echarts.common.min.js 432 KB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function b(t){if(null==t||"object"!=typeof t)return t;var e=t,n=Mh.call(t);if("[object Array]"===n){if(!s(t)){e=[];for(var i=0,r=t.length;i<r;i++)e[i]=b(t[i])}}else if(Sh[n]){if(!s(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(i=0,r=t.length;i<r;i++)e[i]=b(t[i])}}}else if(!bh[n]&&!s(t)&&!w(t))for(var o in e={},t)t.hasOwnProperty(o)&&(e[o]=b(t[o]));return e}function m(t,e,n){if(!O(e)||!O(t))return n?b(e):t;for(var i in e)if(e.hasOwnProperty(i)){var r=t[i],a=e[i];!O(a)||!O(r)||L(a)||L(r)||w(a)||w(r)||o(a)||o(r)||s(a)||s(r)?!n&&i in t||(t[i]=b(e[i])):m(r,a,n)}return t}function h(t,e){for(var n=t[0],i=1,r=t.length;i<r;i++)n=m(n,t[i],e);return n}function k(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function A(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function p(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function i(t,e){function n(){}var i=t.prototype;for(var r in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(r)&&(t.prototype[r]=i[r]);(t.prototype.constructor=t).superClass=e}function e(t,e,n){A(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)}function N(t){return t?"string"!=typeof t&&"number"==typeof t.length:void 0}function D(t,e,n){if(t&&e)if(t.forEach&&t.forEach===Th)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function P(t,e,n){if(t&&e){if(t.map&&t.map===Dh)return t.map(e,n);for(var i=[],r=0,a=t.length;r<a;r++)i.push(e.call(n,t[r],r,t));return i}}function S(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===kh)return t.reduce(e,n,i);for(var r=0,a=t.length;r<a;r++)n=e.call(i,n,t[r],r,t);return n}}function v(t,e,n){if(t&&e){if(t.filter&&t.filter===Ch)return t.filter(e,n);for(var i=[],r=0,a=t.length;r<a;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}}function _(t,e){var n=Ah.call(arguments,2);return function(){return t.apply(e,n.concat(Ah.call(arguments)))}}function y(t){var e=Ah.call(arguments,1);return function(){return t.apply(this,e.concat(Ah.call(arguments)))}}function L(t){return"[object Array]"===Mh.call(t)}function g(t){return"function"==typeof t}function M(t){return"[object String]"===Mh.call(t)}function O(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function o(t){return!!bh[Mh.call(t)]}function x(t){return!!Sh[Mh.call(t)]}function w(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function I(t){return t!=t}function E(){for(var t=0,e=arguments.length;t<e;t++)if(null!=arguments[t])return arguments[t]}function z(t,e){return null!=t?t:e}function B(t,e,n){return null!=t?t:null!=e?e:n}function r(){return Function.call.apply(Ah,arguments)}function a(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 c(t,e){if(!t)throw new Error(e)}function d(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function f(t){t[Nh]=!0}function s(t){return t[Nh]}function l(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=L(t);this.data={};var i=this;t instanceof l?t.each(e):t&&D(t,e)}function T(t){return new l(t)}function u(){}function n(t,e){var n=new Eh(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n}function C(t){var e=new Eh(2);return e[0]=t[0],e[1]=t[1],e}function R(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function F(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function V(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function G(t,e){var n,i,r=(n=e,Math.sqrt((i=n)[0]*i[0]+i[1]*i[1]));return t[1]=0===r?t[0]=0:(t[0]=e[0]/r,e[1]/r),t}function H(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function W(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function X(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Z(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function U(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function Y(t,e){return{target:t,topTarget:e&&e.topTarget}}function q(t,e,n,i,r,a){var o,s,l=t._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!e)return t;o=n,s=t._$eventProcessor,null!=o&&s&&s.normalizeQuery&&(o=s.normalizeQuery(o)),n=o,l[e]||(l[e]=[]);for(var u=0;u<l[e].length;u++)if(l[e][u].h===i)return t;var h={h:i,one:a,query:n,ctx:r||t,callAtLast:i.zrEventfulCallAtLast},c=l[e].length-1,d=l[e][c];return d&&d.callAtLast?l[e].splice(c,0,h):l[e].push(h),t}function j(t,e,n,i,r,a){var o=i+"-"+r,s=t.length;if(a.hasOwnProperty(o))return a[o];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/Vh);return t[n][l]}for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,d=0,f=0;d<s;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[n][d]*j(t,e-1,h,u,r|p,a),f++)}return a[o]=c}function $(t,e,n,i){return n=n||{},i||!wh.canvasSupported?K(t,e,n):wh.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):K(t,e,n),n}function K(t,e,n){if(t.getBoundingClientRect&&wh.domSupported){var i=e.clientX,r=e.clientY;if("CANVAS"===t.nodeName.toUpperCase()){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}var o=t[Wh]||(t[Wh]={}),s=function(t,e){for(var n=e.transformer,i=e.srcCoords,r=!0,a=[],o=[],s=0;s<4;s++){var l=t[s].getBoundingClientRect(),u=2*s,h=l.left,c=l.top;a.push(h,c),r&=i&&h===i[u]&&c===i[u+1],o.push(t[s].offsetLeft,t[s].offsetTop)}return r?n:(e.srcCoords=a,e.transformer=function(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},r=j(n,8,0,0,0,i);if(0!==r){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*j(n,7,0===o?1:0,1<<o,1<<s,i)/r*e[o];return function(t,e,n){var i=e*a[6]+n*a[7]+1;t[0]=(e*a[0]+n*a[1]+a[2])/i,t[1]=(e*a[3]+n*a[4]+a[5])/i}}}(a,o))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),n.push(o)}return n}(t,o),o);if(s)return s(Xh,i,r),n.zrX=Xh[0],void(n.zrY=Xh[1])}n.zrX=n.zrY=0}function Q(t){return t||window.event}function J(t,e,n){if(null!=(e=Q(e)).zrX)return e;var i=e.type;if(i&&0<=i.indexOf("touch")){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&$(t,r,e,n)}else $(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Hh.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function tt(t,e,n,i){Gh?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}function et(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function nt(){Zh(this.event)}function it(){}function rt(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||qh}return!1}function at(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}function ot(){var t=new Kh(6);return st(t),t}function st(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function lt(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],o=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function ut(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function ht(t,e,n){var i=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+o*u,t[1]=-i*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function ct(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function dt(t,e){var n=e[0],i=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=n*o-a*i;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-o*r)*l,t[5]=(a*r-n*s)*l,t):null}function ft(t){return 5e-5<t||t<-5e-5}function pt(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 gt(t){return(t=Math.round(t))<0?0:255<t?255:t}function mt(t){return t<0?0:1<t?1:t}function vt(t){return gt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function yt(t){return mt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function xt(t,e,n){return n<0?n+=1:1<n&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function _t(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function wt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function bt(t,e){dc&&wt(dc,e),dc=cc.put(t,dc||e.slice())}function St(t,e){if(t){e=e||[];var n=cc.get(t);if(n)return wt(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in hc)return wt(e,hc[i]),bt(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),a=i.indexOf(")");if(-1!==r&&a+1===i.length){var o=i.substr(0,r),s=i.substr(r+1,a-(r+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return void _t(e,0,0,0,1);l=yt(s.pop());case"rgb":return 3!==s.length?void _t(e,0,0,0,1):(_t(e,vt(s[0]),vt(s[1]),vt(s[2]),l),bt(t,e),e);case"hsla":return 4!==s.length?void _t(e,0,0,0,1):(s[3]=yt(s[3]),Mt(s,e),bt(t,e),e);case"hsl":return 3!==s.length?void _t(e,0,0,0,1):(Mt(s,e),bt(t,e),e);default:return}}_t(e,0,0,0,1)}else{var u;if(4===i.length)return 0<=(u=parseInt(i.substr(1),16))&&u<=4095?(_t(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),bt(t,e),e):void _t(e,0,0,0,1);if(7===i.length)return 0<=(u=parseInt(i.substr(1),16))&&u<=16777215?(_t(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),bt(t,e),e):void _t(e,0,0,0,1)}}}function Mt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=yt(t[1]),r=yt(t[2]),a=r<=.5?r*(i+1):r+i-r*i,o=2*r-a;return _t(e=e||[],gt(255*xt(o,a,n+1/3)),gt(255*xt(o,a,n)),gt(255*xt(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function It(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function Tt(t,e){return t[e]}function Ct(t,e,n){t[e]=n}function At(t,e,n){return(e-t)*n+t}function Dt(t,e,n){return.5<n?e:t}function kt(t,e,n,i,r){var a=t.length;if(1===r)for(var o=0;o<a;o++)i[o]=At(t[o],e[o],n);else{var s=a&&t[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)i[o][l]=At(t[o][l],e[o][l],n)}}function Pt(t,e,n){var i=t.length,r=e.length;if(i!==r)if(r<i)t.length=r;else for(var a=i;a<r;a++)t.push(1===n?e[a]:fc.call(e[a]));var o=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===n)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 Lt(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;r<i;r++)if(t[r]!==e[r])return!1}else{var a=t[0].length;for(r=0;r<i;r++)for(var o=0;o<a;o++)if(t[r][o]!==e[r][o])return!1}return!0}function Ot(t,e,n,i,r,a,o,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=Nt(t[h],e[h],n[h],i[h],r,a,o);else{var c=t[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=Nt(t[h][d],e[h][d],n[h][d],i[h][d],r,a,o)}}function Nt(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function Et(t){if(N(t)){var e=t.length;if(N(t[0])){for(var n=[],i=0;i<e;i++)n.push(fc.call(t[i]));return n}return fc.call(t)}return t}function zt(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Bt(t,e,n,i,a,r){var o,s,l=t._getter,u=t._setter,h="spline"===e,c=i.length;if(c){var d,f=N(i[0].value),p=!1,g=!1,m=f?N((s=(o=i)[o.length-1].value)&&s[0])?2:1:0;i.sort(function(t,e){return t.time-e.time}),d=i[c-1].time;for(var v=[],y=[],x=i[0].value,_=!0,w=0;w<c;w++){v.push(i[w].time/d);var b=i[w].value;if(f&&Lt(b,x,m)||!f&&b===x||(_=!1),"string"==typeof(x=b)){var S=St(b);S?(b=S,p=!0):g=!0}y.push(b)}if(r||!_){var M=y[c-1];for(w=0;w<c-1;w++)f?Pt(y[w],M,m):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&Pt(l(t._target,a),M,m);var I,T,C,A,D,k=0,P=0;if(p)var L=[0,0,0,0];var O=new pt({target:t._target,life:d,loop:t._loop,delay:t._delay,onframe:function(t,e){var n;if(e<0)n=0;else if(e<P){for(n=Math.min(k+1,c-1);0<=n&&!(v[n]<=e);n--);n=Math.min(n,c-2)}else{for(n=k;n<c&&!(v[n]>e);n++);n=Math.min(n-1,c-2)}P=e;var i=v[(k=n)+1]-v[n];if(0!==i)if(I=(e-v[n])/i,h)if(C=y[n],T=y[0===n?n:n-1],A=y[c-2<n?c-1:n+1],D=y[c-3<n?c-1:n+2],f)Ot(T,C,A,D,I,I*I,I*I*I,l(t,a),m);else{if(p)r=Ot(T,C,A,D,I,I*I,I*I*I,L,1),r=zt(L);else{if(g)return Dt(C,A,I);r=Nt(T,C,A,D,I,I*I,I*I*I)}u(t,a,r)}else if(f)kt(y[n],y[n+1],I,l(t,a),m);else{var r;if(p)kt(y[n],y[n+1],I,L,1),r=zt(L);else{if(g)return Dt(y[n],y[n+1],I);r=At(y[n],y[n+1],I)}u(t,a,r)}},ondestroy:n});return e&&"spline"!==e&&(O.easing=e),O}}}function Rt(t,e,n,i,r,a,o,s){function l(){--h||a&&a()}M(i)?(a=r,r=i,i=0):g(r)?(a=r,r="linear",i=0):g(i)?(a=i,i=0):g(n)?(a=n,n=500):n||(n=500),t.stopAnimation(),function t(e,n,i,r,a,o,s){var l={},u=0;for(var h in r)r.hasOwnProperty(h)&&(null!=i[h]?O(r[h])&&!N(r[h])?t(e,n?n+"."+h:h,i[h],r[h],a,o,s):(s?(l[h]=i[h],Ft(e,n,h,r[h])):l[h]=r[h],u++):null==r[h]||s||Ft(e,n,h,r[h]));0<u&&e.animate(n,!1).when(null==a?500:a,l).delay(o||0)}(t,"",t,e,n,i,s);var u=t.animators.slice(),h=u.length;h||a&&a();for(var c=0;c<u.length;c++)u[c].done(l).start(r,o)}function Ft(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}function Vt(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function Gt(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r<n&&i(t[r],t[r-1])<0;)r++;!function(t,e,n){for(n--;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,r)}else for(;r<n&&0<=i(t[r],t[r-1]);)r++;return r-e}function Ht(t,e,n,i,r){for(i===e&&i++;i<n;i++){for(var a,o=t[i],s=e,l=i;s<l;)r(o,t[a=s+l>>>1])<0?l=a:s=a+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=o}}function Wt(t,e,n,i,r,a){var o=0,s=0,l=1;if(0<a(t,e[n+r])){for(s=i-r;l<s&&0<a(t,e[n+r+l]);)(l=1+((o=l)<<1))<=0&&(l=s);s<l&&(l=s),o+=r,l+=r}else{for(s=r+1;l<s&&a(t,e[n+r-l])<=0;)(l=1+((o=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o<l;){var h=o+(l-o>>>1);0<a(t,e[n+h])?o=h+1:l=h}return l}function Xt(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])<0){for(s=r+1;l<s&&a(t,e[n+r-l])<0;)(l=1+((o=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=i-r;l<s&&0<=a(t,e[n+r+l]);)(l=1+((o=l)<<1))<=0&&(l=s);s<l&&(l=s),o+=r,l+=r}for(o++;o<l;){var h=o+(l-o>>>1);a(t,e[n+h])<0?l=h:o=h+1}return l}function Zt(p,g){function e(t){var e=o[t],n=s[t],i=o[t+1],r=s[t+1];s[t]=n+r,t===l-3&&(o[t+1]=o[t+2],s[t+1]=s[t+2]),l--;var a=Xt(p[i],p,e,n,0,g);e+=a,0!==(n-=a)&&(0!==(r=Wt(p[e+n-1],p,i,r,r-1,g))&&(n<=r?function(t,e,n,i){var r=0;for(r=0;r<e;r++)v[r]=p[t+r];var a=0,o=n,s=t;if(p[s++]=p[o++],0!=--i){if(1===e){for(r=0;r<i;r++)p[s+r]=p[o+r];return p[s+i]=v[a]}for(var l,u,h,c=m;;){u=l=0,h=!1;do{if(g(p[o],v[a])<0){if(p[s++]=p[o++],u++,(l=0)==--i){h=!0;break}}else if(p[s++]=v[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=Xt(p[o],v,a,e,0,g))){for(r=0;r<l;r++)p[s+r]=v[a+r];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(p[s++]=p[o++],0==--i){h=!0;break}if(0!==(u=Wt(v[a],p,o,i,0,g))){for(r=0;r<u;r++)p[s+r]=p[o+r];if(s+=u,o+=u,0===(i-=u)){h=!0;break}}if(p[s++]=v[a++],1==--e){h=!0;break}c--}while(kc<=l||kc<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(r=0;r<i;r++)p[s+r]=p[o+r];p[s+i]=v[a]}else{if(0===e)throw new Error;for(r=0;r<e;r++)p[s+r]=v[a+r]}}else for(r=0;r<e;r++)p[s+r]=v[a+r]}(e,n,i,r):function(t,e,n,i){var r=0;for(r=0;r<i;r++)v[r]=p[n+r];var a=t+e-1,o=i-1,s=n+i-1,l=0,u=0;if(p[s--]=p[a--],0!=--e){if(1===i){for(u=(s-=e)+1,l=(a-=e)+1,r=e-1;0<=r;r--)p[u+r]=p[l+r];return p[s]=v[o]}for(var h=m;;){var c=0,d=0,f=!1;do{if(g(v[o],p[a])<0){if(p[s--]=p[a--],c++,(d=0)==--e){f=!0;break}}else if(p[s--]=v[o--],d++,c=0,1==--i){f=!0;break}}while((c|d)<h);if(f)break;do{if(0!==(c=e-Xt(v[o],p,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(a-=c)+1,r=c-1;0<=r;r--)p[u+r]=p[l+r];if(0===e){f=!0;break}}if(p[s--]=v[o--],1==--i){f=!0;break}if(0!==(d=i-Wt(p[a],v,0,i,i-1,g))){for(i-=d,u=(s-=d)+1,l=(o-=d)+1,r=0;r<d;r++)p[u+r]=v[l+r];if(i<=1){f=!0;break}}if(p[s--]=p[a--],0==--e){f=!0;break}h--}while(kc<=c||kc<=d);if(f)break;h<0&&(h=0),h+=2}if((m=h)<1&&(m=1),1===i){for(u=(s-=e)+1,l=(a-=e)+1,r=e-1;0<=r;r--)p[u+r]=p[l+r];p[s]=v[o]}else{if(0===i)throw new Error;for(l=s-(i-1),r=0;r<i;r++)p[l+r]=v[r]}}else for(l=s-(i-1),r=0;r<i;r++)p[l+r]=v[r]}(e,n,i,r)))}var o,s,m=kc,l=0,v=[];o=[],s=[],this.mergeRuns=function(){for(;1<l;){var t=l-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<l;){var t=l-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){o[l]=t,s[l]=e,l+=1}}function Ut(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var a=0;if(r<Dc)return void Ht(t,n,i,n+(a=Gt(t,n,i,e)),e);var o=new Zt(t,e),s=function(t){for(var e=0;Dc<=t;)e|=1&t,t>>=1;return t+e}(r);do{if((a=Gt(t,n,i,e))<s){var l=r;s<l&&(l=s),Ht(t,n,n+l,n+a,e),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}function Yt(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function qt(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(i,a,r,o)}function jt(t,e,n){var i=n.width,r=n.height,a=Math.min(i,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*i+n.x,s=s*r+n.y,l*=a),t.createRadialGradient(o,s,0,o,s,l)}function $t(){return!1}function Kt(t,e,n){var i=Lh(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}function Qt(t){if("string"!=typeof t)return t;var e=Xc.get(t);return e&&e.image}function Jt(t,e,n,i,r){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var a=Xc.get(t),o={hostEl:n,cb:i,cbPayload:r};return a?!ee(e=a.image)&&a.pending.push(o):((e=new Image).onload=e.onerror=te,Xc.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return e}function te(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function ee(t){return t&&t.width&&t.height}function ne(t,e){var n,i,r=t+":"+(e=e||jc);if(Zc[r])return Zc[r];for(var a=(t+"").split("\n"),o=0,s=0,l=a.length;s<l;s++)o=Math.max((n=a[s],i=e,$c.measureText(n,i)).width,o);return Yc<Uc&&(Uc=0,Zc={}),Uc++,Zc[r]=o}function ie(t,e,n,i,r,a,o,s){return o?(u=i,h=fe(t,{rich:o,truncate:s,font:e,textAlign:l=n,textPadding:r,textLineHeight:a}),c=h.outerWidth,d=h.outerHeight,f=re(0,c,l),p=ae(0,d,u),new Vt(f,p,c,d)):function(t,e,n,i,r,a,o){var s=de(t,e,r,a,o),l=ne(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=re(0,l,n),c=ae(0,u,i),d=new Vt(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,n,i,r,a,s);var l,u,h,c,d,f,p}function re(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function ae(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function oe(t,e,n){var i=e.textPosition,r=e.textDistance,a=n.x,o=n.y;r=r||0;var s=n.height,l=n.width,u=s/2,h="left",c="top";switch(i){case"left":a-=r,o+=u,h="right",c="middle";break;case"right":a+=r+l,o+=u,c="middle";break;case"top":a+=l/2,o-=r,h="center",c="bottom";break;case"bottom":a+=l/2,o+=s+r,h="center";break;case"inside":a+=l/2,o+=u,h="center",c="middle";break;case"insideLeft":a+=r,o+=u,c="middle";break;case"insideRight":a+=l-r,o+=u,h="right",c="middle";break;case"insideTop":a+=l/2,o+=r,h="center";break;case"insideBottom":a+=l/2,o+=s-r,h="center",c="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,h="right";break;case"insideBottomLeft":a+=r,o+=s-r,c="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,h="right",c="bottom"}return(t=t||{}).x=a,t.y=o,t.textAlign=h,t.textVerticalAlign=c,t}function se(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=le(e,n,i,r);for(var o=0,s=a.length;o<s;o++)a[o]=ue(a[o],r);return a.join("\n")}function le(t,e,n,i){(i=k({},i)).font=e;n=z(n,"...");i.maxIterations=z(i.maxIterations,2);var r=i.minChar=z(i.minChar,0);i.cnCharWidth=ne("国",e);var a=i.ascCharWidth=ne("a",e);i.placeholder=z(i.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<r&&a<=o;s++)o-=a;var l=ne(n,e);return o<l&&(n="",l=0),o=t-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=o,i.containerWidth=t,i}function ue(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=ne(t,i);if(a<=n)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?he(t,r,e.ascCharWidth,e.cnCharWidth):0<a?Math.floor(t.length*r/a):0;a=ne(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function he(t,e,n,i){for(var r=0,a=0,o=t.length;a<o&&r<e;a++){var s=t.charCodeAt(a);r+=0<=s&&s<=127?n:i}return a}function ce(t){return ne("国",t)}function de(t,e,n,i,r){null!=t&&(t+="");var a=z(i,ce(e)),o=t?t.split("\n"):[],s=o.length*a,l=s,u=!0;if(n&&(l+=n[0]+n[2]),t&&r){u=!1;var h=r.outerHeight,c=r.outerWidth;if(null!=h&&h<l)t="",o=[];else if(null!=c)for(var d=le(c-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=o.length;f<p;f++)o[f]=ue(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function fe(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=qc.lastIndex=0;null!=(i=qc.exec(t));){var a=i.index;r<a&&pe(n,t.substring(r,a)),pe(n,i[2],i[1]),r=qc.lastIndex}r<t.length&&pe(n,t.substring(r,t.length));var o=n.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<o.length;p++){for(var g=o[p],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(D=g.tokens[y]).styleName&&e.rich[D.styleName]||{},_=D.textPadding=x.textPadding,w=D.font=x.font||e.font,b=D.textHeight=z(x.textHeight,ce(w));if(_&&(b+=_[0]+_[2]),D.height=b,D.lineHeight=B(x.textLineHeight,e.textLineHeight,b),D.textAlign=x&&x.textAlign||e.textAlign,D.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+D.lineHeight>f)return{lines:[],width:0,height:0};D.textWidth=ne(D.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,u.push(D),S=0;else{if(M){S=D.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&(ee(T=Qt(T))&&(S=Math.max(S,T.width*b/T.height)))}var C=_?_[1]+_[3]:0;S+=C;var A=null!=d?d-v:null;null!=A&&A<S&&(!M||A<C?(D.text="",D.textWidth=S=0):(D.text=se(D.text,A-C,w,c.ellipsis,{minChar:c.minChar}),D.textWidth=ne(D.text,w),S=D.textWidth+C))}v+=D.width=S,x&&(m=Math.max(m,D.lineHeight))}g.width=v,s+=g.lineHeight=m,l=Math.max(l,v)}n.outerWidth=n.width=z(e.textWidth,l),n.outerHeight=n.height=z(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(p=0;p<u.length;p++){var D,k=(D=u[p]).percentWidth;D.width=parseInt(k,10)/100*l}return n}function pe(t,e,n){for(var i=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||i)&&u.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&&d(e)||t.textFont||t.font}function me(t,e){var n,i,r,a,o,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=a=c:c instanceof Array?1===c.length?n=i=r=a=c[0]:2===c.length?(n=r=c[0],i=a=c[1]):3===c.length?(n=c[0],i=a=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],a=c[3]):n=i=r=a=0,u<n+i&&(n*=u/(o=n+i),i*=u/o),u<r+a&&(r*=u/(o=r+a),a*=u/o),h<i+r&&(i*=h/(o=i+r),r*=h/o),h<n+a&&(n*=h/(o=n+a),a*=h/o),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}function 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||Qc[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||Jc[n]?n:"top",t.textPadding&&(t.textPadding=a(t.textPadding))}}function xe(t,e,n,i,r,a){i.rich?function(t,e,n,i,r,a){a!==Ec&&(e.__attrCachedBy=Nc.NONE);var o=t.__textCotentBlock;(!o||t.__dirtyText)&&(o=t.__textCotentBlock=fe(n,i)),function(t,e,n,i,r){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=Ie(nd,t,i,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;_e(e,i,r,h,c);var p=re(h,o,d),g=ae(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;be(i)&&Se(t,e,i,p,g,o,s);for(var x=0;x<n.lines.length;x++){for(var _,w=n.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,C=m,A=y,D=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)we(t,e,_,i,M,v,C,"left"),I-=_.width,C+=_.width,T++;for(;0<=D&&"right"===(_=b[D]).textAlign;)we(t,e,_,i,M,v,A,"right"),I-=_.width,A-=_.width,D--;for(C+=(a-(C-m)-(y-A)-I)/2;T<=D;)_=b[T],we(t,e,_,i,M,v,C+_.width/2,"center"),C+=_.width,T++;v+=M}}(t,e,o,i,r)}(t,e,n,i,r,a):function(t,e,n,i,r,a){var o,s=be(i),l=!1,u=e.__attrCachedBy===Nc.PLAIN_TEXT;a!==Ec?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?Nc.NONE:Nc.PLAIN_TEXT):u&&(e.__attrCachedBy=Nc.NONE);var h=i.font||Kc;l&&h===(o.font||Kc)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=i.textPadding,f=i.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=de(n,c,d,f,i.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=Ie(nd,t,i,r),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;_e(e,i,r,x,_);var S=ae(_,g,b),M=x,I=S;if(s||d){var T=ne(n,c),C=T;d&&(C+=d[1]+d[3]);var A=re(x,C,w);s&&Se(t,e,i,A,S,C,g),d&&(M=ke(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var D=0;D<td.length;D++){var k=td[D],P=k[0],L=k[1],O=i[P];l&&O===o[P]||(e[L]=Oc(e,L,O||k[2]))}I+=v/2;var N=i.textStrokeWidth,E=l?o.textStrokeWidth:null,z=!l||N!==E,B=!l||z||i.textStroke!==o.textStroke,R=Ce(i.textStroke,N),F=Ae(i.textFill);if(R&&(z&&(e.lineWidth=N),B&&(e.strokeStyle=R)),F&&(l&&i.textFill===o.textFill||(e.fillStyle=F)),1===m.length)R&&e.strokeText(m[0],M,I),F&&e.fillText(m[0],M,I);else for(var D=0;D<m.length;D++)R&&e.strokeText(m[D],M,I),F&&e.fillText(m[D],M,I),I+=v}(t,e,n,i,r,a)}function _e(t,e,n,i,r){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function we(t,e,n,i,r,a,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,h=a+r/2;"top"===u?h=a+n.height/2:"bottom"===u&&(h=a+r-n.height/2),!n.isLineHolder&&be(l)&&Se(t,e,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,h-n.height/2,n.width,n.height);var c=n.textPadding;c&&(o=ke(o,s,c),h-=n.height/2-c[2]-n.textHeight/2),Te(e,"shadowBlur",B(l.textShadowBlur,i.textShadowBlur,0)),Te(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Te(e,"shadowOffsetX",B(l.textShadowOffsetX,i.textShadowOffsetX,0)),Te(e,"shadowOffsetY",B(l.textShadowOffsetY,i.textShadowOffsetY,0)),Te(e,"textAlign",s),Te(e,"textBaseline","middle"),Te(e,"font",n.font||Kc);var d=Ce(l.textStroke||i.textStroke,p),f=Ae(l.textFill||i.textFill),p=z(l.textStrokeWidth,i.textStrokeWidth);d&&(Te(e,"lineWidth",p),Te(e,"strokeStyle",d),e.strokeText(n.text,o,h)),f&&(Te(e,"fillStyle",f),e.fillText(n.text,o,h))}function be(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Se(t,e,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,h=M(s);if(Te(e,"shadowBlur",n.textBoxShadowBlur||0),Te(e,"shadowColor",n.textBoxShadowColor||"transparent"),Te(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Te(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=n.textBorderRadius;c?me(e,{x:i,y:r,width:a,height:o,r:c}):e.rect(i,r,a,o),e.closePath()}if(h)if(Te(e,"fillStyle",s),null!=n.fillOpacity){var d=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(O(s)){var f=s.image;(f=Jt(f,null,t,Me,s))&&ee(f)&&e.drawImage(f,i,r,a,o)}if(l&&u)if(Te(e,"lineWidth",l),Te(e,"strokeStyle",u),null!=n.strokeOpacity){d=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function Me(t,e){e.image=t}function Ie(t,e,n,i){var r=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)r=i.x+De(l[0],i.width),a=i.y+De(l[1],i.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(ed,n,i):oe(ed,n,i);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=n.textOffset;h&&(r+=h[0],a+=h[1])}return(t=t||{}).baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function Te(t,e,n){return t[e]=Oc(t,e,n),t[e]}function Ce(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ae(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function De(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function ke(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[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||{},_c.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Bc(t.style,this),this._rect=null,this.__clipPaths=null}function Oe(t){Le.call(this,t)}function Ne(t){return parseInt(t,10)}function Ee(t){return"mousewheel"===t&&wh.browser.firefox?"DOMMouseScroll":t}function ze(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Be(t){t&&(t.zrByTouch=!0)}function Re(t,e){for(var n=!1;(e=e&&e.parentNode)&&9!==e.nodeType&&!(n=e===t.painterRoot););return n}function Fe(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}function Ve(i,r){var a=r.domHandlers;wh.pointerEventsSupported?D(fd.pointer,function(e){He(r,e,function(t){a[e].call(i,t)})}):(wh.touchEventsSupported&&D(fd.touch,function(n){He(r,n,function(t){var e;a[n].call(i,t),(e=r).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),D(fd.mouse,function(e){He(r,e,function(t){t=Q(t),r.touching||a[e].call(i,t)})}))}function Ge(r,a){function t(i){He(a,i,function(t){var e,n;t=Q(t),Re(r,t.target)||(n=t,t=J((e=r).dom,new Fe(e,n),!0),a.domHandlers[i].call(r,t))},{capture:!0})}wh.pointerEventsSupported?D(pd.pointer,t):wh.touchEventsSupported||D(pd.mouse,t)}function He(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,tt(t.domTarget,Ee(e),n,i)}function We(t){var e,n,i,r,a=t.mounted;for(var o in a)a.hasOwnProperty(o)&&(e=t.domTarget,n=Ee(o),i=a[o],r=t.listenerOpts[o],Gh?e.removeEventListener(n,i,r):e.detachEvent("on"+n,i));t.mounted={}}function Xe(t,e){if(t._mayPointerCapture=null,dd&&t._pointerCapturing^e){t._pointerCapturing=e;var n=t._globalHandlerScope;e?Ge(t,n):We(n)}}function Ze(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function Ue(t,e){Fh.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Ze(t,md),dd&&(this._globalHandlerScope=new Ze(document,vd)),this._pointerCapturing=!1,this._mayPointerCapture=null,Ve(this,this._localHandlerScope)}function Ye(t,e){return new wd(_h(),t,e)}function qe(t){return t instanceof Array?t:null==t?[]:[t]}function je(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function $e(t){return!Sd(t)||Md(t)||t instanceof Date?t:t.value}function Ke(t,r){r=(r||[]).slice();var a=P(t||[],function(t){return{exist:t}});return bd(r,function(t,e){if(Sd(t)){for(var n=0;n<a.length;n++)if(!a[n].option&&null!=t.id&&a[n].exist.id===t.id+"")return a[n].option=t,void(r[e]=null);for(n=0;n<a.length;n++){var i=a[n].exist;if(!(a[n].option||null!=i.id&&null!=t.id||null==t.name||Je(t)||Je(i)||i.name!==t.name+""))return a[n].option=t,void(r[e]=null)}}}),bd(r,function(t){if(Sd(t)){for(var e=0;e<a.length;e++){var n=a[e].exist;if(!a[e].option&&!Je(n)&&null==t.id){a[e].option=t;break}}e>=a.length&&a.push({option:t})}}),a}function Qe(t){var e=t.name;return!(!e||!e.indexOf(Id))}function Je(t){return Sd(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function tn(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?L(t.dataIndex)?P(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?L(t.name)?P(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function en(){var e="__\0ec_inner_"+Cd+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}function nn(s,l,u){if(M(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||rn(l,e+"Index")||rn(l,e+"Id")||rn(l,e+"Name")||(l[e+"Index"]=0);var h={};return bd(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var n=e.match(/^(\w+)(Index|Id|Name)$/)||[],i=n[1],r=(n[2]||"").toLowerCase();if(!(!i||!r||null==t||"index"===r&&"none"===t||u&&u.includeMainTypes&&p(u.includeMainTypes,i)<0)){var a={mainType:i};("index"!==r||"all"!==t)&&(a[r]=t);var o=s.queryComponents(a);h[i+"Models"]=o,h[i+"Model"]=o[0]}}else h[e]=t}),h}function rn(t,e){return t&&t.hasOwnProperty(e)}function an(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function on(t){return"auto"===t?wh.domSupported?"html":"richText":t||"html"}function sn(t){var e={main:"",sub:""};return t&&(t=t.split(Ad),e.main=t[0]||"",e.sub=t[1]||""),e}function ln(t){(t.$constructor=t).extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return k(n.prototype,t),n.extend=this.extend,n.superCall=hn,n.superApply=cn,i(n,this),n.superClass=e,n}}function un(t){var e=["__\0is_clz",kd++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function hn(t,e){var n=r(arguments,2);return this.superClass.prototype[e].apply(t,n)}function cn(t,e,n){return this.superClass.prototype[e].apply(t,n)}function dn(n,t){t=t||{};var a={};if(n.registerClass=function(t,e){if(e)if(c(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r=e),'componentType "'+r+'" illegal'),(e=sn(e)).sub){if(e.sub!==Dd)((i=a[(n=e).main])&&i[Dd]||((i=a[n.main]={})[Dd]=!0),i)[e.sub]=t}else a[e.main]=t;var n,i,r;return t},n.getClass=function(t,e,n){var i=a[t];if(i&&i[Dd]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=sn(t);var n=[],e=a[t.main];return e&&e[Dd]?D(e,function(t,e){e!==Dd&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=sn(t),!!a[t.main]},n.getAllClassMainTypes=function(){var n=[];return D(a,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=sn(t);var e=a[t.main];return e&&e[Dd]},n.parseClassType=sn,t.registerWhenExtend){var i=n.extend;i&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)})}return n}function fn(t){return-Rd<t&&t<Rd}function pn(t){return Rd<t||t<-Rd}function gn(t,e,n,i,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*i+3*a*n)}function mn(t,e,n,i,r){var a=1-r;return 3*(((e-t)*a+2*(n-e)*r)*a+(i-n)*r*r)}function vn(t,e,n,i,r){var a=6*n-12*e+6*t,o=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(fn(o)){if(pn(a))0<=(h=-s/a)&&h<=1&&(r[l++]=h)}else{var u=a*a-4*o*s;if(fn(u))r[0]=-a/(2*o);else if(0<u){var h,c=Bd(u),d=(-a-c)/(2*o);0<=(h=(-a+c)/(2*o))&&h<=1&&(r[l++]=h),0<=d&&d<=1&&(r[l++]=d)}}return l}function yn(t,e,n,i,r,a){var o=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i}function xn(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function _n(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function wn(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function bn(t,e,n,i,r){var a=(e-t)*i+t,o=(n-e)*i+e,s=(o-a)*i+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n}function Sn(t,e,n,i,r,a){r[0]=Zd(t,n),r[1]=Zd(e,i),a[0]=Ud(t,n),a[1]=Ud(e,i)}function Mn(t,e,n,i,r,a,o,s,l,u){var h,c=vn,d=gn,f=c(t,n,r,o,Jd);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,n,r,o,Jd[h]);l[0]=Zd(p,l[0]),u[0]=Ud(p,u[0])}for(f=c(e,i,a,s,tf),h=0;h<f;h++){var g=d(e,i,a,s,tf[h]);l[1]=Zd(g,l[1]),u[1]=Ud(g,u[1])}l[0]=Zd(t,l[0]),u[0]=Ud(t,u[0]),l[0]=Zd(o,l[0]),u[0]=Ud(o,u[0]),l[1]=Zd(e,l[1]),u[1]=Ud(e,u[1]),l[1]=Zd(s,l[1]),u[1]=Ud(s,u[1])}function In(t,e,n,i,r,a,o,s,l){var u=X,h=Z,c=Math.abs(r-a);if(c%jd<1e-4&&1e-4<c)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if($d[0]=qd(r)*n+t,$d[1]=Yd(r)*i+e,Kd[0]=qd(a)*n+t,Kd[1]=Yd(a)*i+e,u(s,$d,Kd),h(l,$d,Kd),(r%=jd)<0&&(r+=jd),(a%=jd)<0&&(a+=jd),a<r&&!o?a+=jd:r<a&&o&&(r+=jd),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)r<f&&(Qd[0]=qd(f)*n+t,Qd[1]=Yd(f)*i+e,u(s,Qd,s),h(l,Qd,l))}function Tn(t,e,n,i,r,a,o){if(0===r)return!1;var s,l=r;if(e+l<o&&i+l<o||o<e-l&&o<i-l||t+l<a&&n+l<a||a<t-l&&a<n-l)return!1;if(t===n)return Math.abs(a-t)<=l/2;var u=(s=(e-i)/(t-n))*a-o+(t*i-n*e)/(t-n);return u*u/(s*s+1)<=l/2*l/2}function Cn(t,e,n,i,r,a,o,s,l,u,h){if(0===l)return!1;var c=l;return!(e+c<h&&i+c<h&&a+c<h&&s+c<h||h<e-c&&h<i-c&&h<a-c&&h<s-c||t+c<u&&n+c<u&&r+c<u&&o+c<u||u<t-c&&u<n-c&&u<r-c&&u<o-c)&&function(t,e,n,i,r,a,o,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;Hd[0]=l,Hd[1]=u;for(var y=0;y<1;y+=.05)Wd[0]=gn(t,n,r,o,y),Wd[1]=gn(e,i,a,s,y),(p=Bh(Hd,Wd))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<Fd);x++)d=c-m,f=c+m,Wd[0]=gn(t,n,r,o,d),Wd[1]=gn(e,i,a,s,d),p=Bh(Wd,Hd),0<=d&&p<v?(c=d,v=p):(Xd[0]=gn(t,n,r,o,f),Xd[1]=gn(e,i,a,s,f),g=Bh(Xd,Hd),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=gn(t,n,r,o,c),h[1]=gn(e,i,a,s,c)),Bd(v)}(t,e,n,i,r,a,o,s,u,h,null)<=c/2}function An(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;return!(e+u<l&&i+u<l&&a+u<l||l<e-u&&l<i-u&&l<a-u||t+u<s&&n+u<s&&r+u<s||s<t-u&&s<n-u&&s<r-u)&&function(t,e,n,i,r,a,o,s,l){var u,h=.005,c=1/0;Hd[0]=o,Hd[1]=s;for(var d=0;d<1;d+=.05)Wd[0]=xn(t,n,r,d),Wd[1]=xn(e,i,a,d),(m=Bh(Hd,Wd))<c&&(u=d,c=m);c=1/0;for(var f=0;f<32&&!(h<Fd);f++){var p=u-h,g=u+h;Wd[0]=xn(t,n,r,p),Wd[1]=xn(e,i,a,p);var m=Bh(Wd,Hd);if(0<=p&&m<c)u=p,c=m;else{Xd[0]=xn(t,n,r,g),Xd[1]=xn(e,i,a,g);var v=Bh(Xd,Hd);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=xn(t,n,r,u),l[1]=xn(e,i,a,u)),Bd(c)}(t,e,n,i,r,a,s,l,null)<=u/2}function Dn(t){return(t%=gf)<0&&(t+=gf),t}function kn(t,e,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(n<h-u||h+u<n)return!1;if(Math.abs(i-r)%mf<1e-4)return!0;if(a){var c=i;i=Dn(r),r=Dn(c)}else i=Dn(i),r=Dn(r);r<i&&(r+=mf);var d=Math.atan2(l,s);return d<0&&(d+=mf),i<=d&&d<=r||i<=d+mf&&d+mf<=r}function Pn(t,e,n,i,r,a){if(e<a&&i<a||a<e&&a<i)return 0;if(i===e)return 0;var o=i<e?1:-1,s=(a-e)/(i-e);(1===s||0===s)&&(o=i<e?.5:-.5);var l=s*(n-t)+t;return l===r?1/0:r<l?o:0}function Ln(t,e,n,i,r,a,o,s,l,u){if(e<u&&i<u&&a<u&&s<u||u<e&&u<i&&u<a&&u<s)return 0;var h,c=function(t,e,n,i,r,a){var o=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(fn(h)&&fn(c))fn(s)?a[0]=0:0<=(M=-l/s)&&M<=1&&(a[f++]=M);else{var p=c*c-4*h*d;if(fn(p)){var g=c/h,m=-g/2;0<=(M=-s/o+g)&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m)}else if(0<p){var v=Bd(p),y=h*s+1.5*o*(-c+v),x=h*s+1.5*o*(-c-v);0<=(M=(-s-((y=y<0?-zd(-y,Gd):zd(y,Gd))+(x=x<0?-zd(-x,Gd):zd(x,Gd))))/(3*o))&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*o*c)/(2*Bd(h*h*h)),w=Math.acos(_)/3,b=Bd(h),S=Math.cos(w),M=(-s-2*b*S)/(3*o),I=(m=(-s+b*(S+Vd*Math.sin(w)))/(3*o),(-s+b*(S-Vd*Math.sin(w)))/(3*o));0<=M&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m),0<=I&&I<=1&&(a[f++]=I)}}return f}(e,i,a,s,u,_f);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=_f[m],y=0===v||1===v?.5:1;gn(t,n,r,o,v)<l||(g<0&&(g=vn(e,i,a,s,wf),wf[1]<wf[0]&&1<g&&(void 0,h=wf[0],wf[0]=wf[1],wf[1]=h),d=gn(e,i,a,s,wf[0]),1<g&&(f=gn(e,i,a,s,wf[1]))),p+=2===g?v<wf[0]?d<e?y:-y:v<wf[1]?f<d?y:-y:s<f?y:-y:v<wf[0]?d<e?y:-y:s<d?y:-y)}return p}function On(t,e,n,i,r,a,o,s){if(e<s&&i<s&&a<s||s<e&&s<i&&s<a)return 0;var l=function(t,e,n,i,r){var a=t-2*e+n,o=2*(e-t),s=t-i,l=0;if(fn(a))pn(o)&&0<=(h=-s/o)&&h<=1&&(r[l++]=h);else{var u=o*o-4*a*s;if(fn(u))0<=(h=-o/(2*a))&&h<=1&&(r[l++]=h);else if(0<u){var h,c=Bd(u),d=(-o-c)/(2*a);0<=(h=(-o+c)/(2*a))&&h<=1&&(r[l++]=h),0<=d&&d<=1&&(r[l++]=d)}}return l}(e,i,a,s,_f);if(0===l)return 0;var u=wn(e,i,a);if(0<=u&&u<=1){for(var h=0,c=xn(e,i,a,u),d=0;d<l;d++){var f=0===_f[d]||1===_f[d]?.5:1;xn(t,n,r,_f[d])<o||(h+=_f[d]<u?c<e?f:-f:a<c?f:-f)}return h}f=0===_f[0]||1===_f[0]?.5:1;return xn(t,n,r,_f[0])<o?0:a<e?f:-f}function Nn(t,e,n,i,r,a,o,s){if(n<(s-=e)||s<-n)return 0;var l=Math.sqrt(n*n-s*s);_f[0]=-l,_f[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u%yf<1e-4){r=yf;var h=a?1:-1;return o>=_f[i=0]+t&&o<=_f[1]+t?h:0}if(a){l=i;i=Dn(r),r=Dn(l)}else i=Dn(i),r=Dn(r);r<i&&(r+=yf);for(var c=0,d=0;d<2;d++){var f=_f[d];if(o<f+t){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=yf+p),(i<=p&&p<=r||i<=p+yf&&p+yf<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function En(t,e,n,i,r){for(var a=0,o=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===vf.M&&1<h&&(n||(a+=Pn(o,s,l,u,i,r))),1===h&&(l=o=t[h],u=s=t[h+1]),c){case vf.M:o=l=t[h++],s=u=t[h++];break;case vf.L:if(n){if(Tn(o,s,t[h],t[h+1],e,i,r))return!0}else a+=Pn(o,s,t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case vf.C:if(n){if(Cn(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else a+=Ln(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case vf.Q:if(n){if(An(o,s,t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else a+=On(o,s,t[h++],t[h++],t[h],t[h+1],i,r)||0;o=t[h++],s=t[h++];break;case vf.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;1<h?a+=Pn(o,s,x,_,i,r):(l=x,u=_);var w=(i-d)*g/p+d;if(n){if(kn(d,f,g,m,m+v,y,e,w,r))return!0}else a+=Nn(d,f,g,m,m+v,y,w,r);o=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case vf.R:l=o=t[h++],u=s=t[h++];x=l+t[h++],_=u+t[h++];if(n){if(Tn(l,u,x,u,e,i,r)||Tn(x,u,x,_,e,i,r)||Tn(x,_,l,_,e,i,r)||Tn(l,_,l,u,e,i,r))return!0}else a+=Pn(x,u,x,_,i,r),a+=Pn(l,_,l,u,i,r);break;case vf.Z:if(n){if(Tn(o,s,l,u,e,i,r))return!0}else a+=Pn(o,s,l,u,i,r);o=l,s=u}}return n||(b=s,S=u,Math.abs(b-S)<xf)||(a+=Pn(o,s,l,u,i,r)||0),0!==a;var b,S}function zn(t){Le.call(this,t),this.path=null}function Bn(t,e,n,i,r,a,o,s,l,u,h){var c=l*(Of/180),d=Lf(c)*(t-n)/2+Pf(c)*(e-i)/2,f=-1*Pf(c)*(t-n)/2+Lf(c)*(e-i)/2,p=d*d/(o*o)+f*f/(s*s);1<p&&(o*=kf(p),s*=kf(p));var g=(r===a?-1:1)*kf((o*o*s*s-o*o*f*f-s*s*d*d)/(o*o*f*f+s*s*d*d))||0,m=g*o*f/s,v=g*-s*d/o,y=(t+n)/2+Lf(c)*m-Pf(c)*v,x=(e+i)/2+Pf(c)*m+Lf(c)*v,_=zf([1,0],[(d-m)/o,(f-v)/s]),w=[(d-m)/o,(f-v)/s],b=[(-1*d-m)/o,(-1*f-v)/s],S=zf(w,b);Ef(w,b)<=-1&&(S=Of),1<=Ef(w,b)&&(S=0),0===a&&0<S&&(S-=2*Of),1===a&&S<0&&(S+=2*Of),h.addData(u,y,x,o,s,_,S,c,a)}function Rn(t,e){var n=function(t){if(!t)return new pf;for(var e,n=0,i=0,r=n,a=i,o=new pf,s=pf.CMD,l=t.match(Bf),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Rf)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,x,_,w,b,S,M=n,I=i;switch(d){case"l":n+=f[m++],i+=f[m++],h=s.L,o.addData(h,n,i);break;case"L":n=f[m++],i=f[m++],h=s.L,o.addData(h,n,i);break;case"m":n+=f[m++],i+=f[m++],h=s.M,o.addData(h,n,i),r=n,a=i,d="l";break;case"M":n=f[m++],i=f[m++],h=s.M,o.addData(h,n,i),r=n,a=i,d="L";break;case"h":n+=f[m++],h=s.L,o.addData(h,n,i);break;case"H":n=f[m++],h=s.L,o.addData(h,n,i);break;case"v":i+=f[m++],h=s.L,o.addData(h,n,i);break;case"V":i=f[m++],h=s.L,o.addData(h,n,i);break;case"C":h=s.C,o.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),n=f[m-2],i=f[m-1];break;case"c":h=s.C,o.addData(h,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i),n+=f[m-2],i+=f[m-1];break;case"S":v=n,y=i;var T=o.len(),C=o.data;e===s.C&&(v+=n-C[T-4],y+=i-C[T-3]),h=s.C,M=f[m++],I=f[m++],n=f[m++],i=f[m++],o.addData(h,v,y,M,I,n,i);break;case"s":v=n,y=i,T=o.len(),C=o.data,e===s.C&&(v+=n-C[T-4],y+=i-C[T-3]),h=s.C,M=n+f[m++],I=i+f[m++],n+=f[m++],i+=f[m++],o.addData(h,v,y,M,I,n,i);break;case"Q":M=f[m++],I=f[m++],n=f[m++],i=f[m++],h=s.Q,o.addData(h,M,I,n,i);break;case"q":M=f[m++]+n,I=f[m++]+i,n+=f[m++],i+=f[m++],h=s.Q,o.addData(h,M,I,n,i);break;case"T":v=n,y=i,T=o.len(),C=o.data,e===s.Q&&(v+=n-C[T-4],y+=i-C[T-3]),n=f[m++],i=f[m++],h=s.Q,o.addData(h,v,y,n,i);break;case"t":v=n,y=i,T=o.len(),C=o.data,e===s.Q&&(v+=n-C[T-4],y+=i-C[T-3]),n+=f[m++],i+=f[m++],h=s.Q,o.addData(h,v,y,n,i);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Bn(M=n,I=i,n=f[m++],i=f[m++],b,S,x,_,w,h=s.A,o);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Bn(M=n,I=i,n+=f[m++],i+=f[m++],b,S,x,_,w,h=s.A,o)}}("z"===d||"Z"===d)&&(h=s.Z,o.addData(h),n=r,i=a),e=h}return o.toStatic(),o}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;n.rebuildPath(e)}},e.applyTransform=function(t){Df(n,t),this.dirty(!0)},e}function Fn(t,e){return new zn(Rn(t,e))}function Vn(t,e,n,i,r,a,o){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*o+(-3*(e-n)-2*s-l)*a+s*r+e}function Gn(t,e,n){var i=e.points,r=e.smooth;if(i&&2<=i.length){if(r&&"spline"!==r){var a=function(t,e,n,i){var r,a,o,s,l=[],u=[],h=[],c=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)X(o,o,t[d]),Z(s,s,t[d]);X(o,o,i[0]),Z(s,s,i[1])}for(var d=0,f=t.length;d<f;d++){var p=t[d];if(n)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(C(t[d]));continue}r=t[d-1],a=t[d+1]}F(u,a,r),V(u,u,e);var g=H(p,r),m=H(p,a),v=g+m;0!==v&&(g/=v,m/=v),V(h,u,-g),V(c,u,m);var y=R([],p,h),x=R([],p,c);i&&(Z(y,y,o),X(y,y,s),Z(x,x,o),X(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=a[2*s],u=a[2*s+1],h=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(i=function(t,e){for(var n=t.length,i=[],r=0,a=1;a<n;a++)r+=H(t[a-1],t[a]);var o=r/2;o=o<n?n:o;for(var a=0;a<o;a++){var s,l,u,h=a/(o-1)*(e?n:n-1),c=Math.floor(h),d=h-c,f=t[c%n];u=e?(s=t[(c-1+n)%n],l=t[(c+1)%n],t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[n-2<c?n-1:c+1],t[n-3<c?n-1:c+2]);var p=d*d,g=d*p;i.push([Vn(s[0],f[0],l[0],u[0],d,p,g),Vn(s[1],f[1],l[1],u[1],d,p,g)])}return i}(i,n)),t.moveTo(i[0][0],i[0][1]);s=1;for(var c=i.length;s<c;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}function Hn(t,e,n){var i=n&&n.lineWidth;if(e&&i){var r=e.x1,a=e.x2,o=e.y1,s=e.y2;Yf(2*r)===Yf(2*a)?t.x1=t.x2=Xn(r,i,!0):(t.x1=r,t.x2=a),Yf(2*o)===Yf(2*s)?t.y1=t.y2=Xn(o,i,!0):(t.y1=o,t.y2=s)}}function Wn(t,e,n){var i=n&&n.lineWidth;if(e&&i){var r=e.x,a=e.y,o=e.width,s=e.height;t.x=Xn(r,i,!0),t.y=Xn(a,i,!0),t.width=Math.max(Xn(r+o,i,!1)-t.x,0===o?0:1),t.height=Math.max(Xn(a+s,i,!1)-t.y,0===s?0:1)}}function Xn(t,e,n){var i=Yf(2*t);return(i+Yf(e))%2==0?i/2:(i+(n?1:-1))/2}function Zn(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?mn:gn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?mn:gn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?_n:xn)(t.x1,t.cpx1,t.x2,e),(n?_n:xn)(t.y1,t.cpy1,t.y2,e)]}function Un(t){Le.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Yn(t){return zn.extend(t)}function qn(t,e){pp[t]=e}function jn(t,e,n,i){var r=Fn(t,e);return n&&("center"===i&&(n=Kn(n,r.getBoundingRect())),Qn(r,n)),r}function $n(t,n,i){var r=new Oe({style:{image:t,x:n.x,y:n.y,width:n.width,height:n.height},onload:function(t){if("center"===i){var e={width:t.width,height:t.height};r.setStyle(Kn(n,e))}}});return r}function Kn(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}function Qn(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function Jn(t){return null!=t&&"none"!==t}function ti(t){if("string"!=typeof t)return t;var e=vp.get(t);return e||(e=function(t,e){var n=St(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:t[i]<0&&(n[i]=0);return It(n,4===n.length?"rgba":"rgb")}}(t,-.1),yp<1e4&&(vp.set(t,e),yp++)),e}function ei(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.__zr,i=t.useHoverLayer&&n&&"canvas"===n.painter.type;if(t.__highlighted=i?"layer":"plain",!(t.isGroup||!n&&t.useHoverLayer)){var r=t,a=t.style;i&&(a=(r=n.addHover(t)).style),wi(a),i||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e)return t.__cachedNormalStl=t.__cachedNormalZ2=null;var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var i=t.style;for(var r in e)null!=e[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}}(r),a.extendFrom(e),ni(a,e,"fill"),ni(a,e,"stroke"),_i(a),i||(t.dirty(!1),t.z2+=up)}}}function ni(t,e,n){!Jn(e[n])&&Jn(t[n])&&(t[n]=ti(t[n]))}function ii(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var n=t.style,i=t.__cachedNormalStl;i&&(wi(n),t.setStyle(i),_i(n));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===up&&(t.z2=r)}}function ri(t,e,n){var i,r=cp,a=cp;t.__highlighted&&(r=hp,i=!0),e(t,n),t.__highlighted&&(a=hp,i=!0),t.isGroup&&t.traverse(function(t){!t.isGroup&&e(t,n)}),i&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function ai(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,ii(t),ei(t))}function oi(t){!hi(this,t)&&!this.__highByOuter&&ri(this,ei)}function si(t){!hi(this,t)&&!this.__highByOuter&&ri(this,ii)}function li(t){this.__highByOuter|=1<<(t||0),ri(this,ei)}function ui(t){!(this.__highByOuter&=~(1<<(t||0)))&&ri(this,ii)}function hi(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function ci(t,e){di(t,!0),ri(t,ai,e)}function di(t,e){var n=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!n||t.__highDownDispatcher){var i=n?"off":"on";t[i]("mouseover",oi)[i]("mouseout",si),t[i]("emphasis",li)[i]("normal",ui),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!n}}function fi(t){return!(!t||!t.__highDownDispatcher)}function pi(t){var e=fp[t];return null==e&&dp<=32&&(e=fp[t]=dp++),e}function gi(t,e,n,i,r,a,o){var s,l=(r=r||lp).labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=g(r.defaultText)?r.defaultText(u,r):r.defaultText));var f=c?s:null,p=d?z(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(mi(t,n,a,r),mi(e,i,o,r,!0)),t.text=f,e.text=p}function mi(t,e,n,i,r){return vi(t,e,i,r),n&&k(t,n),t}function vi(t,e,n,i){if((n=n||lp).isRectText){var r;n.getTextPosition?r=n.getTextPosition(e,i):"outside"===(r=e.getShallow("position")||(i?null:"inside"))&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=z(e.getShallow("distance"),i?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,u=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||lp).rich;if(n)for(var i in e=e||{},n)n.hasOwnProperty(i)&&(e[i]=1);t=t.parentModel}return e}(e);if(u)for(var h in o={},u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);yi(o[h]={},c,l,n,i)}return t.rich=o,yi(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function yi(t,e,n,i,r,a){n=!r&&n||lp,t.textFill=xi(e.getShallow("color"),i)||n.color,t.textStroke=xi(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=z(e.getShallow("textBorderWidth"),n.textBorderWidth),r||(a&&(t.insideRollbackOpt=i,_i(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&i.disableBox||(t.textBackgroundColor=xi(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=xi(e.getShallow("borderColor"),i),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function xi(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function _i(t){var e,n=t.textPosition,i=t.insideRollbackOpt;if(i&&null==t.textFill){var r=i.autoColor,a=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||a&&n&&"string"==typeof n&&0<=n.indexOf("inside")),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function wi(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function bi(t,e){var n=e&&e.getModel("textStyle");return d([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function Si(t,e,n,i,r,a){if("function"==typeof r&&(a=r,r=null),i&&i.isAnimationEnabled()){var o=t?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),u=i.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),0<s?e.animateTo(n,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function Mi(t,e,n,i,r){Si(!0,t,e,n,i,r)}function Ii(t,e,n,i,r){Si(!1,t,e,n,i,r)}function Ti(t,e){for(var n=st([]);t&&t!==e;)lt(n,t.getLocalTransform(),n),t=t.parent;return n}function Ci(t,e,n){return e&&!N(e)&&(e=Jh.getLocalTransform(e)),n&&(e=dt([],e)),W([],t,e)}function Ai(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return a=Ci(a,e,n),Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"}function Di(t,e,i){function r(t){var e={position:C(t.position),rotation:t.rotation};return t.shape&&(e.shape=k({},t.shape)),e}if(t&&e){var a=(n={},t.traverse(function(t){!t.isGroup&&t.anid&&(n[t.anid]=t)}),n);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=r(t);t.attr(r(e)),Mi(t,n,i,t.dataIndex)}}})}var n}function ki(t,i){return P(t,function(t){var e=t[0];e=op(e,i.x),e=sp(e,i.x+i.width);var n=t[1];return n=op(n,i.y),[e,n=sp(n,i.y+i.height)]})}function Pi(t,e,n){var i=(e=k({rectHover:!0},e)).style={strokeNoScale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(i.image=t.slice(8),A(i,n),new Oe(e)):jn(t.replace("path://",""),e,n,"center"):void 0}function Li(t,e,n,i,r,a,o,s){var l,u=n-t,h=i-e,c=o-r,d=s-a,f=Oi(c,d,u,h);if((l=f)<=1e-6&&-1e-6<=l)return!1;var p=t-r,g=e-a,m=Oi(p,g,u,h)/f;if(m<0||1<m)return!1;var v=Oi(p,g,c,d)/f;return!(v<0||1<v)}function Oi(t,e,n,i){return t*i-n*e}function Ni(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Ei(t,e,n){for(var i=0;i<e.length&&(!e[i]||null!=(t=t&&"object"==typeof t?t[e[i]]:null));i++);return null==t&&n&&(t=n.get(e)),t}function zi(t,e){var n=Ip(t).getParent;return n?n.call(t,e):t.parentModel}function Bi(t){return[t||"",Ap++,Math.random().toFixed(5)].join("_")}function Ri(t,e,n,i){var r=e[1]-e[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(0<r){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]}function Fi(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?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function Vi(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Gi(t){var e=t.toString(),n=e.indexOf("e");if(0<n){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function Hi(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function Wi(t){var e=2*Math.PI;return(t%e+e)%e}function Xi(t){return-Dp<t&&t<Dp}function Zi(t){if(t instanceof Date)return t;if("string"!=typeof t)return new Date(null==t?NaN:Math.round(t));var e=kp.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}function Ui(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}function Yi(t,e){var n=Ui(t),i=Math.pow(10,n),r=t/i;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)*i,-20<=n?+t.toFixed(n<0?-n:0):t}function qi(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function ji(t){return null==t?"":(t+"").replace(Lp,function(t,e){return Op[e]})}function $i(t,e,n){L(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=Np[a];t=t.replace(Ep(o),Ep(o,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(Ep(Np[l],s),n?ji(u):u)}return t}function Ki(t,e){var n=(t=M(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,r=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return n?"html"===r?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ji(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+ji(n)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:n}}:""}function Qi(t,e){return"0000".substr(0,e-(t+="").length)+t}function Ji(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var i=Zi(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t.replace("MM",Qi(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Qi(s,2)).replace("d",s).replace("hh",Qi(l,2)).replace("h",l).replace("mm",Qi(u,2)).replace("m",u).replace("ss",Qi(h,2)).replace("s",h).replace("SSS",Qi(c,3))}function tr(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function er(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var n,i,r=t.position,a=t.getBoundingRect(),o=c.childAt(e+1),s=o&&o.getBoundingRect();if("horizontal"===h){var l=a.width+(s?-s.x+a.x:0);v=f<(n=g+l)||t.newline?(g=0,n=l,m+=v+d,a.height):Math.max(v,a.height)}else{var u=a.height+(s?-s.y+a.y:0);v=p<(i=m+u)||t.newline?(g+=v+d,m=0,i=u,a.width):Math.max(v,a.width)}t.newline||(r[0]=g,r[1]=m,"horizontal"===h?g=n+d:m=i+d)})}function nr(t,e,n){n=Pp(n||0);var i=e.width,r=e.height,a=Fi(t.left,i),o=Fi(t.top,r),s=Fi(t.right,i),l=Fi(t.bottom,r),u=Fi(t.width,i),h=Fi(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(h)&&(h=r-l-c-o),null!=f&&(isNaN(u)&&isNaN(h)&&(i/r<f?u=.8*i:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=i-s-u-d),isNaN(o)&&(o=r-l-h-c),t.left||t.right){case"center":a=i/2-u/2-n[3];break;case"right":a=i-u-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-h/2-n[0];break;case"bottom":o=r-h-c}a=a||0,o=o||0,isNaN(u)&&(u=i-d-a-(s||0)),isNaN(h)&&(h=r-c-o-(l||0));var p=new Vt(a+n[3],o+n[0],u,h);return p.margin=n,p}function ir(l,u,t){function e(t,e){var n={},i=0,r={},a=0;if(Bp(t,function(t){r[t]=l[t]}),Bp(t,function(t){h(u,t)&&(n[t]=r[t]=u[t]),c(n,t)&&i++,c(r,t)&&a++}),d[e])return c(u,t[1])?r[t[2]]=null:c(u,t[2])&&(r[t[1]]=null),r;if(2!==a&&i){if(2<=i)return n;for(var o=0;o<t.length;o++){var s=t[o];if(!h(n,s)&&h(l,s)){n[s]=l[s];break}}return n}return r}function h(t,e){return t.hasOwnProperty(e)}function c(t,e){return null!=t[e]&&"auto"!==t[e]}function n(t,e,n){Bp(t,function(t){e[t]=n[t]})}!O(t)&&(t={});var d=t.ignoreSize;!L(d)&&(d=[d,d]);var i=e(Fp[0],0),r=e(Fp[1],1);n(Fp[0],l,i),n(Fp[1],l,r)}function rr(t){return e={},(n=t)&&e&&Bp(Rp,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e;var e,n}function ar(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Kp?{}:[]),this.sourceFormat=t.sourceFormat||Qp,this.seriesLayoutBy=t.seriesLayoutBy||tg,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&T(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function or(t){var e=t.option,n=e.data,i=x(n)?Jp:qp,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=cr(t);if(l){var u=l.option;n=u.source,i=ig(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,n,i,r){if(!t)return{dimensionsDefine:sr(r)};var a,o;if(e===jp)"auto"===i||null==i?lr(function(t){null!=t&&"-"!==t&&(M(t)?null==o&&(o=1):o=0)},n,t,10):o=i?1:0,r||1!==o||(r=[],lr(function(t,e){r[e]=null!=t?t:""},n,t)),a=r?r.length:n===eg?t.length:t[0]?t[0].length:null;else if(e===$p)r||(r=function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var i=[];return D(e,function(t,e){i.push(e)}),i}}(t));else if(e===Kp)r||(r=[],D(t,function(t,e){r.push(e)}));else if(e===qp){var s=$e(t[0]);a=L(s)&&s.length||1}return{startIndex:o,dimensionsDefine:sr(r),dimensionsDetectCount:a}}(n,i,a,o,s);ig(t).source=new ar({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function sr(t){if(t){var n=T();return P(t,function(t){if(null==(t=k({},O(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var e=n.get(t.name);return e?t.name+="-"+e.count++:n.set(t.name,{count:1}),t})}}function lr(t,e,n,i){if(null==i&&(i=1/0),e===eg)for(var r=0;r<n.length&&r<i;r++)t(n[r]?n[r][0]:null,r);else{var a=n[0]||[];for(r=0;r<a.length&&r<i;r++)t(a[r],r)}}function ur(n,t,e){function a(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function o(t){var e=t.dimsDef;return e?e.length:1}var s={},i=cr(t);if(!i||!n)return s;var l,r,u=[],h=[],c=t.ecModel,d=ig(c).datasetMap,f=i.uid+"_"+e.seriesLayoutBy;D(n=n.slice(),function(t,e){!O(t)&&(n[e]={name:t}),"ordinal"===t.type&&null==l&&(r=o(n[l=e])),s[t.name]=[]});var p=d.get(f)||d.set(f,{categoryWayDim:r,valueWayDim:0});return D(n,function(t,e){var n=t.name,i=o(t);if(null==l){var r=p.valueWayDim;a(s[n],r,i),a(h,r,i),p.valueWayDim+=i}else if(l===e)a(s[n],0,i),a(u,0,i);else{r=p.categoryWayDim;a(s[n],r,i),a(h,r,i),p.categoryWayDim+=i}}),u.length&&(s.itemName=u),h.length&&(s.seriesName=h),s}function hr(t,l,u){var e={};if(!cr(t))return e;var h,c=l.sourceFormat,d=l.dimensionsDefine;(c===$p||c===Kp)&&D(d,function(t,e){"name"===(O(t)?t.name:t)&&(h=e)});var n=function(){function t(t){return null!=t.v&&null!=t.n}for(var e={},n={},i=[],r=0,a=Math.min(5,u);r<a;r++){var o=dr(l.data,c,l.seriesLayoutBy,d,l.startIndex,r);i.push(o);var s=o===ng.Not;if(s&&null==e.v&&r!==h&&(e.v=r),(null==e.n||e.n===e.v||!s&&i[e.n]===ng.Not)&&(e.n=r),t(e)&&i[e.n]!==ng.Not)return e;s||(o===ng.Might&&null==n.v&&r!==h&&(n.v=r),(null==n.n||n.n===n.v)&&(n.n=r))}return t(e)?e:t(n)?n:null}();if(n){e.value=n.v;var i=null!=h?h:n.n;e.itemName=[i],e.seriesName=[i]}return e}function cr(t){var e=t.option;return e.data?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function dr(t,e,n,i,r,a){function o(t){var e=M(t);return null!=t&&isFinite(t)&&""!==t?e?ng.Might:ng.Not:e&&"-"!==t?ng.Must:void 0}var s,l,u;if(x(t))return ng.Not;if(i){var h=i[a];O(h)?(l=h.name,u=h.type):M(h)&&(l=h)}if(null!=u)return"ordinal"===u?ng.Must:ng.Not;if(e===jp)if(n===eg){for(var c=t[a],d=0;d<(c||[]).length&&d<5;d++)if(null!=(s=o(c[r+d])))return s}else for(d=0;d<t.length&&d<5;d++){var f=t[r+d];if(f&&null!=(s=o(f[a])))return s}else if(e===$p){if(!l)return ng.Not;for(d=0;d<t.length&&d<5;d++){if((p=t[d])&&null!=(s=o(p[l])))return s}}else if(e===Kp){if(!l)return ng.Not;if(!(c=t[l])||x(c))return ng.Not;for(d=0;d<c.length&&d<5;d++)if(null!=(s=o(c[d])))return s}else if(e===qp)for(d=0;d<t.length&&d<5;d++){var p,g=$e(p=t[d]);if(!L(g))return ng.Not;if(null!=(s=o(g[a])))return s}return ng.Not}function fr(t){var n,e,i;t=t,this.option={},this.option[rg]=1,this._componentsMap=T({series:[]}),this._seriesIndices,this._seriesIndicesMap,n=t,e=this._theme.option,i=n.color&&!n.colorLayer,D(e,function(t,e){"colorLayer"===e&&i||Wp.hasClass(e)||("object"==typeof t?n[e]=n[e]?m(n[e],t,!1):b(t):null==n[e]&&(n[e]=t))}),m(t,Zp,!1),this.mergeOption(t)}function pr(t,e){t._seriesIndicesMap=T(t._seriesIndices=P(e,function(t){return t.componentIndex})||[])}function gr(t,e){return e.hasOwnProperty("subType")?v(t,function(t){return t.subType===e.subType}):t}function mr(e){D(og,function(t){this[t]=_(e[t],e)},this)}function vr(){this._coordinateSystems=[]}function yr(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function xr(t,e,n){var l={width:e,height:n,aspectratio:e/n},u=!0;return D(t,function(t,e){var n,i,r,a=e.match(dg);if(a&&a[1]&&a[2]){var o=a[1],s=a[2].toLowerCase();n=l[s],i=t,("min"===(r=o)?i<=n:"max"===r?n<=i:n===i)||(u=!1)}}),u}function _r(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=gg.length;n<i;n++){var r=gg[n],a=e.normal,o=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?m(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),o&&o[r]&&(t[r]=t[r]||{},t[r].emphasis?m(t[r].emphasis,o[r]):t[r].emphasis=o[r],o[r]=null)}}function wr(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,A(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function br(t){wr(t,"itemStyle"),wr(t,"lineStyle"),wr(t,"areaStyle"),wr(t,"label"),wr(t,"labelLine"),wr(t,"upperLabel"),wr(t,"edgeLabel")}function Sr(t,e){var n=pg(t)&&t[e],i=pg(n)&&n.textStyle;if(i)for(var r=0,a=Td.length;r<a;r++){e=Td[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function Mr(t){t&&(br(t),Sr(t,"label"),t.emphasis&&Sr(t.emphasis,"label"))}function Ir(t){return L(t)?t:t?[t]:[]}function Tr(t){return(L(t)?t[0]:t)||{}}function Cr(e){D(vg,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}function Ar(m){D(m,function(h,c){var d=[],f=[NaN,NaN],t=[h.stackResultDimension,h.stackedOverDimension],p=h.data,g=h.isStackedByIndex,e=p.map(t,function(t,e,n){var i,r,a=p.get(h.stackedDimension,n);if(isNaN(a))return f;g?r=p.getRawIndex(n):i=p.get(h.stackedByDimension,n);for(var o=NaN,s=c-1;0<=s;s--){var l=m[s];if(g||(r=l.data.rawIndexOf(l.stackedByDimension,i)),0<=r){var u=l.data.getByRawIndex(l.stackResultDimension,r);if(0<=a&&0<u||a<=0&&u<0){a+=u,o=u;break}}}return d[0]=a,d[1]=o,d});p.hostModel.setData(e),h.data=e})}function Dr(t,e){ar.isInstance(t)||(t=ar.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===Jp&&(this._offset=0,this._dimSize=e,this._data=n),k(this,wg[i===jp?i+"_"+t.seriesLayoutBy:i])}function kr(){return this._data.length}function Pr(t){return this._data[t]}function Lr(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function Or(t,e,n){return null!=n?t[n]:t}function Nr(t,e,n,i){return Er(t[i],this._dimensionInfos[e])}function Er(t,e){var n=e&&e.type;if("ordinal"!==n)return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Zi(t)),null==t||""===t?NaN:+t;var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}function zr(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,a,o=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(r=s.name,a=s.index),bg[o](i,e,a,r)}}}function Br(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===qp||i===$p){var r=t.getRawDataItem(e);return i!==qp||O(r)||(r=null),r?r[n]:void 0}}}function Rr(t){return new Fr(t)}function Fr(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,e,n,i,r,a){Cg.reset(n,i,r,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:Cg.next},t.context)}function Gr(t){var n,e,i,r=t.name;Qe(t)||(t.name=(n=t.getRawData(),e=n.mapDimension("seriesName",!0),i=[],D(e,function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")||r))}function Hr(t){return t.model.getRawData().count()}function Wr(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Xr}function Xr(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Zr(e,n){D(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,y(Ur,n))})}function Ur(t){var e=Yr(t);e&&e.setOutputEnd(this.count())}function Yr(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function qr(){this.group=new Ac,this.uid=Bi("viewChart"),this.renderTask=Rr({plan:Kr,reset:Qr}),this.renderTask.context={view:this}}function jr(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!fi(t)))for(var i=0,r=t.childCount();i<r;i++)jr(t.childAt(i),e,n)}function $r(e,t,n){var i=tn(e,t),r=t&&null!=t.highlightKey?pi(t.highlightKey):null;null!=i?D(qe(i),function(t){jr(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){jr(t,n,r)})}function Kr(t){return Ng(t.model)}function Qr(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&Og(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,n,i,r),zg[l]}function Jr(t,n,i){function r(){c=(new Date).getTime(),d=null,t.apply(s,l||[])}var a,o,s,l,u,h=0,c=0,d=null;n=n||0;var e=function(){a=(new Date).getTime(),s=this,l=arguments;var t=u||n,e=u||i;u=null,o=a-(e?h:c)-t,clearTimeout(d),e?d=setTimeout(r,t):0<=o?r():d=setTimeout(r,-o),h=a};return e.clear=function(){d&&(clearTimeout(d),d=null)},e.debounceNextCall=function(t){u=t},e}function ta(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=T()}function ea(s,t,l,u,h){function c(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}var d;h=h||{},D(t,function(n){if(!h.visualType||h.visualType===n.visualType){var t=s._stageTaskMap.get(n.uid),e=t.seriesTaskMap,i=t.overallTask;if(i){var r,a=i.agentStubMap;a.each(function(t){c(h,t)&&(t.dirty(),r=!0)}),r&&i.dirty(),Zg(i,u);var o=s.getPerformArgs(i,h.block);a.each(function(t){t.perform(o)}),d|=i.perform(o)}else e&&e.each(function(t){c(h,t)&&t.dirty();var e=s.getPerformArgs(t,h.block);e.skip=!n.performRawSeries&&l.isSeriesFiltered(t.context.model),Zg(t,u),d|=t.perform(e)})}}),s.unfinished|=d}function na(t){t.overallReset(t.ecModel,t.api,t.payload)}function ia(t){return t.overallProgress&&ra}function ra(){this.agent.dirty(),this.getDownstream().dirty()}function aa(){this.agent&&this.agent.dirty()}function oa(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function sa(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=qe(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?P(e,function(t,e){return la(e)}):Ug}function la(a){return function(t,e){var n=e.data,i=e.resetDefines[a];if(i&&i.dataEach)for(var r=t.start;r<t.end;r++)i.dataEach(n,r);else i&&i.progress&&i.progress(t,n)}}function ua(t){return t.data.count()}function ha(t,e,n){var i=e.uid,r=t._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),(r.tail=n).__idxInPipeline=r.count++,n.__pipeline=r}function ca(t,e){for(var n in e.prototype)t[n]=u}function da(t){M(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function fa(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),A(e.__inheritedStyle,t.__inheritedStyle))}function pa(t){for(var e=d(t).split(im),n=[],i=0;i<e.length;i+=2){var r=parseFloat(e[i]),a=parseFloat(e[i+1]);n.push([r,a])}return n}function ga(t,e,n,i){var r=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,r=[];n.replace(lm,function(t,e,n){r.push(e,n)});for(var a=r.length-1;0<a;a-=2){var o=r[a],s=r[a-1];switch(i=i||ot(),s){case"translate":o=d(o).split(im),ut(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=d(o).split(im),ct(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=d(o).split(im),ht(i,i,parseFloat(o[0]));break;case"skew":o=d(o).split(im),console.warn("Skew transform is not supported yet");break;case"matrix":var o=d(o).split(im);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}e.setLocalTransform(i)}}(t,e),k(r,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};for(um.lastIndex=0;null!=(i=um.exec(e));)r[i[1]]=i[2];for(var a in om)om.hasOwnProperty(a)&&null!=r[a]&&(n[om[a]]=r[a]);return n}(t)),!i))for(var o in om)if(om.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(r[om[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new Bc;var h=e.style;null!=r.fill&&h.set(l,ma(r.fill,n)),null!=r.stroke&&h.set(u,ma(r.stroke,n)),D(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=r[t]&&h.set(e,parseFloat(r[t]))}),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),D(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=r[t]&&h.set(t,r[t])}),r.lineDash&&(e.style.lineDash=d(r.lineDash).split(im)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=r}function ma(t,e){var n=e&&t&&t.match(sm);return n?e[d(n[1])]:t}function va(i,r){return function(t,e,n){(r||!this._disposed)&&(t=t&&t.toLowerCase(),Fh.prototype[i].call(this,t,e,n))}}function ya(){Fh.call(this)}function xa(t,e,n){function i(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=Am[e]),this.id,this.group,this._dom=t;var r=this._zr=Ye(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Jr(_(r.flush,r),17),(e=b(e))&&xg(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new vr;var a,o,s,l,u=this._api=(o=(a=this)._coordSysMgr,k(new mr(a),{getCoordinateSystems:_(o.getCoordinateSystems,o),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return a._model.getComponent(e.mainType,e.index);t=t.parent}}}));Ut(Cm,i),Ut(Mm,i),this._scheduler=new ta(this,u,Mm,Cm),Fh.call(this,this._ecEventProcessor=new Oa),this._messageCenter=new ya,this._initEvents(),this.resize=_(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),l=this,(s=r).on("rendered",function(){l.trigger("rendered"),!s.animation.isFinished()||l[vm]||l._scheduler.unfinished||l._pendingActions.length||l.trigger("finished")}),f(this)}function _a(t,e,n){if(!this._disposed){var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=nn(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(i=s[t](r,e,n)))return i}}}function wa(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Ca(t,"component",e,n),Ca(t,"chart",e,n),n.plan()}function ba(e,n,i,r,t){function a(t){t&&t.__alive&&t[n]&&t[n](t.__model,o,e._api,i)}var o=e._model;if(r){var s={};s[r+"Id"]=i[r+"Id"],s[r+"Index"]=i[r+"Index"],s[r+"Name"]=i[r+"Name"];var l={mainType:r,query:s};t&&(l.subType=t);var u=i.excludeSeriesId;null!=u&&(u=T(qe(u))),o&&o.eachComponent(l,function(t){u&&null!=u.get(t.id)||a(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else cm(e._componentsViews.concat(e._chartsViews),a)}function Sa(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Ma(e,t){var n=e.type,i=e.escapeConnect,r=bm[n],a=r.actionInfo,o=(a.update||"update").split(":"),s=o.pop();o=null!=o[0]&&pm(o[0]),this[mm]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=P(e.batch,function(t){return(t=A(k({},t),e)).batch=null,t}));var h,c=[],d="highlight"===n||"downplay"===n;cm(l,function(t){(h=(h=r.action(t,this._model,this._api))||k({},t)).type=a.event||h.type,c.push(h),d?ba(this,s,t,"series"):o&&ba(this,s,t,o.main,o.sub)},this),"none"===s||d||o||(this[vm]?(wa(this),_m.update.call(this,e),this[vm]=!1):_m[s].call(this,e)),h=u?{type:a.event||n,escapeConnect:i,batch:c}:c[0],this[mm]=!1,!t&&this._messageCenter.trigger(h.type,h)}function Ia(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Ma.call(this,n,t)}}function Ta(t){!t&&this.trigger("updated")}function Ca(t,e,r,a){function n(t){var e="_ec_"+t.id+"_"+t.type,n=l[e];if(!n){var i=pm(t.type);(n=new(o?kg.getClass(i.main,i.sub):qr.getClass(i.sub))).init(r,h),l[e]=n,s.push(n),u.add(n.group)}t.__viewId=n.__id=e,n.__alive=!0,n.__model=t,n.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!o&&a.prepareView(n,t,r,h)}for(var o="component"===e,s=o?t._componentsViews:t._chartsViews,l=o?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,i=0;i<s.length;i++)s[i].__alive=!1;o?r.eachComponent(function(t,e){"series"!==t&&n(e)}):r.eachSeries(n);for(i=0;i<s.length;){var c=s[i];c.__alive?i++:(!o&&c.renderTask.dispose(),u.remove(c.group),c.dispose(r,h),s.splice(i,1),delete l[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Aa(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Da(t,e,n,i){var r,a,o,s,l;r=t,a=e,o=n,s=i,cm(l||r._componentsViews,function(t){var e=t.__model;t.render(e,a,o,s),La(e,t)}),cm(t._chartsViews,function(t){t.__alive=!1}),ka(t,e,n,i),cm(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function ka(a,t,e,o,s){var l,n,i,r,u,h=a._scheduler;t.eachSeries(function(t){var e=a._chartsMap[t.__viewId];e.__alive=!0;var n,i,r=e.renderTask;h.updatePayload(r,o),s&&s.get(t.uid)&&r.dirty(),l|=r.perform(h.getPerformArgs(r)),e.group.silent=!!t.get("silent"),La(t,e),n=e,i=t.get("blendMode")||null,n.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}),h.unfinished|=l,i=t,r=(n=a)._zr.storage,u=0,r.traverse(function(){u++}),u>i.get("hoverLayerThreshold")&&!wh.node&&i.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=n._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}}),Hg(a._zr.dom,t)}function Pa(e,n){cm(Tm,function(t){t(e,n)})}function La(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Oa(){this.eventInfo}function Na(t){Pm[t]=!1}function Ea(t){return km[(e=t,n=Nm,e.getAttribute?e.getAttribute(n):e[n])];var e,n}function za(t,e){Am[t]=e}function Ba(t){Im.push(t)}function Ra(t,e){Ha(Mm,t,e,1e3)}function Fa(t,e,n){"function"==typeof e&&(n=e,e="");var i=fm(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,hm(ym.test(i)&&ym.test(e)),bm[i]||(bm[i]={action:n,actionInfo:t}),Sm[e]=i}function Va(t,e){Ha(Cm,t,e,1e3,"layout")}function Ga(t,e){Ha(Cm,t,e,3e3,"visual")}function Ha(t,e,n,i,r){(dm(e)||fm(e))&&(n=e,e=i);var a=ta.wrapStageHandler(n,r);return a.__prio=e,a.__raw=n,t.push(a),a}function Wa(t,e){Dm[t]=e}function Xa(t){return Wp.extend(t)}function Za(t){return kg.extend(t)}function Ua(t){return Dg.extend(t)}function Ya(t){return qr.extend(t)}function qa(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function ja(t,e){return qa(t,e)?t.getCalculationInfo("stackResultDimension"):e}function $a(t){return t.get("stack")||zm+t.seriesIndex}function Ka(t){return t.dim+t.index}function Qa(t,e){var n=[];return e.eachSeriesByType(t,function(t){eo(t)&&!no(t)&&n.push(t)}),n}function Ja(t){var g=function(t){var l={};D(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var n=t.getData(),i=e.dim+"_"+e.index,r=n.mapDimension(e.dim),a=0,o=n.count();a<o;++a){var s=n.get(r,a);l[i]?l[i].push(s):l[i]=[s]}});var e=[];for(var n in l)if(l.hasOwnProperty(n)){var i=l[n];if(i){i.sort(function(t,e){return t-e});for(var r=null,a=1;a<i.length;++a){var o=i[a]-i[a-1];0<o&&(r=null===r?o:Math.min(r,o))}e[n]=r}}return e}(t),m=[];return D(t,function(t){var e,n=t.coordinateSystem.getBaseAxis(),i=n.getExtent();if("category"===n.type)e=n.getBandWidth();else if("value"===n.type||"time"===n.type){var r=n.dim+"_"+n.index,a=g[r],o=Math.abs(i[1]-i[0]),s=n.scale.getExtent(),l=Math.abs(s[1]-s[0]);e=a?o/l*a:o}else{var u=t.getData();e=Math.abs(i[1]-i[0])/u.count()}var h=Fi(t.get("barWidth"),e),c=Fi(t.get("barMaxWidth"),e),d=Fi(t.get("barMinWidth")||1,e),f=t.get("barGap"),p=t.get("barCategoryGap");m.push({bandWidth:e,barWidth:h,barMaxWidth:c,barMinWidth:d,barGap:f,barCategoryGap:p,axisKey:Ka(n),stackId:$a(t)})}),function(t){var c={};D(t,function(t){var e=t.axisKey,n=t.bandWidth,i=c[e]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},r=i.stacks;c[e]=i;var a=t.stackId;r[a]||i.autoWidthCount++,r[a]=r[a]||{width:0,maxWidth:0};var o=t.barWidth;o&&!r[a].width&&(r[a].width=o,o=Math.min(i.remainedWidth,o),i.remainedWidth-=o);var s=t.barMaxWidth;s&&(r[a].maxWidth=s);var l=t.barMinWidth;l&&(r[a].minWidth=l);var u=t.barGap;null!=u&&(i.gap=u);var h=t.barCategoryGap;null!=h&&(i.categoryGap=h)});var d={};return D(c,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,r=Fi(t.categoryGap,i),a=Fi(t.gap,1),o=t.remainedWidth,s=t.autoWidthCount,l=(o-r)/(s+(s-1)*a);l=Math.max(l,0),D(e,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){var i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,o-=i+a*i,s--}else{var i=l;e&&e<i&&(i=Math.min(e,o)),n&&i<n&&(i=n),i!==l&&(t.width=i,o-=i+a*i,s--)}}),l=(o-r)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;D(e,function(t){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;D(e,function(t,e){d[n][e]=d[n][e]||{bandWidth:i,offset:c,width:t.width},c+=t.width*(1+a)})}),d}(m)}function to(t,e,n){if(t&&e){var i=t[Ka(e)];return null!=i&&null!=n&&(i=i[$a(n)]),i}}function eo(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function no(t){return t.pipelineContext&&t.pipelineContext.large}function io(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}function ro(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function ao(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function oo(t){return t._map||(t._map=T(t.categories))}function so(t){return O(t)&&null!=t.value?t.value:t+""}function lo(t){return Gi(t)+2}function uo(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function ho(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),uo(t,0,e),uo(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function co(t,e){return ev(t,tv(e))}function fo(t,e){var n,i,r,a=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,u=null!=s,h=t.getExtent();"ordinal"===a?n=e.getCategories().length:(L(i=e.get("boundaryGap"))||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Fi(i[0],1),i[1]=Fi(i[1],1),r=h[1]-h[0]||Math.abs(h[0])),null==o&&(o="ordinal"===a?n?0:NaN:h[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:NaN:h[1]+i[1]*r),"dataMin"===o?o=h[0]:"function"==typeof o&&(o=o({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(o)||I(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<o&&0<s&&!l&&(o=0),o<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=Qa("bar",c);if(D(f,function(t){d|=t.getBaseAxis()===e.axis}),d){var p=Ja(f),g=function(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=to(i,n.axis);if(void 0===o)return{min:t,max:e};var s=1/0;D(o,function(t){s=Math.min(t.offset,s)});var l=-1/0;D(o,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(o,s,e,p);o=g.min,s=g.max}}return[o,s]}function po(t,e){var n=fo(t,e),i=null!=e.getMin(),r=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:r,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function go(n){var e,i=n.getLabelModel().get("formatter"),r="category"===n.type?n.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(t){return t=n.scale.getLabel(t),e.replace("{value}",null!=t?t:"")}):"function"==typeof i?function(t,e){return null!=r&&(e=t-r),i(mo(n,t),e)}:function(t){return n.scale.getLabel(t)}}function mo(t,e){return"category"===t.type?t.scale.getLabel(e):e}function vo(t){var e=t.get("interval");return null==e?"auto":e}function yo(t){return"category"===t.type&&0===vo(t.getLabelModel())}function xo(t){return this._axes[t]}function _o(t){sv.call(this,t)}function wo(t){return"category"===t.type?(a=(r=t).getLabelModel(),o=So(r,a),!a.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:o.labelCategoryInterval}:o):(e=(n=t).scale.getTicks(),i=go(n),{labels:P(e,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t}})});var n,e,i,r,a,o}function bo(t,e){return"category"===t.type?function(t,e){var n,i,r=Mo(t,"ticks"),a=vo(e),o=Io(r,a);if(o)return o;if((!e.get("show")||t.scale.isBlank())&&(n=[]),g(a))n=Ao(t,a,!0);else if("auto"===a){var s=So(t,t.getLabelModel());i=s.labelCategoryInterval,n=P(s.labels,function(t){return t.tickValue})}else n=Co(t,i=a,!0);return To(r,a,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:t.scale.getTicks()}}function So(t,e){var n,i,r,a=Mo(t,"labels"),o=vo(e),s=Io(a,o);return s||To(a,o,{labels:g(o)?Ao(t,o):Co(t,n="auto"===o?null!=(r=lv(i=t).autoInterval)?r:lv(i).autoInterval=i.calculateCategoryInterval():o),labelCategoryInterval:n})}function Mo(t,e){return lv(t)[e]||(lv(t)[e]=[])}function Io(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function To(t,e,n){return t.push({key:e,value:n}),n}function Co(t,e,n){function i(t){l.push(n?t:{formattedLabel:r(t),rawLabel:a.getLabel(t),tickValue:t})}var r=go(t),a=t.scale,o=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=o[0],c=a.count();0!==h&&1<u&&2<c/u&&(h=Math.round(Math.ceil(h/u)*u));var d=yo(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==o[0]&&i(o[0]);for(var g=h;g<=o[1];g+=u)i(g);return p&&g-u!==o[1]&&i(o[1]),l}function Ao(t,n,i){var r=t.scale,a=go(t),o=[];return D(r.getTicks(),function(t){var e=r.getLabel(t);n(t,e)&&o.push(i?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})}),o}function Do(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function ko(t,e){return e.type||(e.data?"category":"value")}function Po(t,e){return t.getCoordSysModel()===e}function Lo(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function Oo(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,o=t[e],s=n.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)No(o[u])&&(a=o[u]);else for(var h in o)if(o.hasOwnProperty(h)&&No(o[h])&&!i[r(o[h])]){a=o[h];break}a&&(i[r(a)]=!0)}}function No(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=t.scale.getExtent(),n=e[0],i=e[1],!(0<n&&0<i||n<0&&i<0));var e,n,i}function Eo(e){return P(_v,function(t){return e.getReferringComponents(t)[0]})}function zo(t){return"cartesian2d"===t.get("coordinateSystem")}function Bo(t){return t}function Ro(t,e,n,i,r){this._old=t,this._new=e,this._oldKeyGetter=n||Bo,this._newKeyGetter=i||Bo,this.context=r}function Fo(t,e,n,i,r){for(var a=0;a<t.length;a++){var o="_ec_"+r[i](t[a],a),s=e[o];null==s?(n.push(o),e[o]=a):(s.length||(e[o]=s=[s]),s.push(a))}}function Vo(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Go(t){null!=t&&k(this,t),this.otherDims={}}function Ho(t){return 65535<t._rawCount?Iv:Cv}function Wo(e,n){D(Av.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,D(Dv,function(t){e[t]=b(n[t])}),e._calculationInfo=k(n._calculationInfo)}function Xo(t,e,n,i,r){var a=Mv[e.type],o=i-1,s=e.name,l=t[s][o];if(l&&l.length<n){for(var u=new a(Math.min(r-o*n,n)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var c=i*n;c<r;c+=n)t[s].push(new a(Math.min(r-c,n)))}function Zo(r){var a=r._invertedIndicesMap;D(a,function(t,e){var n=r._dimensionInfos[e].ordinalMeta;if(n){t=a[e]=new Tv(n.categories.length);for(var i=0;i<t.length;i++)t[i]=-1;for(i=0;i<r._count;i++)t[r.get(e,i)]=i}})}function Uo(t,e,n){var i;if(null!=e){var r=t._chunkSize,a=Math.floor(n/r),o=n%r,s=t.dimensions[e],l=t._storage[s][a];if(l){i=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function Yo(t){return t}function qo(t){return t<this._count&&0<=t?this._indices[t]:-1}function jo(t,e){var n=t._idList[e];return null==n&&(n=Uo(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n}function $o(t){return L(t)||(t=[t]),t}function Ko(t,e){var n=t.dimensions,i=new kv(P(n,t.getDimensionInfo,t),t.hostModel);Wo(i,t);for(var r=i._storage={},a=t._storage,o=0;o<n.length;o++){var s=n[o];a[s]&&(0<=p(e,s)?(r[s]=Qo(a[s]),i._rawExtent[s]=[1/0,-1/0],i._extent[s]=null):r[s]=a[s])}return i}function Qo(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=(i=t[n],r=void 0,(r=i.constructor)===Array?i.slice():new r(i));var i,r;return e}function Jo(t,e,n){function l(t,e,n){null!=wv.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,a.set(e,!0))}ar.isInstance(e)||(e=ar.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=T(),a=T(),u=[],o=function(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return D(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}(e,t,i,n.dimCount),s=0;s<o;s++){var h=i[s]=k({},O(i[s])?i[s]:{name:i[s]}),c=h.name,d=u[s]=new Go;null!=c&&null==r.get(c)&&(d.name=d.displayName=c,r.set(c,s)),null!=h.type&&(d.type=h.type),null!=h.displayName&&(d.displayName=h.displayName)}var f=n.encodeDef;!f&&n.encodeDefaulter&&(f=n.encodeDefaulter(e,o)),(f=T(f)).each(function(t,n){if(1===(t=qe(t).slice()).length&&!M(t[0])&&t[0]<0)f.set(n,!1);else{var i=f.set(n,[]);D(t,function(t,e){M(t)&&(t=r.get(t)),null!=t&&t<o&&(i[e]=t,l(u[t],n,e))})}});var p=0;D(t,function(r){var a,o,s;if(M(r))a=r,r={};else{a=r.name;var t=r.ordinalMeta;r.ordinalMeta=null,(r=b(r)).ordinalMeta=t,o=r.dimsDef,s=r.otherDims,r.name=r.coordDim=r.coordDimIndex=r.dimsDef=r.otherDims=null}if(!1!==(e=f.get(a))){var e;if(!(e=qe(e)).length)for(var n=0;n<(o&&o.length||1);n++){for(;p<u.length&&null!=u[p].coordDim;)p++;p<u.length&&e.push(p++)}D(e,function(t,e){var n=u[t];if(l(A(n,r),a,e),null==n.name&&o){var i=o[e];!O(i)&&(i={name:i}),n.name=n.displayName=i.name,n.defaultTooltip=i.defaultTooltip}s&&A(n.otherDims,s)})}});var g,m,v=n.generateCoord,y=n.generateCoordCount,x=null!=y;y=v?y||1:0;for(var _=v||"value",w=0;w<o;w++){null==(d=u[w]=u[w]||new Go).coordDim&&(d.coordDim=ts(_,a,x),d.coordDimIndex=0,(!v||y<=0)&&(d.isExtraCoord=!0),y--),null==d.name&&(d.name=ts(d.coordDim,r)),null!=d.type||(g=e,m=w,d.name,dr(g.data,g.sourceFormat,g.seriesLayoutBy,g.dimensionsDefine,g.startIndex,m)!==ng.Must&&(!d.isExtraCoord||null==d.otherDims.itemName&&null==d.otherDims.seriesName))||(d.type="ordinal")}return u}function ts(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function es(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=T(),this.categoryAxisMap=T(),this.firstCategoryDimIndex=null}function ns(t){return"category"===t.get("type")}function is(t,e,n){n=n||{},ar.isInstance(t)||(t=ar.seriesDataToSource(t));var i,r,a,o,s,l=e.get("coordinateSystem"),u=vr.get(l),h=(a=(r=e).get("coordinateSystem"),o=new es(a),(s=Nv[a])?(s(r,o,o.axisMap,o.categoryAxisMap),o):void 0);h&&(i=P(h.coordSysDims,function(t){var e,n={name:t},i=h.axisMap.get(t);if(i){var r=i.get("type");n.type="category"===(e=r)?"ordinal":"time"===e?"time":"float"}return n})),i||(i=u&&(u.getDimensionsInfo?u.getDimensionsInfo():u.dimensions.slice())||["x","y"]);var c,d,f=Ov(t,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?y(ur,i,e):null});h&&D(f,function(t,e){var n=t.coordDim,i=h.categoryAxisMap.get(n);i&&(null==c&&(c=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(d=!0)}),d||null==c||(f[c].otherDims.itemName=0);var p=function(t,n,e){var i,r,a,o,s=(e=e||{}).byIndex,l=e.stackedCoordDimension,u=!(!t||!t.get("stack"));if(D(n,function(t,e){M(t)&&(n[e]=t={name:t}),u&&!t.isExtraCoord&&(s||i||!t.ordinalMeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||i||(s=!0),r){a="__\0ecstackresult",o="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;D(n,function(t){t.coordDim===h&&d++}),n.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,n.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}}(e,f),g=new kv(f,e);g.setCalculationInfo(p);var m=null!=c&&function(t){if(t.sourceFormat===qp){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!L($e(e))}}(t)?function(t,e,n,i){return i===c?n:this.defaultDimValueGetter(t,e,n,i)}:null;return g.hasItemOption=!1,g.initData(t,null,m),g}function rs(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return zr(t,e,n[0]);if(i){for(var r=[],a=0;a<n.length;a++){var o=zr(t,e,n[a]);r.push(o)}return r.join(" ")}}function as(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function os(t,e,n){var i=t.getArea(),r=t.getBaseAxis().isHorizontal(),a=i.x,o=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2,h=new jf({shape:{x:a-=u/2,y:o-=u/2,width:s+=u,height:l+=u}});return e&&(h.shape[r?"width":"height"]=0,Ii(h,{shape:{width:s,height:l}},n)),h}function ss(t,e,n){var i=t.getArea(),r=new Wf({shape:{cx:Vi(t.cx,1),cy:Vi(t.cy,1),r0:Vi(i.r0,1),r:Vi(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&(r.shape.endAngle=i.startAngle,Ii(r,{shape:{endAngle:i.endAngle}},n)),r}function ls(t,e,n){n.style.text=null,Mi(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function us(t,e,n){n.style.text=null,Mi(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}function hs(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function cs(t,e,n,i,r,a,o,s){var l=e.getItemVisual(n,"color"),u=e.getItemVisual(n,"opacity"),h=e.getVisual("borderColor"),c=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(A({stroke:hs(r)?"none":h,fill:hs(r)?"none":l,opacity:u},c.getBarItemStyle()));var f=i.getShallow("cursor");f&&t.attr("cursor",f);var p,g,m,v,y,x;o?r.height:r.width;s||(p=t.style,v=l,y=a,x=n,gi(p,g=d,(m=i).getModel("label"),m.getModel("emphasis.label"),{labelFetcher:y,labelDataIndex:x,defaultText:rs(y.getData(),x),isRectText:!0,autoColor:v}),as(p),as(g)),hs(r)&&(d.fill=d.stroke="none"),ci(t,d)}function ds(t,e,n){var i=t.getData(),r=[],a=i.getLayout("valueAxisHorizontal")?1:0;r[1-a]=i.getLayout("valueAxisStart");var o,s,l,u,h,c=new Zv({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:r,__baseDimIdx:a,__largeDataIndices:i.getLayout("largeDataIndices"),__barWidth:i.getLayout("barWidth")});e.add(c),o=c,s=t,u=(l=i).getVisual("borderColor")||l.getVisual("color"),h=s.getModel("itemStyle").getItemStyle(["color","borderColor"]),o.useStyle(h),o.style.fill=null,o.style.stroke=u,o.style.lineWidth=l.getLayout("barWidth"),c.seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",Uv),c.on("mousemove",Uv))}function fs(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function ps(t,e,n,i,r,a,o){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?$n(t.slice(8),new Vt(e,n,i,r),o?"center":"cover"):0===t.indexOf("path://")?jn(t.slice(7),{},new Vt(e,n,i,r),o?"center":"cover"):new Jv({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=fs,s.setColor(a),s}function gs(t){t&&(t.ignore=!0)}function ms(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=st([]);return ht(r,r,-t.rotation),n.applyTransform(lt([],r,t.getLocalTransform())),i.applyTransform(lt([],r,e.getLocalTransform())),n.intersect(i)}}function vs(t){return"middle"===t||"center"===t}function ys(t,e,n,i,r){for(var a=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,s[o[1]=0]=u,s[1]=n,e&&(W(o,o,e),W(s,s,e));var h=new Kf({anid:r+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});a.push(h)}return a}function xs(t,e){var p,g,n,o,m,v,y,i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return p=i,n=e,o=(g=t).getComponent("tooltip"),m=g.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[],oy(n.getCoordinateSystems(),function(c){function t(t,e,n){var i=n.model.getModel("axisPointer",m),r=i.get("show");if(r&&("auto"!==r||t||bs(i))){null==e&&(e=i.get("triggerTooltip"));var a=(i=t?function(t,e,n,i,r,a){var o=e.getModel("axisPointer"),s={};oy(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=b(o.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=o.get("label.show");if(l.show=null==u||u,!a){var h=s.lineStyle=o.get("crossStyle");h&&A(l,h.textStyle)}}return t.model.getModel("axisPointer",new Ni(s,n,i))}(n,f,m,g,t,e):i).get("snap"),o=Ss(n.model),s=e||a||"category"===n.type,l=p.axesInfo[o]={key:o,axis:n,coordSys:c,axisPointerModel:i,triggerTooltip:e,involveSeries:s,snap:a,useHandle:bs(i),seriesModels:[]};d[o]=l,p.seriesInvolved|=s;var u=function(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var a=t[r]||{};if(_s(a[i+"AxisId"],n.id)||_s(a[i+"AxisIndex"],n.componentIndex)||_s(a[i+"AxisName"],n.name))return r}}(v,n);if(null!=u){var h=y[u]||(y[u]={axesInfo:{}});h.axesInfo[o]=l,h.mapper=v[u].mapper,l.linkGroup=h}}}if(c.axisPointerEnabled){var e=Ss(c.model),d=p.coordSysAxesInfo[e]={},n=(p.coordSysMap[e]=c).model,f=n.getModel("tooltip",o);if(oy(c.getAxes(),sy(t,!1,null)),c.getTooltipAxes&&o&&f.get("show")){var i="axis"===f.get("trigger"),r="cross"===f.get("axisPointer.type"),a=c.getTooltipAxes(f.get("axisPointer.axis"));(i||r)&&oy(a.baseAxes,sy(t,!r||"cross",i)),r&&oy(a.otherAxes,sy(t,"cross",!1))}}}),i.seriesInvolved&&function(r,t){t.eachSeries(function(n){var i=n.coordinateSystem,t=n.get("tooltip.trigger",!0),e=n.get("tooltip.show",!0);i&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==n.get("axisPointer.show",!0)&&oy(r.coordSysAxesInfo[Ss(i.model)],function(t){var e=t.axis;i.getAxis(e.dim)===e&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())})},this)}(i,t),i}function _s(t,e){return"all"===t||L(t)&&0<=p(t,e)||t===e}function ws(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ss(t)]}function bs(t){return!!t.get("handle.show")}function Ss(t){return t.type+"||"+t.id}function Ms(t,e,n,i,r,a){var o,s=ly.getAxisPointerClass(t.axisPointerClass);if(s){var l=(o=ws(e))&&o.axisPointerModel;l?(t._axisPointer||(t._axisPointer=new s)).render(e,l,i,a):Is(t,i)}}function Is(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}function Ts(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===u?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=o?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),E(n.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}function Cs(t,e,n){Ac.call(this),this.updateData(t,e,n)}function As(t){return[t[0]/2,t[1]/2]}function Ds(t,e){this.parent.drift(t,e)}function ks(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var n=this.__symbolOriginalScale,i=n[1]/n[0],r={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(r,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function Ps(t){this.group=new Ac,this._symbolCtor=t||Cs}function Ls(t,e,n,i){return!(!e||isNaN(e[0])||isNaN(e[1])||i.isIgnore&&i.isIgnore(n)||i.clipShape&&!i.clipShape.contain(e[0],e[1])||"none"===t.getItemVisual(n,"symbol"))}function Os(t){return null==t||O(t)||(t={isIgnore:t}),t||{}}function Ns(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 Es(t,e,n){var i,r,a,o,s=t.getBaseAxis(),l=t.getOtherAxis(s),u=(r=n,a=0,o=l.scale.getExtent(),"start"===r?a=o[0]:"end"===r?a=o[1]:0<o[0]?a=o[0]:o[1]<0&&(a=o[1]),a),h=s.dim,c=l.dim,d=e.mapDimension(c),f=e.mapDimension(h),p="x"===c||"radius"===c?1:0,g=P(t.dimensions,function(t){return e.mapDimension(t)}),m=e.getCalculationInfo("stackResultDimension");return(i|=qa(e,g[0]))&&(g[0]=m),(i|=qa(e,g[1]))&&(g[1]=m),{dataDimsForPoint:g,valueStart:u,valueAxisDim:c,baseAxisDim:h,stacked:!!i,valueDim:d,baseDim:f,baseDataOffset:p,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function zs(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=n.get(t.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function Bs(t){return isNaN(t[0])||isNaN(t[1])}function Rs(t,e,n,i,r,a,o,s,l,u){return"none"!==u&&u?function(t,e,n,i,r,a,o,s,l,u,h){for(var c=0,d=n,f=0;f<i;f++){var p=e[d];if(r<=d||d<0)break;if(Bs(p)){if(h){d+=a;continue}break}if(d===n)t[0<a?"moveTo":"lineTo"](p[0],p[1]);else if(0<l){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;Sy(Iy,g),Iy[m]=g[m]+v,Sy(Ty,p),Ty[m]=p[m]-v,t.bezierCurveTo(Iy[0],Iy[1],Ty[0],Ty[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}.apply(this,arguments):function(t,e,n,i,r,a,o,s,l,u,h){for(var c=0,d=n,f=0;f<i;f++){var p=e[d];if(r<=d||d<0)break;if(Bs(p)){if(h){d+=a;continue}break}if(d===n)t[0<a?"moveTo":"lineTo"](p[0],p[1]),Sy(Iy,p);else if(0<l){var g=d+a,m=e[g];if(h)for(;m&&Bs(e[g]);)m=e[g+=a];var v=.5,y=e[c],m=e[g];if(!m||Bs(m))Sy(Ty,p);else{var x,_;if(Bs(m)&&!h&&(m=p),F(My,m,y),"x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=zh(p,y),_=zh(p,m);by(Ty,p,My,-l*(1-(v=_/(_+x))))}_y(Iy,Iy,s),wy(Iy,Iy,o),_y(Ty,Ty,s),wy(Ty,Ty,o),t.bezierCurveTo(Iy[0],Iy[1],Ty[0],Ty[1],p[0],p[1]),by(Iy,p,My,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}.apply(this,arguments)}function Fs(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;r<t.length;r++){var a=t[r];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>i[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}function Vs(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(i[0]!==r[0]||i[1]!==r[1])return}return!0}}function Gs(t){return"number"==typeof t?t:t?.5:0}function Hs(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,a=[],o=0;o<t.length-1;o++){var s=t[o+1],l=t[o];a.push(l);var u=[];switch(n){case"end":u[r]=s[r],u[1-r]=l[1-r],a.push(u);break;case"middle":var h=(l[r]+s[r])/2,c=[];u[r]=c[r]=h,u[1-r]=l[1-r],c[1-r]=s[1-r],a.push(u),a.push(c);break;default:u[r]=l[r],u[1-r]=s[1-r],a.push(u)}}return t[o]&&a.push(t[o]),a}function Ws(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),a=Math.max(1,Math.round(r/5)),o=0;o<r;o+=a)if(1.5*Cs.getSymbolSize(e,o)[t.isHorizontal()?1:0]>i)return!1;return!0}(a,e))){var o=e.mapDimension(a.dim),s={};return D(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function Xs(t,e,n){if("cartesian2d"!==t.type)return ss(t,e,n);var i=t.getBaseAxis().isHorizontal(),r=os(t,e,n);if(!n.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);i?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}function Zs(n,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){return 0<=e().indexOfName(t)},this.indexOfName=function(t){return n().indexOfName(t)},this.getItemVisual=function(t,e){return n().getItemVisual(t,e)}}function Us(t,e,n,i){var r=e.getData(),a=this.dataIndex,o=r.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each(function(t){Ys(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function Ys(t,e,n,i,r){var a=(e.startAngle+e.endAngle)/2,o=n?i:0,s=[Math.cos(a)*o,Math.sin(a)*o];r?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function qs(t,e){Ac.call(this);var n=new Wf({z2:2}),i=new Uf,r=new Ff;this.add(n),this.add(i),this.add(r),this.updateData(t,e,!0)}function js(r,t,e,n,i,a,o,s,l,u){function h(t,e,n){for(var i=t;i<e&&!(r[i].y+n>l+o);i++)if(r[i].y+=n,t<i&&i+1<e&&r[i+1].y>r[i].y+r[i].height)return void c(i,n/2);c(e-1,n/2)}function c(t,e){for(var n=t;0<=n&&!(r[n].y-e<l)&&(r[n].y-=e,!(0<n&&r[n].y>r[n-1].y+r[n-1].height));n--);}function d(t,e,n,i,r,a){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("none"===t[s].labelAlignTo){var u=Math.abs(t[s].y-i),h=t[s].len,c=t[s].len2,d=u<r+h?Math.sqrt((r+h+c)*(r+h+c)-u*u):Math.abs(t[s].x-n);e&&o<=d&&(d=o-10),!e&&d<=o&&(d=o+10),t[s].x=n+d*a,o=d}}r.sort(function(t,e){return t.y-e.y});for(var f,p=0,g=r.length,m=[],v=[],y=0;y<g;y++){if("outer"===r[y].position&&"labelLine"===r[y].labelAlignTo){var x=r[y].x-u;r[y].linePoints[1][0]+=x,r[y].x=u}(f=r[y].y-p)<0&&h(y,g,-f),p=r[y].y+r[y].height}o-p<0&&c(g-1,p-o);for(y=0;y<g;y++)r[y].y>=e?v.push(r[y]):m.push(r[y]);d(m,!1,t,e,n,i),d(v,!0,t,e,n,i)}function $s(t){return"center"===t.position}function Ks(t,e,n){hv.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}function Qs(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=P(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,i=new Ks(n,"log"===t.get("axisType")?new ov:new Xm);return i.name=t.get("name"),(i.model=t).axis=i,this.dimensions.push(n),i},this),this.resize(t,n),this.cx,this.cy,this.r,this.r0,this.startAngle}function Js(t,e){return A({show:e},t)}function tl(t){return!isNaN(t[0])&&!isNaN(t[1])}function el(t){return[t.cx,t.cy]}function nl(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function il(t,e){Ac.call(this);var n=new Zf,i=new Uf,r=new Ff;this.add(n),this.add(i),this.add(r),this.highDownOnUpdate=function(t,e){r.ignore="emphasis"===e?(i.ignore=i.hoverIgnore,r.hoverIgnore):(i.ignore=i.normalIgnore,r.normalIgnore)},this.updateData(t,e,!0)}function rl(t,e,n){var r,a={},o="toggleSelected"===t;return n.eachComponent("legend",function(i){o&&null!=r?i[r?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),r=i.isSelected(e.name)),D(i.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a[e]=a.hasOwnProperty(e)?a[e]&&n:n}})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}function al(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},o=nr(i,a,r);Vp(e.get("orient"),t,e.get("itemGap"),o.width,o.height),function(t,e,n,i,r){var a=!r||!r.hv||r.hv[0],o=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(a||o){var l;if("raw"===s)l="group"===t.type?new Vt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}e=nr(A({width:l.width,height:l.height},e),n,i);var h=t.position,c=a?e.x-l.x:0,d=o?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[h[0]+c,h[1]+d])}}(t,i,a,r)}function ol(t,e){var n=Pp(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new jf({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}function sl(t,e,n,i,r,a){var o;return"line"!==e&&e.indexOf("empty")<0?(o=n.getItemStyle(),t.style.stroke=i,a||(o.stroke=r)):o=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(o)}function ll(t,e,n,i){hl(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),ul(t,e,n,i)}function ul(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function hl(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function cl(t,e,n){var i=[1,1];i[t.getOrient().index]=0,ir(e,n,{type:"box",ignoreSize:i})}function dl(t,e,n,i,r){var s,a,l,u,h,c,d,f,o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var p=(s=e,l=(a=t).axis,u=l.dim,h=s,c=[],d=Number.MAX_VALUE,f=-1,cx(a.seriesModels,function(e){var t,n,i=e.getData().mapDimension(u,!0);if(e.getAxisTooltipData){var r=e.getAxisTooltipData(i,s,l);n=r.dataIndices,t=r.nestestValue}else{if(!(n=e.getData().indicesOfNearest(i[0],s,"category"===l.type?.5:null)).length)return;t=e.getData().get(i[0],n[0])}if(null!=t&&isFinite(t)){var a=s-t,o=Math.abs(a);o<=d&&((o<d||0<=a&&f<0)&&(d=o,f=a,h=t,c.length=0),cx(n,function(t){c.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:c,snapToValue:h}),g=p.payloadBatch,m=p.snapToValue;g[0]&&null==r.seriesIndex&&k(r,g[0]),!i&&t.snap&&o.containData(m)&&null!=m&&(e=m),n.showPointer(t,e,g,r),n.showTooltip(t,p,m)}}function fl(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function pl(t,e,n,i){var r=n.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=Ss(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function gl(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function ml(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function vl(t,e,n){if(!wh.node){var i=e.getZr();px(i).records||(px(i).records={}),function(c,d){function t(t,h){c.on(t,function(e){var n,i,r,t,a,o,s,l,u=(n=d,{dispatchAction:r=function(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=r,n.dispatchAction(t))},pendings:i={showTip:[],hideTip:[]}});gx(px(c).records,function(t){t&&h(t,e,u.dispatchAction)}),t=u.pendings,a=d,s=t.showTip.length,l=t.hideTip.length,s?o=t.showTip[s-1]:l&&(o=t.hideTip[l-1]),o&&(o.dispatchAction=null,a.dispatchAction(o))})}px(c).initialized||(px(c).initialized=!0,t("click",y(xl,"click")),t("mousemove",y(xl,"mousemove")),t("globalout",yl))}(i,e),(px(i).records[t]||(px(i).records[t]={})).handler=n}}function yl(t,e,n){t.handler("leave",null,n)}function xl(t,e,n,i){e.handler(t,n,i)}function _l(t,e){if(!wh.node){var n=e.getZr();(px(n).records||{})[t]&&(px(n).records[t]=null)}}function wl(){}function bl(t,e,n,i){(function n(i,t){if(O(i)&&O(t)){var r=!0;return D(t,function(t,e){r=r&&n(i[e],t)}),!!r}return i===t})(vx(n).lastProp,i)||(vx(n).lastProp=i,e?Mi(n,i,t):(n.stopAnimation(),n.attr(i)))}function Sl(t,e){t[e.get("label.show")?"show":"hide"]()}function Ml(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Il(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function Tl(t,e,n,i,r){var a=Cl(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),o=n.getModel("label"),s=Pp(o.get("padding")||0),l=o.getFont(),u=ie(a,l),h=r.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=r.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p,g,m,v,y,x,_=r.verticalAlign;"bottom"===_&&(h[1]-=d),"middle"===_&&(h[1]-=d/2),p=h,g=c,m=d,y=(v=i).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=o.get("backgroundColor");w&&"auto"!==w||(w=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:o.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:o.getTextColor(),textPosition:"inside",textPadding:s,fill:w,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function Cl(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:i.precision}),o=i.formatter;if(o){var s={value:mo(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};D(n,function(t){var e=r.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,i=e&&e.getDataParams(n);i&&s.seriesData.push(i)}),M(o)?a=o.replace("{value}",a):g(o)&&(a=o(s))}return a}function Al(t,e,n){var i=ot();return ht(i,i,n.rotation),ut(i,i,n.position),Ci([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function Dl(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function kl(t){return"x"===t.dim?0:1}function Pl(r){var n,i,t,e,a,o,s,l,u=[],h=r.get("transitionDuration"),c=r.get("backgroundColor"),d=r.getModel("textStyle"),f=r.get("padding");return h&&u.push((l="left "+(o=h)+"s "+(s="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+o+"s "+s,P(Ix,function(t){return t+"transition:"+l}).join(";"))),c&&(wh.canvasSupported?u.push("background-Color:"+c):(u.push("background-Color:#"+((a=St(c))?((1<<24)+(a[0]<<16)+(a[1]<<8)+ +a[2]).toString(16).slice(1):void 0)),u.push("filter:alpha(opacity=70)"))),Sx(["width","color","radius"],function(t){var e="border-"+t,n=Mx(e),i=r.get(n);null!=i&&u.push(e+":"+i+("color"===t?"":"px"))}),u.push((i=[],t=(n=d).get("fontSize"),(e=n.getTextColor())&&i.push("color:"+e),i.push("font:"+n.getFont()),t&&i.push("line-height:"+Math.round(3*t/2)+"px"),Sx(["decoration","align"],function(t){var e=n.get(t);e&&i.push("text-"+t+":"+e)}),i.join(";"))),null!=f&&u.push("padding:"+Pp(f).join("px ")+"px"),u.join(";")+";"}function Ll(n,t){if(wh.wxa)return null;var e=document.createElement("div"),i=this._zr=t.getZr();this.el=e,this._x=t.getWidth()/2,this._y=t.getHeight()/2,n.appendChild(e),this._container=n,this._show=!1,this._hideTimeout;var r=this;e.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},e.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=i.handler;J(n,t,!0),e.dispatch("mousemove",t)}},e.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function Ol(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function Nl(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(Ni.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new Ni(n,e,e.ecModel))}return e}function El(t,e){return t.dispatchAction||_(e.dispatchAction,e)}function zl(t){return"center"===t||"middle"===t}function Bl(t){je(t,"label",["show"])}function Rl(t,e,n,i,r,a){var o=[],s=qa(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=Wl(e,s,t),u=e.indicesOfNearest(s,l)[0];o[r]=e.get(n,u),o[a]=e.get(i,u);var h=function(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}(e.get(i,u));return 0<=(h=Math.min(h,20))&&(o[a]=+o[a].toFixed(h)),o}function Fl(t,e){var n,i=t.getData(),r=t.coordinateSystem;if(e&&(n=e,isNaN(parseFloat(n.x))||isNaN(parseFloat(n.y)))&&!L(e.coord)&&r){var a=r.dimensions,o=Vl(e,i,r,t);if((e=b(e)).type&&Ex[e.type]&&o.baseAxis&&o.valueAxis){var s=Ox(a,o.baseAxis.dim),l=Ox(a,o.valueAxis.dim);e.coord=Ex[e.type](i,o.baseDataDim,o.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)Ex[u[h]]&&(u[h]=Wl(i,i.mapDimension(a[h]),u[h]));e.coord=u}}return e}function Vl(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r<i.length;r++){var a=n.getDimensionInfo(i[r]);if(a.name===e)return a.coordDim}}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function Gl(t,e){return!(t&&t.containData&&e.coord&&(n=e,isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y))))||t.containData(e.coord);var n}function Hl(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function Wl(t,e,n){if("average"!==n)return"median"===n?t.getMedian(e):t.getDataExtent(e,!0)["max"===n?1:0];var i=0,r=0;return t.each(e,function(t){isNaN(t)||(i+=t,r++)}),i/r}function Xl(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e,n=s.getItemModel(t),i=Fi(n.get("x"),u.getWidth()),r=Fi(n.get("y"),u.getHeight());if(isNaN(i)||isNaN(r)){if(l.getMarkerPosition)e=l.getMarkerPosition(s.getValues(s.dimensions,t));else if(h){var a=s.get(h.dimensions[0],t),o=s.get(h.dimensions[1],t);e=h.dataToPoint([a,o])}}else e=[i,r];isNaN(i)||(e[0]=i),isNaN(r)||(e[1]=r),s.setItemLayout(t,e)})}function Zl(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Ul(t){return"_"+t+"Type"}function Yl(t,e,n){var i=e.getItemVisual(n,"color"),r=e.getItemVisual(n,t),a=e.getItemVisual(n,t+"Size");if(r&&"none"!==r){L(a)||(a=[a,a]);var o=ps(r,-a[0]/2,-a[1]/2,a[0],a[1],i);return o.name=t,o}}function ql(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];t.cpy1=n?(t.cpx1=n[0],n[1]):t.cpx1=NaN}function jl(t,e,n){Ac.call(this),this._createLine(t,e,n)}function $l(t){this._ctor=t||jl,this.group=new Ac}function Kl(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 Ql(t){return isNaN(t[0])||isNaN(t[1])}function Jl(t){return!Ql(t[0])&&!Ql(t[1])}function tu(t){return!isNaN(t)&&!isFinite(t)}function eu(t,e,n,i){var r=1-t,a=i.dimensions[t];return tu(e[r])&&tu(n[r])&&e[t]===n[t]&&i.getAxis(a).containData(e[t])}function nu(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(eu(1,n,i,t)||eu(0,n,i,t)))return!0}return Gl(t,e[0])&&Gl(t,e[1])}function iu(t,e,n,i,r){var a,o=i.coordinateSystem,s=t.getItemModel(e),l=Fi(s.get("x"),r.getWidth()),u=Fi(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)a=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=o.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=o.dataToPoint([c,d])}if("cartesian2d"===o.type){var f=o.getAxis("x"),p=o.getAxis("y");h=o.dimensions;tu(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[n?0:1]):tu(t.get(h[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];t.setItemLayout(e,a)}function ru(t){return!isNaN(t)&&!isFinite(t)}function au(t,e,n){var i=1-t;return ru(e[i])&&ru(n[i])}function ou(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!au(1,n,i)&&!au(0,n,i))||(Gl(t,{coord:n,x:e.x0,y:e.y0})||Gl(t,{coord:i,x:e.x1,y:e.y1}))}function su(t,e,n,i,r){var a,o=i.coordinateSystem,s=t.getItemModel(e),l=Fi(s.get(n[0]),r.getWidth()),u=Fi(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)a=i.getMarkerPosition(t.getValues(n,e));else{var h=[f=t.get(n[0],e),p=t.get(n[1],e)];o.clampData&&o.clampData(h,h),a=o.dataToPoint(h,!0)}if("cartesian2d"===o.type){var c=o.getAxis("x"),d=o.getAxis("y"),f=t.get(n[0],e),p=t.get(n[1],e);ru(f)?a[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):ru(p)&&(a[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}function lu(t,e){Ux[t]=e}function uu(t){return Ux[t]}function hu(t){this.model=t}function cu(t){this.model=t}function du(t){var r,a,o,e,n,u,i=(r={},a=[],o=[],t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)a.push(t);else{var n=e.getBaseAxis();if("category"===n.type){var i=n.dim+"_"+n.index;r[i]||(r[i]={categoryAxis:n,valueAxis:e.getOtherAxis(n),series:[]},o.push({axisDim:n.dim,axisIndex:n.index})),r[i].series.push(t)}else a.push(t)}}),{seriesGroupByCategoryAxis:r,other:a,meta:o});return{value:v([(n=i.seriesGroupByCategoryAxis,u=[],D(n,function(t){var e=t.categoryAxis,n=t.valueAxis.dim,i=[" "].concat(P(t.series,function(t){return t.name})),r=[e.model.getCategories()];D(t.series,function(t){r.push(t.getRawData().mapArray(n,function(t){return t}))});for(var a=[i.join(n_)],o=0;o<r[0].length;o++){for(var s=[],l=0;l<r.length;l++)s.push(r[l][o]);a.push(s.join(n_))}u.push(a.join("\n"))}),u.join("\n\n"+e_+"\n\n")),(e=i.other,P(e,function(t){var r=t.getRawData(),a=[t.name],o=[];return r.each(r.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],n=r.getName(e),i=0;i<t-1;i++)o[i]=arguments[i];a.push((n?n+n_:"")+o.join(n_))}),a.join("\n")}).join("\n\n"+e_+"\n\n"))],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+e_+"\n\n"),meta:i.meta}}function fu(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function pu(t,o){var e=t.split(new RegExp("\n*"+e_+"\n*","g")),s={series:[]};return D(e,function(t,e){if(0<=(a=t).slice(0,a.indexOf("\n")).indexOf(n_)){var n=function(t){for(var e=t.split(/\n+/g),n=[],i=P(fu(e.shift()).split(i_),function(t){return{name:t,data:[]}}),r=0;r<e.length;r++){var a=fu(e[r]).split(i_);n.push(a.shift());for(var o=0;o<a.length;o++)i[o]&&(i[o].data[r]=a[o])}return{series:i,categories:n}}(t),i=o[e],r=i.axisDim+"Axis";i&&(s[r]=s[r]||[],s[r][i.axisIndex]={data:n.categories},s.series=s.series.concat(n.series))}else{n=function(t){for(var e=t.split(/\n+/g),n=fu(e.shift()),i=[],r=0;r<e.length;r++){var a,o=fu(e[r]).split(i_),s="",l=!1;a=isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),i[r]={name:s,value:[]},i[r].value):i[r]=[];for(var u=0;u<o.length;u++)a.push(+o[u]);1===a.length&&(l?i[r].value=a[0]:i[r]=a[0])}return{name:n,data:i}}(t);s.series.push(n)}var a}),s}function gu(t){this._dom=null,this.model=t}function mu(t){return t[r_]||(t[r_]={})}function vu(t){Fh.call(this),this._zr=t,this.group=new Ac,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+y_++,this._handlers={},o_(x_,function(t,e){this._handlers[e]=_(t,this)},this)}function yu(t,e){var n,i,r,a,o,s=t._zr;t._enableGlobalPan||(r=s,a=p_,o=t._uid,mu(r)[a]=o),n=s,i=t._handlers,o_(i,function(t,e){n.on(e,t)}),t._brushType=e.brushType,t._brushOption=m(b(v_),e,!0)}function xu(t){var n,e,i,r,a,o,s=t._zr;i=s,r=p_,a=t._uid,(o=mu(i))[r]===a&&(o[r]=null),n=s,e=t._handlers,o_(e,function(t,e){n.off(e,t)}),t._brushType=t._brushOption=null}function _u(t,e){var n=__[e.brushType].createCover(t,e);return n.__brushOption=e,Su(n,e),t.group.add(n),n}function wu(t,e){var n=Iu(e);return n.endCreating&&(n.endCreating(t,e),Su(e,e.__brushOption)),e}function bu(t,e){var n=e.__brushOption;Iu(e).updateCoverShape(t,e,n.range,n)}function Su(t,e){var n=e.z;null==n&&(n=c_),t.traverse(function(t){t.z=n,t.z2=n})}function Mu(t,e){Iu(e).updateCommon(t,e),bu(t,e)}function Iu(t){return __[t.__brushOption.brushType]}function Tu(t,e,n){var i=t._panels;if(!i)return!0;var r,a=t._transform;return o_(i,function(t){t.isTargetByCursor(e,n,a)&&(r=t)}),r}function Cu(t,e){var n=t._panels;if(!n)return!0;var i=e.__brushOption.panelId;return null==i||n[i]}function Au(e){var t=e._covers,n=t.length;return o_(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function Du(t,e){var n=s_(t._covers,function(t){var e=t.__brushOption,n=b(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function ku(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Pu(e,n,t,i){var r=new Ac;return r.add(new jf({name:"main",style:Eu(t),silent:!0,draggable:!0,cursor:"move",drift:a_(e,n,r,"nswe"),ondragend:a_(Du,n,{isEnd:!0})})),o_(i,function(t){r.add(new jf({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:a_(e,n,r,t),ondragend:a_(Du,n,{isEnd:!0})}))}),r}function Lu(t,e,n,i){var r=i.brushStyle.lineWidth||0,a=u_(r,f_),o=n[0][0],s=n[1][0],l=o-r/2,u=s-r/2,h=n[0][1],c=n[1][1],d=h-a+r/2,f=c-a+r/2,p=h-o,g=c-s,m=p+r,v=g+r;Nu(t,e,"main",o,s,p,g),i.transformable&&(Nu(t,e,"w",l,u,a,v),Nu(t,e,"e",d,u,a,v),Nu(t,e,"n",l,u,m,a),Nu(t,e,"s",l,f,m,a),Nu(t,e,"nw",l,u,a,a),Nu(t,e,"ne",d,u,a,a),Nu(t,e,"sw",l,f,a,a),Nu(t,e,"se",d,f,a,a))}function Ou(i,r){var t=r.__brushOption,a=t.transformable,e=r.childAt(0);e.useStyle(Eu(t)),e.attr({silent:!a,cursor:a?"move":"default"}),o_(["w","e","n","s","se","sw","ne","nw"],function(t){var e=r.childOfName(t),n=function t(e,n){if(1<n.length){n=n.split("");var i=[t(e,n[0]),t(e,n[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var r={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=Ai(r[n],(o=e,Ti(o.group)));var o;return a[i]}(i,t);e&&e.attr({silent:!a,invisible:!a,cursor:a?m_[n]+"-resize":null})})}function Nu(t,e,n,i,r,a,o){var s,l,u,h,c,d=e.childOfName(n);d&&d.setShape((s=Vu(t,e,[[i,r],[i+a,r+o]]),l=l_(s[0][0],s[1][0]),u=l_(s[0][1],s[1][1]),h=u_(s[0][0],s[1][0]),c=u_(s[0][1],s[1][1]),{x:l,y:u,width:h-l,height:c-u}))}function Eu(t){return A({strokeNoScale:!0},t.brushStyle)}function zu(t,e,n,i){var r=[l_(t,n),l_(e,i)],a=[u_(t,n),u_(e,i)];return[[r[0],a[0]],[r[1],a[1]]]}function Bu(t,e,n,i,r,a,o){var s=i.__brushOption,l=t(s.range),u=Fu(n,a,o);o_(r.split(""),function(t){var e=g_[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(zu(l[0][0],l[1][0],l[0][1],l[1][1])),Mu(n,i),Du(n,{isEnd:!1})}function Ru(t,e,n,i){var r=e.__brushOption.range,a=Fu(t,n,i);o_(r,function(t){t[0]+=a[0],t[1]+=a[1]}),Mu(t,e),Du(t,{isEnd:!1})}function Fu(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),a=i.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function Vu(t,e,n){var i=Cu(t,e);return i&&!0!==i?i.clipPath(n,t._transform):b(n)}function Gu(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Wu(t,e,n){return t.childOfName("main").contain(e,n)}function Xu(t,e,n,i){var r,a=t._creatingCover,o=t._creatingPanel,s=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],a=n[1]-i[1],o=h_(r*r+a*a,.5);return d_<o}(t)||a){if(o&&!a){"single"===s.brushMode&&Au(t);var l=b(s);l.brushType=Zu(l.brushType,o),l.panelId=!0===o?null:o.panelId,a=t._creatingCover=_u(t,l),t._covers.push(a)}if(a){var u=__[Zu(t._brushType,o)];a.__brushOption.range=u.getCreatingRange(Vu(t,a,t._track)),i&&(wu(t,a),u.updateCommon(t,a)),bu(t,a),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&Tu(t,e,n)&&Au(t)&&(r={isEnd:i,removeOnClick:!0});return r}function Zu(t,e){return"auto"===t?e.defaultBrushType:t}function Uu(t,e){if(t._dragging){Gu(e);var n=e.offsetX,i=e.offsetY,r=Xu(t,e,t.group.transformCoordToLocal(n,i),!0);t._dragging=!1,t._track=[],t._creatingCover=null,r&&Du(t,r)}}function Yu(l){return{createCover:function(t,e){return Pu(a_(Bu,function(t){var e=[t,[0,100]];return l&&e.reverse(),e},function(t){return t[l]}),t,e,[["w","e"],["n","s"]][l])},getCreatingRange:function(t){var e=ku(t);return[l_(e[0][l],e[1][l]),u_(e[0][l],e[1][l])]},updateCoverShape:function(t,e,n,i){var r,a=Cu(t,e);if(!0!==a&&a.getLinearBrushOtherExtent)r=a.getLinearBrushOtherExtent(l,t._transform);else{var o=t._zr;r=[0,[o.getWidth(),o.getHeight()][1-l]]}var s=[n,r];l&&s.reverse(),Lu(t,e,s,i)},updateCommon:Ou,contain:Wu}}function qu(o,s,l){return o=ju(o),function(t,e){return o.contain(e[0],e[1])&&(n=t,i=l,r=s.getComponentByElement(n.topTarget),a=r&&r.coordinateSystem,!(r&&r!==i&&!w_[r.mainType]&&a&&a.model!==i));var n,i,r,a}}function ju(t){return Vt.create(t)}function $u(t,e,n){var i=this._targetInfoList=[],r={},a=Qu(e,t);b_(A_,function(t,e){(!n||!n.include||0<=S_(n.include,e))&&t(a,i,r)})}function Ku(t){return t[0]>t[1]&&t.reverse(),t}function Qu(t,e){return nn(t,e,{includeMainTypes:T_})}function Ju(t,e,n,i){var r=n.getAxis(["x","y"][t]),a=Ku(P([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}function th(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function eh(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function nh(t){var e=t[N_];return e||(e=t[N_]=[{}]),e}function ih(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:0<n?-1:n<0?1:e?-1:1}}function rh(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}function ah(n,s,l){function u(t,n){n.nodes.push(t),s(function(e){D(l(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(t){function e(t){var n,i,r,e;e=t,!(0<=p(o.nodes,e))&&(n=t,i=o,r=!1,s(function(e){D(l(n,e)||[],function(t){i.records[e.name][t]&&(r=!0)})}),r)&&(u(t,o),a=!0)}var a,o={nodes:[],records:{}};if(s(function(t){o.records[t.name]={}}),!t)return o;for(u(t,o);a=!1,n(e),a;);return o}}function oh(t,e){var n=t.getAxisModel(),i=t._percentWindow,r=t._valueWindow;if(i){var a=Hi(r,[0,500]);a=Math.min(a,20);var o=e||0===i[0]&&100===i[1];n.setRange(o?null:+r[0].toFixed(a),o?null:+r[1].toFixed(a))}}function sh(e){var n={};return Z_(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function lh(t,r){var a=t._rangePropMode,o=t.get("rangeMode");Z_([["start","startValue"],["end","endValue"]],function(t,e){var n=null!=r[t[0]],i=null!=r[t[1]];n&&!i?a[e]="percent":!n&&i?a[e]="value":o?a[e]=o[e]:n&&(a[e]="percent")})}function uh(t,e,n){(this._brushController=new vu(n.getZr())).on("brush",_(this._onBrush,this)).mount(),this._isZoomActive}function hh(e){var n={};return D(["xAxisIndex","yAxisIndex"],function(t){n[t]=e[t],null==n[t]&&(n[t]="all"),(!1===n[t]||"none"===n[t])&&(n[t]=[])}),n}function ch(t,e){t.setIconStatus("back",1<nh(e).length?"emphasis":"normal")}function dh(t){this.model=t}var fh,ph,gh,mh,vh,yh,xh=2311,_h=function(){return xh++},wh="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:(fh=navigator.userAgent,ph={},gh=fh.match(/Firefox\/([\d.]+)/),mh=fh.match(/MSIE\s([\d.]+)/)||fh.match(/Trident\/.+?rv:(([\d.]+))/),vh=fh.match(/Edge\/([\d.]+)/),yh=/micromessenger/i.test(fh),gh&&(ph.firefox=!0,ph.version=gh[1]),mh&&(ph.ie=!0,ph.version=mh[1]),vh&&(ph.edge=!0,ph.version=vh[1]),yh&&(ph.weChat=!0),{browser:ph,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!ph.ie&&!ph.edge,pointerEventsSupported:"onpointerdown"in window&&(ph.edge||ph.ie&&11<=ph.version),domSupported:"undefined"!=typeof document}),bh={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Sh={"[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},Mh=Object.prototype.toString,Ih=Array.prototype,Th=Ih.forEach,Ch=Ih.filter,Ah=Ih.slice,Dh=Ih.map,kh=Ih.reduce,Ph={},Lh=function(){return Ph.createCanvas()};Ph.createCanvas=function(){return document.createElement("canvas")};var Oh,Nh="__ec_primitive__";l.prototype={constructor:l,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=_(t,e)),this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var Eh="undefined"==typeof Float32Array?Array:Float32Array,zh=H,Bh=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};U.prototype={constructor:U,_dragStart:function(t){var e=t.target;e&&e.draggable&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(Y(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,a=i-this._y;this._x=n,this._y=i,e.drift(r,a,t),this.dispatchToElement(Y(e,t),"drag",t.event);var o=this.findHover(n,i,e).target,s=this._dropTarget;e!==(this._dropTarget=o)&&(s&&o!==s&&this.dispatchToElement(Y(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(Y(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(Y(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(Y(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Rh=Array.prototype.slice,Fh=function(t){this._$handlers={},this._$eventProcessor=t};Fh.prototype={constructor:Fh,one:function(t,e,n,i){return q(this,t,e,n,i,!0)},on:function(t,e,n,i){return q(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,a=n[t].length;r<a;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;3<r&&(i=Rh.call(i,1));for(var a=e.length,o=0;o<a;){var s=e[o];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(o,1),a--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,r=i.length;4<r&&(i=Rh.call(i,1,i.length-1));for(var a=i[i.length-1],o=e.length,s=0;s<o;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(e.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this}};var Vh=Math.log(2),Gh="undefined"!=typeof window&&!!window.addEventListener,Hh=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Wh="___zrEVENTSAVED",Xh=[],Zh=Gh?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Uh=function(){this._track=[]};Uh.prototype={constructor:Uh,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},a=0,o=i.length;a<o;a++){var s=i[a],l=$(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Yh)if(Yh.hasOwnProperty(e)){var n=Yh[e](this._track,t);if(n)return n}}};var Yh={pinch:function(t,e){var n,i=t.length;if(i){var r=(t[i-1]||{}).points,a=(t[i-2]||{}).points||r;if(a&&1<a.length&&r&&1<r.length){var o=et(r)/et(a);!isFinite(o)&&(o=1),e.pinchScale=o;var s=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},qh="silent";it.prototype.dispose=function(){};var jh=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],$h=function(t,e,n,i){Fh.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new it,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,U.call(this),this.setHandlerProxy(n)};$h.prototype={constructor:$h,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(D(jh,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=at(this,e,n),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!n&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i,r,a=(t=t||{}).target;if(!a||!a.silent){for(var o="on"+e,s={type:e,event:r=n,target:(i=t).target,topTarget:i.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,stop:nt};a&&(a[o]&&(s.cancelBubble=a[o].call(a,s)),a.trigger(e,s),a=a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,s),t.trigger&&t.trigger(e,s)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;0<=a;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=rt(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==qh)){r.target=i[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Uh);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},D(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(o){$h.prototype[o]=function(t){var e,n,i=t.zrX,r=t.zrY,a=at(this,i,r);if("mouseup"===o&&a||(n=(e=this.findHover(i,r)).target),"mousedown"===o)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===o)this._upEl=n;else if("click"===o){if(this._downEl!==this._upEl||!this._downPoint||4<zh(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,o,t)}}),e($h,Fh),e($h,U);var Kh="undefined"==typeof Float32Array?Array:Float32Array,Qh=st,Jh=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},tc=Jh.prototype;tc.transform=null,tc.needLocalTransform=function(){return ft(this.rotation)||ft(this.position[0])||ft(this.position[1])||ft(this.scale[0]-1)||ft(this.scale[1]-1)};var ec=[];tc.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(n||e){var r,a;i=i||ot(),n?this.getLocalTransform(i):Qh(i),e&&(n?lt(i,t.transform,i):(r=i,a=t.transform,r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r[4]=a[4],r[5]=a[5])),this.transform=i;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(ec);var s=ec[0]<0?-1:1,l=ec[1]<0?-1:1,u=((ec[0]-s)*o+s)/ec[0]||0,h=((ec[1]-l)*o+l)/ec[1]||0;i[0]*=u,i[1]*=u,i[2]*=h,i[3]*=h}this.invTransform=this.invTransform||ot(),dt(this.invTransform,i)}else i&&Qh(i)},tc.getLocalTransform=function(t){return Jh.getLocalTransform(this,t)},tc.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},tc.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var nc=[],ic=ot();tc.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,r=this.scale;ft(e-1)&&(e=Math.sqrt(e)),ft(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},tc.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(lt(nc,t.invTransform,e),e=nc);var n=this.origin;n&&(n[0]||n[1])&&(ic[4]=n[0],ic[5]=n[1],lt(nc,e,ic),nc[4]-=n[0],nc[5]-=n[1],e=nc),this.setLocalTransform(e)}},tc.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},tc.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&W(n,n,i),n},tc.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&W(n,n,i),n},Jh.getLocalTransform=function(t,e){Qh(e=e||[]);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),ct(e,e,i),r&&ht(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var rc={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*n*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/.4):n*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*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?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-rc.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*rc.bounceIn(2*t):.5*rc.bounceOut(2*t-1)+.5}};pt.prototype={constructor:pt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var n=(t-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?rc[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),1===n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var ac=function(){this.head=null,this.tail=null,this._len=0},oc=ac.prototype;oc.insert=function(t){var e=new sc(t);return this.insertEntry(e),e},oc.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},oc.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},oc.len=function(){return this._len},oc.clear=function(){this.head=this.tail=null,this._len=0};var sc=function(t){this.value=t,this.next,this.prev},lc=function(t){this._list=new ac,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},uc=lc.prototype;uc.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&0<a){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new sc(e),o.key=t,n.insertEntry(o),i[t]=o}return r},uc.get=function(t){var e=this._map[t],n=this._list;return null!=e?(e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value):void 0},uc.clear=function(){this._list.clear(),this._map={}};var hc={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]},cc=new lc(20),dc=null,fc=Array.prototype.slice,pc=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Tt,this._setter=i||Ct,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};pc.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:Et(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,n=0;n<e;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,a=function(){--r||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=Bt(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var r=e[i];t&&r.onframe(this._target,1),n&&n.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 gc=1;"undefined"!=typeof window&&(gc=Math.max(window.devicePixelRatio||1,1));var mc=gc,vc=function(){},yc=vc,xc=function(){this.animators=[]};xc.prototype={constructor:xc,animate:function(t,e){var n,i=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;i="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=r;if(n){var h=r.animators,c=new pc(n,e);return c.during(function(){r.dirty(i)}).done(function(){h.splice(p(h,c),1)}),h.push(c),a&&a.animation.addAnimator(c),c}yc('Property "'+t+'" is not existed in element '+r.id)},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;i<n;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,r,a){Rt(this,t,e,n,i,r,a)},animateFrom:function(t,e,n,i,r,a){Rt(this,t,e,n,i,r,a,!0)}};var _c=function(t){Jh.call(this,t),Fh.call(this,t),xc.call(this,t),this.id=t.id||_h()};_c.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[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(O(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},e(_c,xc),e(_c,Jh),e(_c,Fh);var wc,bc,Sc,Mc,Ic=W,Tc=Math.min,Cc=Math.max;Vt.prototype={constructor:Vt,union:function(t){var e=Tc(t.x,this.x),n=Tc(t.y,this.y);this.width=Cc(t.x+t.width,this.x+this.width)-e,this.height=Cc(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(wc=[],bc=[],Sc=[],Mc=[],function(t){if(t){wc[0]=Sc[0]=this.x,wc[1]=Mc[1]=this.y,bc[0]=Mc[0]=this.x+this.width,bc[1]=Sc[1]=this.y+this.height,Ic(wc,wc,t),Ic(bc,bc,t),Ic(Sc,Sc,t),Ic(Mc,Mc,t),this.x=Tc(wc[0],bc[0],Sc[0],Mc[0]),this.y=Tc(wc[1],bc[1],Sc[1],Mc[1]);var e=Cc(wc[0],bc[0],Sc[0],Mc[0]),n=Cc(wc[1],bc[1],Sc[1],Mc[1]);this.width=e-this.x,this.height=n-this.y}}),calculateTransform:function(t){var e=t.width/this.width,n=t.height/this.height,i=ot();return ut(i,i,[-this.x,-this.y]),ct(i,i,[e,n]),ut(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof Vt||(t=Vt.create(t));var e=this.x,n=this.x+this.width,i=this.y,r=this.y+this.height,a=t.x,o=t.x+t.width,s=t.y,l=t.y+t.height;return!(n<a||o<e||r<s||l<i)},contain:function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new Vt(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}}},Vt.create=function(t){return new Vt(t.x,t.y,t.width,t.height)};var Ac=function(t){for(var e in t=t||{},_c.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ac.prototype={constructor:Ac,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,i=n.indexOf(e);0<=i&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Ac&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=p(i,t);return r<0||(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof Ac&&t.delChildrenFromStorage(n)),e&&e.refresh()),this},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e<n.length;e++)t=n[e],i&&(i.delFromStorage(t),t instanceof Ac&&t.delChildrenFromStorage(i)),t.parent=null;return n.length=0,this},eachChild:function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof Ac&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof Ac&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new Vt(0,0,0,0),i=t||this._children,r=[],a=0;a<i.length;a++){var o=i[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(n.copy(s),n.applyTransform(l),(e=e||n.clone()).union(n)):(e=e||s.clone()).union(s)}}return e||n}},i(Ac,_c);var Dc=32,kc=7,Pc=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Pc.prototype={constructor:Pc,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,r=e.length;i<r;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,wh.canvasSupported&&Ut(n,Yt)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var r=i,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),r=(a=r).clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Ac&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var n=this._roots[e];n instanceof Ac&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var i=t.length;e<i;e++)this.delRoot(t[e])}else{var r=p(this._roots,t);0<=r&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Ac&&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:Yt};var Lc={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Oc=function(t,e,n){return Lc.hasOwnProperty(e)?n*=t.dpr:n},Nc={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Ec=9,zc=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Bc=function(t){this.extendFrom(t,!1)};Bc.prototype={constructor:Bc,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){var i=this,r=n&&n.style,a=!r||t.__attrCachedBy!==Nc.STYLE_BIND;t.__attrCachedBy=Nc.STYLE_BIND;for(var o=0;o<zc.length;o++){var s=zc[o],l=s[0];(a||i[l]!==r[l])&&(t[l]=Oc(t,l,i[l]||s[1]))}if((a||i.fill!==r.fill)&&(t.fillStyle=i.fill),(a||i.stroke!==r.stroke)&&(t.strokeStyle=i.stroke),(a||i.opacity!==r.opacity)&&(t.globalAlpha=null==i.opacity?1:i.opacity),(a||i.blend!==r.blend)&&(t.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var u=i.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?jt:qt)(t,e,n),r=e.colorStops,a=0;a<r.length;a++)i.addColorStop(r[a].offset,r[a].color);return i}};for(var Rc=Bc.prototype,Fc=0;Fc<zc.length;Fc++){var Vc=zc[Fc];Vc[0]in Rc||(Rc[Vc[0]]=Vc[1])}Bc.getGradient=Rc.getGradient;var Gc=function(t,e){this.image=t,this.repeat=e,this.type="pattern"},Hc=function(t,e,n){var i;n=n||mc,"string"==typeof t?i=Kt(t,e,n):O(t)&&(t=(i=t).id),this.id=t;var r=(this.dom=i).style;r&&(i.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=n};Hc.prototype={constructor:Hc,__dirty:!0,__used:!(Gc.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=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 n=this.dpr,i=this.dom,r=i.style,a=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,a&&(a.width=t*n,a.height=e*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n,i=this.dom,r=this.ctx,a=i.width,o=i.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/u,o/u)),r.clearRect(0,0,a,o),e&&"transparent"!==e)&&(e.colorStops?(n=e.__canvasGradient||Bc.getGradient(r,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=n):e.image&&(n=Gc.prototype.getCanvasPattern.call(e,r)),r.save(),r.fillStyle=n||e,r.fillRect(0,0,a,o),r.restore());if(s){var h=this.domBack;r.save(),r.globalAlpha=l,r.drawImage(h,0,0,a,o),r.restore()}}};var Wc="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Xc=new lc(50),Zc={},Uc=0,Yc=5e3,qc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,jc="12px sans-serif",$c={};$c.measureText=function(t,e){var n=(Oh||(Oh=Lh().getContext("2d")),Oh);return n.font=e||jc,n.measureText(t)};var Kc=jc,Qc={left:1,right:1,center:1},Jc={top:1,bottom:1,middle:1},td=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],ed={},nd={},id=new Vt,rd=function(){};Le.prototype={constructor:Le,type:"displayable",__dirty:!0,invisible:!(rd.prototype={constructor:rd,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&ve(n);var i=n.text;if(null!=i&&(i+=""),Pe(i,n)){t.save();var r=this.transform;n.transformText?this.setTransform(t):r&&(id.copy(e),id.applyTransform(r),e=id),xe(this,t,i,n,e,Ec),t.restore()}}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(){},afterBrush:function(){},brush:function(){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?_c.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 Bc(t,this),this.dirty(!1),this},calculateTextPosition:null},i(Le,_c),e(Le,rd),Oe.prototype={constructor:Oe,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var r=this._image=Jt(i,this._image,this,this.onload);if(r&&ee(r)){var a=n.x||0,o=n.y||0,s=n.width,l=n.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),n.sWidth&&n.sHeight){var h=n.sx||0,c=n.sy||0;t.drawImage(r,h,c,n.sWidth,n.sHeight,a,o,s,l)}else if(n.sx&&n.sy){var d=s-(h=n.sx),f=l-(c=n.sy);t.drawImage(r,h,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,s,l);null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Vt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},i(Oe,Le);var ad=314159,od=new Vt(0,0,0,0),sd=new Vt(0,0,0,0),ld=function(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=k({},n||{}),this.dpr=n.devicePixelRatio||mc,this._singleCanvas=i;var r=(this.root=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,o,s,l=this._zlevelList=[],u=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var h=t.width,c=t.height;null!=n.width&&(h=n.width),null!=n.height&&(c=n.height),this.dpr=n.devicePixelRatio||1,t.width=h*this.dpr,t.height=c*this.dpr,this._width=h,this._height=c;var d=new Hc(t,this,this.dpr);d.__builtin__=!0,d.initContext(),(u[ad]=d).zlevel=ad,l.push(ad),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var f=this._domRoot=(a=this._width,o=this._height,(s=document.createElement("div")).style.cssText=["position:relative","width:"+a+"px","height:"+o+"px","padding:0","margin:0","border-width:0"].join(";")+";",s);t.appendChild(f)}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();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(t){var e=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var r=n[i],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===i?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return(n.__from=t).__hoverMir=n,e&&n.setStyle(e),this._hoverElements.push(n),n}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,i=p(n,e);0<=i&&n.splice(i,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var n=t[e].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){Ut(t,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(1e5));var i={};n.ctx.save();for(var r=0;r<e;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(r,1),o.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;Wc(function(){r._paintList(t,e,n)})}}},_compositeManually:function(){var e=this.getLayer(ad).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&n.push(s)}for(var a=!0,o=0;o<n.length;o++){var s,l=(s=n[o]).ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,c)if(15<Date.now()-d)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return wh.wxa&&D(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,n,i){var r,a,o,s=e.ctx,l=t.transform;if(!(!e.__dirty&&!n||t.invisible||0===t.style.opacity||l&&!l[0]&&!l[3]||t.culling&&(r=t,a=this._width,o=this._height,od.copy(r.getBoundingRect()),r.transform&&od.applyTransform(r.transform),sd.width=a,sd.height=o,!od.intersect(sd)))){var u=t.__clipPaths,h=i.prevElClipPaths;(!h||function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}(u,h))&&(h&&(s.restore(),i.prevElClipPaths=null,i.prevEl=null),u&&(s.save(),function(t,e){for(var n=0;n<t.length;n++){var i=t[n];i.setTransform(e),e.beginPath(),i.buildPath(e,i.shape),e.clip(),i.restoreTransform(e)}}(u,s),i.prevElClipPaths=u)),t.beforeBrush&&t.beforeBrush(s),t.brush(s,i.prevEl||null),(i.prevEl=t).afterBrush&&t.afterBrush(s)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ad);var n=this._layers[t];return n||((n=new Hc("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&m(n,this._layerConfig[t],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,a=null,o=-1,s=this._domRoot;if(n[t])yc("ZLevel "+t+" has been used already");else if((l=e)&&(l.__builtin__||"function"==typeof l.resize&&"function"==typeof l.refresh)){var l;if(0<r&&t>i[0]){for(o=0;o<r-1&&!(i[o]<t&&i[o+1]>t);o++);a=n[i[o]]}if(i.splice(o+1,0,t),!(n[t]=e).virtual)if(a){var u=a.dom;u.nextSibling?s.insertBefore(e.dom,u.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else yc("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i<r.length;i++)n=r[i],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],(n=this._layers[i]).__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],(n=this._layers[i]).__builtin__||t.call(e,n,i)},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){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){if((o=t[n]).zlevel!==t[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var i=null,r=0;for(n=0;n<t.length;n++){var a,o,s=(o=t[n]).zlevel;o.incremental?((a=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,r=1):a=this.getLayer(s+(0<r?.01:0),this._needsManuallyCompositing),a.__builtin__||yc("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==n&&(a.__dirty=!0),a.__startIndex=n,a.__drawIndex=a.incremental?-1:n,e(n),i=a),o.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?m(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];if(r===t||r===t+.01)m(this._layers[r],n[t],!0)}}},delLayer:function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(p(n,t),1))},resize:function(e,n){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=n&&(i.height=n),e=this._getSize(0),n=this._getSize(1),t.style.display="",this._width!==e||n!==this._height){for(var r in t.style.width=e+"px",t.style.height=n+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(e,n);D(this._progressiveLayers,function(t){t.resize(e,n)}),this.refresh(!0)}this._width=e,this._height=n}else{if(null==e||null==n)return;this._width=e,this._height=n,this.getLayer(ad).resize(e,n)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[ad].dom;var e=new Hc("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||Ne(s[n])||Ne(o.style[n]))-(Ne(s[r])||0)-(Ne(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,-s+o),c=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),f=Math.max(u/2,l+o),p=r.width+h+c,g=r.height+d+f;n.width=p*e,n.height=g*e,i.scale(e,e),i.clearRect(0,0,p,g),i.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);var v=new Oe({style:{x:0,y:0,image:n}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var ud=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,Fh.call(this)};ud.prototype={constructor:ud,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=p(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,r=[],a=[],o=0;o<i;o++){var s=n[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(o=0;o<i;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=r.length;for(o=0;o<i;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,Wc(function t(){e._running&&(Wc(t),!e._paused&&e._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var n=new pc(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(n),n}},e(ud,Fh);var hd,cd,dd=wh.domSupported,fd=(cd={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:hd=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:P(hd,function(t){var e=t.replace("mouse","pointer");return cd.hasOwnProperty(e)?e:t})}),pd={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},gd=Fe.prototype;gd.stopPropagation=gd.stopImmediatePropagation=gd.preventDefault=u;var md={mousedown:function(t){t=J(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=J(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Xe(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=J(this.dom,t),Xe(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=J(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Re(this,e),this.trigger("mouseout",t)},touchstart:function(t){Be(t=J(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),md.mousemove.call(this,t),md.mousedown.call(this,t)},touchmove:function(t){Be(t=J(this.dom,t)),this.handler.processGesture(t,"change"),md.mousemove.call(this,t)},touchend:function(t){Be(t=J(this.dom,t)),this.handler.processGesture(t,"end"),md.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&md.click.call(this,t)},pointerdown:function(t){md.mousedown.call(this,t)},pointermove:function(t){ze(t)||md.mousemove.call(this,t)},pointerup:function(t){md.mouseup.call(this,t)},pointerout:function(t){ze(t)||md.mouseout.call(this,t)}};D(["click","mousewheel","dblclick","contextmenu"],function(e){md[e]=function(t){t=J(this.dom,t),this.trigger(e,t)}});var vd={pointermove:function(t){ze(t)||vd.mousemove.call(this,t)},pointerup:function(t){vd.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Xe(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}},yd=Ue.prototype;yd.dispose=function(){We(this._localHandlerScope),dd&&We(this._globalHandlerScope)},yd.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e(Ue,Fh);var xd=!wh.canvasSupported,_d={canvas:ld},wd=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,r=new Pc,a=n.renderer;if(xd){if(!_d.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&_d[a]||(a="canvas");var o=new _d[a](e,r,n,t);this.storage=r,this.painter=o;var s=wh.node||wh.worker?null:new Ue(o.getViewportRoot(),o.root);this.handler=new $h(r,o,s,o.root),this.animation=new ud({stage:{update:_(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(i)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(i)}};wd.prototype={constructor:wd,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=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var n=this.painter.addHover(t,e);return this.refreshHover(),n}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,n){this.handler.on(t,e,n)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null}};var bd=D,Sd=O,Md=L,Id="series\0",Td=["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"],Cd=0,Ad=".",Dd="___EC__COMPONENT__CONTAINER___",kd=0,Pd=function(s){for(var t=0;t<s.length;t++)s[t][1]||(s[t][1]=s[t][0]);return function(t,e,n){for(var i={},r=0;r<s.length;r++){var a=s[r][1];if(!(e&&0<=p(e,a)||n&&p(n,a)<0)){var o=t.getShallow(a);null!=o&&(i[s[r][0]]=o)}}return i}},Ld=Pd([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Od={getLineStyle:function(t){var e=Ld(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[i,i]:[n,n])}},Nd=Pd([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Ed={getAreaStyle:function(t,e){return Nd(this,t,e)}},zd=Math.pow,Bd=Math.sqrt,Rd=1e-8,Fd=1e-4,Vd=Bd(3),Gd=1/3,Hd=n(),Wd=n(),Xd=n(),Zd=Math.min,Ud=Math.max,Yd=Math.sin,qd=Math.cos,jd=2*Math.PI,$d=n(),Kd=n(),Qd=n(),Jd=[],tf=[],ef={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},nf=[],rf=[],af=[],of=[],sf=Math.min,lf=Math.max,uf=Math.cos,hf=Math.sin,cf=Math.sqrt,df=Math.abs,ff="undefined"!=typeof Float32Array,pf=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};pf.prototype={constructor:pf,_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,n){n=n||0,this._ux=df(n/mc/t)||0,this._uy=df(n/mc/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(ef.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=df(t-this._xi)>this._ux||df(e-this._yi)>this._uy||this._len<5;return this.addData(ef.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(ef.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(ef.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(ef.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=uf(r)*n+t,this._yi=hf(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(ef.R,t,e,n,i),this},closePath:function(){this.addData(ef.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!ff||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;r<e;r++)n+=t[r].len();ff&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(r=0;r<e;r++)for(var a=t[r].data,o=0;o<a.length;o++)this.data[i++]=a[o];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var n,i,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=cf(h*h+c*c),f=l,p=u,g=o.length;for(a<0&&(a=r+a),f-=(a%=r)*(h/=d),p-=a*(c/=d);0<h&&f<=t||h<0&&t<=f||0===h&&(0<c&&p<=e||c<0&&e<=p);)f+=h*(n=o[i=this._dashIdx]),p+=c*n,this._dashIdx=(i+1)%g,0<h&&f<l||h<0&&l<f||0<c&&p<u||c<0&&u<p||s[i%2?"moveTo":"lineTo"](0<=h?sf(f,t):lf(f,t),0<=c?sf(p,e):lf(p,e));h=f-t,c=p-e,this._dashOffset=-cf(h*h+c*c)},_dashedBezierTo:function(t,e,n,i,r,a){var o,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=gn,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=v(g,t,n,r,o+.1)-v(g,t,n,r,o),l=v(m,e,i,a,o+.1)-v(m,e,i,a,o),y+=cf(s*s+l*l);for(;x<_&&!(d<(w+=f[x]));x++);for(o=(w-d)/y;o<=1;)u=v(g,t,n,r,o),h=v(m,e,i,a,o),x%2?p.moveTo(u,h):p.lineTo(u,h),o+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(r,a),s=r-u,l=a-h,this._dashOffset=-cf(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,ff&&(this.data=new Float32Array(t)))},getBoundingRect:function(){nf[0]=nf[1]=af[0]=af[1]=Number.MAX_VALUE,rf[0]=rf[1]=of[0]=of[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,a=0;a<t.length;){var o=t[a++];switch(1===a&&(i=e=t[a],r=n=t[a+1]),o){case ef.M:e=i=t[a++],n=r=t[a++],af[0]=i,af[1]=r,of[0]=i,of[1]=r;break;case ef.L:Sn(e,n,t[a],t[a+1],af,of),e=t[a++],n=t[a++];break;case ef.C:Mn(e,n,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],af,of),e=t[a++],n=t[a++];break;case ef.Q:p=e,g=n,m=t[a++],v=t[a++],y=t[a],x=t[a+1],_=af,w=of,S=b=void 0,S=xn,M=Ud(Zd((b=wn)(p,m,y),1),0),I=Ud(Zd(b(g,v,x),1),0),T=S(p,m,y,M),C=S(g,v,x,I),_[0]=Zd(p,y,T),_[1]=Zd(g,x,C),w[0]=Ud(p,y,T),w[1]=Ud(g,x,C),e=t[a++],n=t[a++];break;case ef.A:var s=t[a++],l=t[a++],u=t[a++],h=t[a++],c=t[a++],d=t[a++]+c;a+=1;var f=1-t[a++];1===a&&(i=uf(c)*u+s,r=hf(c)*h+l),In(s,l,u,h,c,d,f,af,of),e=uf(d)*u+s,n=hf(d)*h+l;break;case ef.R:Sn(i=e=t[a++],r=n=t[a++],i+t[a++],r+t[a++],af,of);break;case ef.Z:e=i,n=r}X(nf,nf,af),Z(rf,rf,of)}var p,g,m,v,y,x,_,w,b,S,M,I,T,C;return 0===a&&(nf[0]=nf[1]=rf[0]=rf[1]=0),new Vt(nf[0],nf[1],rf[0]-nf[0],rf[1]-nf[1])},rebuildPath:function(t){for(var e,n,i,r,a,o,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=i=s[c],n=r=s[c+1]),d){case ef.M:e=i=s[c++],n=r=s[c++],t.moveTo(i,r);break;case ef.L:a=s[c++],o=s[c++],(df(a-i)>l||df(o-r)>u||c===h-1)&&(t.lineTo(a,o),i=a,r=o);break;case ef.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case ef.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case ef.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=m<g?g:m,b=m<g?1:g/m,S=m<g?m/g:1,M=v+y;.001<Math.abs(g-m)?(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=uf(v)*g+f,n=hf(v)*m+p),i=uf(M)*g+f,r=hf(M)*m+p;break;case ef.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case ef.Z:t.closePath(),i=e,r=n}}}},pf.CMD=ef;var gf=2*Math.PI,mf=2*Math.PI,vf=pf.CMD,yf=2*Math.PI,xf=1e-4,_f=[-1,-1,-1],wf=[-1,-1],bf=Gc.prototype.getCanvasPattern,Sf=Math.abs,Mf=new pf(!0);zn.prototype={constructor:zn,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var n,i=this.style,r=this.path||Mf,a=i.hasStroke(),o=i.hasFill(),s=i.fill,l=i.stroke,u=o&&!!s.colorStops,h=a&&!!l.colorStops,c=o&&!!s.image,d=a&&!!l.image;(i.bind(t,this,e),this.setTransform(t),this.__dirty)&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(t,s,n)),h&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,l,n)));u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=bf.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=bf.call(l,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(r.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(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)),o)if(null!=i.fillOpacity){var v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,r.fill(t),t.globalAlpha=v}else r.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=i.strokeOpacity){v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,r.stroke(t),t.globalAlpha=v}else r.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new pf},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new pf),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),1e-10<o&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),En(a,o/s,!0,t,e)))return!0}if(r.hasFill())return En(a,0,!1,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Le.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(O(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<Sf(t[0]-1)&&1e-10<Sf(t[3]-1)?Math.sqrt(Sf(t[0]*t[3]-t[2]*t[1])):1}},zn.extend=function(r){var t=function(t){zn.call(this,t),r.style&&this.style.extendFrom(r.style,!1);var e=r.shape;if(e){this.shape=this.shape||{};var n=this.shape;for(var i in e)!n.hasOwnProperty(i)&&e.hasOwnProperty(i)&&(n[i]=e[i])}r.init&&r.init.call(this,t)};for(var e in i(t,zn),r)"style"!==e&&"shape"!==e&&(t.prototype[e]=r[e]);return t},i(zn,Le);var If=pf.CMD,Tf=[[],[],[]],Cf=Math.sqrt,Af=Math.atan2,Df=function(t,e){var n,i,r,a,o,s=t.data,l=If.M,u=If.C,h=If.L,c=If.R,d=If.A,f=If.Q;for(a=r=0;r<s.length;){switch(n=s[r++],a=r,i=0,n){case l:case h:i=1;break;case u:i=3;break;case f:i=2;break;case d:var p=e[4],g=e[5],m=Cf(e[0]*e[0]+e[1]*e[1]),v=Cf(e[2]*e[2]+e[3]*e[3]),y=Af(-e[1]/v,e[0]/m);s[r]*=m,s[r++]+=p,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,a=r+=2;break;case c:x[0]=s[r++],x[1]=s[r++],W(x,x,e),s[a++]=x[0],s[a++]=x[1],x[0]+=s[r++],x[1]+=s[r++],W(x,x,e),s[a++]=x[0],s[a++]=x[1]}for(o=0;o<i;o++){var x;(x=Tf[o])[0]=s[r++],x[1]=s[r++],W(x,x,e),s[a++]=x[0],s[a++]=x[1]}}},kf=Math.sqrt,Pf=Math.sin,Lf=Math.cos,Of=Math.PI,Nf=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Ef=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Nf(t)*Nf(e))},zf=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Ef(t,e))},Bf=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Rf=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,Ff=function(t){Le.call(this,t)};Ff.prototype={constructor:Ff,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&ve(n),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;return null!=i&&(i+=""),Pe(i,n)?(this.setTransform(t),xe(this,t,i,n,null,e),void this.restoreTransform(t)):void(t.__attrCachedBy=Nc.NONE)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&ve(t),!this._rect){var e=t.text;null!=e?e+="":e="";var n=ie(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(n.x+=t.x||0,n.y+=t.y||0,Ce(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect}},i(Ff,Le);var Vf=zn.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),Gf=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Hf=function(l){return wh.browser.ie&&11<=wh.browser.version?function(){var t,e=this.__clipPaths,n=this.style;if(e)for(var i=0;i<e.length;i++){var r=e[i],a=r&&r.shape,o=r&&r.type;if(a&&("sector"===o&&a.startAngle===a.endAngle||"rect"===o&&(!a.width||!a.height))){for(var s=0;s<Gf.length;s++)Gf[s][2]=n[Gf[s][0]],n[Gf[s][0]]=Gf[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(s=0;s<Gf.length;s++)n[Gf[s][0]]=Gf[s][2]}:l},Wf=zn.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Hf(zn.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*r+n,h*r+i),t.lineTo(u*a+n,h*a+i),t.arc(n,i,a,o,s,!l),t.lineTo(Math.cos(s)*r+n,Math.sin(s)*r+i),0!==r&&t.arc(n,i,r,s,o,l),t.closePath()}}),Xf=zn.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)}}),Zf=zn.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Gn(t,e,!0)}}),Uf=zn.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Gn(t,e,!1)}}),Yf=Math.round,qf={},jf=zn.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n,i,r,a;this.subPixelOptimize?(Wn(qf,e,this.style),n=qf.x,i=qf.y,r=qf.width,a=qf.height,qf.r=e.r,e=qf):(n=e.x,i=e.y,r=e.width,a=e.height),e.r?me(t,e):t.rect(n,i,r,a),t.closePath()}}),$f={},Kf=zn.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n,i,r,a;a=this.subPixelOptimize?(Hn($f,e,this.style),n=$f.x1,i=$f.y1,r=$f.x2,$f.y2):(n=e.x1,i=e.y1,r=e.x2,e.y2);var o=e.percent;0!==o&&(t.moveTo(n,i),o<1&&(r=n*(1-o)+r*o,a=i*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Qf=[],Jf=zn.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(n,i),null==l||null==u?(h<1&&(bn(n,o,r,h,Qf),o=Qf[1],r=Qf[2],bn(i,s,a,h,Qf),s=Qf[1],a=Qf[2]),t.quadraticCurveTo(o,s,r,a)):(h<1&&(yn(n,o,l,r,h,Qf),o=Qf[1],l=Qf[2],r=Qf[3],yn(i,s,u,a,h,Qf),s=Qf[1],u=Qf[2],a=Qf[3]),t.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(t){return Zn(this.shape,t,!1)},tangentAt:function(t){var e=Zn(this.shape,t,!0);return G(e,e)}}),tp=zn.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,a,o,!s)}}),ep=zn.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),zn.prototype.getBoundingRect.call(this)}}),np=function(t){this.colorStops=t||[]};np.prototype={constructor:np,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var ip=function(t,e,n,i,r,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,np.call(this,r)};ip.prototype={constructor:ip},i(ip,np);var rp=function(t,e,n,i,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=r||!1,np.call(this,i)};rp.prototype={constructor:rp},i(rp,np),Un.prototype.incremental=!0,Un.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Un.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Un.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Un.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Un.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Un.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){(n=this._displayables[e]).beforeBrush&&n.beforeBrush(t),n.brush(t,e===this._cursor?null:this._displayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=e;for(e=0;e<this._temporaryDisplayables.length;e++){var n;(n=this._temporaryDisplayables[e]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===e?null:this._temporaryDisplayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var ap=[];Un.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Vt(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(ap)),t.union(i)}this._rect=t}return this._rect},Un.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(t,e))return!0}return!1},i(Un,Le);var op=Math.max,sp=Math.min,lp={},up=1,hp="emphasis",cp="normal",dp=1,fp={},pp={},gp=function(t,e){for(var n=[],i=t.length,r=0;r<i;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var o=new zn(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},o},mp=Xn,vp=T(),yp=0;qn("circle",Vf),qn("sector",Wf),qn("ring",Xf),qn("polygon",Zf),qn("polyline",Uf),qn("rect",jf),qn("line",Kf),qn("bezierCurve",Jf),qn("arc",tp);var xp=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:up,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:Yn,extendPath:function(t,e){return zn.extend(Rn(t,e))},registerShape:qn,getShapeClass:function(t){return pp.hasOwnProperty(t)?pp[t]:void 0},makePath:jn,makeImage:$n,mergePath:gp,resizePath:Qn,subPixelOptimizeLine:function(t){return Hn(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return Wn(t.shape,t.shape,t.style),t},subPixelOptimize:mp,setElementHoverStyle:ai,setHoverStyle:ci,setAsHighDownDispatcher:di,isHighDownDispatcher:fi,getHighlightDigit:pi,setLabelStyle:gi,modifyLabelStyle:function(t,e,n){var i=t.style;e&&(wi(i),t.setStyle(e),_i(i)),i=t.__hoverStl,n&&i&&(wi(i),k(i,n),_i(i))},setTextStyle:mi,setText:function(t,e,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,vi(t,e,r,i)},getFont:bi,updateProps:Mi,initProps:Ii,getTransform:Ti,applyTransform:Ci,transformDirection:Ai,groupTransition:Di,clipPointsByRect:ki,clipRectByRect:function(t,e){var n=op(t.x,e.x),i=sp(t.x+t.width,e.x+e.width),r=op(t.y,e.y),a=sp(t.y+t.height,e.y+e.height);return n<=i&&r<=a?{x:n,y:r,width:i-n,height:a-r}:void 0},createIcon:Pi,linePolygonIntersect:function(t,e,n,i,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(Li(t,e,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},lineLineIntersect:Li,Group:Ac,Image:Oe,Text:Ff,Circle:Vf,Sector:Wf,Ring:Xf,Polygon:Zf,Polyline:Uf,Rect:jf,Line:Kf,BezierCurve:Jf,Arc:tp,IncrementalDisplayable:Un,CompoundPath:ep,LinearGradient:ip,RadialGradient:rp,BoundingRect:Vt}),_p=["textStyle","color"],wp={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(_p):null)},getFont:function(){return bi({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ie(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},bp=Pd([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Sp={getItemStyle:function(t,e){var n=bp(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Mp=e,Ip=en();Ni.prototype={constructor:Ni,init:null,mergeOption:function(t){m(this.option,t,!0)},get:function(t,e){return null==t?this.option:Ei(this.option,this.parsePath(t),!e&&zi(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&zi(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n;return new Ni(null==t?this.option:Ei(this.option,t=this.parsePath(t)),e=e||(n=zi(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(b(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Ip(this).getParent=t},isAnimationEnabled:function(){if(!wh.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ln(Ni),un(Ni),Mp(Ni,Od),Mp(Ni,Ed),Mp(Ni,wp),Mp(Ni,Sp);var Tp,Cp,Ap=0,Dp=1e-4,kp=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,Pp=a,Lp=/([&<>"'])/g,Op={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Np=["a","b","c","d","e","f","g"],Ep=function(t,e){return"{"+t+(null==e?"":e)+"}"},zp=se,Bp=D,Rp=["left","right","top","bottom","width","height"],Fp=[["width","left","right"],["height","top","bottom"]],Vp=er,Gp=(y(er,"vertical"),y(er,"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")}}}),Hp=en(),Wp=Ni.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){Ni.call(this,t,e,n,i),this.uid=Bi("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?rr(t):{};m(t,e.getTheme().get(this.mainType)),m(t,this.getDefaultOption()),n&&ir(t,i,n)},mergeOption:function(t){m(this.option,t,!0);var e=this.layoutMode;e&&ir(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=Hp(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var r={},a=e.length-1;0<=a;a--)r=m(r,e[a],!0);t.defaultOption=r}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});dn(Wp,{registerWhenExtend:!0}),Cp={},(Tp=Wp).registerSubTypeDefaulter=function(t,e){t=sn(t),Cp[t.main]=e},Tp.determineSubType=function(t,e){var n=e.type;if(!n){var i=sn(t).main;Tp.hasSubTypes(t)&&Cp[i]&&(n=Cp[i](e))}return n},function(t,u){function f(o){var s={},l=[];return D(o,function(n){var e,i,r=h(s,n),t=r.originalDeps=u(n),a=(e=o,i=[],D(t,function(t){0<=p(e,t)&&i.push(t)}),i);r.entryCount=a.length,0===r.entryCount&&l.push(n),D(a,function(t){p(r.predecessor,t)<0&&r.predecessor.push(t);var e=h(s,t);p(e.successor,t)<0&&e.successor.push(n)})}),{graph:s,noEntryList:l}}function h(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,e,n,i){function r(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function a(t){u[t]=!0,r(t)}if(t.length){var o=f(e),s=o.graph,l=o.noEntryList,u={};for(D(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=s[h],d=!!u[h];d&&(n.call(i,h,c.originalDeps.slice()),delete u[h]),D(c.successor,d?a:r)}D(u,function(){throw new Error("Circle dependency may exists")})}}}(Wp,function(t){var e=[];return D(Wp.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=P(e,function(t){return sn(t).main}),"dataset"!==t&&p(e,"dataset")<=0&&e.unshift("dataset"),e}),e(Wp,Gp);var Xp="";"undefined"!=typeof navigator&&(Xp=navigator.platform||"");var Zp={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Xp.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},Up=en(),Yp={clearColorPalette:function(){Up(this).colorIdx=0,Up(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=Up(e=e||this),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=qe(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(s,n):o;if((l=l||o)&&l.length){var u=l[r];return t&&(a[t]=u),i.colorIdx=(r+1)%l.length,u}}},qp="original",jp="arrayRows",$p="objectRows",Kp="keyedColumns",Qp="unknown",Jp="typedArray",tg="column",eg="row";ar.seriesDataToSource=function(t){return new ar({data:t,sourceFormat:x(t)?Jp:qp,fromDataset:!1})},un(ar);var ng={Must:1,Might:2,Not:3},ig=en(),rg="\0_ec_inner",ag=Ni.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new Ni(n),this._optionManager=i},setOption:function(t,e){c(!(rg in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):fr.call(this,i),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=n.getMediaOption(this,this._api);a.length&&D(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(r){var u=this.option,h=this._componentsMap,n=[];ig(this).datasetMap=T(),D(r,function(t,e){null!=t&&(Wp.hasClass(e)?e&&n.push(e):u[e]=null==u[e]?b(t):m(u[e],t,!0))}),Wp.topologicalTravel(n,Wp.getAllClassMainTypes(),function(o,t){var e,s,n=qe(r[o]),i=Ke(h.get(o),n);e=i,s=T(),bd(e,function(t){var e=t.exist;e&&s.set(e.id,t)}),bd(e,function(t){var e=t.option;c(!e||null==e.id||!s.get(e.id)||s.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&s.set(e.id,t),!t.keyInfo&&(t.keyInfo={})}),bd(e,function(t,e){var n=t.exist,i=t.option,r=t.keyInfo;if(Sd(i)){if(r.name=null!=i.name?i.name+"":n?n.name:Id+e,n)r.id=n.id;else if(null!=i.id)r.id=i.id+"";else for(var a=0;r.id="\0"+r.name+"\0"+a++,s.get(r.id););s.set(r.id,t)}}),D(i,function(t){var e,n,i,r=t.option;O(r)&&(t.keyInfo.mainType=o,t.keyInfo.subType=(e=o,n=r,i=t.exist,n.type?n.type:i?i.subType:Wp.determineSubType(e,n)))});var l=function(e,t){L(t)||(t=t?[t]:[]);var n={};return D(t,function(t){n[t]=(e.get(t)||[]).slice()}),n}(h,t);u[o]=[],h.set(o,[]),D(i,function(t,e){var n=t.exist,i=t.option;if(c(O(i)||n,"Empty component definition"),i){var r=Wp.getClass(o,t.keyInfo.subType,!0);if(n&&n.constructor===r)n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1);else{var a=k({dependentModels:l,componentIndex:e},t.keyInfo);k(n=new r(i,this,this,a),a),n.init(i,this,this,a),n.optionUpdated(null,!0)}}else n.mergeOption({},this),n.optionUpdated({},!1);h.get(o)[e]=n,u[o][e]=n.option},this),"series"===o&&pr(this,h.get("series"))},this),this._seriesIndicesMap=T(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=b(this.option);return D(i,function(t,e){if(Wp.hasClass(e)){for(var n=(t=qe(t)).length-1;0<=n;n--)Je(t[n])&&t.splice(n,1);i[e]=t}}),delete i[rg],i},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);return n?n[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,r=t.id,a=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];if(null!=i)L(i)||(i=[i]),n=v(P(i,function(t){return o[t]}),function(t){return!!t});else if(null!=r){var s=L(r);n=v(o,function(t){return s&&0<=p(r,t.id)||!s&&t.id===r})}else if(null!=a){var l=L(a);n=v(o,function(t){return l&&0<=p(a,t.name)||!l&&t.name===a})}else n=o.slice();return gr(n,t)},findComponents:function(t){var e,n,i,r,a,o=t.query,s=t.mainType,l=(n=s+"Index",i=s+"Id",r=s+"Name",!(e=o)||null==e[n]&&null==e[i]&&null==e[r]?null:{mainType:s,index:e[n],id:e[i],name:e[r]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=gr(u,t),t.filter?v(a,t.filter):a},eachComponent:function(t,i,r){var e=this._componentsMap;if("function"==typeof t)r=i,i=t,e.each(function(t,n){D(t,function(t,e){i.call(r,n,t,e)})});else if(M(t))D(e.get(t),i,r);else if(O(t)){D(this.findComponents(t),i,r)}},getSeriesByName:function(e){return v(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return v(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(n,i){D(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},eachRawSeries:function(t,e){D(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(n,i,r){D(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(r,e,t)},this)},eachRawSeriesByType:function(t,e,n){return D(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){pr(this,v(this._componentsMap.get("series"),t,e))},restoreData:function(n){var t=this._componentsMap;pr(this,t.get("series"));var i=[];t.each(function(t,e){i.push(e)}),Wp.topologicalTravel(i,Wp.getAllClassMainTypes(),function(e){D(t.get(e),function(t){("series"!==e||!function(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}(t,n))&&t.restoreData()})})}});e(ag,Yp);var og=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],sg={};vr.prototype={constructor:vr,create:function(n,i){var r=[];D(sg,function(t){var e=t.create(n,i);r=r.concat(e||[])}),this._coordinateSystems=r},update:function(e,n){D(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},vr.register=function(t,e){sg[t]=e},vr.get=function(t){return sg[t]};var lg=D,ug=b,hg=P,cg=m,dg=/^(min|max)?(.+)$/;yr.prototype={constructor:yr,setOption:function(t,e){t&&D(qe(t.series),function(t){t&&t.data&&x(t.data)&&f(t.data)}),t=ug(t);var r,n,i=this._optionBackup,a=function(t,n,i){var e,r,a=[],o=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},a=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;lg(l,function(t){t&&t.option&&(t.query?o.push(t):e||(e=t))})}return r||(r=t),r.timeline||(r.timeline=s),lg([r].concat(a).concat(P(o,function(t){return t.option})),function(e){lg(n,function(t){t(e,i)})}),{baseOption:r,timelineOptions:a,mediaDefault:e,mediaList:o}}.call(this,t,e,!i);this._newBaseOption=a.baseOption,i?(r=i.baseOption,n=a.baseOption,lg(n=n||{},function(t,e){if(null!=t){var n=r[e];if(Wp.hasClass(e)){t=qe(t);var i=Ke(n=qe(n),t);r[e]=hg(i,function(t){return t.option&&t.exist?cg(t.exist,t.option,!0):t.exist||t.option})}else r[e]=cg(n,t,!0)}}),a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=hg(e.timelineOptions,ug),this._mediaList=hg(e.mediaList,ug),this._mediaDefault=ug(e.mediaDefault),this._currentMediaIndices=[],ug(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=ug(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t,e,n=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!r.length&&!a)return s;for(var l=0,u=r.length;l<u;l++)xr(r[l].query,n,i)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&(t=o,e=this._currentMediaIndices,!(t.join(",")===e.join(",")))&&(s=hg(o,function(t){return ug(-1===t?a.option:r[t].option)})),this._currentMediaIndices=o,s}};var fg=D,pg=O,gg=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],mg=function(e,t){fg(Ir(e.series),function(t){pg(t)&&function(t){if(pg(t)){_r(t),br(t),Sr(t,"label"),Sr(t,"upperLabel"),Sr(t,"edgeLabel"),t.emphasis&&(Sr(t.emphasis,"label"),Sr(t.emphasis,"upperLabel"),Sr(t.emphasis,"edgeLabel")),(n=t.markPoint)&&(_r(n),Mr(n)),(i=t.markLine)&&(_r(i),Mr(i));var e=t.markArea;e&&Mr(e);var n,i,r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!x(a))for(var o=0;o<a.length;o++)Mr(a[o]);D(t.categories,function(t){br(t)})}if(r&&!x(r))for(o=0;o<r.length;o++)Mr(r[o]);if((n=t.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)Mr(s[o])}if((i=t.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)L(l[o])?(Mr(l[o][0]),Mr(l[o][1])):Mr(l[o])}"gauge"===t.type?(Sr(t,"axisLabel"),Sr(t,"title"),Sr(t,"detail")):"treemap"===t.type?(wr(t.breadcrumb,"itemStyle"),D(t.levels,function(t){br(t)})):"tree"===t.type&&br(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),fg(n,function(t){fg(Ir(e[t]),function(t){t&&(Sr(t,"axisLabel"),Sr(t.axisPointer,"label"))})}),fg(Ir(e.parallel),function(t){var e=t&&t.parallelAxisDefault;Sr(e,"axisLabel"),Sr(e&&e.axisPointer,"label")}),fg(Ir(e.calendar),function(t){wr(t,"itemStyle"),Sr(t,"dayLabel"),Sr(t,"monthLabel"),Sr(t,"yearLabel")}),fg(Ir(e.radar),function(t){Sr(t,"name")}),fg(Ir(e.geo),function(t){pg(t)&&(Mr(t),fg(Ir(t.regions),function(t){Mr(t)}))}),fg(Ir(e.timeline),function(t){Mr(t),wr(t,"label"),wr(t,"itemStyle"),wr(t,"controlStyle",!0);var e=t.data;L(e)&&D(e,function(t){O(t)&&(wr(t,"label"),wr(t,"itemStyle"))})}),fg(Ir(e.toolbox),function(t){wr(t,"iconStyle"),fg(t.feature,function(t){wr(t,"iconStyle")})}),Sr(Tr(e.axisPointer),"label"),Sr(Tr(e.tooltip).axisPointer,"label")},vg=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],yg=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],xg=function(n,t){mg(n,t),n.series=qe(n.series),D(n.series,function(t){if(O(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var n=function(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&null!=(n=n&&n[e[i]]);i++);return n}(t,"pointer.color");null!=n&&function(t,e,n,i){e=e.split(",");for(var r,a=t,o=0;o<e.length-1;o++)null==a[r=e[o]]&&(a[r]={}),a=a[r];(i||null==a[e[o]])&&(a[e[o]]=n)}(t,"itemStyle.color",n)}Cr(t)}}),n.dataRange&&(n.visualMap=n.dataRange),D(yg,function(t){var e=n[t];e&&(L(e)||(e=[e]),D(e,function(t){Cr(t)}))})},_g=Dr.prototype;_g.pure=!1;var wg={arrayRows_column:{pure:_g.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Lr},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i<n.length;i++){var r=n[i];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:kr,getItem:Pr,appendData:Lr},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var r=this._data[n[i].name];e.push(r?r[t]:null)}return e},appendData:function(t){var r=this._data;D(t,function(t,e){for(var n=r[e]||(r[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},original:{count:kr,getItem:Pr,appendData:Lr},typedArray:{persistent:!(_g.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},bg={arrayRows:Or,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:Or,original:function(t,e,n){var i=$e(t);return null!=n&&i instanceof Array?i[n]:i},typedArray:Or},Sg={arrayRows:Nr,objectRows:function(t,e){return Er(t[e],this._dimensionInfos[e])},keyedColumns:Nr,original:function(t,e,n,i){var r,a=t&&(null==t.value?t:t.value);return!this._rawData.pure&&(Sd(r=t)&&!(r instanceof Array))&&(this.hasItemOption=!0),Er(a instanceof Array?a[i]:a,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},Mg=/\{@(.+?)\}/g,Ig={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),a=n.getName(t),o=n.getRawDataItem(t),s=n.getItemVisual(t,"color"),l=n.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=on(u&&u.get("renderMode")),c=this.mainType,d="series"===c,f=n.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:r,data:o,dataType:e,value:i,color:s,borderColor:l,dimensionNames:f?f.dimensionNames:null,encode:f?f.encode:null,marker:Ki({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(i,t,e,n,r){t=t||"normal";var a=this.getData(e),o=a.getItemModel(i),s=this.getDataParams(i,e);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=o.get("normal"===t?[r||"label","formatter"]:[t,r||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=n,l(s)):"string"==typeof l?$i(l,s).replace(Mg,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),zr(a,i,e)}):void 0},getRawValue:function(t,e){return zr(this.getData(e),t)},formatTooltip:function(){}},Tg=Fr.prototype;Tg.perform=function(t){function e(t){return!(1<=t)&&(t=1),t}var n,i=this._upstream,r=t&&t.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(n=this._plan(this.context));var o,s=e(this._modBy),l=this._modDataCount||0,u=e(t&&t.modBy),h=t&&t.modDataCount||0;(s!==u||l!==h)&&(n="reset"),(this._dirty||"reset"===n)&&(this._dirty=!1,o=function(t,e){var n,i;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((n=t._reset(t.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),L(n)&&!n.length&&(n=null)),t._progress=n,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),i}(this,r)),this._modBy=u,this._modDataCount=h;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!r&&(o||d<f)){var p=this._progress;if(L(p))for(var g=0;g<p.length;g++)Vr(this,p[g],d,f,u,h);else Vr(this,p,d,f,u,h)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Cg=function(){function r(){return s<o?s++:null}function a(){var t=s%h*l+Math.ceil(s/h),e=o<=s?null:t<u?t:s;return s++,e}var o,s,l,u,h,c={reset:function(t,e,n,i){s=t,o=e,l=n,u=i,h=Math.ceil(u/l),c.next=1<l&&0<u?a:r}};return c}();Tg.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Tg.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Tg.pipe=function(t){(this._downstream!==t||this._dirty)&&((this._downstream=t)._upstream=this,t.dirty())},Tg.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Tg.getUpstream=function(){return this._upstream},Tg.getDownstream=function(){return this._downstream},Tg.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Ag=en(),Dg=Wp.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Rr({count:Hr,reset:Wr}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),or(this);var i=this.getInitialData(t,n);Zr(i,this),this.dataTask.context.data=i,Ag(this).dataBeforeProcessed=i,Gr(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?rr(t):{},r=this.subType;Wp.hasClass(r)&&(r+="Series"),m(t,e.getTheme().get(this.subType)),m(t,this.getDefaultOption()),je(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ir(t,i,n)},mergeOption:function(t,e){t=m(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&ir(this.option,t,n),or(this);var i=this.getInitialData(t,e);Zr(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Ag(this).dataBeforeProcessed=i,Gr(this)},fillDataTextStyle:function(t){if(t&&!x(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&je(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=Yr(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return Ag(this).data},setData:function(t){var e=Yr(this);if(e){var n=e.context;n.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),n.outputData=t,e!==this.dataTask&&(n.data=t)}Ag(this).data=t},getSource:function(){return ig(this).source},getRawData:function(){return Ag(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(r,h,t,c){var d=this,e="html"===(c=c||"html")?"<br/>":"\n",f="richText"===c,p={},g=0,m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,i=this.getRawValue(r),o=L(i),v=m.getItemVisual(r,"color");O(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var s,l=(1<n||o&&!n?function(t){function e(t,e){var n=m.getDimensionInfo(e);if(n&&!1!==n.otherDims.tooltip){var i=n.type,r="sub"+d.seriesIndex+"at"+g,a=Ki({color:v,type:"subItem",renderMode:c,markerId:r}),o="string"==typeof a?a:a.content,s=(l?o+ji(n.displayName||"-")+": ":"")+ji("ordinal"===i?t+"":"time"===i?h?"":Ji("yyyy/MM/dd hh:mm:ss",t):qi(t));s&&u.push(s),f&&(p[r]=v,++g)}}var l=S(t,function(t,e,n){var i=m.getDimensionInfo(n);return t|(i&&!1!==i.tooltip&&null!=i.displayName)},0),u=[];a.length?D(a,function(t){e(zr(m,r,t),t)}):D(t,e);var n=l?f?"\n":"<br/>":"",i=n+u.join(n||", ");return{renderMode:c,content:i,style:p}}(i):(s=n?zr(m,r,a[0]):o?i[0]:i,{renderMode:c,content:ji(qi(s)),style:p})).content,u=d.seriesIndex+"at"+g,y=Ki({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(r),_=this.name;Qe(this)||(_=""),_=_?ji(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?ji(x)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(wh.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=Yp.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),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});e(Dg,Ig),e(Dg,Yp);var kg=function(){this.group=new Ac,this.uid=Bi("viewComponent")};kg.prototype={constructor:kg,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var Pg=kg.prototype;Pg.updateView=Pg.updateLayout=Pg.updateVisual=function(){},ln(kg),dn(kg,{registerWhenExtend:!0});var Lg=function(){var s=en();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,r=e.progressiveRender,a=e.large=n.large,o=e.progressiveRender=n.progressiveRender;return!!(i^a||r^o)&&"reset"}},Og=en(),Ng=Lg(),Eg=qr.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){$r(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){$r(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};Eg.updateView=Eg.updateLayout=Eg.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},ln(qr),dn(qr,{registerWhenExtend:!0}),qr.markUpdateMethod=function(t,e){Og(t).updateMethod=e};var zg={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)}}},Bg="\0__throttleOriginMethod",Rg="\0__throttleRate",Fg="\0__throttleType",Vg={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),a=(e.visualColorAccessPath||"itemStyle.color").split("."),i=e.get(a),r=!g(i)||i instanceof np?null:i;(!i||r)&&(i=e.getColorFromPalette(e.name,null,t.getSeriesCount())),n.setVisual("color",i);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(n.setVisual("borderColor",s),!t.isSeriesFiltered(e)){r&&n.each(function(t){n.setItemVisual(t,"color",r(e.getDataParams(t)))});return{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.get(a,!0),r=n.get(o,!0);null!=i&&t.setItemVisual(e,"color",i),null!=r&&t.setItemVisual(e,"borderColor",r)}:null}}}},Gg={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},Hg=function(t,e){function c(t,e){if("string"!=typeof t)return t;var n=t;return D(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function d(t){var e=a.get(t);if(null!=e)return e;for(var n=t.split("."),i=Gg.aria,r=0;r<n.length;++r)i=i[n[r]];return i}var n,a=e.getModel("aria");if(a.get("show")){if(a.get("description"))return void t.setAttribute("aria-label",a.get("description"));var f=0;e.eachSeries(function(){++f},this);var i,p=a.get("data.maxCount")||10,r=a.get("series.maxCount")||10,g=Math.min(f,r);if(!(f<1)){var o=((n=e.getModel("title").option)&&n.length&&(n=n[0]),n&&n.text);i=o?c(d("general.withTitle"),{title:o}):d("general.withoutTitle");var m=[];i+=c(d(1<f?"series.multiple.prefix":"series.single.prefix"),{seriesCount:f}),e.eachSeries(function(t,e){if(e<g){var n,i=t.get("name"),r="series."+(1<f?"multiple":"single")+".";n=c(n=d(i?r+"withName":r+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(h=t.subType,Gg.series.typeNames[h]||"自定义图")});var a=t.getData();n+=(window.data=a).count()>p?c(d("data.partialData"),{displayCnt:p}):d("data.allData");for(var o=[],s=0;s<a.count();s++)if(s<p){var l=a.getName(s),u=zr(a,s);o.push(c(d(l?"data.withName":"data.withoutName"),{name:l,value:u}))}n+=o.join(d("data.separator.middle"))+d("data.separator.end"),m.push(n)}var h}),i+=m.join(d("series.multiple.separator.middle"))+d("series.multiple.separator.end"),t.setAttribute("aria-label",i)}}},Wg=Math.PI,Xg=ta.prototype;Xg.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},Xg.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},Xg.getPipeline=function(t){return this._pipelineMap.get(t)},Xg.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:o,large:a}},Xg.restorePipelines=function(t){var i=this,r=i._pipelineMap=T();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),ha(i,t,t.dataTask)})},Xg.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),r=this.api;D(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&function(i,r,t,a,o){function e(t){var e=t.uid,n=s.get(e)||s.set(e,Rr({plan:oa,reset:sa,count:ua}));n.context={model:t,ecModel:a,api:o,useClearVisual:r.isVisual&&!r.isLayout,plan:r.plan,reset:r.reset,scheduler:i},ha(i,t,n)}var s=t.seriesTaskMap||(t.seriesTaskMap=T()),n=r.seriesType,l=r.getTargetSeries;r.createOnAllSeries?a.eachRawSeries(e):n?a.eachRawSeriesByType(n,e):l&&l(a,o).each(e);var u=i._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,i,r),t.overallReset&&function(i,t,e,n,r){function a(t){var e=t.uid,n=s.get(e);n||(n=s.set(e,Rr({reset:ia,onDirty:aa})),o.dirty()),n.context={model:t,overallProgress:h,modifyOutputEnd:c},n.agent=o,n.__block=h,ha(i,t,n)}var o=e.overallTask=e.overallTask||Rr({reset:na});o.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap=o.agentStubMap||T(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=t.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,r).each(a):(h=!1,D(n.getSeries(),a));var d=i._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),s.removeKey(e))})}(this,t,e,i,r)},this)},Xg.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,ha(this,e,r)},Xg.performDataProcessorTasks=function(t,e){ea(this,this._dataProcessorHandlers,t,e,{block:!0})},Xg.performVisualTasks=function(t,e,n){ea(this,this._visualHandlers,t,e,n)},Xg.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Xg.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Zg=Xg.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Ug=la(0);ta.wrapStageHandler=function(t,e){return g(t)&&(t={overallReset:t,seriesType:function(t){Yg=null;try{t(qg,jg)}catch(t){}return Yg}(t)}),t.uid=Bi("stageHandler"),e&&(t.visualType=e),t};var Yg,qg={},jg={};ca(qg,ag),ca(jg,mr),qg.eachSeriesByType=qg.eachRawSeriesByType=function(t){Yg=t},qg.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Yg=t.subType)};var $g=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Kg={color:$g,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],$g]},Qg="#eee",Jg=function(){return{axisLine:{lineStyle:{color:Qg}},axisTick:{lineStyle:{color:Qg}},axisLabel:{textStyle:{color:Qg}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:Qg}}}},tm=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],em={color:tm,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:Qg},crossStyle:{color:Qg},label:{color:"#000"}}},legend:{textStyle:{color:Qg}},textStyle:{color:Qg},title:{textStyle:{color:Qg}},toolbox:{iconStyle:{normal:{borderColor:Qg}}},dataZoom:{textStyle:{color:Qg}},visualMap:{textStyle:{color:Qg}},timeline:{lineStyle:{color:Qg},itemStyle:{normal:{color:tm[1]}},label:{normal:{textStyle:{color:Qg}}},controlStyle:{normal:{color:Qg,borderColor:Qg}}},timeAxis:Jg(),logAxis:Jg(),valueAxis:Jg(),categoryAxis:Jg(),line:{symbol:"circle"},graph:{color:tm},gauge:{title:{textStyle:{color:Qg}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};em.categoryAxis.splitLine.show=!1,Wp.extend({type:"dataset",defaultOption:{seriesLayoutBy:tg,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,n=Qp;if(x(e))n=Jp;else if(L(e)){0===e.length&&(n=jp);for(var i=0,r=e.length;i<r;i++){var a=e[i];if(null!=a){if(L(a)){n=jp;break}if(O(a)){n=$p;break}}}}else if(O(e)){for(var o in e)if(e.hasOwnProperty(o)&&N(e[o])){n=Kp;break}}else if(null!=e)throw new Error("Invalid data");ig(t).sourceFormat=n}(this)}}),kg.extend({type:"dataset"});var nm=zn.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.rx,a=e.ry,o=.5522848*r,s=.5522848*a;t.moveTo(n-r,i),t.bezierCurveTo(n-r,i-s,n-o,i-a,n,i-a),t.bezierCurveTo(n+o,i-a,n+r,i-s,n+r,i),t.bezierCurveTo(n+r,i+s,n+o,i+a,n,i+a),t.bezierCurveTo(n-o,i+a,n-r,i+s,n-r,i),t.closePath()}}),im=/[\s,]+/;var rm={g:function(t,e){var n=new Ac;return fa(e,n),ga(t,n,this._defs),n},rect:function(t,e){var n=new jf;return fa(e,n),ga(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new Vf;return fa(e,n),ga(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new Kf;return fa(e,n),ga(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new nm;return fa(e,n),ga(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=pa(n));var i=new Zf({shape:{points:n||[]}});return fa(e,i),ga(t,i,this._defs),i},polyline:function(t,e){var n=new zn;fa(e,n),ga(t,n,this._defs);var i=t.getAttribute("points");return i&&(i=pa(i)),new Uf({shape:{points:i||[]}})},image:function(t,e){var n=new Oe;return fa(e,n),ga(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(a);var o=new Ac;return fa(e,o),ga(t,o,this._defs),o},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new Ac;return fa(e,o),ga(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var n=Fn(t.getAttribute("d")||"");return fa(e,n),ga(t,n,this._defs),n}},am={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new ip(e,n,i,r);return function(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=0<i.indexOf("%")?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}(t,a),a},radialgradient:function(){}},om={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},sm=/url\(\s*#(.*?)\)/,lm=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,um=/([^\s:;]+)\s*:\s*([^:;]+)/g,hm=(T(),c),cm=D,dm=g,fm=O,pm=Wp.parseClassType,gm={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},mm="__flagInMainProcess",vm="__optionUpdated",ym=/^[a-zA-Z0-9_]+$/;ya.prototype.on=va("on",!0),ya.prototype.off=va("off",!0),ya.prototype.one=va("one",!0),e(ya,Fh);var xm=xa.prototype;xm._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[vm]){var e=this[vm].silent;this[mm]=!0,wa(this),_m.update.call(this),this[mm]=!1,this[vm]=!1,Ia.call(this,e),Ta.call(this,e)}else if(t.unfinished){var n=1,i=this._model;this._api;t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Sa(this,i),t.performVisualTasks(i),ka(this,this._model,0,"remain"),n-=+new Date-r}while(0<n&&t.unfinished);t.unfinished||this._zr.flush()}}},xm.getDom=function(){return this._dom},xm.getZr=function(){return this._zr},xm.setOption=function(t,e,n){if(!this._disposed){var i;if(fm(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[mm]=!0,!this._model||e){var r=new yr(this._api),a=this._theme,o=this._model=new ag;o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,Im),n?(this[vm]={silent:i},this[mm]=!1):(wa(this),_m.update.call(this),this._zr.flush(),this[vm]=!1,this[mm]=!1,Ia.call(this,i),Ta.call(this,i))}},xm.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},xm.getModel=function(){return this._model},xm.getOption=function(){return this._model&&this._model.getOption()},xm.getWidth=function(){return this._zr.getWidth()},xm.getHeight=function(){return this._zr.getHeight()},xm.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},xm.getRenderedCanvas=function(t){if(wh.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},xm.getSvgDataUrl=function(){if(wh.svgSupported){var t=this._zr;return D(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},xm.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;cm(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return cm(i,function(t){t.group.ignore=!1}),a}},xm.getConnectedDataURL=function(i){if(!this._disposed&&wh.canvasSupported){var r=this.group,a=Math.min,o=Math.max;if(Pm[r]){var s=1/0,l=1/0,u=-1/0,h=-1/0,c=[],n=i&&i.pixelRatio||1;D(km,function(t){if(t.group===r){var e=t.getRenderedCanvas(b(i)),n=t.getDom().getBoundingClientRect();s=a(n.left,s),l=a(n.top,l),u=o(n.right,u),h=o(n.bottom,h),c.push({dom:e,left:n.left,top:n.top})}});var t=(u*=n)-(s*=n),e=(h*=n)-(l*=n),d=Lh();d.width=t,d.height=e;var f=Ye(d);return i.connectedBackgroundColor&&f.add(new jf({shape:{x:0,y:0,width:t,height:e},style:{fill:i.connectedBackgroundColor}})),cm(c,function(t){var e=new Oe({style:{x:t.left*n-s,y:t.top*n-l,image:t.dom}});f.add(e)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png"))}return this.getDataURL(i)}},xm.convertToPixel=y(_a,"convertToPixel"),xm.convertFromPixel=y(_a,"convertFromPixel"),xm.containPixel=function(t,r){var a;if(!this._disposed)return D(t=nn(this._model,t),function(t,i){0<=i.indexOf("Models")&&D(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint)a|=!!e.containPoint(r);else if("seriesModels"===i){var n=this._chartsMap[t.__viewId];n&&n.containPoint&&(a|=n.containPoint(r,t))}},this)},this),!!a},xm.getVisual=function(t,e){var n=(t=nn(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),i=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=i?n.getItemVisual(i,e):n.getVisual(e)},xm.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},xm.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var _m={prepareAndUpdate:function(t){wa(this),_m.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),Sa(this,e),r.update(e,n),Aa(e),a.performVisualTasks(e,t),Da(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if(wh.canvasSupported)i.setBackgroundColor(o);else{var s=St(o);o=It(s,"rgb"),0===s[3]&&(o="transparent")}Pa(e,n)}},updateTransform:function(r){var a=this._model,o=this,s=this._api;if(a){var l=[];a.eachComponent(function(t,e){var n=o.getViewOfComponentModel(e);if(n&&n.__alive)if(n.updateTransform){var i=n.updateTransform(e,a,s,r);i&&i.update&&l.push(n)}else l.push(n)});var i=T();a.eachSeries(function(t){var e=o._chartsMap[t.__viewId];if(e.updateTransform){var n=e.updateTransform(t,a,s,r);n&&n.update&&i.set(t.uid,1)}else i.set(t.uid,1)}),Aa(a),this._scheduler.performVisualTasks(a,r,{setDirty:!0,dirtyMap:i}),ka(o,a,0,r,i),Pa(a,this._api)}},updateView:function(t){var e=this._model;e&&(qr.markUpdateMethod(t,"updateView"),Aa(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Da(this,this._model,this._api,t),Pa(e,this._api))},updateVisual:function(t){_m.update.call(this,t)},updateLayout:function(t){_m.update.call(this,t)}};xm.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[mm]=!0,n&&wa(this),_m.update.call(this),this[mm]=!1,Ia.call(this,i),Ta.call(this,i)}}},xm.showLoading=function(t,e){if(!this._disposed&&(fm(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Dm[t])){var n=Dm[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},xm.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},xm.makeActionFromEvent=function(t){var e=k({},t);return e.type=Sm[t.type],e},xm.dispatchAction=function(t,e){if(!this._disposed&&(fm(e)||(e={silent:!!e}),bm[t.type]&&this._model)){if(this[mm])return void this._pendingActions.push(t);Ma.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&wh.browser.weChat&&this._throttledZrFlush(),Ia.call(this,e.silent),Ta.call(this,e.silent)}},xm.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},xm.on=va("on",!1),xm.off=va("off",!1),xm.one=va("one",!1);var wm=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];xm._initEvents=function(){cm(wm,function(u){var t=function(t){var e,n=this.getModel(),i=t.target;if("globalout"===u)e={};else if(i&&null!=i.dataIndex){var r=i.dataModel||n.getSeriesByIndex(i.seriesIndex);e=r&&r.getDataParams(i.dataIndex,i.dataType,i)||{}}else i&&i.eventData&&(e=k({},i.eventData));if(e){var a=e.componentType,o=e.componentIndex;("markLine"===a||"markPoint"===a||"markArea"===a)&&(a="series",o=e.seriesIndex);var s=a&&null!=o&&n.getComponent(a,o),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:i,packedEvent:e,model:s,view:l},this.trigger(u,e)}};t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),cm(Sm,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},xm.isDisposed=function(){return this._disposed},xm.clear=function(){this._disposed||this.setOption({series:[]},!0)},xm.dispose=function(){if(!this._disposed){this._disposed=!0,an(this.getDom(),Nm,"");var e=this._api,n=this._model;cm(this._componentsViews,function(t){t.dispose(n,e)}),cm(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete km[this.id]}},e(xa,Fh),Oa.prototype={constructor:Oa,normalizeQuery:function(t){var s={},l={},u={};if(M(t)){var e=pm(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};D(t,function(t,e){for(var n=!1,i=0;i<h.length;i++){var r=h[i],a=e.lastIndexOf(r);if(0<a&&a===e.length-r.length){var o=e.slice(0,a);"data"!==o&&(s.mainType=o,s[r.toLowerCase()]=t,n=!0)}}c.hasOwnProperty(e)&&(l[e]=t,n=!0),n||(u[e]=t)})}return{cptQuery:s,dataQuery:l,otherQuery:u}},filter:function(t,e){function n(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return n(l,o,"mainType")&&n(l,o,"subType")&&n(l,o,"index","componentIndex")&&n(l,o,"name")&&n(l,o,"id")&&n(u,a,"name")&&n(u,a,"dataIndex")&&n(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a))},afterTrigger:function(){this.eventInfo=null}};var bm={},Sm={},Mm=[],Im=[],Tm=[],Cm=[],Am={},Dm={},km={},Pm={},Lm=new Date-0,Om=new Date-0,Nm="_echarts_instance_",Em=Na;Ga(2e3,Vg),Ba(xg),Ra(900,function(t){var a=T();t.eachSeries(function(t){var e=t.get("stack");if(e){var n=a.get(e)||a.set(e,[]),i=t.getData(),r={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;n.length&&i.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(r)}}),a.each(Ar)}),Wa("default",function(i,t){A(t=t||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var r=new jf({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),a=new tp({shape:{startAngle:-Wg/2,endAngle:-Wg/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001}),o=new jf({style:{fill:"none",text:t.text,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});a.animateShape(!0).when(1e3,{endAngle:3*Wg/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*Wg/2}).delay(300).start("circularInOut");var e=new Ac;return e.add(a),e.add(o),e.add(r),e.resize=function(){var t=i.getWidth()/2,e=i.getHeight()/2;a.setShape({cx:t,cy:e});var n=a.shape.r;o.setShape({x:t-n,y:e-n,width:2*n,height:2*n}),r.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},e.resize(),e}),Fa({type:"highlight",event:"highlight",update:"highlight"},u),Fa({type:"downplay",event:"downplay",update:"downplay"},u),za("light",Kg),za("dark",em);var zm="__ec_stack_",Bm="undefined"!=typeof Float32Array?Float32Array:Array,Rm={seriesType:"bar",plan:Lg(),reset:function(t){if(eo(t)&&no(t)){var e=t.getData(),h=t.coordinateSystem,n=h.getBaseAxis(),c=h.getOtherAxis(n),d=e.mapDimension(c.dim),f=e.mapDimension(n.dim),p=c.isHorizontal(),g=p?0:1,m=to(Ja([t]),n,t).width;return.5<m||(m=.5),{progress:function(t,e){for(var n,i=t.count,r=new Bm(2*i),a=new Bm(i),o=[],s=[],l=0,u=0;null!=(n=t.next());)s[g]=e.get(d,n),s[1-g]=e.get(f,n),o=h.dataToPoint(s,null,o),r[l++]=o[0],r[l++]=o[1],a[u++]=n;e.setLayout({largePoints:r,largeDataIndices:a,barWidth:m,valueAxisStart:io(0,c),valueAxisHorizontal:p})}}}}};ro.prototype.parse=function(t){return t},ro.prototype.getSetting=function(t){return this._setting[t]},ro.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},ro.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},ro.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},ro.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},ro.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},ro.prototype.getExtent=function(){return this._extent.slice()},ro.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},ro.prototype.isBlank=function(){return this._isBlank},ro.prototype.setBlank=function(t){this._isBlank=t},ro.prototype.getLabel=null,ln(ro),dn(ro,{registerWhenExtend:!0}),ao.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&P(n,so);return new ao({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var Fm=ao.prototype;Fm.getOrdinal=function(t){return oo(this).get(t)},Fm.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=oo(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var Vm=ro.prototype,Gm=ro.extend({type:"ordinal",init:function(t,e){(!t||L(t))&&(t=new ao({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),Vm.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Vm.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Vm.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){return this.isBlank()?void 0:this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:u,niceExtent:u});Gm.create=function(){return new Gm};var Hm=Vi,Wm=Vi,Xm=ro.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Xm.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=lo(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;n[0]<i[0]&&a.push(t?Wm(i[0]-e):n[0]);for(var o=i[0];o<=i[1]&&(a.push(o),(o=Wm(o+e,r))!==a[a.length-1]);)if(1e4<a.length)return[];var s=a.length?a[a.length-1]:i[1];return n[1]>s&&a.push(t?s+e:n[1]),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;r<e.length;r++){for(var a=e[r],o=e[r-1],s=0,l=[],u=(a-o)/t;s<t-1;){var h=Vi(o+(s+1)*u);h>i[0]&&h<i[1]&&l.push(h),s++}n.push(l)}return n},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Gi(t)||0:"auto"===n&&(n=this._intervalPrecision),qi(t=Wm(t,n,!0))},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var a=function(t,e,n,i){var r={},a=t[1]-t[0],o=r.interval=Yi(a/e,!0);null!=n&&o<n&&(o=r.interval=n),null!=i&&i<o&&(o=r.interval=i);var s=r.intervalPrecision=lo(o);return ho(r.niceTickExtent=[Hm(Math.ceil(t[0]/o)*o,s),Hm(Math.floor(t[1]/o)*o,s)],t),r}(i,t,e,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=Wm(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Wm(Math.ceil(e[1]/r)*r))}});Xm.create=function(){return new Xm};var Zm=Xm.prototype,Um=Math.ceil,Ym=Math.floor,qm=36e5,jm=864e5,$m=Xm.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return Ji(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=jm,e[1]+=jm),e[1]===-1/0&&1/0===e[0]){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-jm}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=Vi(Ym(e[0]/i)*i)),t.fixMax||(e[1]=Vi(Um(e[1]/i)*i))},niceTicks:function(t,e,n){t=t||10;var i=this._extent,r=i[1]-i[0],a=r/t;null!=e&&a<e&&(a=e),null!=n&&n<a&&(a=n);var o=Km.length,s=function(t,e,n,i){for(;n<i;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n}(Km,a,0,o),l=Km[Math.min(s,o-1)],u=l[1];"year"===l[0]&&(u*=Yi(r/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,c=[Math.round(Um((i[0]-h)/u)*u+h),Math.round(Ym((i[1]-h)/u)*u+h)];ho(c,i),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Zi(t)}});D(["contain","normalize"],function(e){$m.prototype[e]=function(t){return Zm[e].call(this,this.parse(t))}});var Km=[["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",qm],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",6*qm],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",jm],["MM-dd\nyyyy",2*jm],["MM-dd\nyyyy",3*jm],["MM-dd\nyyyy",4*jm],["MM-dd\nyyyy",5*jm],["MM-dd\nyyyy",6*jm],["week",7*jm],["MM-dd\nyyyy",864e6],["week",14*jm],["week",21*jm],["month",31*jm],["week",42*jm],["month",62*jm],["week",70*jm],["quarter",95*jm],["month",31*jm*4],["month",13392e6],["half-year",16416e6],["month",31*jm*8],["month",26784e6],["year",380*jm]];$m.create=function(t){return new $m({useUTC:t.ecModel.get("useUTC")})};var Qm=ro.prototype,Jm=Xm.prototype,tv=Gi,ev=Vi,nv=Math.floor,iv=Math.ceil,rv=Math.pow,av=Math.log,ov=ro.extend({type:"log",base:10,$constructor:function(){ro.apply(this,arguments),this._originalScale=new Xm},getTicks:function(t){var n=this._originalScale,i=this._extent,r=n.getExtent();return P(Jm.getTicks.call(this,t),function(t){var e=Vi(rv(this.base,t));return e=t===i[0]&&n.__fixMin?co(e,r[0]):e,t===i[1]&&n.__fixMax?co(e,r[1]):e},this)},getMinorTicks:Jm.getMinorTicks,getLabel:Jm.getLabel,scale:function(t){return t=Qm.scale.call(this,t),rv(this.base,t)},setExtent:function(t,e){var n=this.base;t=av(t)/av(n),e=av(e)/av(n),Jm.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Qm.getExtent.call(this);e[0]=rv(t,e[0]),e[1]=rv(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=co(e[0],i[0])),n.__fixMax&&(e[1]=co(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=av(t[0])/av(e),t[1]=av(t[1])/av(e),Qm.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e,n=this._extent,i=n[1]-n[0];if(!(1/0===i||i<=0)){var r=(e=i,Math.pow(10,Ui(e)));for(t/i*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&0<Math.abs(r);)r*=10;var a=[Vi(iv(n[0]/r)*r),Vi(nv(n[1]/r)*r)];this._interval=r,this._niceExtent=a}},niceExtent:function(t){Jm.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});D(["contain","normalize"],function(e){ov.prototype[e]=function(t){return t=av(t)/av(this.base),Qm[e].call(this,t)}}),ov.create=function(){return new ov};var sv=function(t){this._axes={},this._dimList=[],this.name=t||""};sv.prototype={constructor:sv,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return P(this._dimList,xo,this)},getAxesByScale:function(e){return e=e.toLowerCase(),v(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;r<n.length;r++){var a=n[r],o=this._axes[a];i[a]=o[e](t[a])}return i}},_o.prototype={constructor:_o,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),r=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=r.toGlobalCoord(r.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),a=i.getExtent(),o=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),i=this.getAxis("y");return(e=e||[])[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]);return new Vt(n,i,Math.max(t[0],t[1])-n,Math.max(e[0],e[1])-i)}},i(_o,sv);var lv=en(),uv=[0,1],hv=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};hv.prototype={constructor:hv,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return n<=t&&t<=i},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Hi(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Do(n=n.slice(),i.count()),Ri(t,uv,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Do(n=n.slice(),i.count());var r=Ri(t,n,uv,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=P(bo(this,e).ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this);return function(t,e,n,i){function r(t,e){return t=Vi(t),e=Vi(e),c?e<t:t<e}var a=e.length;if(t.onBand&&!n&&a){var o,s,l=t.getExtent();if(1===a)e[0].coord=l[0],o=e[1]={coord:l[0]};else{var u=e[a-1].tickValue-e[0].tickValue,h=(e[a-1].coord-e[0].coord)/u;D(e,function(t){t.coord-=h/2}),s=1+t.scale.getExtent()[1]-e[a-1].tickValue,o={coord:e[a-1].coord+h*s},e.push(o)}var c=l[0]>l[1];r(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift()),i&&r(l[0],e[0].coord)&&e.unshift({coord:l[0]}),r(l[1],o.coord)&&(i?o.coord=l[1]:e.pop()),i&&r(o.coord,l[1])&&e.push({coord:l[1]})}}(this,n,e.get("alignWithLabel"),t.clamp),n},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),P(this.scale.getMinorTicks(t),function(t){return P(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},getViewLabels:function(){return wo(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return function(t){var e,n,i=(n=(e=t).getLabelModel(),{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}),r=go(t),a=(i.axisRotate-i.labelRotate)/180*Math.PI,o=t.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1;40<l&&(u=Math.max(1,Math.floor(l/40)));for(var h=s[0],c=t.dataToCoord(h+1)-t.dataToCoord(h),d=Math.abs(c*Math.cos(a)),f=Math.abs(c*Math.sin(a)),p=0,g=0;h<=s[1];h+=u){var m,v,y=ie(r(h),i.font,"center","top");m=1.3*y.width,v=1.3*y.height,p=Math.max(p,m,7),g=Math.max(g,v,7)}var x=p/d,_=g/f;isNaN(x)&&(x=1/0),isNaN(_)&&(_=1/0);var w=Math.max(0,Math.floor(Math.min(x,_))),b=lv(t.model),S=t.getExtent(),M=b.lastAutoInterval,I=b.lastTickCount;return null!=M&&null!=I&&Math.abs(M-w)<=1&&Math.abs(I-l)<=1&&w<M&&b.axisExtend0===S[0]&&b.axisExtend1===S[1]?w=M:(b.lastTickCount=l,b.lastAutoInterval=w,b.axisExtend0=S[0],b.axisExtend1=S[1]),w}(this)}};var cv=function(t,e,n,i,r){hv.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom"};cv.prototype={constructor:cv,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},i(cv,hv);var dv={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=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},dv),fv.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},dv),fv.timeAxis=A({scale:!0,min:"dataMin",max:"dataMax"},fv.valueAxis),fv.logAxis=A({scale:!0,logBase:10},fv.valueAxis);var pv=["value","category","time","log"],gv=function(a,t,o,e){D(pv,function(r){t.extend({type:a+"Axis."+r,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?rr(t):{};m(t,e.getTheme().get(r+"Axis")),m(t,this.getDefaultOption()),t.type=o(a,t),n&&ir(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=ao.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:h([{},fv[r+"Axis"],e],!0)})}),Wp.registerSubTypeDefaulter(a+"Axis",y(o,a))},mv={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!I(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!I(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:u,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},vv=Wp.extend({type:"cartesian2dAxis",axis:null,init:function(){vv.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){vv.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){vv.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});m(vv.prototype,mv);var yv={offset:0};gv("x",vv,ko,yv),gv("y",vv,ko,yv),Wp.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 xv=Lo.prototype;xv.type="grid",xv.axisPointerEnabled=!0,xv.getRect=function(){return this._rect},xv.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),D(n.x,function(t){po(t.scale,t.model)}),D(n.y,function(t){po(t.scale,t.model)});var i={};D(n.x,function(t){Oo(n,"y",t,i)}),D(n.y,function(t){Oo(n,"x",t,i)}),this.resize(this.model,e)},xv.resize=function(t,e,n){function i(){D(r,function(t){var e,n,i,r,a=t.isHorizontal(),o=a?[0,l.width]:[0,l.height],s=t.inverse?1:0;t.setExtent(o[s],o[1-s]),e=t,n=a?l.x:l.y,i=e.getExtent(),r=i[0]+i[1],e.toGlobalCoord="x"===e.dim?function(t){return t+n}:function(t){return r-t+n},e.toLocalCoord="x"===e.dim?function(t){return t-n}:function(t){return r-t+n}})}var l=nr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=l;var r=this._axesList;i(),!n&&t.get("containLabel")&&(D(r,function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e,n,i,r,a,o,s,l,u=t.model,h=t.scale;if(u.get("axisLabel.show")&&!h.isBlank()){var c,d,f="category"===t.type,p=h.getExtent();d=f?h.count():(c=h.getTicks()).length;var g,m=t.getLabelModel(),v=go(t),y=1;40<d&&(y=Math.ceil(d/40));for(var x=0;x<d;x+=y){var _=v(c?c[x]:p[0]+x),w=m.getTextRect(_),b=(e=w,n=m.get("rotate")||0,i=n*Math.PI/180,r=e.plain(),a=r.width,o=r.height,s=a*Math.cos(i)+o*Math.sin(i),l=a*Math.sin(i)+o*Math.cos(i),new Vt(r.x,r.y,s,l));g?g.union(b):g=b}return g}}(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");l[n]-=e[n]+i,"top"===t.position?l.y+=e.height+i:"left"===t.position&&(l.x+=e.width+i)}}}),i())},xv.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},xv.getAxes=function(){return this._axesList.slice()},xv.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}O(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===e)return r[i]},xv.getCartesians=function(){return this._coordsList.slice()},xv.convertToPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},xv.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},xv._findConvertTarget=function(t,e){var n,i,r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)p(l,n=r.coordinateSystem)<0&&(n=null);else if(a&&o)n=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)i=this.getAxis("x",a.componentIndex);else if(o)i=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},xv.containPoint=function(t){var e=this._coordsList[0];return e?e.containPoint(t):void 0},xv._initCartesian=function(o,t){function e(a){return function(t,e){if(Po(t,o)){var n=t.get("position");"x"===a?"top"!==n&&"bottom"!==n&&(n=s.bottom?"top":"bottom"):"left"!==n&&"right"!==n&&(n=s.left?"right":"left"),s[n]=!0;var i=new cv(a,function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Gm(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Xm;default:return(ro.getClass(e)||Xm).create(t)}}(t),[0,0],t.get("type"),n),r="category"===i.type;i.onBand=r&&t.get("boundaryGap"),i.inverse=t.get("inverse"),(t.axis=i).model=t,i.grid=this,i.index=e,this._axesList.push(i),l[a][e]=i,u[a]++}}}var s={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},u={x:0,y:0};return t.eachComponent("xAxis",e("x"),this),t.eachComponent("yAxis",e("y"),this),u.x&&u.y?void D((this._axesMap=l).x,function(r,a){D(l.y,function(t,e){var n="x"+a+"y"+e,i=new _o(n);i.grid=this,i.model=o,this._coordsMap[n]=i,this._coordsList.push(i),i.addAxis(r),i.addAxis(t)},this)},this):(this._axesMap={},void(this._axesList=[]))},xv._updateScale=function(t,l){function u(e,n){D(e.mapDimension(n.dim,!0),function(t){n.scale.unionExtentFromData(e,ja(e,t))})}D(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(t){if(zo(t)){var e=Eo(t),n=e[0],i=e[1];if(!Po(n,l)||!Po(i,l))return;var r=this.getCartesian(n.componentIndex,i.componentIndex),a=t.getData(),o=r.getAxis("x"),s=r.getAxis("y");"list"===a.type&&(u(a,o),u(a,s))}},this)},xv.getTooltipAxes=function(i){var r=[],a=[];return D(this.getCartesians(),function(t){var e=null!=i&&"auto"!==i?t.getAxis(i):t.getBaseAxis(),n=t.getOtherAxis(e);p(r,e)<0&&r.push(e),p(a,n)<0&&a.push(n)}),{baseAxes:r,otherAxes:a}};var _v=["xAxis","yAxis"];Lo.create=function(i,r){var a=[];return i.eachComponent("grid",function(t,e){var n=new Lo(t,i,r);n.name="grid_"+e,n.resize(t,r,!0),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){if(zo(t)){var e=Eo(t),n=e[0],i=e[1],r=n.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(n.componentIndex,i.componentIndex)}}),a},Lo.dimensions=Lo.prototype.dimensions=_o.prototype.dimensions,vr.register("cartesian2d",Lo),Ro.prototype={constructor:Ro,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,n={},i=[],r=[];for(Fo(t,{},i,"_oldKeyGetter",this),Fo(e,n,r,"_newKeyGetter",this),a=0;a<t.length;a++){if(null!=(s=n[o=i[a]]))(u=s.length)?(1===u&&(n[o]=null),s=s.shift()):n[o]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<r.length;a++){var o=r[a];if(n.hasOwnProperty(o)){var s;if(null==(s=n[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var wv=T(["tooltip","label","itemName","itemId","seriesName"]),bv=O,Sv="undefined",Mv={float:typeof Float64Array===Sv?Array:Float64Array,int:typeof Int32Array===Sv?Array:Int32Array,ordinal:Array,number:Array,time:Array},Iv=typeof Uint32Array===Sv?Array:Uint32Array,Tv=typeof Int32Array===Sv?Array:Int32Array,Cv=typeof Uint16Array===Sv?Array:Uint16Array,Av=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Dv=["_extent","_approximateExtent","_rawExtent"],kv=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},a=0;a<t.length;a++){var o=t[a];M(o)?o=new Go({name:o}):o instanceof Go||(o=new Go(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),(n[s]=o).index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=function(a){var t={},o=t.encode={},s=T(),l=[],u=[],h=t.userOutput={dimensionNames:a.dimensions.slice(),encode:{}};D(a.dimensions,function(t){var e,r=a.getDimensionInfo(t),n=r.coordDim;if(n){var i=r.coordDimIndex;Vo(o,n)[i]=t,r.isExtraCoord||(s.set(n,1),!("ordinal"===(e=r.type)||"time"===e)&&(l[0]=t),Vo(h.encode,n)[i]=r.index),r.defaultTooltip&&u.push(t)}wv.each(function(t,e){var n=Vo(o,e),i=r.otherDims[e];null!=i&&!1!==i&&(n[i]=r.name)})});var i=[],r={};s.each(function(t,e){var n=o[e];r[e]=n[0],i=i.concat(n)}),t.dataDimsOnCoord=i,t.encodeFirstDimNotExtra=r;var e=o.label;e&&e.length&&(l=e.slice());var n=o.tooltip;return n&&n.length?u=n.slice():u.length||(u=l.slice()),o.defaultedLabel=l,o.defaultedTooltip=u,t}(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},Pv=kv.prototype;Pv.type="list",Pv.hasItemOption=!0,Pv.getDimension=function(t){return("number"==typeof t||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},Pv.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Pv.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Pv.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return!0===e?(i||[]).slice():i&&i[e]},Pv.initData=function(t,e,n){(ar.isInstance(t)||N(t))&&(t=new Dr(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Sg[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Sg.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},Pv.getProvider=function(){return this._rawData},Pv.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i)},Pv.appendValues=function(t,e){for(var n=this._chunkSize,i=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++){o[v=r[h]]||(o[v]=[1/0,-1/0]),i[v]||(i[v]=[]),Xo(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length}for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/n),g=d%n,m=0;m<a;m++){var v=r[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);i[v][p][g]=y;var x=o[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Zo(this)},Pv._initDataFromProvider=function(t,e){if(!(e<=t)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[w=o[p]]||(c[w]=[1/0,-1/0]);var g=l[w];0===g.otherDims.itemName&&(n=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),Xo(a,g,i,f,e),this._chunkCount=a[w].length}for(var m=new Array(s),v=t;v<e;v++){m=r.getItem(v,m);for(var y=Math.floor(v/i),x=v%i,_=0;_<s;_++){var w,b=a[w=o[_]][y],S=this._dimValueGetter(m,w,v,_);b[x]=S;var M=c[w];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!r.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=n){var T=o[n],C=a[T][y];if(C){I=C[x];var A=l[T].ordinalMeta;A&&A.categories.length&&(I=A.categories[I])}}var D=null==m?null:m.id;null==D&&null!=I&&(d[I]=d[I]||0,0<d[D=I]&&(D+="__ec__"+d[I]),d[I]++),null!=D&&(h[v]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},Zo(this)}},Pv.count=function(){return this._count},Pv.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){r=new e(n);for(var i=0;i<n;i++)r[i]=t[i]}else r=new e(t.buffer,0,n)}else{var r=new(e=Ho(this))(this.count());for(i=0;i<r.length;i++)r[i]=i}return r},Pv.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;var n=this._storage;if(!n[t])return NaN;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return n[t][i][r]},Pv.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;var n=this._storage[t];if(!n)return NaN;var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return n[i][r]},Pv._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return this._storage[t][n][i]},Pv.getValues=function(t,e){var n=[];L(t)||(e=t,t=this.dimensions);for(var i=0,r=t.length;i<r;i++)n.push(this.get(t[i],e));return n},Pv.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},Pv.getDataExtent=function(t){t=this.getDimension(t);var e=[1/0,-1/0];if(!this._storage[t])return e;var n,i=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var r=(n=e)[0],a=n[1],o=0;o<i;o++){var s=this._getFast(t,this.getRawIndex(o));s<r&&(r=s),a<s&&(a=s)}return n=[r,a],this._extent[t]=n},Pv.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Pv.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Pv.getCalculationInfo=function(t){return this._calculationInfo[t]},Pv.setCalculationInfo=function(t,e){bv(t)?k(this._calculationInfo,t):this._calculationInfo[t]=e},Pv.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var r=this.get(t,n);isNaN(r)||(e+=r)}return e},Pv.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var n=[].concat(e).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},Pv.rawIndexOf=function(t,e){var n=(t&&this._invertedIndicesMap[t])[e];return null==n||isNaN(n)?-1:n},Pv.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},Pv.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;i<=r;){var a=(i+r)/2|0;if(e[a]<t)i=a+1;else{if(!(e[a]>t))return a;r=a-1}}return-1},Pv.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var r=1/0,a=-1,o=0,s=0,l=this.count();s<l;s++){var u=e-this.get(t,s),h=Math.abs(u);h<=n&&((h<r||h===r&&0<=u&&a<0)&&(r=h,a=u,o=0),u===a&&(i[o++]=s))}return i.length=o,i},Pv.getRawIndex=Yo,Pv.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},Pv.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Uo(this,this._nameDimIdx,e)||""},Pv.getId=function(t){return jo(this,this.getRawIndex(t))},Pv.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;for(var r=(t=P($o(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(r){case 0:e.call(n,a);break;case 1:e.call(n,this.get(t[0],a),a);break;case 2:e.call(n,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var o=0,s=[];o<r;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(n,s)}}},Pv.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=P($o(t),this.getDimension,this);for(var r=this.count(),a=new(Ho(this))(r),o=[],s=t.length,l=0,u=t[0],h=0;h<r;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(n,h);else if(1===s){var f=this._getFast(u,d);c=e.call(n,f,h)}else{for(var p=0;p<s;p++)o[p]=this._getFast(u,d);o[p]=h,c=e.apply(n,o)}c&&(a[l++]=d)}return l<r&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?qo:Yo,this}},Pv.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);var i=e.length;if(i){var r=this.count(),a=new(Ho(this))(r),o=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===i){for(var d=this._storage[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++){(l<=(w=p[m])&&w<=u||isNaN(w))&&(a[o++]=c),c++}h=!0}else if(2===i){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];(l<=w&&w<=u||isNaN(w))&&(y<=b&&b<=x||isNaN(b))&&(a[o++]=c),c++}}h=!0}}if(!h)if(1===i)for(m=0;m<r;m++){var S=this.getRawIndex(m);(l<=(w=this._getFast(s,S))&&w<=u||isNaN(w))&&(a[o++]=S)}else for(m=0;m<r;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<i;f++){var I=e[f];((w=this._getFast(n,S))<t[I][0]||w>t[I][1])&&(M=!1)}M&&(a[o++]=this.getRawIndex(m))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?qo:Yo,this}}},Pv.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},Pv.map=function(t,e,n,i){n=n||i||this;var r=Ko(this,t=P($o(t),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?qo:Yo;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=r._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)h[f]=this.get(t[f],d);h[l]=d;var p=e&&e.apply(n,h);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var x=t[y],_=p[y],w=c[x],b=a[x];b&&(b[m][v]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return r},Pv.downSample=function(t,e,n,i){for(var r=Ko(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(Ho(this))(u),f=0,p=0;p<u;p+=s){u-p<s&&(s=u-p,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;o[g]=l[v][y]}var x=n(o),_=this.getRawIndex(Math.min(p+i(o,x)||0,u-1)),w=_%h;(l[Math.floor(_/h)][w]=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},Pv.getItemModel=function(t){var e=this.hostModel;return new Ni(this.getRawDataItem(t),e,e&&e.ecModel)},Pv.diff=function(e){var n=this;return new Ro(e?e.getIndices():[],this.getIndices(),function(t){return jo(e,t)},function(t){return jo(n,t)})},Pv.getVisual=function(t){var e=this._visual;return e&&e[t]},Pv.setVisual=function(t,e){if(bv(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},Pv.setLayout=function(t,e){if(bv(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},Pv.getLayout=function(t){return this._layout[t]},Pv.getItemLayout=function(t){return this._itemLayouts[t]},Pv.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?k(this._itemLayouts[t]||{},e):e},Pv.clearItemLayouts=function(){this._itemLayouts.length=0},Pv.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},Pv.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,bv(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},Pv.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Lv=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};Pv.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Lv,e)),this._graphicEls[t]=e},Pv.getItemGraphicEl=function(t){return this._graphicEls[t]},Pv.eachItemGraphicEl=function(n,i){D(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},Pv.cloneShallow=function(t){if(!t){var e=P(this.dimensions,this.getDimensionInfo,this);t=new kv(e,this.hostModel)}if(t._storage=this._storage,Wo(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},Pv.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(r(arguments)))})},Pv.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Pv.CHANGABLE_METHODS=["filterSelf","selectRange"];var Ov=function(t,e){return Jo((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},Nv={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),ns(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),ns(a)&&(i.set("y",a),e.firstCategoryDimIndex,e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),ns(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),ns(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),ns(o)&&(i.set("angle",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,r,a,o){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=r.coordSysDims=e.dimensions.slice();D(e.parallelAxisIndex,function(t,e){var n=s.getComponent("parallelAxis",t),i=l[e];a.set(i,n),ns(n)&&null==r.firstCategoryDimIndex&&(o.set(i,n),r.firstCategoryDimIndex=e)})}};Dg.extend({type:"series.__base_bar__",getInitialData:function(){return is(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),a=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+a/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}}).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t},defaultOption:{clip:!0,roundCap:!1}});var Ev=Pd([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),zv={getBarItemStyle:function(t){var e=Ev(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},Bv=Yn({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=.5*(a-r),s=r+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+n,d*r+i),t.arc(c*s+n,d*s+i,o,-Math.PI+l,l,!h)),t.arc(n,i,a,l,u,!h),t.moveTo(f*a+n,p*a+i),t.arc(f*s+n,p*s+i,o,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveTo(c*r+n,p*r+i)),t.closePath()}}),Rv=["itemStyle","barBorderWidth"],Fv=[0,0];k(Ni.prototype,zv),Ya({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return("cartesian2d"===i||"polar"===i)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(a){var o,s=this.group,l=a.getData(),u=this._data,h=a.coordinateSystem,t=h.getBaseAxis();"cartesian2d"===h.type?o=t.isHorizontal():"polar"===h.type&&(o="angle"===t.dim);var c=a.isAnimationEnabled()?a:null,d=a.get("clip",!0),f=function(t,e){var n=t.getArea&&t.getArea();if("cartesian2d"===t.type){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(h,l);s.removeClipPath();var p=a.get("roundCap",!0);l.diff(u).add(function(t){if(l.hasValue(t)){var e=l.getItemModel(t),n=Xv[h.type](l,t,e);if(d)if(Hv[h.type](f,n))return void s.remove(i);var i=Wv[h.type](t,n,o,c,!1,p);l.setItemGraphicEl(t,i),s.add(i),cs(i,l,t,e,n,a,o,"polar"===h.type)}}).update(function(t,e){var n=u.getItemGraphicEl(e);if(l.hasValue(t)){var i=l.getItemModel(t),r=Xv[h.type](l,t,i);if(d)if(Hv[h.type](f,r))return void s.remove(n);n?Mi(n,{shape:r},c,t):n=Wv[h.type](t,r,o,c,!0,p),l.setItemGraphicEl(t,n),s.add(n),cs(n,l,t,i,r,a,o,"polar"===h.type)}else s.remove(n)}).remove(function(t){var e=u.getItemGraphicEl(t);"cartesian2d"===h.type?e&&ls(t,c,e):e&&us(t,c,e)}).execute(),this._data=l},_renderLarge:function(t){this._clear(),ds(t,this.group);var e,n,i,r=t.get("clip",!0)?(e=t.coordinateSystem,n=!1,i=t,e?"polar"===e.type?ss(e,n,i):"cartesian2d"===e.type?os(e,n,i):null:null):null;r?this.group.setClipPath(r):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){ds(e,this.group,!0)},dispose:u,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(t){"sector"===t.type?us(t.dataIndex,e,t):ls(t.dataIndex,e,t)}):t.removeAll(),this._data=null}});var Vv=Math.max,Gv=Math.min,Hv={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=Vv(e.x,t.x),a=Gv(e.x+e.width,t.x+t.width),o=Vv(e.y,t.y),s=Gv(e.y+e.height,t.y+t.height);e.x=r,e.y=o,e.width=a-r,e.height=s-o;var l=e.width<0||e.height<0;return n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(){return!1}},Wv={cartesian2d:function(t,e,n,i,r){var a=new jf({shape:k({},e)});if(i){var o=n?"height":"width",s={};a.shape[o]=0,s[o]=e[o],xp[r?"updateProps":"initProps"](a,{shape:s},i,t)}return a},polar:function(t,e,n,i,r,a){var o=e.startAngle<e.endAngle,s=new(!n&&a?Bv:Wf)({shape:A({clockwise:o},e)});if(i){var l=n?"r":"endAngle",u={};s.shape[l]=n?0:e.startAngle,u[l]=e[l],xp[r?"updateProps":"initProps"](s,{shape:u},i,t)}return s}},Xv={cartesian2d:function(t,e,n){var i,r,a=t.getItemLayout(e),o=(i=a,r=n.get(Rv)||0,Math.min(r,Math.abs(i.width),Math.abs(i.height))),s=0<a.width?1:-1,l=0<a.height?1:-1;return{x:a.x+s*o/2,y:a.y+l*o/2,width:a.width-s*o,height:a.height-l*o}},polar:function(t,e){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},Zv=zn.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,a=0;a<n.length;a+=2)i[r]=n[a+r],t.moveTo(i[0],i[1]),t.lineTo(n[a],n[a+1])}}),Uv=Jr(function(t){var e=function(t,e,n){var i=t.__baseDimIdx,r=1-i,a=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];Fv[0]=e,Fv[1]=n;for(var u=Fv[i],h=Fv[1-i],c=u-s,d=u+s,f=0,p=a.length/2;f<p;f++){var g=2*f,m=a[g+i],v=a[g+r];if(c<=m&&m<=d&&(l<=v?l<=h&&h<=v:v<=h&&h<=l))return o[f]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=0<=e?e:null},30,!1),Yv=Yn({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i+a),t.lineTo(n-r,i+a),t.closePath()}}),qv=Yn({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i),t.lineTo(n,i+a),t.lineTo(n-r,i),t.closePath()}}),jv=Yn({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;t.moveTo(n-h,l+s),t.arc(n,l,o,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-h+c*f,l+s+d*f,n-h,l+s),t.closePath()}}),$v=Yn({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,a=e.y,o=i/3*2;t.moveTo(r,a),t.lineTo(r+o,a+n),t.lineTo(r,a+n/4*3),t.lineTo(r-o,a+n),t.lineTo(r,a),t.closePath()}}),Kv={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var a=Math.min(n,i);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},Qv={};D({line:Kf,rect:jf,roundRect:jf,square:jf,circle:Vf,diamond:qv,pin:jv,arrow:$v,triangle:Yv},function(t,e){Qv[e]=new t});var Jv=Yn({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=oe(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=Qv[i];r||(r=Qv[i="rect"]),Kv[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}}),ty=Math.PI,ey=function(t,e){this.opt=e,this.axisModel=t,A(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Ac;var n=new Ac({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};ey.prototype={constructor:ey,hasBuilder:function(t){return!!ny[t]},add:function(t){ny[t].call(this)},getGroup:function(){return this.group}};var ny={axisLine:function(){var a=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var e=this.axisModel.axis.getExtent(),n=this._transform,o=[e[0],0],i=[e[1],0];n&&(W(o,o,n),W(i,i,n));var s=k({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Kf({anid:"line",subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:i[0],y2:i[1]},style:s,strokeContainThreshold:a.strokeContainThreshold||5,silent:!0,z2:1}));var l=t.get("axisLine.symbol"),r=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof r||"number"==typeof r)&&(r=[r,r]);var h=r[0],c=r[1];D([{rotate:a.rotation+Math.PI/2,offset:u[0],r:0},{rotate:a.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((o[0]-i[0])*(o[0]-i[0])+(o[1]-i[1])*(o[1]-i[1]))}],function(t,e){if("none"!==l[e]&&null!=l[e]){var n=ps(l[e],-h/2,-c/2,h,c,s.stroke,!0),i=t.r+t.offset,r=[o[0]+i*Math.cos(a.rotation),o[1]-i*Math.sin(a.rotation)];n.attr({rotation:t.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=function(t,e,n){var i=e.axis,r=e.getModel("axisTick");if(r.get("show")&&!i.scale.isBlank()){for(var a=r.getModel("lineStyle"),o=n.tickDirection*r.get("length"),s=ys(i.getTicksCoords(),t._transform,o,A(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)t.group.add(s[l]);return s}}(this,t,e);(function(t,e,n){if(!yo(t.axis)){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");n=n||[];var a=(e=e||[])[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];!1===i?(gs(a),gs(u)):ms(a,o)&&(i?(gs(o),gs(h)):(gs(a),gs(u))),!1===r?(gs(s),gs(c)):ms(l,s)&&(r?(gs(l),gs(d)):(gs(s),gs(c)))}})(t,function(u,h,c){var d=h.axis;if(E(c.axisLabelShow,h.get("axisLabel.show"))&&!d.scale.isBlank()){var f=h.getModel("axisLabel"),p=f.get("margin"),t=d.getViewLabels(),e=(E(c.labelRotate,f.get("rotate"))||0)*ty/180,g=ry(c.rotation,e,c.labelDirection),m=h.getCategories&&h.getCategories(!0),v=[],y=ay(h),x=h.get("triggerEvent");return D(t,function(t,e){var n=t.tickValue,i=t.formattedLabel,r=t.rawLabel,a=f;m&&m[n]&&m[n].textStyle&&(a=new Ni(m[n].textStyle,f,h.ecModel));var o=a.getTextColor()||h.get("axisLine.lineStyle.color"),s=[d.dataToCoord(n),c.labelOffset+c.labelDirection*p],l=new Ff({anid:"label_"+n,position:s,rotation:g.rotation,silent:y,z2:10});mi(l.style,a,{text:i,textAlign:a.getShallow("align",!0)||g.textAlign,textVerticalAlign:a.getShallow("verticalAlign",!0)||a.getShallow("baseline",!0)||g.textVerticalAlign,textFill:"function"==typeof o?o("category"===d.type?r:"value"===d.type?n+"":n,e):o}),x&&(l.eventData=iy(h),l.eventData.targetType="axisLabel",l.eventData.value=r),u._dumbGroup.add(l),l.updateTransform(),v.push(l),u.group.add(l),l.decomposeTransform()}),v}}(this,t,e),n),function(t,e,n){var i=e.axis,r=e.getModel("minorTick");if(r.get("show")&&!i.scale.isBlank()){var a=i.getMinorTicksCoords();if(a.length)for(var o=r.getModel("lineStyle"),s=n.tickDirection*r.get("length"),l=A(o.getLineStyle(),A(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=ys(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}}(this,t,e)},axisName:function(){var t,e,n,i,r,a,o=this.opt,s=this.axisModel,l=E(o.axisName,s.get("name"));if(l){var u,h,c=s.get("nameLocation"),d=o.nameDirection,f=s.getModel("nameTextStyle"),p=s.get("nameGap")||0,g=this.axisModel.axis.getExtent(),m=g[0]>g[1]?-1:1,v=["start"===c?g[0]-m*p:"end"===c?g[1]+m*p:(g[0]+g[1])/2,vs(c)?o.labelOffset+d*p:0],y=s.get("nameRotate");null!=y&&(y=y*ty/180),vs(c)?u=ry(o.rotation,null!=y?y:o.rotation,d):(t=c,e=g,i=Wi((y||0)-o.rotation),r=e[0]>e[1],a="start"===t&&!r||"start"!==t&&r,u={rotation:i,textAlign:Xi(i-ty/2)?(n=a?"bottom":"top","center"):Xi(i-1.5*ty)?(n=a?"top":"bottom","center"):(n="middle",i<1.5*ty&&ty/2<i?a?"left":"right":a?"right":"left"),textVerticalAlign:n},null!=(h=o.axisNameAvailableWidth)&&(h=Math.abs(h/Math.sin(u.rotation)),!isFinite(h)&&(h=null)));var x=f.getFont(),_=s.get("nameTruncate",!0)||{},w=_.ellipsis,b=E(o.nameTruncateMaxWidth,_.maxWidth,h),S=null!=w&&null!=b?zp(l,b,x,w,{minChar:2,placeholder:_.placeholder}):l,M=s.get("tooltip",!0),I=s.mainType,T={componentType:I,name:l,$vars:["name"]};T[I+"Index"]=s.componentIndex;var C=new Ff({anid:"name",__fullText:l,__truncatedText:S,position:v,rotation:u.rotation,silent:ay(s),z2:1,tooltip:M&&M.show?k({content:l,formatter:function(){return l},formatterParams:T},M):null});mi(C.style,f,{text:S,textFont:x,textFill:f.getTextColor()||s.get("axisLine.lineStyle.color"),textAlign:f.get("align")||u.textAlign,textVerticalAlign:f.get("verticalAlign")||u.textVerticalAlign}),s.get("triggerEvent")&&(C.eventData=iy(s),C.eventData.targetType="axisName",C.eventData.name=l),this._dumbGroup.add(C),C.updateTransform(),this.group.add(C),C.decomposeTransform()}}},iy=ey.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},ry=ey.innerTextLayout=function(t,e,n){var i,r=Wi(e-t);return{rotation:r,textAlign:Xi(r)?(i=0<n?"top":"bottom","center"):Xi(r-ty)?(i=0<n?"bottom":"top","center"):(i="middle",0<r&&r<ty?0<n?"right":"left":0<n?"left":"right"),textVerticalAlign:i}},ay=ey.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},oy=D,sy=y,ly=Za({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&function(t){var e=ws(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=bs(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}(t),ly.superApply(this,"render",arguments),Ms(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n,i){Ms(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),ly.superApply(this,"remove",arguments)},dispose:function(t,e){Is(this,e),ly.superApply(this,"dispose",arguments)}}),uy=[];ly.registerAxisPointerClass=function(t,e){uy[t]=e},ly.getAxisPointerClass=function(t){return t&&uy[t]};var hy=["axisLine","axisTickLabel","axisName"],cy=["splitArea","splitLine","minorSplitLine"],dy=ly.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Ac,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),o=Ts(a,e),s=new ey(e,o);D(hy,s.add,s),this._axisGroup.add(s.getGroup()),D(cy,function(t){e.get(t+".show")&&this["_"+t](e,a)},this),Di(r,this._axisGroup,e),dy.superCall(this,"render",e,t,n,i)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),a=r.get("color");a=L(a)?a:[a];for(var o=e.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),h=[],c=[],d=r.getLineStyle(),f=0;f<u.length;f++){var p=n.toGlobalCoord(u[f].coord);c[1]=s?(h[0]=p,h[1]=o.y,c[0]=p,o.y+o.height):(h[0]=o.x,h[1]=p,c[0]=o.x+o.width,p);var g=l++%a.length,m=u[f].tickValue;this._axisGroup.add(new Kf({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:A({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(t,e){var n=t.axis,i=t.getModel("minorSplitLine").getModel("lineStyle"),r=e.coordinateSystem.getRect(),a=n.isHorizontal(),o=n.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=i.getLineStyle(),h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++){var d=n.toGlobalCoord(o[h][c].coord);l[1]=a?(s[0]=d,s[1]=r.y,l[0]=d,r.y+r.height):(s[0]=r.x,s[1]=d,l[0]=r.x+r.width,d),this._axisGroup.add(new Kf({anid:"minor_line_"+o[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitArea"),r=i.getModel("areaStyle"),a=r.get("color"),o=e.coordinateSystem.getRect(),s=n.getTicksCoords({tickModel:i,clamp:!0});if(s.length){var l=a.length,u=this._splitAreaColors,h=T(),c=0;if(u)for(var d=0;d<s.length;d++){var f=u.get(s[d].tickValue);if(null!=f){c=(f+(l-1)*d)%l;break}}var p=n.toGlobalCoord(s[0].coord),g=r.getAreaStyle();a=L(a)?a:[a];for(d=1;d<s.length;d++){var m,v,y,x,_=n.toGlobalCoord(s[d].coord);p=n.isHorizontal()?(m=p,v=o.y,y=_-m,x=o.height,m+y):(m=o.x,v=p,y=o.width,v+(x=_-v));var w=s[d-1].tickValue;null!=w&&h.set(w,c),this._axisGroup.add(new jf({anid:null!=w?"area_"+w:null,shape:{x:m,y:v,width:y,height:x},style:A({fill:a[c]},g),silent:!0})),c=(c+1)%l}this._splitAreaColors=h}}}});dy.extend({type:"xAxis"}),dy.extend({type:"yAxis"}),Za({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new jf({shape:t.coordinateSystem.getRect(),style:A({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Ba(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Va(gm.VISUAL.LAYOUT,y(function(t,e){var n=Qa(t,e),T=Ja(n),C={};D(n,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=$a(t),a=T[Ka(i)][r],o=a.offset,s=a.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;C[r]=C[r]||[],e.setLayout({bandWidth:a.bandWidth,offset:o,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(i.dim),d=qa(e,h),f=l.isHorizontal(),p=io(0,l),g=0,m=e.count();g<m;g++){var v=e.get(h,g),y=e.get(c,g);if(!isNaN(v)&&!isNaN(y)){var x,_,w,b,S,M=0<=v?"p":"n",I=p;d&&(C[r][y]||(C[r][y]={p:p,n:p}),I=C[r][y][M]),f?(x=I,_=(S=n.dataToPoint([v,y]))[1]+o,w=S[0]-p,b=s,Math.abs(w)<u&&(w=(w<0?-1:1)*u),d&&(C[r][y][M]+=w)):(x=(S=n.dataToPoint([y,v]))[0]+o,_=I,w=s,b=S[1]-p,Math.abs(b)<u&&(b=(b<=0?-1:1)*u),d&&(C[r][y][M]+=b)),e.setItemLayout(g,{x:x,y:_,width:w,height:b})}}},this)},"bar")),Va(gm.VISUAL.PROGRESSIVE_LAYOUT,Rm),Ga({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),Dg.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(){return is(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var fy=Cs.prototype,py=Cs.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};fy._createSymbol=function(t,e,n,i,r){this.removeAll();var a=ps(t,-1,-1,2,2,e.getItemVisual(n,"color"),r);a.attr({z2:100,culling:!0,scale:As(i)}),a.drift=Ds,this._symbolType=t,this.add(a)},fy.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},fy.getSymbolPath=function(){return this.childAt(0)},fy.getScale=function(){return this.childAt(0).scale},fy.highlight=function(){this.childAt(0).trigger("emphasis")},fy.downplay=function(){this.childAt(0).trigger("normal")},fy.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},fy.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},fy.updateData=function(t,e,n){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=py(t,e),o=i!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(i,t,e,a,s)}else{(l=this.childAt(0)).silent=!1,Mi(l,{scale:As(a)},r,e)}if(this._updateCommon(t,e,a,n),o){var l=this.childAt(0),u=n&&n.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Ii(l,h,r,e)}this._seriesModel=r};var gy=["itemStyle"],my=["emphasis","itemStyle"],vy=["label"],yy=["emphasis","label"];fy._updateCommon=function(e,t,n,i){var r=this.childAt(0),a=e.hostModel,o=e.getItemVisual(t,"color");"image"!==r.type?r.useStyle({strokeNoScale:!0}):r.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=i&&i.itemStyle,l=i&&i.hoverItemStyle,u=i&&i.symbolRotate,h=i&&i.symbolOffset,c=i&&i.labelModel,d=i&&i.hoverLabelModel,f=i&&i.hoverAnimation,p=i&&i.cursorStyle;if(!i||e.hasItemOption){var g=i&&i.itemModel?i.itemModel:e.getItemModel(t);s=g.getModel(gy).getItemStyle(["color"]),l=g.getModel(my).getItemStyle(),u=g.getShallow("symbolRotate"),h=g.getShallow("symbolOffset"),c=g.getModel(vy),d=g.getModel(yy),f=g.getShallow("hoverAnimation"),p=g.getShallow("cursor")}else l=k({},l);var m=r.style;r.attr("rotation",(u||0)*Math.PI/180||0),h&&r.attr("position",[Fi(h[0],n[0]),Fi(h[1],n[1])]),p&&r.attr("cursor",p),r.setColor(o,i&&i.symbolInnerColor),r.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(m.opacity=v);var y=e.getItemVisual(t,"liftZ"),x=r.__z2Origin;null!=y?null==x&&(r.__z2Origin=r.z2,r.z2+=y):null!=x&&(r.z2=x,r.__z2Origin=null);var _=i&&i.useNameLabel;gi(m,l,c,d,{labelFetcher:a,labelDataIndex:t,defaultText:function(t){return _?e.getName(t):rs(e,t)},isRectText:!0,autoColor:o}),r.__symbolOriginalScale=As(n),r.hoverStyle=l,r.highDownOnUpdate=f&&a.isAnimationEnabled()?ks:null,ci(r)},fy.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,!(e&&e.keepLabel)&&(n.style.text=null),Mi(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},i(Cs,Ac);var xy=Ps.prototype;xy.updateData=function(r,a){a=Os(a);var o=this.group,s=r.hostModel,l=this._data,u=this._symbolCtor,h=Ns(r);l||o.removeAll(),r.diff(l).add(function(t){var e=r.getItemLayout(t);if(Ls(r,e,t,a)){var n=new u(r,t,h);n.attr("position",e),r.setItemGraphicEl(t,n),o.add(n)}}).update(function(t,e){var n=l.getItemGraphicEl(e),i=r.getItemLayout(t);return Ls(r,i,t,a)?(n?(n.updateData(r,t,h),Mi(n,{position:i},s)):(n=new u(r,t)).attr("position",i),o.add(n),void r.setItemGraphicEl(t,n)):void o.remove(n)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){o.remove(e)})}).execute(),this._data=r},xy.isPersistent=function(){return!0},xy.updateLayout=function(){var i=this._data;i&&i.eachItemGraphicEl(function(t,e){var n=i.getItemLayout(e);t.attr("position",n)})},xy.incrementalPrepareUpdate=function(t){this._seriesScope=Ns(t),this._data=null,this.group.removeAll()},xy.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=Os(n);for(var r=t.start;r<t.end;r++){var a=e.getItemLayout(r);if(Ls(e,a,r,n)){var o=new this._symbolCtor(e,r,this._seriesScope);o.traverse(i),o.attr("position",a),this.group.add(o),e.setItemGraphicEl(r,o)}}},xy.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var _y=X,wy=Z,by=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},Sy=function(t,e){return t[0]=e[0],t[1]=e[1],t},My=[],Iy=[],Ty=[],Cy=zn.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Hf(zn.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,a=Fs(n,e.smoothConstraint);if(e.connectNulls){for(;0<r&&Bs(n[r-1]);r--);for(;i<r&&Bs(n[i]);i++);}for(;i<r;)i+=Rs(t,n,i,r,r,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Ay=zn.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Hf(zn.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,a=n.length,o=e.smoothMonotone,s=Fs(n,e.smoothConstraint),l=Fs(i,e.smoothConstraint);if(e.connectNulls){for(;0<a&&Bs(n[a-1]);a--);for(;r<a&&Bs(n[r]);r++);}for(;r<a;){var u=Rs(t,n,r,a,a,1,s.min,s.max,e.smooth,o,e.connectNulls);Rs(t,i,r+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),r+=u+1,t.closePath()}}});qr.extend({type:"line",init:function(){var t=new Ac,e=new Ps;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,a=t.getData(),o=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===i.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,a=e.count();r<a;r++)i.push(zs(n,t,e,r));return i}(i,a,Es(i,a,v)),x=t.get("showSymbol"),_=x&&!u&&Ws(t,a,i),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),w.setItemGraphicEl(e,null))}),x||c.remove(),r.add(p);var b,S=!u&&t.get("step");i&&i.getArea&&t.get("clip",!0)&&(null!=(b=i.getArea()).width?(b.x-=.1,b.y-=.1,b.width+=.2,b.height+=.2):b.r0&&(b.r0-=.5,b.r1+=.5)),this._clipShapeForSymbol=b,d&&h.type===i.type&&S===this._step?(m&&!f?f=this._newPolygon(l,y,i,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(Xs(i,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:b}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Vs(this._stackedOnPoints,y)&&Vs(this._points,l)||(g?this._updateAnimation(a,y,i,n,S,v):(S&&(l=Hs(l,i,S),y=Hs(y,i,S)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(a,{isIgnore:_,clipShape:b}),S&&(l=Hs(l,i,S),y=Hs(y,i,S)),d=this._newPolyline(l,i,g),m&&(f=this._newPolygon(l,y,i,g)),p.setClipPath(Xs(i,!0,t)));var M=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r,a=n.length-1;0<=a;a--){var o=n[a].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[a];break}}if(r){var u=e.getAxis(i),h=P(r.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";D(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new ip(0,0,0,0,h,!0);return m[i]=f,m[i+"2"]=p,m}}}(a,i)||a.getVisual("color");d.useStyle(A(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Gs(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),C=0;f.useStyle(A(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(C=Gs(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),a=tn(r,i);if(!(a instanceof Array)&&null!=a&&0<=a){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new Cs(r,a)).position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else qr.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=tn(r,i);if(null!=a&&0<=a){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else qr.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Cy({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Ay({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,a,o,s){for(var l=function(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=Es(r,e,o),v=Es(a,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()),u.push(w),h.push(b),c.push(n[x.idx]),d.push(i[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(r.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(zs(m,r,e,S)),d.push(i[S]),g.push(e.getRawIndex(S));break;case"-":S=x.idx;var M=t.getRawIndex(S);M!==S?(u.push(t.getItemLayout(S)),h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),c.push(n[S]),d.push(zs(v,a,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=[],A=[],D=[];for(y=0;y<p.length;y++)S=p[y],I[y]=u[S],T[y]=h[S],C[y]=c[S],A[y]=d[S],D[y]=f[S];return{current:I,next:T,stackedOnCurrent:C,stackedOnNext:A,status:D}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;r&&(h=Hs(u.current,n,r),c=Hs(u.stackedOnCurrent,n,r),d=Hs(u.next,n,r),f=Hs(u.stackedOnNext,n,r)),o.shape.__points=u.current,o.shape.points=h,Mi(o,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Mi(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.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})}}o.animators&&o.animators.length&&o.animators[0].during(function(){for(var t=0;t<p.length;t++){p[t].el.attr("position",o.shape.__points[p[t].ptIdx])}})},remove:function(){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Dy=function(t,a,o){return{seriesType:t,performRawSeries:!0,reset:function(l,t){var e=l.getData(),u=l.get("symbol"),h=l.get("symbolSize"),n=l.get("symbolKeepAspect"),c=g(u),d=g(h),f=c||d,i=!c&&u?u:a,r=d?null:h;return e.setVisual({legendSymbol:o||i,symbol:i,symbolSize:r,symbolKeepAspect:n}),t.isSeriesFiltered(l)?void 0:{dataEach:e.hasItemOption||f?function(t,e){if(f){var n=l.getRawValue(e),i=l.getDataParams(e);c&&t.setItemVisual(e,"symbol",u(n,i)),d&&t.setItemVisual(e,"symbolSize",h(n,i))}if(t.hasItemOption){var r=t.getItemModel(e),a=r.getShallow("symbol",!0),o=r.getShallow("symbolSize",!0),s=r.getShallow("symbolKeepAspect",!0);null!=a&&t.setItemVisual(e,"symbol",a),null!=o&&t.setItemVisual(e,"symbolSize",o),null!=s&&t.setItemVisual(e,"symbolKeepAspect",s)}}:null}}}},ky={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},Py=function(t){return Math.round(t.length/2)};Ga(Dy("line","circle","line")),Va({seriesType:"line",plan:Lg(),reset:function(t){var e=t.getData(),c=t.coordinateSystem,d=t.pipelineContext.large;if(c){var f=P(c.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),p=f.length,n=e.getCalculationInfo("stackResultDimension");return qa(e,f[0])&&(f[0]=n),qa(e,f[1])&&(f[1]=n),p&&{progress:function(t,e){for(var n=t.end-t.start,i=d&&new Float32Array(n*p),r=t.start,a=0,o=[],s=[];r<t.end;r++){var l;if(1===p){var u=e.get(f[0],r);l=!isNaN(u)&&c.dataToPoint(u,null,s)}else{u=o[0]=e.get(f[0],r);var h=o[1]=e.get(f[1],r);l=!isNaN(u)&&!isNaN(h)&&c.dataToPoint(o,null,s)}d?(i[a++]=l?l[0]:NaN,i[a++]=l?l[1]:NaN):e.setItemLayout(r,l&&l.slice()||[NaN,NaN])}d&&e.setLayout("symbolPoints",i)}}}}}),Ra(gm.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(t){var e=t.getData(),n=t.get("sampling"),i=t.coordinateSystem;if("cartesian2d"===i.type&&n){var r,a=i.getBaseAxis(),o=i.getOtherAxis(a),s=a.getExtent(),l=s[1]-s[0],u=Math.round(e.count()/l);1<u&&("string"==typeof n?r=ky[n]:"function"==typeof n&&(r=n),r&&t.setData(e.downSample(e.mapDimension(o.dim),1/u,r,Py)))}}});var Ly=function(t,e,n){e=L(e)&&{coordDimensions:e}||k({},e);var i=t.getSource(),r=Ov(i,e),a=new kv(r,t);return a.initData(i,n),a},Oy={updateSelectedMap:function(t){this._targetList=L(t)?t.slice():[],this._selectTargetMap=S(t||[],function(t,e){return t.set(e.name,e),t},T())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=n?(this[n.selected?"unSelect":"select"](t,e),n.selected):void 0},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}},Ny=Ua({type:"series.pie",init:function(t){Ny.superApply(this,"init",arguments),this.legendVisualProvider=new Zs(_(this.getData,this),_(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Ny.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return Ly(this,{coordDimensions:["value"],encodeDefaulter:y(hr,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,r=t.count();i<r;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:Br(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=Ny.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=function(t,e,n){if(!t[e])return 0;var i=S(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),a=P(t,function(t){return(isNaN(t)?0:t)/i*r*100}),o=100*r,s=P(a,function(t){return Math.floor(t)}),l=S(s,function(t,e){return t+e},0),u=P(a,function(t,e){return t-s[e]});l<o;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;d<f;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){je(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});e(Ny,Oy);var Ey=qs.prototype;Ey.updateData=function(t,e,n){var i=this.childAt(0),r=this.childAt(1),a=this.childAt(2),o=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=k({},l);u.label=null;var h=o.getShallow("animationTypeUpdate");n?(i.setShape(u),"scale"===o.getShallow("animationType")?(i.shape.r=l.r0,Ii(i,{shape:{r:l.r}},o,e)):(i.shape.endAngle=l.startAngle,Mi(i,{shape:{endAngle:l.endAngle}},o,e))):"expansion"===h?i.setShape(u):Mi(i,{shape:u},o,e);var c=t.getItemVisual(e,"color");i.useStyle(A({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),i.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&i.attr("cursor",d),Ys(this,t.getItemLayout(e),o.isSelected(null,e),o.get("selectedOffset"),o.get("animation"));var f=!n&&"transition"===h;this._updateLabel(t,e,f),this.highDownOnUpdate=s.get("hoverAnimation")&&o.isAnimationEnabled()?function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore,i.stopAnimation(!0),i.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut")):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore,i.stopAnimation(!0),i.animateTo({shape:{r:l.r}},300,"elasticOut"))}:null,ci(this)},Ey._updateLabel=function(t,e,n){var i=this.childAt(1),r=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");if(!s||isNaN(s.x)||isNaN(s.y))r.ignore=r.normalIgnore=r.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},h={x:s.x,y:s.y};n?(Mi(i,{shape:u},a,e),Mi(r,{style:h},a,e)):(i.attr({shape:u}),r.attr({style:h})),r.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=o.getModel("label"),d=o.getModel("emphasis.label"),f=o.getModel("labelLine"),p=o.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color");gi(r.style,r.hoverStyle={},c,d,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),r.ignore=r.normalIgnore=!c.get("show"),r.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),i.setShape({smooth:g})}},i(qs,Ac);var zy=(qr.extend({type:"pie",init:function(){var t=new Ac;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var r=t.getData(),a=this._data,o=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=y(Us,this.uid,t,s,n),d=t.get("selectedMode");if(r.diff(a).add(function(t){var e=new qs(r,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),r.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);l||"transition"===h||n.eachChild(function(t){t.stopAnimation(!0)}),n.updateData(r,t),n.off("click"),d&&n.on("click",c),o.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);o.remove(e)}).execute(),s&&0<r.count()&&(l?"scale"!==u:"transition"!==h)){for(var f=r.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<r.count();++p)f=r.getItemLayout(p);var g=Math.max(n.getWidth(),n.getHeight())/2,m=_(o.removeClipPath,o);o.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,t,l))}else o.removeClipPath();this._data=r}},dispose:function(){},_createClipPath:function(t,e,n,i,r,a,o,s){var l=new Wf({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:r}});return(s?Ii:Mi)(l,{shape:{endAngle:i+(r?1:-1)*Math.PI*2}},o,a),l},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,a=Math.sqrt(i*i+r*r);return a<=n.r&&a>=n.r0}}}),function(n,t){D(t,function(a){a.update="updateView",Fa(a,function(t,e){var r={};return e.eachComponent({mainType:"series",subType:n,query:t},function(n){n[a.method]&&n[a.method](t.name,t.dataIndex);var i=n.getData();i.each(function(t){var e=i.getName(t);r[e]=n.isSelected(e)||!1})}),{name:t.name,selected:r,seriesId:t.seriesId}})})}),By=function(i){return{getTargetSeries:function(t){var e={},n=T();return t.eachSeriesByType(i,function(t){t.__paletteScope=e,n.set(t.uid,t)}),n},reset:function(s){var l=s.getRawData(),u={},h=s.getData();h.each(function(t){var e=h.getRawIndex(t);u[e]=t}),l.each(function(t){var e,n=u[t],i=null!=n&&h.getItemVisual(n,"color",!0),r=null!=n&&h.getItemVisual(n,"borderColor",!0);if(i&&r||(e=l.getItemModel(t)),!i){var a=e.get("itemStyle.color")||s.getColorFromPalette(l.getName(t)||t+"",s.__paletteScope,l.count());null!=n&&h.setItemVisual(n,"color",a)}if(!r){var o=e.get("itemStyle.borderColor");null!=n&&h.setItemVisual(n,"borderColor",o)}})}}},Ry=Math.PI/180,Fy=function(k,P,L,t,O,e){var N,E,z=k.getData(),B=[],R=!1,F=(k.get("minShowLabelAngle")||0)*Ry;z.each(function(t){var e=z.getItemLayout(t),n=z.getItemModel(t),i=n.getModel("label"),r=i.get("position")||n.get("emphasis.label.position"),a=i.get("distanceToLabelLine"),o=i.get("alignTo"),s=Fi(i.get("margin"),L),l=i.get("bleedMargin"),u=i.getFont(),h=n.getModel("labelLine"),c=h.get("length");c=Fi(c,L);var d=h.get("length2");if(d=Fi(d,L),!(e.angle<F)){var f,p,g,m,v=(e.startAngle+e.endAngle)/2,y=Math.cos(v),x=Math.sin(v);N=e.cx,E=e.cy;var _=k.getFormattedLabel(t,"normal")||z.getName(t),w=ie(_,u,m,"top"),b="inside"===r||"inner"===r;if("center"===r)f=e.cx,p=e.cy,m="center";else{var S=(b?(e.r+e.r0)/2*y:e.r*y)+N,M=(b?(e.r+e.r0)/2*x:e.r*x)+E;if(f=S+3*y,p=M+3*x,!b){var I=S+y*(c+P-e.r),T=M+x*(c+P-e.r),C=I+(y<0?-1:1)*d;f="edge"===o?y<0?O+s:O+L-s:C+(y<0?-a:a),g=[[S,M],[I,T],[C,p=T]]}m=b?"center":"edge"===o?0<y?"right":"left":0<y?"left":"right"}var A,D=i.get("rotate");A="number"==typeof D?D*(Math.PI/180):D?y<0?-v+Math.PI:-v:0,R=!!A,e.label={x:f,y:p,position:r,height:w.height,len:c,len2:d,linePoints:g,textAlign:m,verticalAlign:"middle",rotation:A,inside:b,labelDistance:a,labelAlignTo:o,labelMargin:s,bleedMargin:l,textRect:w,text:_,font:u},b||B.push(e.label)}}),!R&&k.get("avoidLabelOverlap")&&function(t,e,n,i,r,a,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++)$s(t[d])||(t[d].x<e?(h=Math.min(h,t[d].x),l.push(t[d])):(c=Math.max(c,t[d].x),u.push(t[d])));for(js(u,e,n,i,1,0,a,0,s,c),js(l,e,n,i,-1,0,a,0,s,h),d=0;d<t.length;d++){var f=t[d];if(!$s(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;(g=m?f.x<e?p[2][0]-f.labelDistance-o-f.labelMargin:o+r-f.labelMargin-p[2][0]-f.labelDistance:f.x<e?f.x-o-f.bleedMargin:o+r-f.x-f.bleedMargin)<f.textRect.width&&(f.text=se(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=ne(f.text,f.font)));var y=p[1][0]-p[2][0];m?p[2][0]=f.x<e?o+f.labelMargin+v+f.labelDistance:o+r-f.labelMargin-v-f.labelDistance:(p[2][0]=f.x<e?f.x+f.labelDistance:f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}(B,N,E,P,L,t,O,e)},Vy=2*Math.PI,Gy=Math.PI/180,Hy=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var r=t.getData();r.filterSelf(function(t){for(var e=r.getName(t),n=0;n<i.length;n++)if(!i[n].isSelected(e))return!1;return!0})}}}};zy("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Ga(By("pie")),Va(y(function(t,e,A){e.eachSeriesByType(t,function(t){var e,r=t.getData(),n=r.mapDimension("value"),a=(e=A,nr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),i=t.get("center"),o=t.get("radius");L(o)||(o=[0,o]),L(i)||(i=[i,i]);var s=Fi(a.width,A.getWidth()),l=Fi(a.height,A.getHeight()),u=Math.min(s,l),h=Fi(i[0],s)+a.x,c=Fi(i[1],l)+a.y,d=Fi(o[0],u/2),f=Fi(o[1],u/2),p=-t.get("startAngle")*Gy,g=t.get("minAngle")*Gy,m=0;r.each(n,function(t){!isNaN(t)&&m++});var v=r.getSum(n),y=Math.PI/(v||m)*2,x=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=r.getDataExtent(n);b[0]=0;var S=Vy,M=0,I=p,T=x?1:-1;if(r.each(n,function(t,e){var n;if(isNaN(t))r.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:h,cy:c,r0:d,r:_?NaN:f,viewRect:a});else{(n="area"!==_?0===v&&w?y:t*y:Vy/m)<g?S-=n=g:M+=t;var i=I+T*n;r.setItemLayout(e,{angle:n,startAngle:I,endAngle:i,clockwise:x,cx:h,cy:c,r0:d,r:_?Ri(t,b,[d,f]):f,viewRect:a}),I=i}}),S<Vy&&m)if(S<=.001){var C=Vy/m;r.each(n,function(t,e){if(!isNaN(t)){var n=r.getItemLayout(e);n.angle=C,n.startAngle=p+T*e*C,n.endAngle=p+T*(e+1)*C}})}else y=S/M,I=p,r.each(n,function(t,e){if(!isNaN(t)){var n=r.getItemLayout(e),i=n.angle===g?g:t*y;n.startAngle=I,n.endAngle=I+T*i,I+=T*i}});Fy(t,f,a.width,a.height,a.x,a.y)})},"pie")),Ra(Hy("pie")),i(Ks,hv),Qs.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Qs.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},Qs.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},Qs.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var r,a=Math.atan2(-n,e),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(a-u.angle);h<o&&(r=u,s=l,o=h)}return[s,+(r&&r.coordToData(i))]},Qs.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),a=Math.min(i,r)/2;this.cx=Fi(n[0],i),this.cy=Fi(n[1],r),this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");("string"==typeof o||"number"==typeof o)&&(o=[0,o]),this.r0=Fi(o[0],a),this.r=Fi(o[1],a),D(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),t.angle=n},this)},Qs.prototype.update=function(n){function d(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),n=t/e;return 2===n?n=5:n*=2,n*e}var i=this._indicatorAxes,r=this._model;D(i,function(t){t.scale.setExtent(1/0,-1/0)}),n.eachSeriesByType("radar",function(t){if("radar"===t.get("coordinateSystem")&&n.getComponent("radar",t.get("radarIndex"))===r){var e=t.getData();D(i,function(t){t.scale.unionExtentFromData(e,e.mapDimension(t.dim))})}},this);var f=r.get("splitNumber");D(i,function(t){var e=fo(t.scale,t.model);po(t.scale,t.model);var n=t.model,i=t.scale,r=n.getMin(),a=n.getMax(),o=i.getInterval();if(null!=r&&null!=a)i.setExtent(+r,+a),i.setInterval((a-r)/f);else if(null!=r)for(var s;s=r+o*f,i.setExtent(+r,s),i.setInterval(o),o=d(o),s<e[1]&&isFinite(s)&&isFinite(e[1]););else if(null!=a)for(var l;l=a-o*f,i.setExtent(l,+a),i.setInterval(o),o=d(o),l>e[0]&&isFinite(l)&&isFinite(e[0]););else{var u=i.getTicks().length-1;f<u&&(o=d(o));var h=Math.round((e[0]+e[1])/2/o)*o,c=Math.round(f/2);i.setExtent(Vi(h-c*o),Vi(h+(f-c)*o)),i.setInterval(o)}})},Qs.dimensions=[],Qs.create=function(n,i){var r=[];return n.eachComponent("radar",function(t){var e=new Qs(t,n,i);r.push(e),t.coordinateSystem=e}),n.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=r[t.get("radarIndex")||0])}),r},vr.register("radar",Qs);var Wy=fv.valueAxis,Xy=(Xa({type:"radar",optionUpdated:function(){var r=this.get("boundaryGap"),a=this.get("splitNumber"),o=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),t=P(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=c;if(null!=t.color&&(e=A({color:t.color},c)),t=m(b(t),{boundaryGap:r,splitNumber:a,scale:o,axisLine:s,axisTick:l,axisType:u,axisLabel:h,name:t.text,nameLocation:"end",nameGap:p,nameTextStyle:e,triggerEvent:g},!1),d||(t.name=""),"string"==typeof f){var n=t.name;t.name=f.replace("{value}",null!=n?n:"")}else"function"==typeof f&&(t.name=f(t.name,t));var i=k(new Ni(t,null,this.ecModel),mv);return i.mainType="radar",i.componentIndex=this.componentIndex,i},this);this.getIndicatorModels=function(){return t}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:m({lineStyle:{color:"#bbb"}},Wy.axisLine),axisLabel:Js(Wy.axisLabel,!1),axisTick:Js(Wy.axisTick,!1),axisType:"interval",splitLine:Js(Wy.splitLine,!0),splitArea:Js(Wy.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Za({type:"radar",render:function(t){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;D(P(e.getIndicatorAxes(),function(t){return new ey(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){D(Xy,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,n){var i=n%e.length;return t[i]=t[i]||[],i}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var r=t.get("shape"),a=t.getModel("splitLine"),o=t.getModel("splitArea"),s=a.getModel("lineStyle"),l=o.getModel("areaStyle"),u=a.get("show"),h=o.get("show"),c=s.get("color"),d=l.get("color");c=L(c)?c:[c],d=L(d)?d:[d];var f=[],p=[];if("circle"===r)for(var g=n[0].getTicksCoords(),m=i.cx,v=i.cy,y=0;y<g.length;y++){if(u)f[e(f,c,y)].push(new Vf({shape:{cx:m,cy:v,r:g[y].coord}}));if(h&&y<g.length-1)p[e(p,d,y)].push(new Xf({shape:{cx:m,cy:v,r0:g[y].coord,r:g[y+1].coord}}))}else{var x,_=P(n,function(t,e){var n=t.getTicksCoords();return x=null==x?n.length-1:Math.min(n.length-1,x),P(n,function(t){return i.coordToPoint(t.coord,e)})}),w=[];for(y=0;y<=x;y++){for(var b=[],S=0;S<n.length;S++)b.push(_[S][y]);if(b[0]&&b.push(b[0].slice()),u)f[e(f,c,y)].push(new Uf({shape:{points:b}}));if(h&&w)p[e(p,d,y-1)].push(new Zf({shape:{points:b.concat(w)}}));w=b.slice().reverse()}}var M=s.getLineStyle(),I=l.getAreaStyle();D(p,function(t,e){this.group.add(gp(t,{style:A({stroke:"none",fill:d[e%d.length]},I),silent:!0}))},this),D(f,function(t,e){this.group.add(gp(t,{style:A({fill:"none",stroke:c[e%c.length]},M),silent:!0}))},this)}}});var Zy=Dg.extend({type:"series.radar",dependencies:["radar"],init:function(){Zy.superApply(this,"init",arguments),this.legendVisualProvider=new Zs(_(this.getData,this),_(this.getRawData,this))},getInitialData:function(){return Ly(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(n){var i=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(n);return ji(""===e?this.name:e)+"<br/>"+P(t,function(t){var e=i.get(i.mapDimension(t.dim),n);return ji(t.name+" : "+e)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Ya({type:"radar",render:function(l){function u(t,e){var n,i=t.getItemVisual(e,"symbol")||"circle",r=t.getItemVisual(e,"color");if("none"!==i){var a=(L(n=t.getItemVisual(e,"symbolSize"))||(n=[+n,+n]),n),o=ps(i,-1,-1,2,2,r);return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function s(t,e,n,i,r,a){n.removeAll();for(var o=0;o<e.length-1;o++){var s=u(i,r);s&&(t[s.__dimIdx=o]?(s.attr("position",t[o]),xp[a?"initProps":"updateProps"](s,{position:e[o]},l,r)):s.attr("position",e[o]),n.add(s))}}function h(t){return P(t,function(){return[e.cx,e.cy]})}var e=l.coordinateSystem,g=this.group,m=l.getData(),c=this._data;m.diff(c).add(function(t){var e=m.getItemLayout(t);if(e){var n=new Zf,i=new Uf,r={shape:{points:e}};n.shape.points=h(e),i.shape.points=h(e),Ii(n,r,l,t),Ii(i,r,l,t);var a=new Ac,o=new Ac;a.add(i),a.add(n),a.add(o),s(i.shape.points,e,o,m,t,!0),m.setItemGraphicEl(t,a)}}).update(function(t,e){var n=c.getItemGraphicEl(e),i=n.childAt(0),r=n.childAt(1),a=n.childAt(2),o={shape:{points:m.getItemLayout(t)}};o.shape.points&&(s(i.shape.points,o.shape.points,a,m,t,!1),Mi(i,o,l),Mi(r,o,l),m.setItemGraphicEl(t,n))}).remove(function(t){g.remove(c.getItemGraphicEl(t))}).execute(),m.eachItemGraphicEl(function(t,n){var e=m.getItemModel(n),i=t.childAt(0),r=t.childAt(1),a=t.childAt(2),o=m.getItemVisual(n,"color");g.add(t),i.useStyle(A(e.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:o})),i.hoverStyle=e.getModel("emphasis.lineStyle").getLineStyle();var s=e.getModel("areaStyle"),l=e.getModel("emphasis.areaStyle"),u=s.isEmpty()&&s.parentModel.isEmpty(),h=l.isEmpty()&&l.parentModel.isEmpty();h=h&&u,r.ignore=u,r.useStyle(A(s.getAreaStyle(),{fill:o,opacity:.7})),r.hoverStyle=l.getAreaStyle();var c=e.getModel("itemStyle").getItemStyle(["color"]),d=e.getModel("emphasis.itemStyle").getItemStyle(),f=e.getModel("label"),p=e.getModel("emphasis.label");a.eachChild(function(t){t.setStyle(c),t.hoverStyle=b(d);var e=m.get(m.dimensions[t.__dimIdx],n);(null==e||isNaN(e))&&(e=""),gi(t.style,t.hoverStyle,f,p,{labelFetcher:m.hostModel,labelDataIndex:n,labelDimIndex:t.__dimIdx,defaultText:e,autoColor:o,isRectText:!0})}),t.highDownOnUpdate=function(t,e){r.attr("ignore","emphasis"===e?h:u)},ci(t)}),this._data=m},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Ga(By("radar")),Ga(Dy("radar","circle")),Va(function(t){t.eachSeriesByType("radar",function(t){var n=t.getData(),r=[],a=t.coordinateSystem;if(a){var e=a.getIndicatorAxes();D(e,function(t,i){n.each(n.mapDimension(e[i].dim),function(t,e){r[e]=r[e]||[];var n=a.dataToPoint(t,i);r[e][i]=tl(n)?n:el(a)})}),n.each(function(t){var e=function(t,e,n){if(t&&e)for(var i=0,r=t.length;i<r;i++)if(e.call(n,t[i],i,t))return t[i]}(r[t],function(t){return tl(t)})||el(a);r[t].push(e.slice()),n.setItemLayout(t,r[t])})}})}),Ra(Hy("radar")),Ba(function(e){var t=e.polar;if(t){L(t)||(t=[t]);var n=[];D(t,function(t){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],L(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}D(e.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});var Uy=(Dg.extend({type:"series.gauge",getInitialData:function(){return Ly(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),zn.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var n=Math.cos,i=Math.sin,r=e.r,a=e.width,o=e.angle,s=e.x-n(o)*a*(r/3<=a?1:2),l=e.y-i(o)*a*(r/3<=a?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(o)*a,e.y+i(o)*a),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(o)*a,e.y-i(o)*a),t.lineTo(s,l)}})),Yy=2*Math.PI,qy=(qr.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i,r,a,o,s,l,u=t.get("axisLine.lineStyle.color"),h=(r=n,a=(i=t).get("center"),o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),{cx:Fi(a[0],r.getWidth()),cy:Fi(a[1],r.getHeight()),r:Fi(i.get("radius"),l/2)});this._renderMain(t,e,n,u,h)},dispose:function(){},_renderMain:function(t,e,n,i,r){for(var a=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=((g=-t.get("endAngle")/180*Math.PI)-u)%Yy,c=u,d=s.get("width"),f=o.get("show"),p=0;f&&p<i.length;p++){var g,m=Math.min(Math.max(i[p][0],0),1),v=new Wf({shape:{startAngle:c,endAngle:g=u+h*m,cx:r.cx,cy:r.cy,clockwise:l,r0:r.r-d,r:r.r},silent:!0});v.setStyle({fill:i[p][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(v),c=g}var y=function(t){if(t<=0)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]};if(!l){var x=u;u=g,g=x}this._renderTicks(t,e,n,y,r,u,g,l),this._renderPointer(t,e,n,y,r,u,g,l),this._renderTitle(t,e,n,y,r),this._renderDetail(t,e,n,y,r)},_renderTicks:function(t,e,n,i,r,a,o){for(var s=this.group,l=r.cx,u=r.cy,h=r.r,c=+t.get("min"),d=+t.get("max"),f=t.getModel("splitLine"),p=t.getModel("axisTick"),g=t.getModel("axisLabel"),m=t.get("splitNumber"),v=p.get("splitNumber"),y=Fi(f.get("length"),h),x=Fi(p.get("length"),h),_=a,w=(o-a)/m,b=w/v,S=f.getModel("lineStyle").getLineStyle(),M=p.getModel("lineStyle").getLineStyle(),I=0;I<=m;I++){var T=Math.cos(_),C=Math.sin(_);if(f.get("show")){var A=new Kf({shape:{x1:T*h+l,y1:C*h+u,x2:T*(h-y)+l,y2:C*(h-y)+u},style:S,silent:!0});"auto"===S.stroke&&A.setStyle({stroke:i(I/m)}),s.add(A)}if(g.get("show")){var D=nl(Vi(I/m*(d-c)+c),g.get("formatter")),k=g.get("distance"),P=i(I/m);s.add(new Ff({style:mi({},g,{text:D,x:T*(h-y-k)+l,y:C*(h-y-k)+u,textVerticalAlign:C<-.4?"top":.4<C?"bottom":"middle",textAlign:T<-.4?"left":.4<T?"right":"center"},{autoColor:P}),silent:!0}))}if(p.get("show")&&I!==m){for(var L=0;L<=v;L++){T=Math.cos(_),C=Math.sin(_);var O=new Kf({shape:{x1:T*h+l,y1:C*h+u,x2:T*(h-x)+l,y2:C*(h-x)+u},silent:!0,style:M});"auto"===M.stroke&&O.setStyle({stroke:i((I+L/v)/m)}),s.add(O),_+=b}_-=b}else _+=w}},_renderPointer:function(i,t,e,r,a,n,o){var s=this.group,l=this._data;if(i.get("pointer.show")){var u=[+i.get("min"),+i.get("max")],h=[n,o],c=i.getData(),d=c.mapDimension("value");c.diff(l).add(function(t){var e=new Uy({shape:{angle:n}});Ii(e,{shape:{angle:Ri(c.get(d,t),u,h,!0)}},i),s.add(e),c.setItemGraphicEl(t,e)}).update(function(t,e){var n=l.getItemGraphicEl(e);Mi(n,{shape:{angle:Ri(c.get(d,t),u,h,!0)}},i),s.add(n),c.setItemGraphicEl(t,n)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var n=c.getItemModel(e),i=n.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Fi(i.get("width"),a.r),r:Fi(i.get("length"),a.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",r(Ri(c.get(d,e),u,[0,1],!0))),ci(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c}else l&&l.eachItemGraphicEl(function(t){s.remove(t)})},_renderTitle:function(t,e,n,i,r){var a=t.getData(),o=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=r.cx+Fi(l[0],r.r),h=r.cy+Fi(l[1],r.r),c=+t.get("min"),d=+t.get("max"),f=i(Ri(t.getData().get(o,0),[c,d],[0,1],!0));this.group.add(new Ff({silent:!0,style:mi({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,n,i,r){var a=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=r.cx+Fi(l[0],r.r),h=r.cy+Fi(l[1],r.r),c=Fi(a.get("width"),r.r),d=Fi(a.get("height"),r.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=i(Ri(p,[o,s],[0,1],!0));this.group.add(new Ff({silent:!0,style:mi({},a,{x:u,y:h,text:nl(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Ua({type:"series.funnel",init:function(t){qy.superApply(this,"init",arguments),this.legendVisualProvider=new Zs(_(this.getData,this),_(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(){return Ly(this,{coordDimensions:["value"],encodeDefaulter:y(hr,this)})},_defaultLabelLine:function(t){je(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),n=qy.superCall(this,"getDataParams",t),i=e.mapDimension("value"),r=e.getSum(i);return n.percent=r?+(e.get(i,t)/r*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),jy=il.prototype,$y=["itemStyle","opacity"];jy.updateData=function(t,e,n){var i=this.childAt(0),r=t.hostModel,a=t.getItemModel(e),o=t.getItemLayout(e),s=t.getItemModel(e).get($y);s=null==s?1:s,i.useStyle({}),n?(i.setShape({points:o.points}),i.setStyle({opacity:0}),Ii(i,{style:{opacity:s}},r,e)):Mi(i,{style:{opacity:s},shape:{points:o.points}},r,e);var l=a.getModel("itemStyle"),u=t.getItemVisual(e,"color");i.setStyle(A({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),i.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),ci(this)},jy._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),r=t.hostModel,a=t.getItemModel(e),o=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Mi(n,{shape:{points:o.linePoints||o.linePoints}},r,e),Mi(i,{style:{x:o.x,y:o.y}},r,e),i.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color");gi(i.style,i.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!h.get("show"),n.hoverIgnore=!c.get("show"),n.setStyle({stroke:s}),n.setStyle(h.getModel("lineStyle").getLineStyle()),n.hoverStyle=c.getModel("lineStyle").getLineStyle()},i(il,Ac);var Ky=(qr.extend({type:"funnel",render:function(t){var i=t.getData(),r=this._data,a=this.group;i.diff(r).add(function(t){var e=new il(i,t);i.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),a.add(n),i.setItemGraphicEl(t,n)}).remove(function(t){var e=r.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),function(t,S){t.eachSeriesByType("funnel",function(t){var e,r=t.getData(),a=r.mapDimension("value"),n=t.get("sort"),o=(e=S,nr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),i=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),r=[],a="ascending"===e,o=0,s=t.count();o<s;o++)r[o]=o;return"function"==typeof e?r.sort(e):"none"!==e&&r.sort(function(t,e){return a?i[t]-i[e]:i[e]-i[t]}),r}(r,n),s=[Fi(t.get("minSize"),o.width),Fi(t.get("maxSize"),o.width)],l=r.getDataExtent(a),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var g,c=t.get("funnelAlign"),d=t.get("gap"),f=(o.height-d*(r.count()-1))/r.count(),p=o.y,m=function(t,e){var n,i=Ri(r.get(a,t)||0,[u,h],s,!0);switch(c){case"left":n=o.x;break;case"center":n=o.x+(o.width-i)/2;break;case"right":n=o.x+o.width-i}return[[n,e],[n+i,e]]};"ascending"===n&&(f=-f,d=-d,p+=o.height,i=i.reverse());for(var v=0;v<i.length;v++){var y=i[v],x=i[v+1],_=r.getItemModel(y).get("itemStyle.height");null==_?_=f:(_=Fi(_,o.height),"ascending"===n&&(_=-_));var w=m(y,p),b=m(x,p+_);p+=_+d,r.setItemLayout(y,{points:w.concat(b.slice().reverse())})}(g=r).each(function(t){var e,n,i,r,a=g.getItemModel(t),o=a.getModel("label").get("position"),s=a.getModel("labelLine"),l=g.getItemLayout(t),u=l.points,h="inner"===o||"inside"===o||"center"===o||"insideLeft"===o||"insideRight"===o;if(h)e="insideLeft"===o?(n=(u[0][0]+u[3][0])/2+5,i=(u[0][1]+u[3][1])/2,"left"):"insideRight"===o?(n=(u[1][0]+u[2][0])/2-5,i=(u[1][1]+u[2][1])/2,"right"):(n=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,i=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,"center"),r=[[n,i],[n,i]];else{var c,d,f,p=s.get("length");e="left"===o?(c=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,n=(f=c-p)-5,"right"):"right"===o?(c=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,n=(f=c+p)+5,"left"):"rightTop"===o?(c=u[1][0],d=u[1][1],n=(f=c+p)+5,"top"):"rightBottom"===o?(c=u[2][0],d=u[2][1],n=(f=c+p)+5,"bottom"):"leftTop"===o?(c=u[0][0],d=u[1][1],n=(f=c-p)-5,"right"):"leftBottom"===o?(c=u[3][0],d=u[2][1],n=(f=c-p)-5,"right"):(c=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,n=(f=c+p)+5,"left"),r=[[c,d],[f,d]],i=d}l.label={linePoints:r,x:n,y:i,verticalAlign:"middle",textAlign:e,inside:h}})})});Ga(By("funnel")),Va(Ky),Ra(Hy("funnel"));var Qy=Gg.legend.selector,Jy={all:{type:"all",title:b(Qy.all)},inverse:{type:"inverse",title:b(Qy.inverse)}},tx=Xa({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){tx.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var n=t.selector;!0===n&&(n=t.selector=["all","inverse"]),L(n)&&D(n,function(t,e){M(t)&&(t={type:t}),n[e]=m(t,Jy[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(r){var a=[],o=[];r.eachRawSeries(function(t){var e,n=t.name;if(o.push(n),t.legendVisualProvider){var i=t.legendVisualProvider.getAllNames();r.isSeriesFiltered(t)||(o=o.concat(i)),i.length?a=a.concat(i):e=!0}else e=!0;e&&Qe(t)&&a.push(t.name)}),this._availableNames=o;var t=P(this.get("data")||a,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new Ni(t,this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&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)},allSelect:function(){var t=this._data,e=this.option.selected;D(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,n=this.option.selected;D(t,function(t){var e=t.get("name",!0);n.hasOwnProperty(e)||(n[e]=!0),n[e]=!n[e]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=p(this._availableNames,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});Fa("legendToggleSelect","legendselectchanged",y(rl,"toggleSelected")),Fa("legendAllSelect","legendselectall",y(rl,"allSelect")),Fa("legendInverseSelect","legendinverseselect",y(rl,"inverseSelect")),Fa("legendSelect","legendselected",y(rl,"select")),Fa("legendUnSelect","legendunselected",y(rl,"unSelect"));var ex=y,nx=D,ix=Ac,rx=Za({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new ix),this._backgroundEl,this.group.add(this._selectorGroup=new ix),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),a=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===a?"right":"left");var o=t.get("selector",!0),s=t.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===a?"end":"start"),this.renderInner(r,t,e,n,o,a,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=nr(l,u,h),d=this.layoutInner(t,r,c,i,o,s),f=nr(A({width:d.width,height:d.height},l),u,h);this.group.attr("position",[f.x-d.x,f.y-d.y]),this.group.add(this._backgroundEl=ol(d,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(u,h,c,d,t,e,n){var f=this.getContentGroup(),p=T(),g=h.get("selectedMode"),m=[];c.eachRawSeries(function(t){!t.get("legendHoverLink")&&m.push(t.id)}),nx(h.getData(),function(a,o){var s=a.get("name");if(this.newlineDisabled||""!==s&&"\n"!==s){var t=c.getSeriesByName(s)[0];if(!p.get(s))if(t){var e=t.getData(),n=e.getVisual("color"),i=e.getVisual("borderColor");"function"==typeof n&&(n=n(t.getDataParams(0))),"function"==typeof i&&(i=i(t.getDataParams(0)));var r=e.getVisual("legendSymbol")||"roundRect",l=e.getVisual("symbol");this._createItem(s,o,a,h,r,l,u,n,i,g).on("click",ex(ll,s,null,d,m)).on("mouseover",ex(ul,t.name,null,d,m)).on("mouseout",ex(hl,t.name,null,d,m)),p.set(s,!0)}else c.eachRawSeries(function(t){if(!p.get(s)&&t.legendVisualProvider){var e=t.legendVisualProvider;if(!e.containName(s))return;var n=e.indexOfName(s),i=e.getItemVisual(n,"color"),r=e.getItemVisual(n,"borderColor");this._createItem(s,o,a,h,"roundRect",null,u,i,r,g).on("click",ex(ll,null,s,d,m)).on("mouseover",ex(ul,null,s,d,m)).on("mouseout",ex(hl,null,s,d,m)),p.set(s,!0)}},this)}else f.add(new ix({newline:!0}))},this),t&&this._createSelector(t,h,d,e,n)},_createSelector:function(t,a,o){var s=this.getSelectorGroup();nx(t,function(t){!function(t){var e=t.type,n=new Ff({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){o.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});s.add(n);var i=a.getModel("selectorLabel"),r=a.getModel("emphasis.selectorLabel");gi(n.style,n.hoverStyle={},i,r,{defaultText:t.title,isRectText:!1}),ci(n)}(t)})},_createItem:function(t,e,n,i,r,a,o,s,l,u){var h=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),p=i.get("symbolKeepAspect"),g=i.getModel("itemStyle"),m=i.isSelected(t),v=new ix,y=n.getModel("textStyle"),x=n.get("icon"),_=n.getModel("tooltip"),w=_.parentModel,b=ps(r=x||r,0,0,h,c,m?s:d,null==p||p);if(v.add(sl(b,r,g,l,f,m)),!x&&a&&(a!==r||"none"===a)){var S=.8*c;"none"===a&&(a="circle");var M=ps(a,(h-S)/2,(c-S)/2,S,S,m?s:d,null==p||p);v.add(sl(M,a,g,l,f,m))}var I="left"===o?h+5:-5,T=o,C=i.get("formatter"),A=t;"string"==typeof C&&C?A=C.replace("{name}",null!=t?t:""):"function"==typeof C&&(A=C(t)),v.add(new Ff({style:mi({},y,{text:A,x:I,y:c/2,textFill:m?y.getTextColor():d,textAlign:T,textVerticalAlign:"middle"})}));var D=new jf({shape:v.getBoundingRect(),invisible:!0,tooltip:_.get("show")?k({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},_.option):null});return v.add(D),v.eachChild(function(t){t.silent=!0}),D.silent=!u,this.getContentGroup().add(v),ci(v),v.__legendDataIndex=e,v},layoutInner:function(t,e,n,i,r,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Vp(t.get("orient"),o,t.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(r){Vp("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===a?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),o.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});Ra(gm.PROCESSOR.SERIES_FILTER,function(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries(function(t){for(var e=0;e<n.length;e++)if(!n[e].isSelected(t.name))return!1;return!0})}),Wp.registerSubTypeDefaulter("legend",function(){return"plain"});var ax=tx.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,n,i){var r=rr(t);ax.superCall(this,"init",t,e,n,i),cl(this,t,r)},mergeOption:function(t,e){ax.superCall(this,"mergeOption",t,e),cl(this,this.option,t)}}),ox=Ac,sx=["width","height"],lx=["x","y"],ux=rx.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){ux.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new ox),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new ox),this._showController},resetInner:function(){ux.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,r,e,a,n,i,o){function s(t,e){var n=t+"DataIndex",i=Pi(r.get("pageIcons",!0)[r.getOrient().name][e],{onclick:_(l._pageGo,l,n,r,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});i.name=t,u.add(i)}var l=this;ux.superCall(this,"renderInner",t,r,e,a,n,i,o);var u=this._controllerGroup,h=r.get("pageIconSize",!0);L(h)||(h=[h,h]),s("pagePrev",0);var c=r.getModel("pageTextStyle");u.add(new Ff({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),s("pageNext",1)},layoutInner:function(t,e,n,i,r,a){var o=this.getSelectorGroup(),s=t.getOrient().index,l=sx[s],u=lx[s],h=sx[1-s],c=lx[1-s];r&&Vp("horizontal",o,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),f=o.getBoundingRect(),p=[-f.x,-f.y],g=b(n);r&&(g[l]=n[l]-f[l]-d);var m=this._layoutContentAndController(t,i,g,s,l,h,c);if(r){if("end"===a)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[c]+m[h]/2-f[h]/2,m[h]=Math.max(m[h],f[h]),m[c]=Math.min(m[c],f[c]+p[1-s]),o.attr("position",p)}return m},_layoutContentAndController:function(t,e,n,i,r,a,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;Vp(t.get("orient"),s,t.get("itemGap"),i?n.width:null,i?null:n.height),Vp("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[r]>n[r],f=[-h.x,-h.y];e||(f[i]=s.position[i]);var p=[0,0],g=[-c.x,-c.y],m=z(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[i]+=n[r]-c[r]:p[i]+=c[r]+m);g[1-i]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[r]=d?n[r]:h[r],v[a]=Math.max(h[a],c[a]),v[o]=Math.min(0,c[o]+g[1-i]),l.__rectSize=n[r],d){var y={x:0,y:0};y[r]=Math.max(n[r]-c[r]-m,0),y[a]=v[a],l.setClipPath(new jf({shape:y})),l.__rectSize=y[r]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&Mi(s,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(i,r){var a=this._controllerGroup;D(["pagePrev","pageNext"],function(t){var e=null!=r[t+"DataIndex"],n=a.childOfName(t);n&&(n.setStyle("fill",e?i.get("pageIconColor",!0):i.get("pageIconInactiveColor",!0)),n.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=i.get("pageFormatter"),n=r.pageIndex,o=null!=n?n+1:0,s=r.pageCount;t&&e&&t.setStyle("text",M(e)?e.replace("{current}",o).replace("{total}",s):e({current:o,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),n=e[l]+t.position[o];return{s:n,e:n+e[s],i:t.__legendDataIndex}}}function n(t,e){return t.e>=e&&t.s<=e+a}var i=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=sx[o],l=lx[o],u=this._findTargetItemIndex(i),h=r.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[o]=-g.s;for(var m=u+1,v=g,y=g,x=null;m<=d;++m)(!(x=e(h[m]))&&y.e>v.s+a||x&&!n(x,v.s))&&((v=y.i>v.i?y:x)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount)),y=x;for(m=u-1,v=g,y=g,x=null;-1<=m;--m)(x=e(h[m]))&&n(y,x.s)||!(v.i<y.i)||(y=v,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=v.i),++p.pageCount,++p.pageIndex),v=x;return p},_findTargetItemIndex:function(i){var r,a,t=this.getContentGroup();return this._showController&&t.eachChild(function(t,e){var n=t.__legendDataIndex;null==a&&null!=n&&(a=e),n===i&&(r=e)}),null!=r?r:a}});Fa("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})});var hx=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var a=n.getData(),o=tn(a,t);if(null==o||o<0||L(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(a.getValues(P(l.dimensions,function(t){return a.mapDimension(t)}),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},cx=D,dx=y,fx=en(),px=(Xa({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}}}),en()),gx=D,mx=Za({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";vl("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||0<=r.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){_l(e.getZr(),"axisPointer"),mx.superApply(this._model,"remove",arguments)},dispose:function(t,e){_l("axisPointer",e),mx.superApply(this._model,"dispose",arguments)}}),vx=en(),yx=b,xx=_;ln((wl.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=y(bl,e,h);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new Ac,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),n.getZr().add(o);Il(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"!==n&&null!=n)return!0===n;var o=this.animationThreshold;if(r&&i.getBandWidth()>o)return!0;if(a){var s=ws(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1},makeElOption:function(){},createPointerEl:function(t,e){var n=e.pointer;if(n){var i=vx(t).pointerEl=new xp[n.type](yx(e.pointer));t.add(i)}},createLabelEl:function(t,e,n,i){if(e.label){var r=vx(t).labelEl=new jf(yx(e.label));t.add(r),Sl(r,i)}},updatePointerEl:function(t,e,n){var i=vx(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=vx(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),Sl(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,a=n.getModel("handle"),o=n.get("status");if(!a.get("show")||!o||"hide"===o)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Pi(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Zh(t.event)},onmousedown:xx(this._onHandleDragMove,this,0,0),drift:xx(this._onHandleDragMove,this),ondragend:xx(this._onHandleDragEnd,this)}),i.add(r)),Il(r,n,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");L(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),function(t,e,n,i){var r=t[e];if(r){var a=r[Bg]||r,o=r[Fg];if(r[Rg]!==n||o!==i){if(null==n||!i)return t[e]=a;(r=t[e]=Jr(a,n,"debounce"===i))[Bg]=a,r[Fg]=i,r[Rg]=n}}}(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){bl(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Ml(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Ml(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Ml(i)),vx(n).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(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=wl);var _x=wl.extend({makeElOption:function(t,e,n,i,r){var a,o,s,l,u=n.axis,h=u.grid,c=i.get("type"),d=Dl(h,u).getOtherAxis(u).getGlobalExtent(),f=u.toGlobalCoord(u.dataToCoord(e,!0));if(c&&"none"!==c){var p=(s=(a=i).get("type"),l=a.getModel(s+"Style"),"line"===s?(o=l.getLineStyle()).fill=null:"shadow"===s&&((o=l.getAreaStyle()).stroke=null),o),g=bx[c](u,f,d);g.style=p,t.graphicKey=g.type,t.pointer=g}var m,v,y,x,_,w,b,S=Ts(h.model,n);m=e,v=t,x=n,_=i,w=r,b=ey.innerTextLayout((y=S).rotation,0,y.labelDirection),y.labelMargin=_.get("label.margin"),Tl(v,x,_,w,{position:Al(x.axis,m,y),align:b.textAlign,verticalAlign:b.textVerticalAlign})},getHandleTransform:function(t,e,n){var i=Ts(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Al(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,r=i.grid,a=i.getGlobalExtent(!0),o=Dl(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(o[1]+o[0])/2,h=[u,u];h[s]=l[s];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][s]}}}),bx={line:function(t,e,n){var i,r,a;return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],r=[e,n[1]],a=kl(t),{x1:i[a=a||0],y1:i[1-a],x2:r[a],y2:r[1-a]})}},shadow:function(t,e,n){var i,r,a,o=Math.max(1,t.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(i=[e-o/2,n[0]],r=[o,s],a=kl(t),{x:i[a=a||0],y:i[1-a],width:r[a],height:r[1-a]})}}};ly.registerAxisPointerClass("CartesianAxisPointer",_x),Ba(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!L(e)&&(t.axisPointer.link=[e])}}),Ra(gm.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=xs(t,e)}),Fa({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var r,i,a,o=t.currTrigger,s=[t.x,t.y],l=t,u=t.dispatchAction||_(n.dispatchAction,n),h=e.getComponent("axisPointer").coordSysAxesInfo;if(h){ml(s)&&(s=hx({seriesIndex:l.seriesIndex,dataIndex:l.dataIndex},e).point);var c=ml(s),d=l.axesInfo,f=h.axesInfo,p="leave"===o||ml(s),g={},m={},v={list:[],map:{}},y={showPointer:dx(fl,m),showTooltip:dx(pl,v)};cx(h.coordSysMap,function(t,e){var r=c||t.containPoint(s);cx(h.coordSysAxesInfo[e],function(t){var e=t.axis,n=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(d,t);if(!p&&r&&(!d||n)){var i=n&&n.value;null!=i||c||(i=e.pointToData(s)),null!=i&&dl(t,i,y,!1,g)}})});var x={};return cx(f,function(r,t){var a=r.linkGroup;a&&!m[t]&&cx(a.axesInfo,function(t,e){var n=m[e];if(t!==r&&n){var i=n.value;a.mapper&&(i=r.axis.scale.parse(a.mapper(i,gl(t),gl(r)))),x[r.key]=i}})}),cx(x,function(t,e){dl(f[e],t,y,!0,g)}),r=m,i=f,a=g.axesInfo=[],cx(i,function(t,e){var n=t.axisPointerModel.option,i=r[e];i?(!t.useHandle&&(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):!t.useHandle&&(n.status="hide"),"show"===n.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),function(t,e,n,i){if(!ml(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}(v,s,t,u),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",a=fx(i)[r]||{},o=fx(i)[r]={};cx(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&cx(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var s=[],l=[];D(a,function(t,e){!o[e]&&l.push(t)}),D(o,function(t,e){!a[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(f,0,n),g}}),Xa({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var Sx=D,Mx=function(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},Ix=["","-webkit-","-moz-","-o-"];Ll.prototype={constructor:Ll,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+Pl(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var 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(_(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}},Ol.prototype={constructor:Ol,_enterable:!0,update:function(){},show:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},r=t,a="{marker",o=r.indexOf(a);0<=o;){var s=r.indexOf("|}"),l=r.substr(o+a.length,s-o-a.length);i["marker"+l]=-1<l.indexOf("sub")?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[l],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[l]},o=(r=r.substr(s+1)).indexOf("{marker")}this.el=new Ff({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(_(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var Tx=_,Cx=D,Ax=Fi,Dx=new jf({shape:{x:-1,y:-1,width:2,height:2}});Za({type:"tooltip",init:function(t,e){if(!wh.node){var n,i=t.getComponent("tooltip").get("renderMode");this._renderMode=on(i),"html"===this._renderMode?(n=new Ll(e.getDom(),e),this._newLine="<br/>"):(n=new Ol(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,n){if(!wh.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var i=this._tooltipModel.get("triggerOn");vl("itemTooltip",this._api,Tx(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!wh.node){var r=El(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=Dx;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=hx(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el,event:{}},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(El(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,a=i.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s)if("axis"===(t=Nl([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}},_tryShow:function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=_(e,this),clearTimeout(this._showTimout),0<n?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var d=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],r=[],f=[],a=Nl([e.tooltipOption,n]),p=this._renderMode,o=this._newLine,g={};Cx(t,function(t){Cx(t.dataByAxis,function(s){var l=d.getComponent(s.axisDim+"Axis",s.axisIndex),u=s.value,h=[];if(l&&null!=u){var c=Cl(u,l.axis,d,s.seriesDataIndices,s.valueLabelOpt);D(s.seriesDataIndices,function(t){var e=d.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,i=e&&e.getDataParams(n);if(i.axisDim=s.axisDim,i.axisIndex=s.axisIndex,i.axisType=s.axisType,i.axisId=s.axisId,i.axisValue=mo(l.axis,u),i.axisValueLabel=c,i){f.push(i);var r,a=e.formatTooltip(n,!0,null,p);if(O(a)){r=a.html;var o=a.markers;m(g,o)}else r=a;h.push(r)}});var t=c;r.push("html"!==p?h.join(o):(t?ji(t)+o:"")+h.join(o))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var s=e.position;this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(a,s,i[0],i[1],this._tooltipContent,f):this._showTooltipContent(a,r,f,Math.random(),i[0],i[1],s,void 0,g)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,a=i.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=o.getData(),h=Nl([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);f=O(g)?(d=g.html,g.markers):(d=g,null);var m="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){i={content:i,formatter:i}}var r=new Ni(i,this._tooltipModel,this._ecModel),a=r.get("content"),o=Math.random();this._showOrMove(r,function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(n,t,i,e,r,a,o,s,l){if(this._ticket="",n.get("showContent")&&n.get("show")){var u=this._tooltipContent,h=n.get("formatter");o=o||n.get("position");var c=t;if(h&&"string"==typeof h)c=$i(h,i,!0);else if("function"==typeof h){var d=Tx(function(t,e){t===this._ticket&&(u.setContent(e,l,n),this._updatePosition(n,o,r,a,u,i,s))},this);this._ticket=e,c=h(i,e,d)}u.setContent(c,l,n),u.show(n),this._updatePosition(n,o,r,a,u,i,s)}},_updatePosition:function(t,e,n,i,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u,h,c,d,f,p,g,m,v,y,x,_,w,b,S,M,I=r.getSize(),T=t.get("align"),C=t.get("verticalAlign"),A=o&&o.getBoundingRect().clone();if(o&&A.applyTransform(o.transform),"function"==typeof e&&(e=e([n,i],a,r.el,A,{viewSize:[s,l],contentSize:I.slice()})),L(e))n=Ax(e[0],s),i=Ax(e[1],l);else if(O(e)){e.width=I[0],e.height=I[1];var D=nr(e,{width:s,height:l});n=D.x,i=D.y,C=T=null}else if("string"==typeof e&&o){n=(k=function(t,e,n){var i=n[0],r=n[1],a=0,o=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-i/2,o=e.y+l/2-r/2;break;case"top":a=e.x+s/2-i/2,o=e.y-r-5;break;case"bottom":a=e.x+s/2-i/2,o=e.y+l+5;break;case"left":a=e.x-i-5,o=e.y+l/2-r/2;break;case"right":a=e.x+s+5,o=e.y+l/2-r/2}return[a,o]}(e,A,I))[0],i=k[1]}else{var k;n=(k=(u=n,h=i,c=s,d=l,f=T?null:20,p=C?null:20,g=r.getOuterSize(),m=g.width,v=g.height,null!=f&&(c<u+m+f?u-=m+f:u+=f),null!=p&&(d<h+v+p?h-=v+p:h+=p),[u,h]))[0],i=k[1]}(T&&(n-=zl(T)?I[0]/2:"right"===T?I[0]:0),C&&(i-=zl(C)?I[1]/2:"bottom"===C?I[1]:0),t.get("confine"))&&(n=(k=(y=n,x=i,_=s,w=l,b=r.getOuterSize(),S=b.width,M=b.height,y=Math.min(y+S,_)-S,x=Math.min(x+M,w)-M,[y=Math.max(y,0),x=Math.max(x,0)]))[0],i=k[1]);r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(i){var t=this._lastDataByCoordSys,o=!!t&&t.length===i.length;return o&&Cx(t,function(t,e){var n=t.dataByAxis||{},a=(i[e]||{}).dataByAxis||[];(o&=n.length===a.length)&&Cx(n,function(t,e){var n=a[e]||{},i=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(o&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&i.length===r.length)&&Cx(i,function(t,e){var n=r[e];o&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=i,!!o},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){wh.node||(this._tooltipContent.hide(),_l("itemTooltip",e))}}),Fa({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Fa({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var kx=qi,Px=ji,Lx=Xa({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},isAnimationEnabled:function(){if(wh.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,i,e,r){var a=this.constructor,o=this.mainType+"Model";e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=t[o];return e&&e.data?(n?n._mergeOption(e,i,!0):(r&&Bl(e),D(e.data,function(t){t instanceof Array?(Bl(t[0]),Bl(t[1])):Bl(t)}),k(n=new a(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),void(t[o]=n)):void(t[o]=null)},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=L(n)?P(n,kx).join(", "):kx(n),r=e.getName(t),a=Px(this.name);return(null!=n||r)&&(a+="<br />"),r&&(a+=Px(r),null!=n&&(a+=" : ")),null!=n&&(a+=Px(i)),a},getData:function(){return this._data},setData:function(t){this._data=t}});e(Lx,Ig),Lx.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 Ox=p,Nx=y,Ex={min:Nx(Rl,"min"),max:Nx(Rl,"max"),average:Nx(Rl,"average")},zx=Za({type:"marker",init:function(){this.markerGroupMap=T()},render:function(t,n,i){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var r=this.type+"Model";n.eachSeries(function(t){var e=t[r];e&&this.renderSeries(t,e,n,i)},this),e.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});zx.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(Xl(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,l,e,n){var i=t.coordinateSystem,r=t.id,u=t.getData(),a=this.markerGroupMap,o=a.get(r)||a.set(r,new Ps),h=function(t,e,n){var i;i=t?P(t&&t.dimensions,function(t){return A({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new kv(i,n),a=P(n.get("data"),y(Fl,e));return t&&(a=v(a,y(Gl,t))),r.initData(a,null,t?Hl:function(t){return t.value}),r}(i,t,l);l.setData(h),Xl(l.getData(),t,n),h.each(function(t){var e=h.getItemModel(t),n=e.getShallow("symbol"),i=e.getShallow("symbolSize"),r=g(n),a=g(i);if(r||a){var o=l.getRawValue(t),s=l.getDataParams(t);r&&(n=n(o,s)),a&&(i=i(o,s))}h.setItemVisual(t,{symbol:n,symbolSize:i,color:e.get("itemStyle.color")||u.getVisual("color")})}),o.updateData(h),this.group.add(o.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=l})}),o.__keep=!0,o.group.silent=l.get("silent")||t.get("silent")}}),Ba(function(t){t.markPoint=t.markPoint||{}}),Lx.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 Bx=Kf.prototype,Rx=Jf.prototype,Fx=Yn({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Zl(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:Bx.buildPath,_buildPathCurve:Rx.buildPath,pointAt:function(t){return this[Zl(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:Bx.pointAt,_pointAtCurve:Rx.pointAt,tangentAt:function(t){var e=this.shape,n=Zl(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return G(n,n)},_tangentAtCurve:Rx.tangentAt}),Vx=["fromSymbol","toSymbol"],Gx=jl.prototype;Gx.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.childOfName("label");if(t||e||!n.ignore){for(var i=1,r=this.parent;r;)r.scale&&(i/=r.scale[0]),r=r.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var o=a.shape.percent,s=a.pointAt(0),l=a.pointAt(o),u=F([],l,s);if(G(u,u),t){t.attr("position",s);var h=a.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[i*o,i*o])}if(e&&(e.attr("position",l),h=a.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[i*o,i*o])),!n.ignore){n.attr("position",l);var c,d,f,p=5*i;if("end"===n.__position)c=[u[0]*p+l[0],u[1]*p+l[1]],d=.8<u[0]?"left":u[0]<-.8?"right":"center",f=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var g=o/2,m=[(h=a.tangentAt(g))[1],-h[0]],v=a.pointAt(g);0<m[1]&&(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(h[1],h[0]);l[0]<s[0]&&(y=Math.PI+y),n.attr("rotation",y)}else c=[-u[0]*p+s[0],-u[1]*p+s[1]],d=.8<u[0]?"right":u[0]<-.8?"left":"center",f=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||f,textAlign:n.__textAlign||d},position:c,scale:[i,i]})}}}},Gx._createLine=function(n,i,t){var e,r,a=n.hostModel,o=n.getItemLayout(i),s=(e=o,ql((r=new Fx({name:"line",subPixelOptimize:!0})).shape,e),r);s.shape.percent=0,Ii(s,{shape:{percent:1}},a,i),this.add(s);var l=new Ff({name:"label",lineLabelOriginalOpacity:1});this.add(l),D(Vx,function(t){var e=Yl(t,n,i);this.add(e),this[Ul(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},Gx.updateData=function(r,a,t){var e=r.hostModel,n=this.childOfName("line"),i=r.getItemLayout(a),o={shape:{}};ql(o.shape,i),Mi(n,o,e,a),D(Vx,function(t){var e=r.getItemVisual(a,t),n=Ul(t);if(this[n]!==e){this.remove(this.childOfName(t));var i=Yl(t,r,a);this.add(i)}this[n]=e},this),this._updateCommonStl(r,a,t)},Gx._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),a=n&&n.lineStyle,o=n&&n.hoverLineStyle,s=n&&n.labelModel,l=n&&n.hoverLabelModel;if(!n||t.hasItemOption){var u=t.getItemModel(e);a=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),c=B(t.getItemVisual(e,"opacity"),a.opacity,1);r.useStyle(A({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},a)),r.hoverStyle=o,D(Vx,function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))},this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=h||"#000",null==(f=i.getFormattedLabel(e,"normal",t.dataType)))){var v=i.getRawValue(e);f=null==v?t.getName(e):isFinite(v)?Vi(v):v}var y=p?f:null,x=g?z(i.getFormattedLabel(e,"emphasis",t.dataType),f):null,_=m.style;(null!=y||null!=x)&&(mi(m.style,s,{text:y},{autoColor:d}),m.__textAlign=_.textAlign,m.__verticalAlign=_.textVerticalAlign,m.__position=s.get("position")||"middle"),m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,ci(this)},Gx.highlight=function(){this.trigger("emphasis")},Gx.downplay=function(){this.trigger("normal")},Gx.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},Gx.setLinePoints=function(t){var e=this.childOfName("line");ql(e.shape,t),e.dirty()},i(jl,Ac);var Hx=$l.prototype;Hx.isPersistent=function(){return!0},Hx.updateData=function(l){var u=this,e=u.group,h=u._lineData;u._lineData=l,h||e.removeAll();var c=Kl(l);l.diff(h).add(function(t){!function(t,e,n,i){if(Jl(e.getItemLayout(n))){var r=new t._ctor(e,n,i);e.setItemGraphicEl(n,r),t.group.add(r)}}(u,l,t,c)}).update(function(t,e){var n,i,r,a,o,s;n=u,i=l,r=e,a=t,o=c,s=h.getItemGraphicEl(r),Jl(i.getItemLayout(a))?(s?s.updateData(i,a,o):s=new n._ctor(i,a,o),i.setItemGraphicEl(a,s),n.group.add(s)):n.group.remove(s)}).remove(function(t){e.remove(h.getItemGraphicEl(t))}).execute()},Hx.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},Hx.incrementalPrepareUpdate=function(t){this._seriesScope=Kl(t),this._lineData=null,this.group.removeAll()},Hx.incrementalUpdate=function(t,e){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var i=t.start;i<t.end;i++){if(Jl(e.getItemLayout(i))){var r=new this._ctor(e,i,this._seriesScope);r.traverse(n),this.group.add(r),e.setItemGraphicEl(i,r)}}},Hx.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Hx._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var Wx=function(t,e,n,i){var r=t.getData(),a=i.type;if(!L(i)&&("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis)){var o,s;if(null!=i.yAxis||null!=i.xAxis)o=e.getAxis(null!=i.yAxis?"y":"x"),s=E(i.yAxis,i.xAxis);else{var l=Vl(i,r,e,t);o=l.valueAxis,s=Wl(r,ja(r,l.valueDataDim),a)}var u="x"===o.dim?0:1,h=1-u,c=b(i),d={};c.type=null,c.coord=[],d.coord=[],c.coord[h]=-1/0,d.coord[h]=1/0;var f=n.get("precision");0<=f&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),c.coord[u]=d.coord[u]=s,i=[c,d,{type:a,valueIndex:i.valueIndex,value:s}]}return(i=[Fl(t,i[0]),Fl(t,i[1]),k({},i[2])])[2].type=i[2].type||"",m(i[2],i[0]),m(i[2],i[1]),i};zx.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var t=e.markLineModel;if(t){var n=t.getData(),i=t.__from,r=t.__to;i.each(function(t){iu(i,t,!0,e,a),iu(r,t,!1,e,a)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),r.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},renderSeries:function(r,e,t,a){function n(t,e,n){var i=t.getItemModel(e);iu(t,e,n,r,a),t.setItemVisual(e,{symbolSize:i.get("symbolSize")||g[n?0:1],symbol:i.get("symbol",!0)||p[n?0:1],color:i.get("itemStyle.color")||s.getVisual("color")})}var i=r.coordinateSystem,o=r.id,s=r.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,new $l);this.group.add(u.group);var h=function(t,e,n){var i;i=t?P(t&&t.dimensions,function(t){return A({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new kv(i,n),a=new kv(i,n),o=new kv([],n),s=P(n.get("data"),y(Wx,e,t,n));t&&(s=v(s,y(nu,t)));var l=t?Hl:function(t){return t.value};return r.initData(P(s,function(t){return t[0]}),null,l),a.initData(P(s,function(t){return t[1]}),null,l),o.initData(P(s,function(t){return t[2]})),o.hasItemOption=!0,{from:r,to:a,line:o}}(i,r,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");L(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){n(c,t,!0),n(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||r.get("silent")}}),Ba(function(t){t.markLine=t.markLine||{}}),Lx.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 Xx=function(t,e,n,i){var r=Fl(t,i[0]),a=Fl(t,i[1]),o=E,s=r.coord,l=a.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=h([{},r,a]);return u.coord=[r.coord,a.coord],u.x0=r.x,u.y0=r.y,u.x1=a.x,u.y1=a.y,u},Zx=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];zx.extend({type:"markArea",updateTransform:function(t,e,r){e.eachSeries(function(n){var t=n.markAreaModel;if(t){var i=t.getData();i.each(function(e){var t=P(Zx,function(t){return su(i,e,t,n,r)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})}},this)},renderSeries:function(n,l,t,i){var e=n.coordinateSystem,r=n.id,a=n.getData(),o=this.markerGroupMap,s=o.get(r)||o.set(r,{group:new Ac});this.group.add(s.group),s.__keep=!0;var u=function(t,n,e){var i,r;r=t?(i=P(t&&t.dimensions,function(t){var e=n.getData();return A({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new kv(P(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),e)):new kv(i=[{name:"value",type:"float"}],e);var a=P(e.get("data"),y(Xx,n,t,e));t&&(a=v(a,y(ou,t)));var o=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return r.initData(a,null,o),r.hasItemOption=!0,r}(e,n,l);l.setData(u),u.each(function(e){u.setItemLayout(e,P(Zx,function(t){return su(u,e,t,n,i)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(s.__data).add(function(t){var e=new Zf({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),s.group.add(e)}).update(function(t,e){var n=s.__data.getItemGraphicEl(e);Mi(n,{shape:{points:u.getItemLayout(t)}},l,t),s.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=s.__data.getItemGraphicEl(t);s.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var n,i,r=u.getItemModel(e),a=r.getModel("label"),o=r.getModel("emphasis.label"),s=u.getItemVisual(e,"color");t.useStyle(A(r.getModel("itemStyle").getItemStyle(),{fill:(n=s,i=.4,(n=St(n))&&null!=i?(n[3]=mt(i),It(n,"rgba")):void 0),stroke:s})),t.hoverStyle=r.getModel("emphasis.itemStyle").getItemStyle(),gi(t.style,t.hoverStyle,a,o,{labelFetcher:l,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:s}),ci(t,{}),t.dataModel=l}),s.__data=u,s.group.silent=l.get("silent")||n.get("silent")}}),Ba(function(t){t.markArea=t.markArea||{}});var Ux={},Yx=Xa({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){Yx.superApply(this,"optionUpdated",arguments),D(this.option.feature,function(t,e){var n=uu(e);n&&m(t,n.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});Za({type:"toolbox",render:function(h,c,d,l){function t(t,e){var n,i=m[t],r=m[e],a=u[i],o=new Ni(a,h,h.ecModel);if(l&&null!=l.newTitle&&(a.title=l.newTitle),i&&!r){if(0===i.indexOf("my"))n={model:o,onclick:o.option.onclick,featureName:i};else{var s=uu(i);if(!s)return;n=new s(o,c,d)}g[i]=n}else{if(!(n=g[r]))return;n.model=o,n.ecModel=c,n.api=d}return!i&&r?void(n.dispose&&n.dispose(c,d)):!o.get("show")||n.unusable?void(n.remove&&n.remove(c,d)):(function(r,a,t){var o=r.getModel("iconStyle"),s=r.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():r.get("icon"),l=r.get("title")||{};if("string"==typeof e){var n=e,i=l;l={},(e={})[t]=n,l[t]=i}var u=r.iconPaths={};D(e,function(t,e){var n=Pi(t,{},{x:-p/2,y:-p/2,width:p,height:p});n.setStyle(o.getItemStyle()),n.hoverStyle=s.getItemStyle(),n.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var i=h.getModel("tooltip");i&&i.get("show")&&n.attr("tooltip",k({content:l[e],formatter:i.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:i.get("position",!0)||"bottom"},i.option)),ci(n),h.get("showTitle")&&(n.__title=l[e],n.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";n.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){n.setStyle({textFill:null,textBackgroundColor:null})})),n.trigger(r.get("iconStatus."+e)||"normal"),f.add(n),n.on("click",_(a.onclick,a,c,d,e)),u[e]=n})}(o,n,i),o.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},void(n.render&&n.render(o,c,d,l)))}var f=this.group;if(f.removeAll(),h.get("show")){var p=+h.get("itemSize"),u=h.get("feature")||{},g=this._features||(this._features={}),m=[];D(u,function(t,e){m.push(e)}),new Ro(this._featureNames||[],m).add(t).update(t).remove(y(t,null)).execute(),this._featureNames=m,al(f,h,d),f.add(ol(f.getBoundingRect(),h)),f.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var i=ie(e,ge(n)),r=t.position[0]+f.position[0],a=!1;t.position[1]+f.position[1]+p+i.height>d.getHeight()&&(n.textPosition="top",a=!0);var o=a?-5-i.height:p+8;r+i.width/2>d.getWidth()?(n.textPosition=["100%",o],n.textAlign="right"):r-i.width/2<0&&(n.textPosition=[0,o],n.textAlign="left")}})}},updateView:function(t,e,n,i){D(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){D(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){D(this._features,function(t){t.dispose&&t.dispose(e,n)})}});var qx=Gg.toolbox.saveAsImage;hu.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:qx.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:qx.lang.slice()},hu.prototype.unusable=!wh.canvasSupported,hu.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r=n.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||wh.browser.ie||wh.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var o=atob(a.split(",")[1]),s=o.length,l=new Uint8Array(s);s--;)l[s]=o.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+r)}else{var h=n.get("lang"),c='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>';window.open().document.write(c)}else{var d=document.createElement("a");d.download=i+"."+r,d.target="_blank",d.href=a;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},lu("saveAsImage",hu);var jx=Gg.toolbox.magicType,$x="__ec_magicType_stack__";cu.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:b(jx.title),option:{},seriesIndex:{}};var Kx=cu.prototype;Kx.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return D(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var Qx={line:function(t,e,n,i){return"bar"===t?m({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0):void 0},bar:function(t,e,n,i){return"line"===t?m({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0):void 0},stack:function(t,e,n,i){var r=n.get("stack")===$x;return"line"===t||"bar"===t?(i.setIconStatus("stack",r?"normal":"emphasis"),m({id:e,stack:r?"":$x},i.get("option.stack")||{},!0)):void 0}},Jx=[["line","bar"],["stack"]];Kx.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(Qx[h]){var n,d={series:[]};if(D(Jx,function(t){0<=p(t,h)&&D(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,n=t.id,i=Qx[h](e,n,t,c);i&&(A(i,t.option),d.series.push(i));var r=t.coordinateSystem;if(r&&"cartesian2d"===r.type&&("line"===h||"bar"===h)){var a=r.getAxesByScale("ordinal")[0];if(a){var o=a.dim+"Axis",s=u.queryComponents({mainType:o,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[o]=d[o]||[];for(var l=0;l<=s;l++)d[o][s]=d[o][s]||{};d[o][s].boundaryGap="bar"===h}}}),"stack"===h)n=d.series&&d.series[0]&&d.series[0].stack===$x?m({stack:jx.title.tiled},jx.title):b(jx.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:n})}},Fa({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),lu("magicType",cu);var t_=Gg.toolbox.dataView,e_=new Array(60).join("-"),n_="    ",i_=new RegExp("["+n_+"]+","g");gu.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:b(t_.title),lang:b(t_.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},gu.prototype.onclick=function(t,e){function n(){i.removeChild(a),x._dom=null}var i=e.getDom(),r=this.model;this._dom&&i.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=r.get("backgroundColor")||"#fff";var o=document.createElement("h4"),s=r.get("lang")||[];o.innerHTML=s[0]||r.get("title"),o.style.cssText="margin: 10px 20px;",o.style.color=r.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=r.get("optionToContent"),c=r.get("contentToOption"),d=du(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:w(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=r.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=r.get("textColor"),u.style.borderColor=r.get("textareaBorderColor"),u.style.backgroundColor=r.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var x=this;tt(v,"click",n),tt(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):pu(u.value,p)}catch(t){throw n(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),n()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!r.get("readOnly")&&g.appendChild(y),g.appendChild(v),a.appendChild(o),a.appendChild(l),a.appendChild(g),l.style.height=i.clientHeight-80+"px",i.appendChild(a),this._dom=a},gu.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},gu.prototype.dispose=function(t,e){this.remove(t,e)},lu("dataView",gu),Fa({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,a){var o=[];D(t.newOption.series,function(t){var e,i,n=a.getSeriesByName(t.name)[0];if(n){var r=n.get("data");o.push({name:t.name,data:(e=t.data,i=r,P(e,function(t,e){var n=i&&i[e];return O(n)&&!L(n)?(O(t)&&!L(t)&&(t=t.value),A({value:t},n)):t}))})}else o.push(k({type:"scatter"},t))}),a.mergeOption(A({series:o},t.newOption))});var r_="\0_ec_interaction_mutex";Fa({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});var a_=y,o_=D,s_=P,l_=Math.min,u_=Math.max,h_=Math.pow,c_=1e4,d_=6,f_=6,p_="globalPan",g_={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},m_={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},v_={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},y_=0;vu.prototype={constructor:vu,enableBrush:function(t){return this._brushType&&xu(this),t.brushType&&yu(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};D(t,function(t){e[t.panelId]=b(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){o_(this._covers,t,e)},updateCovers:function(r){function n(t,e){return(null!=t.id?t.id:i+e)+"-"+t.brushType}function t(t,e){var n=r[t];if(null!=e&&a[e]===l)o[t]=a[e];else{var i=o[t]=null!=e?(a[e].__brushOption=n,a[e]):wu(s,_u(s,n));Mu(s,i)}}r=P(r,function(t){return m(b(v_),t,!0)});var i="\0-brush-index-",a=this._covers,o=this._covers=[],s=this,l=this._creatingCover;return new Ro(a,r,function(t,e){return n(t.__brushOption,e)},n).add(t).update(t).remove(function(t){a[t]!==l&&s.group.remove(a[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),Au(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},e(vu,Fh);var x_={mousedown:function(t){if(this._dragging)Uu(this,t);else if(!t.target||!t.target.draggable){Gu(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Tu(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&(l=e,h=t._zr,!(l<0||l>h.getWidth()||u<0||u>h.getHeight()))){var i=t._zr,r=t._covers,a=Tu(t,e,n);if(!t._dragging)for(var o=0;o<r.length;o++){var s=r[o].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&__[s.brushType].contain(r[o],n[0],n[1]))return}a&&i.setCursorStyle("crosshair")}var l,u,h}(this,t,i),this._dragging){Gu(t);var r=Xu(this,t,i,!1);r&&Du(this,r)}},mouseup:function(t){Uu(this,t)}},__={lineX:Yu(0),lineY:Yu(1),rect:{createCover:function(t,e){return Pu(a_(Bu,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=ku(t);return zu(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){Lu(t,e,n,i)},updateCommon:Ou,contain:Wu},polygon:{createCover:function(t,e){var n=new Ac;return n.add(new Uf({name:"main",style:Eu(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Zf({name:"main",draggable:!0,drift:a_(Ru,t,e),ondragend:a_(Du,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n){e.childAt(0).setShape({points:Vu(t,e,n)})},updateCommon:Ou,contain:Wu}},w_={axisPointer:1,tooltip:1,brush:1},b_=D,S_=p,M_=y,I_=["dataToPoint","pointToData"],T_=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],C_=$u.prototype;C_.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=P_[t.brushType](0,n,e);t.__rangeOffset={offset:L_[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})},C_.matchOutputRanges=function(t,i,r){b_(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&D(t.coordSyses,function(t){var e=P_[n.brushType](1,t,n.range);r(n,e.values,t,i)})},this)},C_.setInputRanges=function(t,u){b_(t,function(t){var e,n,i,r,a,o=this.findTargetInfo(t,u);if(t.range=t.range||[],o&&!0!==o){t.panelId=o.panelId;var s=P_[t.brushType](0,o.coordSys,t.coordRange),l=t.__rangeOffset;t.range=l?L_[t.brushType](s.values,l.offset,(e=s.xyMinMax,n=l.xyMinMax,i=eh(e),r=eh(n),a=[i[0]/r[0],i[1]/r[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):s.values}},this)},C_.makePanelOpts=function(i,o){return P(this._targetInfoList,function(t){var r,a,e,n=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:o&&o(t),clipPath:(e=n,e=ju(e),function(t){return ki(t,e)}),isTargetByCursor:qu(n,i,t.coordSysModel),getLinearBrushOtherExtent:(r=n,r=ju(r),function(t){var e=null!=a?a:t,n=e?r.width:r.height,i=e?r.x:r.y;return[i,i+(n||0)]})}})},C_.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&0<=S_(i.coordSyses,e.coordinateSystem)},C_.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Qu(e,t),r=0;r<n.length;r++){var a=n[r],o=t.panelId;if(o){if(a.panelId===o)return a}else for(r=0;r<D_.length;r++)if(D_[r](i,a))return a}return!0};var A_={grid:function(t,i){var r=t.xAxisModels,a=t.yAxisModels,e=t.gridModels,n=T(),o={},s={};(r||a||e)&&(b_(r,function(t){var e=t.axis.grid.model;n.set(e.id,e),o[e.id]=!0}),b_(a,function(t){var e=t.axis.grid.model;n.set(e.id,e),s[e.id]=!0}),b_(e,function(t){n.set(t.id,t),o[t.id]=!0,s[t.id]=!0}),n.each(function(t){var e=t.coordinateSystem,n=[];b_(e.getCartesians(),function(t){(0<=S_(r,t.getAxis("x").model)||0<=S_(a,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:k_.grid,xAxisDeclared:o[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){b_(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:k_.geo})})}},D_=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],k_={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ti(t)),e}},P_={lineX:M_(Ju,0),lineY:M_(Ju,1),rect:function(t,e,n){var i=e[I_[t]]([n[0][0],n[1][0]]),r=e[I_[t]]([n[0][1],n[1][1]]),a=[Ku([i[0],r[0]]),Ku([i[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(n,i,t){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:P(t,function(t){var e=i[I_[n]](t);return r[0][0]=Math.min(r[0][0],e[0]),r[1][0]=Math.min(r[1][0],e[1]),r[0][1]=Math.max(r[0][1],e[0]),r[1][1]=Math.max(r[1][1],e[1]),e}),xyMinMax:r}}},L_={lineX:M_(th,0),lineY:M_(th,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return P(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}},O_=D,N_="\0_ec_hist_store",E_=function(t,e,n,i,r,a){t=t||0;var o=n[1]-n[0];if(null!=r&&(r=rh(r,[0,o])),null!=a&&(a=Math.max(a,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);r=a=rh(s=rh(s,[0,o]),[r,a]),i=0}e[0]=rh(e[0],n),e[1]=rh(e[1],n);var l=ih(e,i);e[i]+=t;var u=r||0,h=n.slice();l.sign<0?h[0]+=u:h[1]-=u,e[i]=rh(e[i],h);var c=ih(e,i);null!=r&&(c.sign!==l.sign||c.span<r)&&(e[1-i]=e[i]+l.sign*r);c=ih(e,i);return null!=a&&c.span>a&&(e[1-i]=e[i]+c.sign*a),e};Wp.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var z_,B_,R_,F_,V_=["cartesian2d","polar","singleAxis"],G_=(B_=["axisIndex","axis","index","id"],R_=P(z_=(z_=["x","y","z","radius","angle","single"]).slice(),tr),F_=P(B_=(B_||[]).slice(),tr),function(r,a){D(z_,function(t,e){for(var n={name:t,capital:R_[e]},i=0;i<B_.length;i++)n[B_[i]]=t+F_[i];r.call(a,n)})}),H_=D,W_=function(t){return t.sort(function(t,e){return t-e}),t},X_=function(t,e,n,i){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n};X_.prototype={constructor:X_,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var r=[],a=this.ecModel;return a.eachSeries(function(t){if(i=t.get("coordinateSystem"),0<=p(V_,i)){var e=this._dimName,n=a.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0];this._axisIndex===(n&&n.componentIndex)&&r.push(t)}var i},this),r},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,n,i=this._dimName,r=this.ecModel,a=this.getAxisModel();return t="x"===i||"y"===i?(e="gridIndex","x"===i?"y":"x"):(e="polarIndex","angle"===i?"radius":"angle"),r.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(n=t)}),n},getMinMaxSpan:function(){return b(this._minMaxSpan)},calculateDataWindow:function(r){function t(t,e,n,i,r){var a=r?"Span":"ValueSpan";E_(0,t,n,"all",d["min"+a],d["max"+a]);for(var o=0;o<2;o++)e[o]=Ri(t[o],n,i,!0),r&&(e[o]=s.parse(e[o]))}var a,o=this._dataExtent,s=this.getAxisModel().axis.scale,l=this._dataZoomModel.getRangePropMode(),u=[0,100],h=[],c=[];H_(["start","end"],function(t,e){var n=r[t],i=r[t+"Value"];"percent"===l[e]?(null==n&&(n=u[e]),i=s.parse(Ri(n,u,o))):(a=!0,n=Ri(i=null==i?o[e]:s.parse(i),o,u)),c[e]=i,h[e]=n}),W_(c),W_(h);var d=this._minMaxSpan;return a?t(c,h,o,u,!1):t(h,c,u,o,!0),{valueWindow:c,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=(l=(s=this)._dimName,u=[1/0,-1/0],H_(e,function(t){var n=t.getData();n&&H_(n.mapDimension(l,!0),function(t){var e=n.getApproximateExtent(t);e[0]<u[0]&&(u[0]=e[0]),e[1]>u[1]&&(u[1]=e[1])})}),u[1]<u[0]&&(u=[NaN,NaN]),function(t,e){var n=t.getAxisModel(),i=n.getMin(!0),r="category"===n.get("type"),a=r&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?e[0]=i:r&&(e[0]=0<a?0:NaN);var o=n.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?e[1]=o:r&&(e[1]=0<a?a-1:NaN),n.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0))}(s,u),u),r=(i=this)._minMaxSpan={},a=i._dataZoomModel,o=i._dataExtent,H_(["min","max"],function(t){var e=a.get(t+"Span"),n=a.get(t+"ValueSpan");null!=n&&(n=i.getAxisModel().axis.scale.parse(n)),null!=n?e=Ri(o[0]+n,o,[0,100],!0):null!=e&&(n=Ri(e,[0,100],o,!0)-o[0]),r[t+"Span"]=e,r[t+"ValueSpan"]=n});var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,oh(this)}var i,r,a,o,s,l,u},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,oh(this,!0))},filterData:function(t){if(t===this._dataZoomModel){var e=this._dimName,n=this.getTargetSeriesModels(),i=t.get("filterMode"),c=this._valueWindow;"none"!==i&&H_(n,function(n){var u=n.getData(),h=u.mapDimension(e,!0);h.length&&("weakFilter"===i?u.filterSelf(function(t){for(var e,n,i,r=0;r<h.length;r++){var a=u.get(h[r],t),o=!isNaN(a),s=a<c[0],l=a>c[1];if(o&&!s&&!l)return!0;o&&(i=!0),s&&(e=!0),l&&(n=!0)}return i&&e&&n}):H_(h,function(t){if("empty"===i)n.setData(u=u.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e}));else{var e={};e[t]=c,u.selectRange(e)}}),H_(h,function(t){u.setApproximateExtent(c,t)}))})}}};var Z_=D,U_=G_,Y_=Xa({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=sh(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=sh(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var n=this.option;wh.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),lh(this,t);var i=this.settledOption;Z_([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=i[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var o=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var r=this.dependentModels[t.axis][e],a=r.__dzAxisProxy||(r.__dzAxisProxy=new X_(t.name,e,this,i));o[t.name+"_"+e]=a},this)},_resetTarget:function(){var n=this.option,t=this._judgeAutoMode();U_(function(t){var e=t.axisIndex;n[e]=qe(n[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1;U_(function(t){null!=e[t.axisIndex]&&(n=!0)},this);var t=e.orient;return null==t&&n?"orient":n?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var a=!0,e=this.get("orient",!0),o=this.option,t=this.dependentModels;if(a){var n="vertical"===e?"y":"x";t[n+"Axis"].length?(o[n+"AxisIndex"]=[0],a=!1):Z_(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(o.singleAxisIndex=[t.componentIndex],a=!1)})}a&&U_(function(t){if(a){var e=[],n=this.dependentModels[t.axis];if(n.length&&!e.length)for(var i=0,r=n.length;i<r;i++)"category"===n[i].get("type")&&e.push(i);(o[t.axisIndex]=e).length&&(a=!1)}},this),a&&this.ecModel.eachSeries(function(r){this._isSeriesHasAllAxesTypeOf(r,"value")&&U_(function(t){var e=o[t.axisIndex],n=r.get(t.axisIndex),i=r.get(t.axisId);p(e,n=r.ecModel.queryComponents({mainType:t.axis,index:n,id:i})[0].componentIndex)<0&&e.push(n)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){!e&&(e=t.name)},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(i,r){var a=!0;return U_(function(t){var e=i.get(t.axisIndex),n=this.dependentModels[t.axis][e];n&&n.get("type")===r||(a=!1)},this),a},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20}},getFirstTargetAxisModel:function(){var n;return U_(function(t){if(null==n){var e=this.get(t.axisIndex);e.length&&(n=this.dependentModels[t.axis][e[0]])}},this),n},eachTargetAxis:function(n,i){var r=this.ecModel;U_(function(e){Z_(this.get(e.axisIndex),function(t){n.call(i,e,t,this,r)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(e){var n=this.option,i=this.settledOption;Z_([["start","startValue"],["end","endValue"]],function(t){(null!=e[t[0]]||null!=e[t[1]])&&(n[t[0]]=i[t[0]]=e[t[0]],n[t[1]]=i[t[1]]=e[t[1]])},this),lh(this,e)},setCalculatedRange:function(e){var n=this.option;Z_(["start","startValue","end","endValue"],function(t){n[t]=e[t]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}}),q_=kg.extend({type:"dataZoom",render:function(t,e,n){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){var t=this.dataZoomModel,r=this.ecModel,a={};return t.eachTargetAxis(function(t,e){var n=r.getComponent(t.axis,e);if(n){var i=n.getCoordSysModel();i&&function(t,e,n,i){for(var r,a=0;a<n.length;a++)if(n[a].model===t){r=n[a];break}r||n.push(r={model:t,axisModels:[],coordIndex:i}),r.axisModels.push(e)}(i,n,a[i.mainType]||(a[i.mainType]=[]),i.componentIndex)}},this),a}});Y_.extend({type:"dataZoom.select"}),q_.extend({type:"dataZoom.select"}),Ra({getTargetSeries:function(t){var i=T();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){D(n.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){i.set(t.uid,t)})})}),i},modifyOutputEnd:!0,overallReset:function(t,i){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).reset(n,i)}),t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})})}}),Fa("dataZoom",function(e,t){var n=ah(_(t.eachComponent,t,"dataZoom"),G_,function(t,e){return t.get(e.axisIndex)}),i=[];t.eachComponent({mainType:"dataZoom",query:e},function(t){i.push.apply(i,n(t).nodes)}),D(i,function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})});var j_=Gg.toolbox.dataZoom,$_=D;uh.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:b(j_.title)};var K_=uh.prototype;K_.render=function(t,e,n,i){this.model=t,this.ecModel=e,this.api=n,function(t,e,n,i,r){var a=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(a="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new $u(hh(t.option),e,{include:["grid"]});n._brushController.setPanels(o.makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,i,n),ch(t,e)},K_.onclick=function(t,e,n){Q_[n].call(this)},K_.remove=function(){this._brushController.unmount()},K_.dispose=function(){this._brushController.dispose()};var Q_={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var i=nh(t),e=i[i.length-1];1<i.length&&i.pop();var r={};return O_(e,function(t,e){for(var n=i.length-1;0<=n;n--)if(t=i[n][e]){r[e]=t;break}}),r}(this.ecModel))}};K_._onBrush=function(t,e){function r(t,e,n){var i,r,a,o=e.getAxis(t),s=o.model,l=(i=t,r=s,c.eachComponent({mainType:"dataZoom",subType:"select"},function(t){var e=t.getAxisModel(i,r.componentIndex);e&&(a=t)}),a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(n=E_(0,n.slice(),o.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(h[l.id]={dataZoomId:l.id,startValue:n[0],endValue:n[1]})}if(e.isEnd&&t.length){var h={},c=this.ecModel;this._brushController.updateCovers([]),new $u(hh(this.model.option),c,{include:["grid"]}).matchOutputRanges(t,c,function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}}),n=h,o=nh(a=c),O_(n,function(t,e){for(var n=o.length-1;0<=n&&!o[n][e];n--);if(n<0){var i=a.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(i){var r=i.getPercentRange();o[0][e]={dataZoomId:e,start:r[0],end:r[1]}}}}),o.push(n),this._dispatchZoomAction(h)}var a,n,o},K_._dispatchZoomAction=function(t){var e=[];$_(t,function(t){e.push(b(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},lu("dataZoom",uh),Ba(function(n){function t(i,r){if(r){var a=i+"Index",o=r[a];null==o||"all"===o||L(o)||(o=!1===o||"none"===o?[]:[o]),t=function(t,e){if(null==o||"all"===o||-1!==p(o,e)){var n={type:"select",$fromToolbox:!0,filterMode:r.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+e};n[a]=e,s.push(n)}},L(e=n[i])||(e=e?[e]:[]),$_(e,t)}var t,e}if(n){var s=n.dataZoom||(n.dataZoom=[]);L(s)||(n.dataZoom=s=[s]);var e=n.toolbox;if(e&&(L(e)&&(e=e[0]),e&&e.feature)){var i=e.feature.dataZoom;t("xAxis",i),t("yAxis",i)}}});var J_=Gg.toolbox.restore;dh.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:J_.title},dh.prototype.onclick=function(t,e){t[N_]=null,e.dispatchAction({type:"restore",from:this.uid})},lu("restore",dh),Fa({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),t.version="4.6.0",t.dependencies={zrender:"4.2.0"},t.PRIORITY=gm,t.init=function(t,e,n){var i=Ea(t);if(i)return i;var r=new xa(t,e,n);return r.id="ec_"+Lm++,km[r.id]=r,an(t,Nm,r.id),function(i){function r(t,e){for(var n=0;n<t.length;n++)t[n][a]=e}var a="__connectUpdateStatus";cm(Sm,function(t,e){i._messageCenter.on(e,function(t){if(Pm[i.group]&&0!==i[a]){if(t&&t.escapeConnect)return;var e=i.makeActionFromEvent(t),n=[];cm(km,function(t){t!==i&&t.group===i.group&&n.push(t)}),r(n,0),cm(n,function(t){1!==t[a]&&t.dispatchAction(e)}),r(n,2)}})})}(r),r},t.connect=function(e){if(L(e)){var t=e;e=null,cm(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+Om++,cm(t,function(t){t.group=e})}return Pm[e]=!0,e},t.disConnect=Na,t.disconnect=Em,t.dispose=function(t){"string"==typeof t?t=km[t]:t instanceof xa||(t=Ea(t)),t instanceof xa&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=Ea,t.getInstanceById=function(t){return km[t]},t.registerTheme=za,t.registerPreprocessor=Ba,t.registerProcessor=Ra,t.registerPostUpdate=function(t){Tm.push(t)},t.registerAction=Fa,t.registerCoordinateSystem=function(t,e){vr.register(t,e)},t.getCoordinateSystemDimensions=function(t){var e=vr.get(t);return e?e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice():void 0},t.registerLayout=Va,t.registerVisual=Ga,t.registerLoading=Wa,t.extendComponentModel=Xa,t.extendComponentView=Za,t.extendSeriesModel=Ua,t.extendChartView=Ya,t.setCanvasCreator=function(t){var e,n;n=t,(e="createCanvas")===e&&(Oh=null),Ph[e]=n},t.registerMap=function(t,e,n){Hu.registerMap(t,e,n)},t.getMap=function(t){var e=Hu.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={}});