!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){function n(){this.constructor=t}if("function"!=typeof e&&null!==e)throw new typeerror("class extends value "+string(e)+" is not a constructor or null");lv(t,e),t.prototype=null===e?object.create(e):(n.prototype=e.prototype,new n)}function n(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;o>r;r++)!i&&r in e||(i||(i=array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||e)}function i(t,e){var n=e.browser,i=t.match(/firefox\/([\d.]+)/),r=t.match(/msie\s([\d.]+)/)||t.match(/trident\/.+?rv:(([\d.]+))/),o=t.match(/edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1],n.newedge=+o[1].split(".")[0]>18),a&&(n.wechat=!0),e.canvassupported=!!document.createelement("canvas").getcontext,e.svgsupported="undefined"!=typeof svgrect,e.toucheventssupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointereventssupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domsupported="undefined"!=typeof document;var s=document.documentelement.style;e.transform3dsupported=(n.ie&&"transition"in s||n.edge||"webkitcssmatrix"in window&&"m11"in new webkitcssmatrix||"mozperspective"in s)&&!("otransition"in s),e.transformsupported=e.transform3dsupported||n.ie&&+n.version>=9}function r(t,e){qv[t]=e}function o(){return zv++}function a(){for(var t=[],e=0;ei;i++)e[i]=s(t[i])}}else if(zv[n]){if(!x(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(var i=0,r=t.length;r>i;i++)e[i]=s(t[i])}}}else if(!nv[n]&&!x(t)&&!l(t)){e={};for(var a in t)t.hasownproperty(a)&&a!==jv&&(e[a]=s(t[a]))}return e}function l(t,e,n){if(!i(e)||!i(t))return n?s(e):t;for(var i in e)if(e.hasownproperty(i)&&i!==jv){var r=t[i],o=e[i];!i(o)||!i(r)||m(o)||m(r)||l(o)||l(r)||a(o)||a(r)||x(o)||x(r)?!n&&i in t||(t[i]=s(e[i])):l(r,o,n)}return t}function u(t,e){for(var n=t[0],i=1,r=t.length;r>i;i++)n=l(n,t[i],e);return n}function h(t,e){if(object.assign)object.assign(t,e);else for(var n in e)e.hasownproperty(n)&&n!==jv&&(t[n]=e[n]);return t}function c(t,e,n){for(var i=w(e),r=0;rn;n++)if(t[n]===e)return n}return-1}function f(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)i.hasownproperty(r)&&(t.prototype[r]=i[r]);t.prototype.constructor=t,t.superclass=e}function d(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,object.getownpropertynames)for(var i=object.getownpropertynames(e),r=0;ri;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasownproperty(o)&&e.call(n,t[o],o,t)}function v(t,e,n){if(!t)return[];if(!e)return v(t);if(t.map&&t.map===uv)return t.map(e,n);for(var i=[],r=0,o=t.length;o>r;r++)i.push(e.call(n,t[r],r,t));return i}function m(t,e,n,i){if(t&&e){for(var r=0,o=t.length;o>r;r++)n=e.call(i,n,t[r],r,t);return n}}function _(t,e,n){if(!t)return[];if(!e)return v(t);if(t.filter&&t.filter===gv)return t.filter(e,n);for(var i=[],r=0,o=t.length;o>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function x(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function w(t){if(!t)return[];if(object.keys)return object.keys(t);var e=[];for(var n in t)t.hasownproperty(n)&&e.push(n);return e}function b(t,e){for(var n=[],i=2;in;n++)if(null!=t[n])return t[n]}function z(t,e){return null!=t?t:e}function f(t,e,n){return null!=t?t:null!=e?e:n}function v(t){for(var e=[],n=1;np;p++){var d=1<a;a++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*me(n,7,0===a?1:0,1<o;o++){var a=document.createelement("div"),s=a.style,l=o%2,u=(o>>1)%2;s.csstext=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendchild(a),n.push(a)}return n}function se(t,e,n){for(var i=n?"invtrans":"trans",r=e[i],o=e.srccoords,a=[],s=[],l=!0,u=0;4>u;u++){var h=t[u].getboundingclientrect(),c=2*u,p=h.left,f=h.top;a.push(p,f),l=l&&o&&p===o[c]&&f===o[c+1],s.push(t[u].offsetleft,t[u].offsettop)}return l&&r?r:(e.srccoords=a,e[i]=n?_e(s,a):_e(a,s))}function me(t){return"canvas"===t.nodename.touppercase()}function te(t,e,n,i){return n=n||{},i||!ev.canvassupported?ce(t,e,n):ev.browser.firefox&&ev.browser.version<"39"&&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):ce(t,e,n),n}function ce(t,e,n){if(ev.domsupported&&t.getboundingclientrect){var i=e.clientx,r=e.clienty;if(me(t)){var o=t.getboundingclientrect();return n.zrx=i-o.left,void(n.zry=r-o.top)}if(we(dm,t,i,r))return n.zrx=dm[0],void(n.zry=dm[1])}n.zrx=n.zry=0}function de(t){return t||window.event}function ke(t,e,n){if(e=de(e),null!=e.zrx)return e;var i=e.type,r=i&&i.indexof("touch")>=0;if(r){var o="touchend"!==i?e.targettouches[0]:e.changedtouches[0];o&&te(t,o,e,n)}else{te(t,e,e,n);var a=ie(e);e.zrdelta=a?a/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&fm.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function ie(t){var e=t.wheeldelta;if(e)return e;var n=t.deltax,i=t.deltay;if(null==n||null==i)return e;var r=math.abs(0!==i?i:n),o=i>0?-1:0>i?1:n>0?-1:1;return 3*r*o}function ae(t,e,n,i){pm?t.addeventlistener(e,n,i):t.attachevent("on"+e,n)}function pe(t,e,n,i){pm?t.removeeventlistener(e,n,i):t.detachevent("on"+e,n)}function le(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return math.sqrt(e*e+n*n)}function oe(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function re(t,e,n){return{type:t,event:n,target:e.target,toptarget:e.toptarget,cancelbubble:!1,offsetx:n.zrx,offsety:n.zry,gestureevent:n.gestureevent,pinchx:n.pinchx,pinchy:n.pinchy,pinchscale:n.pinchscale,wheeldelta:n.zrdelta,zrbytouch:n.zrbytouch,which:n.which,stop:be}}function be(){gm(this.event)}function ee(t,e,n){if(t[t.recthover?"rectcontain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreclip&&(o=!0),!o){var a=i.getclippath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hosttarget;i=s?s:i.parent}return r?mm:!0}return!1}function ne(t,e,n){var i=t.painter;return 0>e||e>i.getwidth()||0>n||n>i.getheight()}function ze(t){for(var e=0;t>=mm;)e|=1&t,t>>=1;return t+e}function fe(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;ve(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function ve(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function he(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var o,a=t[i],s=e,l=i;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+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(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function ge(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;s>l&&o(t,e[n+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[n+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function we(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;s>l&&o(t,e[n+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;s>l&&o(t,e[n+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function ue(t,e){function n(t,e){l[c]=t,u[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]u[t+1])break;o(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]=r?a(i,r,o,h):s(i,r,o,h)))}function a(n,i,r,o){var a=0;for(a=0;i>a;a++)p[a]=t[n+a];var s=0,l=r,u=n;if(t[u++]=t[l++],0!==--o){if(1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];return void(t[u+o]=p[s])}for(var c,f,d,g=h;;){c=0,f=0,d=!1;do if(e(t[l],p[s])<0){if(t[u++]=t[l++],f++,c=0,0===--o){d=!0;break}}else if(t[u++]=p[s++],c++,f=0,1===--i){d=!0;break}while(g>(c|f));if(d)break;do{if(c=we(t[l],p,s,i,0,e),0!==c){for(a=0;c>a;a++)t[u+a]=p[s+a];if(u+=c,s+=c,i-=c,1>=i){d=!0;break}}if(t[u++]=t[l++],0===--o){d=!0;break}if(f=ge(p[s],t,l,o,0,e),0!==f){for(a=0;f>a;a++)t[u+a]=t[l+a];if(u+=f,l+=f,o-=f,0===o){d=!0;break}}if(t[u++]=p[s++],1===--i){d=!0;break}g--}while(c>=tm||f>=tm);if(d)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];t[u+o]=p[s]}else{if(0===i)throw new error;for(a=0;i>a;a++)t[u+a]=p[s+a]}}else for(a=0;i>a;a++)t[u+a]=p[s+a]}function s(n,i,r,o){var a=0;for(a=0;o>a;a++)p[a]=t[r+a];var s=n+i-1,l=o-1,u=r+o-1,c=0,f=0;if(t[u--]=t[s--],0!==--i){if(1===o){for(u-=i,s-=i,f=u+1,c=s+1,a=i-1;a>=0;a--)t[f+a]=t[c+a];return void(t[u]=p[l])}for(var d=h;;){var g=0,y=0,v=!1;do if(e(p[l],t[s])<0){if(t[u--]=t[s--],g++,y=0,0===--i){v=!0;break}}else if(t[u--]=p[l--],y++,g=0,1===--o){v=!0;break}while(d>(g|y));if(v)break;do{if(g=i-we(p[l],t,n,i,i-1,e),0!==g){for(u-=g,s-=g,i-=g,f=u+1,c=s+1,a=g-1;a>=0;a--)t[f+a]=t[c+a];if(0===i){v=!0;break}}if(t[u--]=p[l--],1===--o){v=!0;break}if(y=o-ge(t[s],p,0,o,o-1,e),0!==y){for(u-=y,l-=y,o-=y,f=u+1,c=l+1,a=0;y>a;a++)t[f+a]=p[c+a];if(1>=o){v=!0;break}}if(t[u--]=t[s--],0===--i){v=!0;break}d--}while(g>=tm||y>=tm);if(v)break;0>d&&(d=0),d+=2}if(h=d,1>h&&(h=1),1===o){for(u-=i,s-=i,f=u+1,c=s+1,a=i-1;a>=0;a--)t[f+a]=t[c+a];t[u]=p[l]}else{if(0===o)throw new error;for(c=u-(o-1),a=0;o>a;a++)t[c+a]=p[a]}}else for(c=u-(o-1),a=0;o>a;a++)t[c+a]=p[a]}var l,u,h=tm,c=0,p=[];return l=[],u=[],{mergeruns:i,forcemergeruns:r,pushrun:n}}function xe(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var o=0;if(mm>r)return o=fe(t,n,i,e),void he(t,n,i,n+o,e);var a=ue(t,e),s=ze(r);do{if(o=fe(t,n,i,e),s>o){var l=r;l>s&&(l=s),he(t,n,n+l,n+o,e),o=l}a.pushrun(n,o),a.mergeruns(),r-=o,n+=o}while(0!==r);a.forcemergeruns()}}function ye(){im||(im=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function je(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function qe(t){return t=math.round(t),0>t?0:t>255?255:t}function ze(t){return t=math.round(t),0>t?0:t>360?360:t}function ke(t){return 0>t?0:t>1?1:t}function $e(t){var e=t;return qe(e.length&&"%"===e.charat(e.length-1)?parsefloat(e)/100*255:parseint(e,10))}function je(t){var e=t;return ke(e.length&&"%"===e.charat(e.length-1)?parsefloat(e)/100:parsefloat(e))}function qe(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function tn(t,e,n){return t+(e-t)*n}function en(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function nn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function rn(t,e){fm&&nn(fm,e),fm=zm.put(t,fm||e.slice())}function on(t,e){if(t){e=e||[];var n=zm.get(t);if(n)return nn(e,n);t+="";var i=t.replace(/ /g,"").tolowercase();if(i in nm)return nn(e,nm[i]),rn(t,e),e;var r=i.length;if("#"!==i.charat(0)){var o=i.indexof("("),a=i.indexof(")");if(-1!==o&&a+1===r){var s=i.substr(0,o),l=i.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return 3===l.length?en(e,+l[0],+l[1],+l[2],1):en(e,0,0,0,1);u=je(l.pop());case"rgb":return 3!==l.length?void en(e,0,0,0,1):(en(e,$e(l[0]),$e(l[1]),$e(l[2]),u),rn(t,e),e);case"hsla":return 4!==l.length?void en(e,0,0,0,1):(l[3]=je(l[3]),an(l,e),rn(t,e),e);case"hsl":return 3!==l.length?void en(e,0,0,0,1):(an(l,e),rn(t,e),e);default:return}}en(e,0,0,0,1)}else{if(4===r||5===r){var h=parseint(i.slice(1,4),16);return h>=0&&4095>=h?(en(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,5===r?parseint(i.slice(4),16)/15:1),rn(t,e),e):void en(e,0,0,0,1)}if(7===r||9===r){var h=parseint(i.slice(1,7),16);return h>=0&&16777215>=h?(en(e,(16711680&h)>>16,(65280&h)>>8,255&h,9===r?parseint(i.slice(7),16)/255:1),rn(t,e),e):void en(e,0,0,0,1)}}}}function an(t,e){var n=(parsefloat(t[0])%360+360)%360/360,i=je(t[1]),r=je(t[2]),o=.5>=r?r*(i+1):r+i-r*i,a=2*r-o;return e=e||[],en(e,qe(255*qe(a,o,n+1/3)),qe(255*qe(a,o,n)),qe(255*qe(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function sn(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=math.min(i,r,o),s=math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=.5>u?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}function ln(t,e){var n=on(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return dn(n,4===n.length?"rgba":"rgb")}}function un(t){var e=on(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1):void 0}function hn(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=math.floor(i),o=math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=qe(tn(a[0],s[0],l)),n[1]=qe(tn(a[1],s[1],l)),n[2]=qe(tn(a[2],s[2],l)),n[3]=ke(tn(a[3],s[3],l)),n}}function cn(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=math.floor(i),o=math.ceil(i),a=on(e[r]),s=on(e[o]),l=i-r,u=dn([qe(tn(a[0],s[0],l)),qe(tn(a[1],s[1],l)),qe(tn(a[2],s[2],l)),ke(tn(a[3],s[3],l))],"rgba");return n?{color:u,leftindex:r,rightindex:o,value:i}:u}}function pn(t,e,n,i){var r=on(t);return t?(r=sn(r),null!=e&&(r[0]=ze(e)),null!=n&&(r[1]=je(n)),null!=i&&(r[2]=je(i)),dn(an(r),"rgba")):void 0}function fn(t,e){var n=on(t);return n&&null!=e?(n[3]=ke(e),dn(n,"rgba")):void 0}function dn(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 gn(t,e){var n=on(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function yn(){var t=math.round(255*math.random()),e=math.round(255*math.random()),n=math.round(255*math.random());return"rgb("+t+","+e+","+n+")"}function vn(t,e,n){return(e-t)*n+t}function mn(t,e,n){return n>.5?e:t}function _n(t,e,n,i){for(var r=e.length,o=0;r>o;o++)t[o]=vn(e[o],n[o],i)}function xn(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;r>a;a++){t[a]||(t[a]=[]);for(var s=0;o>s;s++)t[a][s]=vn(e[a][s],n[a][s],i)}}function wn(t,e,n,i){for(var r=e.length,o=0;r>o;o++)t[o]=e[o]+n[o]*i;return t}function bn(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;r>a;a++){t[a]||(t[a]=[]);for(var s=0;o>s;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function sn(t,e,n){var i=t,r=e;if(i.push&&r.push){var o=i.length,a=r.length;if(o!==a){var s=o>a;if(s)i.length=a;else for(var l=o;a>l;l++)i.push(1===n?r[l]:wm.call(r[l]))}for(var u=i[0]&&i[0].length,l=0;lh;h++)isnan(i[l][h])&&(i[l][h]=r[l][h])}}function mn(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;n>i;i++)if(t[i]!==e[i])return!1;return!0}function tn(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function cn(t,e,n,i,r,o,a,s){for(var l=e.length,u=0;l>u;u++)t[u]=tn(e[u],n[u],i[u],r[u],o,a,s)}function dn(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;l>h;h++){t[h]||(t[1]=[]);for(var c=0;u>c;c++)t[h][c]=tn(e[h][c],n[h][c],i[h][c],r[h][c],o,a,s)}}function kn(t){if(g(t)){var e=t.length;if(g(t[0])){for(var n=[],i=0;e>i;i++)n.push(wm.call(t[i]));return n}return wm.call(t)}return t}function in(t){return t[0]=math.floor(t[0]),t[1]=math.floor(t[1]),t[2]=math.floor(t[2]),"rgba("+t.join(",")+")"}function an(t){return g(t&&t[0])?2:1}function pn(t){var e=t.pointertype;return"pen"===e||"touch"===e}function ln(t){t.touching=!0,null!=t.touchtimer&&(cleartimeout(t.touchtimer),t.touchtimer=null),t.touchtimer=settimeout(function(){t.touching=!1,t.touchtimer=null},700)}function on(t){t&&(t.zrbytouch=!0)}function rn(t,e){return ke(t.dom,new qm(t,e),!0)}function bn(t,e){for(var n=e,i=!1;n&&9!==n.nodetype&&!(i=n.dombelongtozr||n!==e&&n===t.painterroot);)n=n.parentnode;return i}function en(t,e){var n=e.domhandlers;ev.pointereventssupported?y(km.pointer,function(i){zn(e,i,function(e){n[i].call(t,e)})}):(ev.toucheventssupported&&y(km.touch,function(i){zn(e,i,function(r){n[i].call(t,r),ln(e)})}),y(km.mouse,function(i){zn(e,i,function(r){r=de(r),e.touching||n[i].call(t,r)})}))}function nn(t,e){function n(n){function i(i){i=de(i),bn(t,i.target)||(i=rn(t,i),e.domhandlers[n].call(t,i))}zn(e,n,i,{capture:!0})}ev.pointereventssupported?y($m.pointer,n):ev.toucheventssupported||y($m.mouse,n)}function zn(t,e,n,i){t.mounted[e]=n,t.listeneropts[e]=i,ae(t.domtarget,e,n,i)}function fn(t){var e=t.mounted;for(var n in e)e.hasownproperty(n)&&pe(t.domtarget,n,e[n],t.listeneropts[n]);t.mounted={}}function vn(){return[1,0,0,1,0,0]}function hn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function gn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function wn(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=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]=o,t[3]=a,t[4]=s,t[5]=l,t}function un(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 xn(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=math.sin(n),h=math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function yn(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 jn(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function qn(t){var e=vn();return gn(e,t),e}function zn(t){return t>d_||-d_>t}function kn(t,e){return o_||(o_=kv().getcontext("2d")),a_!==e&&(a_=o_.font=e||l_),o_.measuretext(t)}function $n(t,e){e=e||l_;var n=p_[e];n||(n=p_[e]=new em(500));var i=n.get(t);return null==i&&(i=o_.measuretext(t,e).width,n.put(t,i)),i}function jn(t,e,n,i){var r=$n(t,e),o=ni(e),a=ti(0,r,n),s=ei(0,o,i),l=new a_(a,s,r,o);return l}function qn(t,e,n,i){var r=((t||"")+"").split("\n"),o=r.length;if(1===o)return jn(r[0],e,n,i);for(var a=new a_(0,0,0,0),s=0;s=0?parsefloat(t)/100*e:parsefloat(t):t}function ri(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof array)l+=ii(i[0],n.width),u+=ii(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideleft":l+=r,u+=s,c="middle";break;case"insideright":l+=a-r,u+=s,h="right",c="middle";break;case"insidetop":l+=a/2,u+=r,h="center";break;case"insidebottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insidetopleft":l+=r,u+=r;break;case"insidetopright":l+=a-r,u+=r,h="right";break;case"insidebottomleft":l+=r,u+=o-r,c="bottom";break;case"insidebottomright":l+=a-r,u+=o-r,h="right",c="bottom"}return t=t||{},t.x=l,t.y=u,t.align=h,t.verticalalign=c,t}function oi(t,e,n,i,r){n=n||{};var o=[];ui(t,"",t,e,n,i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,h=function(){s=!0,a--,0>=a&&(s?l&&l():u&&u())},c=function(){a--,0>=a&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var p=0;pi;i++)t[i]=e[i]}function si(t){return g(t[0])}function li(t,e,n){if(g(e[n]))if(g(t[n])||(t[n]=[]),p(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),ai(t[n],e[n],i))}else{var r=e[n],o=t[n],a=r.length;if(si(r))for(var s=r[0].length,l=0;a>l;l++)o[l]?ai(o[l],r[l],s):o[l]=array.prototype.slice.call(r[l]);else ai(o,r,a);o.length=r.length}else t[n]=e[n]}function ui(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=w(i),c=r.duration,f=r.delay,d=r.additive,y=r.settofinal,v=!i(o),m=0;m0||r.force&&!a.length){for(var b=t.animators,s=[],m=0;mm;m++){var _=l[m];k[_]=n[_],y?d[_]=i[_]:n[_]=i[_]}}else if(y){a={};for(var m=0;x>m;m++){var _=l[m];a[_]=kn(n[_]),li(n,i,_)}}var p=new ym(n,!1,d?s:null);p.targetname=e,r.scope&&(p.scope=r.scope),y&&d&&p.whenwithkeys(0,d,l),a&&p.whenwithkeys(0,a,l),p.whenwithkeys(null==c?500:c,s?k:i,l).delay(f||0),t.addanimator(p,e),a.push(p)}}function hi(t){delete w_[t]}function ci(t){if(!t)return!1;if("string"==typeof t)return gn(t,1)r;r++)n+=gn(e[r].color,1);return n/=i,l_>n}return!1}function pi(t,e){var n=new u_(o(),t,e);return w_[n.id]=n,n}function fi(t){t.dispose()}function di(){for(var t in w_)w_.hasownproperty(t)&&w_[t].dispose();w_={}}function gi(t){return w_[t]}function yi(t,e){g_[t]=e}function vi(t){return t.replace(/^\s+|\s+$/g,"")}function mi(t,e,n,i){var r=e[0],o=e[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(r>=t)return a;if(t>=o)return s}else{if(t>=r)return a;if(o>=t)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function _i(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?vi(t).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?0/0:+t}function xi(t,e,n){return null==e&&(e=10),e=math.min(math.max(0,e),q_),t=(+t).tofixed(e),n?t:+t}function wi(t){return t.sort(function(t,e){return t-e}),t}function bi(t){if(t=+t,isnan(t))return 0;if(t>1e-14)for(var e=1,n=0;15>n;n++,e*=10)if(math.round(t*e)/e===t)return n;return si(t)}function si(t){var e=t.tostring().tolowercase(),n=e.indexof("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexof("."),a=0>o?0:r-1-o;return math.max(0,a-i)}function mi(t,e){var n=math.log,i=math.ln10,r=math.floor(n(t[1]-t[0])/i),o=math.round(n(math.abs(e[1]-e[0]))/i),a=math.min(math.max(-r+o,0),20);return isfinite(a)?a:20}function ti(t,e,n){if(!t[e])return 0;var i=m(t,function(t,e){return t+(isnan(e)?0:e)},0);if(0===i)return 0;for(var r=math.pow(10,n),o=v(t,function(t){return(isnan(t)?0:t)/i*r*100}),a=100*r,s=v(o,function(t){return math.floor(t)}),l=m(s,function(t,e){return t+e},0),u=v(o,function(t,e){return t-s[e]});a>l;){for(var h=number.negative_infinity,c=null,p=0,f=u.length;f>p;++p)u[p]>h&&(h=u[p],c=p);++s[c],u[c]=0,++l}return s[e]/r}function ci(t,e){var n=math.max(bi(t),bi(e)),i=t+e;return n>q_?i:xi(i,n)}function di(t){var e=2*math.pi;return(t%e+e)%e}function ki(t){return t>-j_&&j_>t}function ii(t){if(t instanceof date)return t;if("string"==typeof t){var e=k_.exec(t);if(!e)return new date(0/0);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]?+e[7].substring(0,3):0))}return new date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}return new date(null==t?0/0:math.round(t))}function ai(t){return math.pow(10,pi(t))}function pi(t){if(0===t)return 0;var e=math.floor(math.log(t)/math.ln10);return t/math.pow(10,e)>=10&&e++,e}function li(t,e){var n,i=pi(t),r=math.pow(10,i),o=t/r;return n=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=n*r,i>=-20?+t.tofixed(0>i?-i:0):t}function oi(t,e){var n=(t.length-1)*e+1,i=math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function ri(t){function e(t,n,i){return t.interval[i]s;s++)o[s]<=n&&(o[s]=n,a[s]=s?1:1-i),n=o[s],i=a[s];o[0]===o[1]&&a[0]*a[1]!==1?t.splice(r,1):r++}return t}function bi(t){var e=parsefloat(t);return e==t&&(0!==e||"string"!=typeof t||t.indexof("x")<=0)?e:0/0}function ei(t){return!isnan(bi(t))}function ni(){return math.round(9*math.random())}function zi(t,e){return 0===e?t:zi(e,t%e)}function fi(t,e){return null==t?e:null==e?t:t*e/zi(t,e)}function vi(t){throw new error(t)}function hi(t){return t instanceof array?t:null==t?[]:[t]}function gi(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;r>i;i++){var o=n[i];!t.emphasis[e].hasownproperty(o)&&t[e].hasownproperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function wi(t){return!i(t)||m(t)||t instanceof date?t:t.value}function ui(t){return i(t)&&!(t instanceof array)}function xi(t,e,n){var i="normalmerge"===n,r="replacemerge"===n,o="replaceall"===n;t=t||[],e=(e||[]).slice();var a=y();y(e,function(t,n){return i(t)?void 0:void(e[n]=null)});var s=yi(t,a,n);return(i||r)&&ji(s,t,a,e),i&&qi(s,e),i||r?zi(s,e,r):o&&ki(s,e),$i(s),s}function yi(t,e,n){var i=[];if("replaceall"===n)return i;for(var r=0;rr?n:i;for(var s=[],l=n,u=i,h=math.max(l?l.length:0,u.length),c=0;h>c;++c){var p=t.getdimensioninfo(c);if(p&&"ordinal"===p.type)s[c]=(1>r&&l?l:u)[c];else{var f=l&&l[c]?l[c]:0,d=u[c],a=vn(f,d,r);s[c]=xi(a,o?math.max(bi(f),bi(d)):e)}}return s}function dr(t){var e={main:"",sub:""};if(t){var n=t.split(nx);e.main=n[0]||"",e.sub=n[1]||""}return e}function gr(t){g(/^[a-za-z0-9_]+([.][a-za-z0-9_]+)?$/.test(t),'componenttype "'+t+'" illegal')}function yr(t){return!(!t||!t[rx])}function vr(t){t.$constructor=t,t.extend=function(t){function e(){for(var r=[],o=0;o=0||r&&p(r,s)<0)){var l=n.getshallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}function tr(t){if("string"==typeof t){var e=ux.get(t);return e&&e.image}return t}function cr(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!n)return e;var o=ux.get(t),a={hostel:n,cb:i,cbpayload:r};return o?(e=o.image,!kr(e)&&o.pending.push(a)):(e=new image,e.onload=e.onerror=dr,ux.put(t,e.__cachedimgobj={image:e,pending:[a]}),e.src=e.__zrimagesrc=t),e}return t}return e}function dr(){var t=this.__cachedimgobj;this.onload=this.onerror=this.__cachedimgobj=null;for(var e=0;ea;a++)o[a]=pr(o[a],r);return o.join("\n")}function ar(t,e,n,i){i=i||{};var r=h({},i);r.font=e,n=z(n,"..."),r.maxiterations=z(i.maxiterations,2);var o=r.minchar=z(i.minchar,0);r.cncharwidth=$n("国",e);var a=r.asccharwidth=$n("a",e);r.placeholder=z(i.placeholder,"");for(var s=t=math.max(0,t-1),l=0;o>l&&s>=a;l++)s-=a;var u=$n(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsiswidth=u,r.contentwidth=s,r.containerwidth=t,r}function pr(t,e){var n=e.containerwidth,i=e.font,r=e.contentwidth;if(!n)return"";var o=$n(t,i);if(n>=o)return t;for(var a=0;;a++){if(r>=o||a>=e.maxiterations){t+=e.ellipsis;break}var s=0===a?lr(t,r,e.asccharwidth,e.cncharwidth):o>0?math.floor(t.length*r/o):0;t=t.substr(0,s),o=$n(t,i)}return""===t&&(t=e.placeholder),t}function lr(t,e,n,i){for(var r=0,o=0,a=t.length;a>o&&e>r;o++){var s=t.charcodeat(o);r+=s>=0&&127>=s?n:i}return o}function or(t,e){null!=t&&(t+="");var n,i=e.overflow,r=e.padding,o=e.font,a="truncate"===i,s=ni(o),l=z(e.lineheight,s),u="truncate"===e.lineoverflow,h=e.width;n=null!=h&&"break"===i||"breakall"===i?t?zr(t,e.font,h,"breakall"===i,0).lines:[]:t?t.split("\n"):[];var c=n.length*l,p=z(e.height,c);if(c>p&&u){var f=math.floor(p/l);n=n.slice(0,f)}var d=p,g=h;if(r&&(d+=r[0]+r[2],null!=g&&(g+=r[1]+r[3])),t&&a&&null!=g)for(var y=ar(h,o,e.ellipsis,{minchar:e.truncateminchar,placeholder:e.placeholder}),v=0;vu&&br(i,t.substring(u,h),e,l),br(i,r[2],e,l,r[1]),u=hx.lastindex}ua){w>0?(m.tokens=m.tokens.slice(0,w),n(m,x,_),i.lines=i.lines.slice(0,v+1)):i.lines=i.lines.slice(0,v);break t}var k=s.width,i=null==k||"auto"===k;if("string"==typeof k&&"%"===k.charat(k.length-1))b.percentwidth=k,c.push(b),b.contentwidth=$n(b.text,c);else{if(i){var a=s.backgroundcolor,p=a&&a.image;p&&(p=tr(p),kr(p)&&(b.width=math.max(b.width,p.width*d/p.height)))}var l=g&&null!=o?o-x:null;null!=l&&ll?(b.text="",b.width=b.contentwidth=0):(b.text=ir(b.text,l-t,c,e.ellipsis,{minchar:e.truncateminchar}),b.width=b.contentwidth=$n(b.text,c)):b.contentwidth=$n(b.text,c)}b.width+=t,x+=b.width,s&&(_=math.max(_,b.lineheight))}n(m,x,_)}i.outerwidth=i.width=z(o,f),i.outerheight=i.height=z(a,p),i.contentheight=p,i.contentwidth=f,d&&(i.outerwidth+=d[1]+d[3],i.outerheight+=d[0]+d[2]);for(var v=0;v0&&d+i.accumwidth>i.width&&(o=e.split("\n"),c=!0),i.accumwidth=d}else{var g=zr(e,h,i.width,i.breakall,i.accumwidth);i.accumwidth=g.accumwidth+f,a=g.lineswidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=33&&255>=e}function nr(t){return er(t)?dx[t]?!0:!1:!0}function zr(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+f>n)?h?(s||l)&&(d?(s||(s=l,l="",u=0,h=u),o.push(s),a.push(h-u),l+=p,u+=f,s="",h=u):(l&&(s+=l,h+=u,l="",u=0),o.push(s),a.push(h),s=p,h=f)):d?(o.push(l),a.push(u),l=p,u=f):(o.push(p),a.push(f)):(h+=f,d?(l+=p,u+=f):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumwidth:h,lines:o,lineswidths:a}}function fr(t,e,n){return bx.copy(t.getboundingrect()),t.transform&&bx.applytransform(t.transform),sx.width=e,sx.height=n,!bx.intersect(sx)}function vr(t){return t>-cx&&cx>t}function hr(t){return t>cx||-cx>t}function gr(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function wr(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function ur(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,f=0;if(vr(h)&&vr(c))if(vr(s))o[0]=0;else{var d=-l/s;d>=0&&1>=d&&(o[f++]=d)}else{var g=c*c-4*h*p;if(vr(g)){var y=c/h,d=-s/a+y,v=-y/2;d>=0&&1>=d&&(o[f++]=d),v>=0&&1>=v&&(o[f++]=v)}else if(g>0){var m=tx(g),_=h*s+1.5*a*(-c+m),x=h*s+1.5*a*(-c-m);_=0>_?-mx(-_,ix):mx(_,ix),x=0>x?-mx(-x,ix):mx(x,ix);var d=(-s-(_+x))/(3*a);d>=0&&1>=d&&(o[f++]=d)}else{var w=(2*h*s-3*a*c)/(2*tx(h*h*h)),b=math.acos(w)/3,s=tx(h),m=math.cos(b),d=(-s-2*s*m)/(3*a),v=(-s+s*(m+kx*math.sin(b)))/(3*a),t=(-s+s*(m-kx*math.sin(b)))/(3*a);d>=0&&1>=d&&(o[f++]=d),v>=0&&1>=v&&(o[f++]=v),t>=0&&1>=t&&(o[f++]=t)}}return f}function xr(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(vr(a)){if(hr(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(vr(h))r[0]=-o/(2*a);else if(h>0){var c=tx(h),u=(-o+c)/(2*a),p=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),p>=0&&1>=p&&(r[l++]=p)}}return l}function yr(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function jr(t,e,n,i,r,o,a,s,l,u,h){var c,p,f,d,g,y=.005,v=1/0;ax[0]=l,ax[1]=u;for(var m=0;1>m;m+=.05)px[0]=gr(t,n,r,a,m),px[1]=gr(e,i,o,s,m),d=rm(ax,px),v>d&&(c=m,v=d);v=1/0;for(var _=0;32>_&&!(dx>y);_++)p=c-y,f=c+y,px[0]=gr(t,n,r,a,p),px[1]=gr(e,i,o,s,p),d=rm(px,ax),p>=0&&v>d?(c=p,v=d):(lx[0]=gr(t,n,r,a,f),lx[1]=gr(e,i,o,s,f),g=rm(lx,ax),1>=f&&v>g?(c=f,v=g):y*=.5);return h&&(h[0]=gr(t,n,r,a,c),h[1]=gr(e,i,o,s,c)),tx(v)}function qr(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,f=1;l>=f;f++){var d=f*p,g=gr(t,n,r,a,d),y=gr(e,i,o,s,d),v=g-u,m=y-h;c+=math.sqrt(v*v+m*m),u=g,h=y}return c}function zr(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function kr(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function $r(t,e,n,i,r){var o=t-2*e+n,a=2*(e-t),s=t-i,l=0;if(vr(o)){if(hr(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(vr(h)){var u=-a/(2*o);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=tx(h),u=(-a+c)/(2*o),p=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),p>=0&&1>=p&&(r[l++]=p)}}return l}function jr(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function qr(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function to(t,e,n,i,r,o,a,s,l){var u,h=.005,c=1/0;ax[0]=a,ax[1]=s;for(var p=0;1>p;p+=.05){px[0]=zr(t,n,r,p),px[1]=zr(e,i,o,p);var f=rm(ax,px);c>f&&(u=p,c=f)}c=1/0;for(var d=0;32>d&&!(dx>h);d++){var g=u-h,y=u+h;px[0]=zr(t,n,r,g),px[1]=zr(e,i,o,g);var f=rm(px,ax);if(g>=0&&c>f)u=g,c=f;else{lx[0]=zr(t,n,r,y),lx[1]=zr(e,i,o,y);var v=rm(lx,ax);1>=y&&c>v?(u=y,c=v):h*=.5}}return l&&(l[0]=zr(t,n,r,u),l[1]=zr(e,i,o,u)),tx(c)}function eo(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;a>=c;c++){var p=c*h,f=zr(t,n,r,p),d=zr(e,i,o,p),g=f-s,y=d-l;u+=math.sqrt(g*g+y*y),s=f,l=d}return u}function no(t,e,n){if(0!==t.length){for(var i=t[0],r=i[0],o=i[0],a=i[1],s=i[1],l=1;lf;f++){var d=c(t,n,r,a,hx[f]);l[0]=ox(d,l[0]),u[0]=rx(d,u[0])}p=h(e,i,o,s,gx);for(var f=0;p>f;f++){var g=c(e,i,o,s,gx[f]);l[1]=ox(g,l[1]),u[1]=rx(g,u[1])}l[0]=ox(t,l[0]),u[0]=rx(t,u[0]),l[0]=ox(a,l[0]),u[0]=rx(a,u[0]),l[1]=ox(e,l[1]),u[1]=rx(e,u[1]),l[1]=ox(s,l[1]),u[1]=rx(s,u[1])}function oo(t,e,n,i,r,o,a,s){var l=jr,u=zr,h=rx(ox(l(t,n,r),1),0),c=rx(ox(l(e,i,o),1),0),p=u(t,n,r,h),f=u(e,i,o,c);a[0]=ox(t,r,p),a[1]=ox(e,o,f),s[0]=rx(t,r,p),s[1]=rx(e,o,f)}function ao(t,e,n,i,r,o,a,s,l){var u=ye,h=ve,c=math.abs(r-o);if(1e-4>c%nx&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(zx[0]=ex(r)*n+t,zx[1]=bx(r)*i+e,fx[0]=ex(o)*n+t,fx[1]=bx(o)*i+e,u(s,zx,fx),h(l,zx,fx),r%=nx,0>r&&(r+=nx),o%=nx,0>o&&(o+=nx),r>o&&!a?o+=nx:o>r&&a&&(r+=nx),a){var p=o;o=r,r=p}for(var f=0;o>f;f+=math.pi/2)f>r&&(vx[0]=ex(f)*n+t,vx[1]=bx(f)*i+e,u(s,vx,s),h(l,vx,l))}function so(t){var e=math.round(t/nw*1e8)/1e8;return e%2*nw}function lo(t,e){var n=so(t[0]);0>n&&(n+=iw);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=iw?r=n+iw:e&&n-r>=iw?r=n-iw:!e&&n>r?r=n+(iw-so(n-r)):e&&r>n&&(r=n-(iw-so(r-n))),t[0]=n,t[1]=r}function uo(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0,u=t;if(a>e+s&&a>i+s||e-s>a&&i-s>a||o>t+s&&o>n+s||t-s>o&&n-s>o)return!1;if(t===n)return math.abs(o-t)<=s/2;l=(e-i)/(t-n),u=(t*i-n*e)/(t-n);var h=l*o-a+u,c=h*h/(l*l+1);return s/2*s/2>=c}function ho(t,e,n,i,r,o,a,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>i+c&&h>o+c&&h>s+c||e-c>h&&i-c>h&&o-c>h&&s-c>h||u>t+c&&u>n+c&&u>r+c&&u>a+c||t-c>u&&n-c>u&&r-c>u&&a-c>u)return!1;var p=jr(t,e,n,i,r,o,a,s,u,h,null);return c/2>=p}function co(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;if(l>e+u&&l>i+u&&l>o+u||e-u>l&&i-u>l&&o-u>l||s>t+u&&s>n+u&&s>r+u||t-u>s&&n-u>s&&r-u>s)return!1;var h=to(t,e,n,i,r,o,s,l,null);return u/2>=h}function po(t){return t%=sw,0>t&&(t+=sw),t}function fo(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var h=math.sqrt(s*s+l*l);if(h-u>n||n>h+u)return!1;if(math.abs(i-r)%lw<1e-4)return!0;if(o){var c=i;i=po(r),r=po(c)}else i=po(i),r=po(r);i>r&&(r+=lw);var p=math.atan2(l,s);return 0>p&&(p+=lw),p>=i&&r>=p||p+lw>=i&&r>=p+lw}function go(t,e,n,i,r,o){if(o>e&&o>i||e>o&&i>o)return 0;if(i===e)return 0;var a=(o-e)/(i-e),s=e>i?1:-1;(1===a||0===a)&&(s=e>i?.5:-.5);var l=a*(n-t)+t;return l===r?1/0:l>r?s:0}function yo(t,e){return math.abs(t-e)e&&u>i&&u>o&&u>s||e>u&&i>u&&o>u&&s>u)return 0;var h=ur(e,i,o,s,u,pw);if(0===h)return 0;for(var c=0,p=-1,f=void 0,d=void 0,g=0;h>g;g++){var y=pw[g],v=0===y||1===y?.5:1,m=gr(t,n,r,a,y);l>m||(0>p&&(p=xr(e,i,o,s,fw),fw[1]1&&vo(),f=gr(e,i,o,s,fw[0]),p>1&&(d=gr(e,i,o,s,fw[1]))),c+=2===p?yf?v:-v:yd?v:-v:d>s?v:-v:yf?v:-v:f>s?v:-v)}return c}function _o(t,e,n,i,r,o,a,s){if(s>e&&s>i&&s>o||e>s&&i>s&&o>s)return 0;var l=$r(e,i,o,s,pw);if(0===l)return 0;var u=jr(e,i,o);if(u>=0&&1>=u){for(var h=0,c=zr(e,i,o,u),p=0;l>p;p++){var f=0===pw[p]||1===pw[p]?.5:1,d=zr(t,n,r,pw[p]);a>d||(h+=pw[p]c?f:-f:c>o?f:-f)}return h}var f=0===pw[0]||1===pw[0]?.5:1,d=zr(t,n,r,pw[0]);return a>d?0:e>o?f:-f}function xo(t,e,n,i,r,o,a,s){if(s-=e,s>n||-n>s)return 0;var l=math.sqrt(n*n-s*s);pw[0]=-l,pw[1]=l;var u=math.abs(i-r);if(1e-4>u)return 0;if(u>=hw-1e-4){i=0,r=hw;var h=o?1:-1;return a>=pw[0]+t&&a<=pw[1]+t?h:0}if(i>r){var c=i;i=r,r=c}0>i&&(i+=hw,r+=hw);for(var p=0,f=0;2>f;f++){var d=pw[f];if(d+t>a){var g=math.atan2(s,d),h=o?1:-1;0>g&&(g=hw+g),(g>=i&&r>=g||g+hw>=i&&r>=g+hw)&&(g>math.pi/2&&g<1.5*math.pi&&(h=-h),p+=h)}}return p}function wo(t,e,n,i,r){for(var o,a,s=t.data,l=t.len(),u=0,h=0,c=0,p=0,f=0,d=0;l>d;){var g=s[d++],y=1===d;switch(g===uw.m&&d>1&&(n||(u+=go(h,c,p,f,i,r))),y&&(h=s[d],c=s[d+1],p=h,f=c),g){case uw.m:p=s[d++],f=s[d++],h=p,c=f;break;case uw.l:if(n){if(uo(h,c,s[d],s[d+1],e,i,r))return!0}else u+=go(h,c,s[d],s[d+1],i,r)||0;h=s[d++],c=s[d++];break;case uw.c:if(n){if(ho(h,c,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],e,i,r))return!0}else u+=mo(h,c,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],i,r)||0;h=s[d++],c=s[d++];break;case uw.q:if(n){if(co(h,c,s[d++],s[d++],s[d],s[d+1],e,i,r))return!0}else u+=_o(h,c,s[d++],s[d++],s[d],s[d+1],i,r)||0;h=s[d++],c=s[d++];break;case uw.a:var v=s[d++],m=s[d++],_=s[d++],x=s[d++],w=s[d++],b=s[d++];d+=1;var s=!!(1-s[d++]);o=math.cos(w)*_+v,a=math.sin(w)*x+m,y?(p=o,f=a):u+=go(h,c,o,a,i,r);var m=(i-v)*x/_+v;if(n){if(fo(v,m,x,w,w+b,s,e,m,r))return!0}else u+=xo(v,m,x,w,w+b,s,m,r);h=math.cos(w+b)*_+v,c=math.sin(w+b)*x+m;break;case uw.r:p=h=s[d++],f=c=s[d++];var t=s[d++],c=s[d++];if(o=p+t,a=f+c,n){if(uo(p,f,o,f,e,i,r)||uo(o,f,o,a,e,i,r)||uo(o,a,p,a,e,i,r)||uo(p,a,p,f,e,i,r))return!0}else u+=go(o,f,o,a,i,r),u+=go(p,a,p,f,i,r);break;case uw.z:if(n){if(uo(h,c,p,f,e,i,r))return!0}else u+=go(h,c,p,f,i,r);h=p,c=f}}return n||yo(c,f)||(u+=go(h,c,p,f,i,r)||0),0!==u}function bo(t,e,n){return wo(t,0,!1,e,n)}function so(t,e,n,i){return wo(t,e,!0,n,i)}function mo(t){return!!(t&&"string"!=typeof t&&t.width&&t.height)}function to(t,e){var n,i,r,o,a=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(a+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?n=i=r=o=h:h instanceof array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),i+r>u&&(c=i+r,i*=u/c,r*=u/c),n+o>u&&(c=n+o,n*=u/c,o*=u/c),t.moveto(a+n,s),t.lineto(a+l-i,s),0!==i&&t.arc(a+l-i,s+i,i,-math.pi/2,0),t.lineto(a+l,s+u-r),0!==r&&t.arc(a+l-r,s+u-r,r,0,math.pi/2),t.lineto(a+o,s+u),0!==o&&t.arc(a+o,s+u-o,o,math.pi/2,math.pi),t.lineto(a,s+n),0!==n&&t.arc(a+n,s+n,n,math.pi,1.5*math.pi)}function co(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.linewidth;return s?(sw(2*i)===sw(2*r)&&(t.x1=t.x2=ko(i,s,!0)),sw(2*o)===sw(2*a)&&(t.y1=t.y2=ko(o,s,!0)),t):t}}function do(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.linewidth;return s?(t.x=ko(i,s,!0),t.y=ko(r,s,!0),t.width=math.max(ko(i+o,s,!1)-t.x,0===o?0:1),t.height=math.max(ko(r+a,s,!1)-t.y,0===a?0:1),t):t}}function ko(t,e,n){if(!e)return t;var i=sw(2*t);return(i+sw(e))%2===0?i/2:(i+(n?1:-1))/2}function io(t){return ao(t),y(t.rich,ao),t}function ao(t){if(t){t.font=aw.makefont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||pw[e]?e:"left";var n=t.verticalalign;"center"===n&&(n="middle"),t.verticalalign=null==n||lw[n]?n:"top";var i=t.padding;i&&(t.padding=h(t.padding))}}function po(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorstops?"#000":t}function lo(t){return null==t||"none"===t?null:t.image||t.colorstops?"#000":t}function oo(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function ro(t){var e=t.text;return null!=e&&(e+=""),e}function bo(t){return!!(t.backgroundcolor||t.lineheight||t.borderwidth&&t.bordercolor)}function eo(t){return null!=t&&"none"!==t}function no(t){if("string"!=typeof t)return t;var e=kw.get(t);return e||(e=ln(t,-.1),kw.put(t,e)),e}function zo(t,e,n){t.onhoverstatechange&&(t.hoverstate||0)!==n&&t.onhoverstatechange(e),t.hoverstate=n}function fo(t){zo(t,"emphasis",vw)}function vo(t){t.hoverstate===vw&&zo(t,"normal",zw)}function ho(t){zo(t,"blur",fw)}function go(t){t.hoverstate===fw&&zo(t,"normal",zw)}function wo(t){t.selected=!0}function uo(t){t.selected=!1}function xo(t,e,n){e(t,n)}function yo(t,e,n){xo(t,e,n),t.isgroup&&t.traverse(function(t){xo(t,e,n)})}function jo(t,e,n,i){for(var r=t.style,o={},a=0;a=0,o=!1;if(t instanceof vw){var a=nw(t),s=r?a.selectfill||a.normalfill:a.normalfill,l=r?a.selectstroke||a.normalstroke:a.normalstroke;if(eo(s)||eo(l)){i=i||{};var u=i.style||{};"inherit"===u.fill?(o=!0,i=h({},i),u=h({},u),u.fill=s):!eo(u.fill)&&eo(s)?(o=!0,i=h({},i),u=h({},u),u.fill=no(s)):!eo(u.stroke)&&eo(l)&&(o||(i=h({},i),u=h({},u)),u.stroke=no(l)),i.style=u}}if(i&&null==i.z2){o||(i=h({},i));var c=t.z2emphasislift;i.z2=t.z2+(null!=c?c:ww)}return i}function zo(t,e,n){if(n&&null==n.z2){n=h({},n);var i=t.z2selectlift;n.z2=t.z2+(null!=i?i:uw)}return n}function ko(t,e,n){var i=p(t.currentstates,e)>=0,r=t.style.opacity,o=i?null:jo(t,["opacity"],e,{opacity:1});n=n||{};var a=n.style||{};return null==a.opacity&&(n=h({},n),a=h({opacity:i?r:.1*o.opacity},a),n.style=a),n}function $o(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return qo(this,t,e,n);if("blur"===t)return ko(this,t,n);if("select"===t)return zo(this,t,n)}return n}function jo(t){t.stateproxy=$o;var e=t.gettextcontent(),n=t.gettextguideline();e&&(e.stateproxy=$o),n&&(n.stateproxy=$o)}function qo(t,e){!sa(t,e)&&!t.__highbyouter&&yo(t,fo)}function ta(t,e){!sa(t,e)&&!t.__highbyouter&&yo(t,vo)}function ea(t,e){t.__highbyouter|=1<<(e||0),yo(t,fo)}function na(t,e){!(t.__highbyouter&=~(1<<(e||0)))&&yo(t,vo)}function ia(t){yo(t,ho)}function ra(t){yo(t,go)}function oa(t){yo(t,wo)}function aa(t){yo(t,uo)}function sa(t,e){return t.__highdownsilentontouch&&e.zrbytouch}function la(t){var e=t.getmodel();e.eachcomponent(function(e,n){var i="series"===e?t.getviewofseriesmodel(n):t.getviewofcomponentmodel(n);i.group.traverse(function(t){go(t)})})}function ua(t,e,n,i){function r(t,e){for(var n=0;nl;)a=r.getitemgraphicel(l++);if(a){var u=ow(a);ua(i,u.focus,u.blurscope,n)}else{var h=t.get(["emphasis","focus"]),c=t.get(["emphasis","blurscope"]);null!=h&&ua(i,h,c,n)}}function pa(t,e,n,i){var r={focusself:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return r;var o=i.getmodel().getcomponent(t,e);if(!o)return r;var a=i.getviewofcomponentmodel(o);if(!a||!a.findhighdowndispatchers)return r;for(var s,l=a.findhighdowndispatchers(n),u=0;u0){var o={dataindex:r,seriesindex:t.seriesindex};null!=i&&(o.datatype=i),e.push(o)}})}),e}function ma(t,e,n){wa(t,!0),yo(t,jo),_a(t,e,n)}function _a(t,e,n){var i=ow(t);null!=e?(i.focus=e,i.blurscope=n):i.focus&&(i.focus=null)}function xa(t,e,n,i){n=n||"itemstyle";for(var r=0;r<$w.length;r++){var o=$w[r],a=e.getmodel([o,n]),s=t.ensurestate(o);s.style=i?i(a):a[jw[n]]()}}function wa(t,e){var n=e===!1,i=t;t.highdownsilentontouch&&(i.__highdownsilentontouch=t.highdownsilentontouch),(!n||i.__highdowndispatcher)&&(i.__highbyouter=i.__highbyouter||0,i.__highdowndispatcher=!n)}function ba(t){return!(!t||!t.__highdowndispatcher)}function sa(t){var e=ew[t];return null==e&&32>=bw&&(e=ew[t]=bw++),e}function ma(t){var e=t.type;return e===jw||e===qw||e===zw}function ta(t){var e=t.type;return e===xw||e===yw}function ca(t){var e=nw(t);e.normalfill=t.style.fill,e.normalstroke=t.style.stroke;var n=t.states.select||{};e.selectfill=n.style&&n.style.fill||null,e.selectstroke=n.style&&n.style.stroke||null}function da(t,e){if(e){var n,i,r,o,a,s,l=t.data,u=t.len(),h=qw.m,c=qw.c,p=qw.l,f=qw.r,d=qw.a,g=qw.q;for(r=0,o=0;u>r;){switch(n=l[r++],o=r,i=0,n){case h:i=1;break;case p:i=1;break;case c:i=3;break;case g:i=2;break;case d:var y=e[4],v=e[5],m=eb(e[0]*e[0]+e[1]*e[1]),_=eb(e[2]*e[2]+e[3]*e[3]),x=nb(-e[1]/_,e[0]/m);l[r]*=m,l[r++]+=y,l[r]*=_,l[r++]+=v,l[r++]*=m,l[r++]*=_,l[r++]+=x,l[r++]+=x,r+=2,o=r;break;case f:s[0]=l[r++],s[1]=l[r++],ge(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],ge(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(a=0;i>a;a++){var w=tb[a];w[0]=l[r++],w[1]=l[r++],ge(w,w,e),l[o++]=w[0],l[o++]=w[1]}}t.increaseversion()}}function ka(t){return math.sqrt(t[0]*t[0]+t[1]*t[1])}function ia(t,e){return(t[0]*e[0]+t[1]*e[1])/(ka(t)*ka(e))}function aa(t,e){return(t[0]*e[1]1&&(a*=ib(d),s*=ib(d));var g=(r===o?-1:1)*ib((a*a*s*s-a*a*f*f-s*s*p*p)/(a*a*f*f+s*s*p*p))||0,y=g*a*f/s,v=g*-s*p/a,m=(t+n)/2+ob(c)*y-rb(c)*v,_=(e+i)/2+rb(c)*y+ob(c)*v,x=aa([1,0],[(p-y)/a,(f-v)/s]),w=[(p-y)/a,(f-v)/s],b=[(-1*p-y)/a,(-1*f-v)/s],s=aa(w,b);if(ia(w,b)<=-1&&(s=ab),ia(w,b)>=1&&(s=0),0>s){var m=math.round(s/ab*1e6)/1e6;s=2*ab+m%2*ab}h.adddata(u,m,_,a,s,x,s,c,o)}function la(t){var e=new aw;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=aw.cmd,l=t.match(sb);if(!l)return e;for(var u=0;ug;g++)f[g]=parsefloat(f[g]);for(var y=0;d>y;){var v=void 0,m=void 0,_=void 0,x=void 0,w=void 0,b=void 0,s=void 0,m=i,t=r,c=void 0,d=void 0;switch(c){case"l":i+=f[y++],r+=f[y++],p=s.l,e.adddata(p,i,r);break;case"l":i=f[y++],r=f[y++],p=s.l,e.adddata(p,i,r);break;case"m":i+=f[y++],r+=f[y++],p=s.m,e.adddata(p,i,r),o=i,a=r,c="l";break;case"m":i=f[y++],r=f[y++],p=s.m,e.adddata(p,i,r),o=i,a=r,c="l";break;case"h":i+=f[y++],p=s.l,e.adddata(p,i,r);break;case"h":i=f[y++],p=s.l,e.adddata(p,i,r);break;case"v":r+=f[y++],p=s.l,e.adddata(p,i,r);break;case"v":r=f[y++],p=s.l,e.adddata(p,i,r);break;case"c":p=s.c,e.adddata(p,f[y++],f[y++],f[y++],f[y++],f[y++],f[y++]),i=f[y-2],r=f[y-1];break;case"c":p=s.c,e.adddata(p,f[y++]+i,f[y++]+r,f[y++]+i,f[y++]+r,f[y++]+i,f[y++]+r),i+=f[y-2],r+=f[y-1];break;case"s":v=i,m=r,c=e.len(),d=e.data,n===s.c&&(v+=i-d[c-4],m+=r-d[c-3]),p=s.c,m=f[y++],t=f[y++],i=f[y++],r=f[y++],e.adddata(p,v,m,m,t,i,r);break;case"s":v=i,m=r,c=e.len(),d=e.data,n===s.c&&(v+=i-d[c-4],m+=r-d[c-3]),p=s.c,m=i+f[y++],t=r+f[y++],i+=f[y++],r+=f[y++],e.adddata(p,v,m,m,t,i,r);break;case"q":m=f[y++],t=f[y++],i=f[y++],r=f[y++],p=s.q,e.adddata(p,m,t,i,r);break;case"q":m=f[y++]+i,t=f[y++]+r,i+=f[y++],r+=f[y++],p=s.q,e.adddata(p,m,t,i,r);break;case"t":v=i,m=r,c=e.len(),d=e.data,n===s.q&&(v+=i-d[c-4],m+=r-d[c-3]),i=f[y++],r=f[y++],p=s.q,e.adddata(p,v,m,i,r);break;case"t":v=i,m=r,c=e.len(),d=e.data,n===s.q&&(v+=i-d[c-4],m+=r-d[c-3]),i+=f[y++],r+=f[y++],p=s.q,e.adddata(p,v,m,i,r);break;case"a":_=f[y++],x=f[y++],w=f[y++],b=f[y++],s=f[y++],m=i,t=r,i=f[y++],r=f[y++],p=s.a,pa(m,t,i,r,b,s,_,x,w,p,e);break;case"a":_=f[y++],x=f[y++],w=f[y++],b=f[y++],s=f[y++],m=i,t=r,i+=f[y++],r+=f[y++],p=s.a,pa(m,t,i,r,b,s,_,x,w,p,e)}}("z"===c||"z"===c)&&(p=s.z,e.adddata(p),i=o,r=a),n=p}return e.tostatic(),e}function oa(t){return null!=t.setdata}function ra(t,e){var n=la(t),i=h({},e);return i.buildpath=function(t){if(oa(t)){t.setdata(n.data);var e=t.getcontext();e&&t.rebuildpath(e,1)}else{var e=t;n.rebuildpath(e,1)}},i.applytransform=function(t){da(n,t),this.dirtyshape()},i}function ba(t,e){return new ub(ra(t,e))}function ea(t,n){var i=ra(t,n),r=function(t){function n(e){var n=t.call(this,e)||this;return n.applytransform=i.applytransform,n.buildpath=i.buildpath,n}return e(n,t),n}(ub);return r}function na(t,e){for(var n=[],i=t.length,r=0;i>r;r++){var o=t[r];n.push(o.getupdatedpathproxy(!0))}var a=new vw(e);return a.createpathproxy(),a.buildpath=function(t){if(oa(t)){t.appendpath(n);var e=t.getcontext();e&&t.rebuildpath(e,1)}},a}function za(t,e,n,i,r,o,a,s){var l=n-t,u=i-e,h=a-r,c=s-o,p=c*l-h*u;return mb>p*p?void 0:(p=(h*(e-o)-c*(t-r))/p,[t+p*l,e+p*u])}function fa(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/wb(s*s+l*l),h=u*l,c=-u*s,p=t+h,f=e+c,d=n+h,g=i+c,y=(p+d)/2,v=(f+g)/2,m=d-p,_=g-f,x=m*m+_*_,w=r-o,b=p*g-d*f,s=(0>_?-1:1)*wb(bb(0,w*w*x-b*b)),m=(b*_-m*s)/x,t=(-b*m-_*s)/x,c=(b*_+m*s)/x,d=(-b*m+_*s)/x,k=m-y,i=t-v,a=c-y,p=d-v;return k*k+i*i>a*a+p*p&&(m=c,t=d),{cx:m,cy:t,x01:-h,y01:-c,x11:m*(r/w-1),y11:t*(r/w-1)}}function va(t,e){var n=bb(e.r,0),i=bb(e.r0||0,0),r=n>0,o=i>0;if(r||o){if(r||(n=i,i=0),i>n){var a=n;n=i,i=a}var s,l=!!e.clockwise,u=e.startangle,h=e.endangle;if(u===h)s=0;else{var c=[u,h];lo(c,!l),s=xb(c[0]-c[1])}var p=e.cx,f=e.cy,d=e.cornerradius||0,g=e.innercornerradius||0;if(n>mb)if(s>gb-mb)t.moveto(p+n*vb(u),f+n*yb(u)),t.arc(p,f,n,u,h,!l),i>mb&&(t.moveto(p+i*vb(h),f+i*yb(h)),t.arc(p,f,i,h,u,l));else{var y=xb(n-i)/2,v=sb(y,d),m=sb(y,g),_=m,x=v,w=n*vb(u),b=n*yb(u),s=i*vb(h),m=i*yb(h),t=void 0,c=void 0,d=void 0,k=void 0;if((v>mb||m>mb)&&(t=n*vb(h),c=n*yb(h),d=i*vb(u),k=i*yb(u),db>s)){var i=za(w,b,d,k,t,c,s,m);if(i){var a=w-i[0],p=b-i[1],l=t-i[0],o=c-i[1],r=1/yb(mb((a*l+p*o)/(wb(a*a+p*p)*wb(l*l+o*o)))/2),b=wb(i[0]*i[0]+i[1]*i[1]); _=sb(m,(i-b)/(r-1)),x=sb(v,(n-b)/(r+1))}}if(s>mb)if(x>mb){var e=fa(d,k,w,b,n,x,l),n=fa(t,c,s,m,n,x,l);t.moveto(p+e.cx+e.x01,f+e.cy+e.y01),v>x?t.arc(p+e.cx,f+e.cy,x,_b(e.y01,e.x01),_b(n.y01,n.x01),!l):(t.arc(p+e.cx,f+e.cy,x,_b(e.y01,e.x01),_b(e.y11,e.x11),!l),t.arc(p,f,n,_b(e.cy+e.y11,e.cx+e.x11),_b(n.cy+n.y11,n.cx+n.x11),!l),t.arc(p+n.cx,f+n.cy,x,_b(n.y11,n.x11),_b(n.y01,n.x01),!l))}else t.moveto(p+w,f+b),t.arc(p,f,n,u,h,!l);else t.moveto(p+w,f+b);if(i>mb&&s>mb)if(_>mb){var e=fa(s,m,t,c,i,-_,l),n=fa(w,b,d,k,i,-_,l);t.lineto(p+e.cx+e.x01,f+e.cy+e.y01),m>_?t.arc(p+e.cx,f+e.cy,_,_b(e.y01,e.x01),_b(n.y01,n.x01),!l):(t.arc(p+e.cx,f+e.cy,_,_b(e.y01,e.x01),_b(e.y11,e.x11),!l),t.arc(p,f,i,_b(e.cy+e.y11,e.cx+e.x11),_b(n.cy+n.y11,n.cx+n.x11),l),t.arc(p+n.cx,f+n.cy,_,_b(n.y11,n.x11),_b(n.y01,n.x01),!l))}else t.lineto(p+s,f+m),t.arc(p,f,i,h,u,l);else t.lineto(p+s,f+m)}else t.moveto(p,f);t.closepath()}}function ha(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function ga(t,e){for(var n=t.length,i=[],r=0,o=1;n>o;o++)r+=ce(t[o-1],t[o]);var a=r/2;a=n>a?n:a;for(var o=0;a>o;o++){var s=o/(a-1)*(e?n:n-1),l=math.floor(s),u=s-l,h=void 0,c=t[l%n],p=void 0,f=void 0;e?(h=t[(l-1+n)%n],p=t[(l+1)%n],f=t[(l+2)%n]):(h=t[0===l?l:l-1],p=t[l>n-2?n-1:l+1],f=t[l>n-3?n-1:l+2]);var d=u*u,g=u*d;i.push([ha(h[0],c[0],p[0],f[0],u,d,g),ha(h[1],c[1],p[1],f[1],u,d,g)])}return i}function wa(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,f=t.length;f>p;p++)ye(a,a,t[p]),ve(s,s,t[p]);ye(a,a,i[0]),ve(s,s,i[1])}for(var p=0,f=t.length;f>p;p++){var d=t[p];if(n)r=t[p?p-1:f-1],o=t[(p+1)%f];else{if(0===p||p===f-1){l.push(q(t[p]));continue}r=t[p-1],o=t[p+1]}ie(u,o,r),ue(u,u,e);var g=ce(d,r),y=ce(d,o),v=g+y;0!==v&&(g/=v,y/=v),ue(h,u,-g),ue(c,u,y);var m=ee([],d,h),_=ee([],d,c);i&&(ve(m,m,a),ye(m,m,s),ve(_,_,a),ye(_,_,s)),l.push(m),l.push(_)}return n&&l.push(l.shift()),l}function ua(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i&&"spline"!==i){var o=wa(r,i,n,e.smoothconstraint);t.moveto(r[0][0],r[0][1]);for(var a=r.length,s=0;(n?a:a-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=r[(s+1)%a];t.beziercurveto(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===i&&(r=ga(r,n)),t.moveto(r[0][0],r[0][1]);for(var s=1,c=r.length;c>s;s++)t.lineto(r[s][0],r[s][1])}n&&t.closepath()}}function xa(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?wr:gr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?wr:gr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?kr:zr)(t.x1,t.cpx1,t.x2,e),(n?kr:zr)(t.y1,t.cpy1,t.y2,e)]}function ya(t,e,n,i,r){var o;if(e&&e.ecmodel){var a=e.ecmodel.getupdatepayload();o=a&&a.animation}var s=e&&e.isanimationenabled(),l="update"===t;if(s){var u=void 0,h=void 0,c=void 0;i?(u=z(i.duration,200),h=z(i.easing,"cubicout"),c=0):(u=e.getshallow(l?"animationdurationupdate":"animationduration"),h=e.getshallow(l?"animationeasingupdate":"animationeasing"),c=e.getshallow(l?"animationdelayupdate":"animationdelay")),o&&(null!=o.duration&&(u=o.duration),null!=o.easing&&(h=o.easing),null!=o.delay&&(c=o.delay)),"function"==typeof c&&(c=c(n,r)),"function"==typeof u&&(u=u(n));var p={duration:u||0,delay:c,easing:h};return p}return null}function ja(t,e,n,i,r,o,a){var s,l=!1;"function"==typeof r?(a=o,o=r,r=null):i(r)&&(o=r.cb,a=r.during,l=r.isfrom,s=r.removeopt,r=r.dataindex);var u="remove"===t;u||e.stopanimation("remove");var h=ya(t,i,r,u?s||{}:null,i&&i.getanimationdelayparams?i.getanimationdelayparams(e,r):null);if(h&&h.duration>0){var c=h.duration,p=h.delay,f=h.easing,d={duration:c,delay:p||0,easing:f,done:o,force:!!o||!!a,settofinal:!u,scope:t,during:a};l?e.animatefrom(n,d):e.animateto(n,d)}else e.stopanimation(),!l&&e.attr(n),a&&a(1),o&&o()}function qa(t,e,n,i,r,o){ja("update",t,e,n,i,r,o)}function za(t,e,n,i,r,o){ja("init",t,e,n,i,r,o)}function ka(t){if(!t.__zr)return!0;for(var e=0;emath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function ds(t){return!t.isgroup}function gs(t){return null!=t.shape}function ys(t,e,n){function i(t){var e={};return t.traverse(function(t){ds(t)&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return gs(t)&&(e.shape=h({},t.shape)),e}if(t&&e){var o=i(t);e.traverse(function(t){if(ds(t)&&t.anid){var e=o[t.anid];if(e){var i=r(t);t.attr(r(e)),qa(t,i,n,ow(t).dataindex)}}})}}function vs(t,e){return v(t,function(t){var n=t[0];n=qb(n,e.x),n=ts(n,e.x+e.width);var i=t[1];return i=qb(i,e.y),i=ts(i,e.y+e.height),[n,i]})}function ms(t,e){var n=qb(t.x,e.x),i=ts(t.x+t.width,e.x+e.width),r=qb(t.y,e.y),o=ts(t.y+t.height,e.y+e.height);return i>=n&&o>=r?{x:n,y:r,width:i-n,height:o-r}:void 0}function _s(t,e,n){var i=h({recthover:!0},e),r=i.style={strokenoscale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexof("image://")?(r.image=t.slice(8),c(r,n),new bw(i)):os(t.replace("path://",""),i,n,"center"):void 0}function xs(t,e,n,i,r){for(var o=0,a=r[r.length-1];og||g>1)return!1;var y=bs(f,d,h,c)/p;return 0>y||y>1?!1:!0}function bs(t,e,n,i){return t*i-n*e}function ss(t){return 1e-6>=t&&t>=-1e-6}function ms(t){var e=t.itemtooltipoption,n=t.componentmodel,i=t.itemname,r=c(e)?{formatter:e}:e,o=n.maintype,a=n.componentindex,s={componenttype:o,name:i,$vars:["name"]};s[o+"index"]=a;var l=t.formatterparamsextra;l&&y(w(l),function(t){z(s,t)||(s[t]=l[t],s.$vars.push(t))});var u=ow(t.el);u.componentmaintype=o,u.componentindex=a,u.tooltipconfig={name:i,option:c({content:i,formatterparams:s},r)}}function ts(t,e){for(var n=0;n=0&&n.push(t)}),n}t.topologicaltravel=function(t,e,i,r){function o(t){l[t].entrycount--,0===l[t].entrycount&&u.push(t)}function a(t){h[t]=!0,o(t)}if(t.length){var s=n(e),l=s.graph,u=s.noentrylist,h={};for(y(t,function(t){h[t]=!0});u.length;){var c=u.pop(),p=l[c],f=!!h[c];f&&(i.call(r,c,p.originaldeps.slice()),delete h[c]),y(p.successor,f?a:o)}y(h,function(){var t="";throw new error(t)})}}}function fs(t,e){return l(l({},t,!0),e,!0)}function vs(t,e){t=t.touppercase(),ks[t]=new xs(e),ds[t]=e}function hs(t){if(c(t)){var e=ds[t.touppercase()]||{};return t===ms||t===ts?s(e):l(s(e),s(ds[cs]),!1)}return l(s(t),s(ds[cs]),!1)}function gs(t){return ks[t]}function ws(){return ks[cs]}function us(t,e){return t+="","0000".substr(0,e-t.length)+t}function xs(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function ys(t){return t===xs(t)}function js(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function qs(t,e,n,i){var r=ii(t),o=r[js(n)](),a=r[qs(n)]()+1,s=math.floor((a-1)/4)+1,l=r[tl(n)](),u=r["get"+(n?"utc":"")+"day"](),h=r[el(n)](),c=(h-1)%12+1,p=r[nl(n)](),f=r[il(n)](),d=r[rl(n)](),g=i instanceof xs?i:gs(i||is)||ws(),y=g.getmodel("time"),v=y.get("month"),m=y.get("monthabbr"),_=y.get("dayofweek"),x=y.get("dayofweekabbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{q}/g,s+"").replace(/{mmmm}/g,v[a-1]).replace(/{mmm}/g,m[a-1]).replace(/{mm}/g,us(a,2)).replace(/{m}/g,a+"").replace(/{dd}/g,us(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{hh}/g,us(h,2)).replace(/{h}/g,h+"").replace(/{hh}/g,us(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,us(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,us(f,2)).replace(/{s}/g,f+"").replace(/{sss}/g,us(d,3)).replace(/{s}/g,d+"")}function zs(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=h({},bs);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(m(o)){var f=null==t.level?0:t.level>=0?t.level:o.length+t.level;f=math.min(f,o.length-1),o=o[f]}}return qs(new date(t.value),o,r,i)}function ks(t,e){var n=ii(t),i=n[qs(e)]()+1,r=n[tl(e)](),o=n[el(e)](),a=n[nl(e)](),s=n[il(e)](),l=n[rl(e)](),u=0===l,h=u&&0===s,c=h&&0===a,p=c&&0===o,f=p&&1===r,d=f&&1===i;return d?"year":f?"month":p?"day":c?"hour":h?"minute":u?"second":"millisecond"}function $s(t,e,n){var i="number"==typeof t?ii(t):t;switch(e=e||ks(t,n)){case"year":return i[js(n)]();case"half-year":return i[qs(n)]()>=6?1:0;case"quarter":return math.floor((i[qs(n)]()+1)/4);case"month":return i[qs(n)]();case"day":return i[tl(n)]();case"half-day":return i[el(n)]()/24;case"hour":return i[el(n)]();case"minute":return i[nl(n)]();case"second":return i[il(n)]();case"millisecond":return i[rl(n)]()}}function js(t){return t?"getutcfullyear":"getfullyear"}function qs(t){return t?"getutcmonth":"getmonth"}function tl(t){return t?"getutcdate":"getdate"}function el(t){return t?"getutchours":"gethours"}function nl(t){return t?"getutcminutes":"getminutes"}function il(t){return t?"getutcseconds":"getseconds"}function rl(t){return t?"getutcmilliseconds":"getmilliseconds"}function ol(t){return t?"setutcfullyear":"setfullyear"}function al(t){return t?"setutcmonth":"setmonth"}function sl(t){return t?"setutcdate":"setdate"}function ll(t){return t?"setutchours":"sethours"}function ul(t){return t?"setutcminutes":"setminutes"}function hl(t){return t?"setutcseconds":"setseconds"}function cl(t){return t?"setutcmilliseconds":"setmilliseconds"}function pl(t,e,n,i,r,o,a,s){var l=new aw({style:{text:t,font:e,align:n,verticalalign:i,padding:r,rich:o,overflow:a?"truncate":null,lineheight:s}});return l.getboundingrect()}function fl(t){if(!ei(t))return c(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function dl(t,e){return t=(t||"").tolowercase().replace(/-(.)/g,function(t,e){return e.touppercase()}),e&&t&&(t=t.charat(0).touppercase()+t.slice(1)),t}function gl(t){return null==t?"":(t+"").replace(hs,function(t,e){return gs[e]})}function yl(t,e,n){function i(t){return t&&w(t)?t:"-"}function r(t){return!(null==t||isnan(t)||!isfinite(t))}var o="{yyyy}-{mm}-{dd} {hh}:{mm}:{ss}",a="time"===e,s=t instanceof date;if(a||s){var l=a?ii(t):t;if(!isnan(+l))return qs(l,o,n);if(s)return"-"}if("ordinal"===e)return d(t)?i(t):k(t)&&r(t)?t+"":"-";var u=bi(t);return r(u)?fl(u):d(t)?i(t):"boolean"==typeof t?t+"":"-"}function vl(t,e,n){m(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;os;s++)for(var l=0;l':'';var a=n.markerid||"markerx";return{rendermode:o,content:"{"+a+"|} ",style:"subitem"===r?{width:4,height:4,borderradius:2,backgroundcolor:i}:{width:10,height:10,borderradius:5,backgroundcolor:i}}}function _l(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="mm-dd\nyyyy");var i=ii(e),r=n?"utc":"",o=i["get"+r+"fullyear"](),a=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=t.replace("mm",us(a,2)).replace("m",a).replace("yyyy",o).replace("yy",o%100+"").replace("dd",us(s,2)).replace("d",s).replace("hh",us(l,2)).replace("h",l).replace("mm",us(u,2)).replace("m",u).replace("ss",us(h,2)).replace("s",h).replace("sss",us(c,3))}function xl(t){return t?t.charat(0).touppercase()+t.substr(1):t}function wl(t,e){return e=e||"transparent",c(t)?t:i(t)?t.colorstops&&(t.colorstops[0]||{}).color||e:e}function bl(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}function sl(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachchild(function(l,u){var h,c,p=l.getboundingrect(),f=e.childat(u+1),d=f&&f.getboundingrect();if("horizontal"===t){var g=p.width+(d?-d.x+p.x:0);h=o+g,h>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=math.max(s,p.height)}else{var y=p.height+(d?-d.y+p.y:0);c=a+y,c>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markredraw(),"horizontal"===t?o=h+n:a=c+n)})}function ml(t,e,n){n=vs(n||0);var i=e.width,r=e.height,o=_i(t.left,i),a=_i(t.top,r),s=_i(t.right,i),l=_i(t.bottom,r),u=_i(t.width,i),h=_i(t.height,r),c=n[2]+n[0],p=n[1]+n[3],f=t.aspect;switch(isnan(u)&&(u=i-s-p-o),isnan(h)&&(h=r-l-c-a),null!=f&&(isnan(u)&&isnan(h)&&(f>i/r?u=.8*i:h=.8*r),isnan(u)&&(u=f*h),isnan(h)&&(h=u/f)),isnan(o)&&(o=i-s-u-p),isnan(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isnan(u)&&(u=i-p-o-(s||0)),isnan(h)&&(h=r-c-a-(l||0));var d=new a_(o+n[3],a+n[0],u,h);return d.margin=n,d}function tl(t){var e=t.layoutmode||t.constructor.layoutmode;return i(e)?e:e?{type:e}:null}function cl(t,e,n){function i(n,i){var a={},l=0,u={},h=0,c=2;if(xs(n,function(e){u[e]=t[e]}),xs(n,function(t){r(e,t)&&(a[t]=u[t]=e[t]),o(a,t)&&l++,o(u,t)&&h++}),s[i])return o(e,n[1])?u[n[2]]=null:o(e,n[2])&&(u[n[1]]=null),u;if(h!==c&&l){if(l>=c)return a;for(var p=0;pi;i++)t.push(e+i)}function r(t){var e=t.dimsdef;return e?e.length:1}var o={},a=ol(e);if(!a||!t)return o;var s,l,u=[],h=[],c=e.ecmodel,p=pm(c).datasetmap,f=a.uid+"_"+n.serieslayoutby;t=t.slice(),y(t,function(e,n){var i=i(e)?e:t[n]={name:e};"ordinal"===i.type&&null==s&&(s=n,l=r(i)),o[i.name]=[]});var d=p.get(f)||p.set(f,{categorywaydim:l,valuewaydim:0});return y(t,function(t,e){var n=t.name,a=r(t);if(null==s){var l=d.valuewaydim;i(o[n],l,a),i(h,l,a),d.valuewaydim+=a}else if(s===e)i(o[n],0,a),i(u,0,a);else{var l=d.categorywaydim;i(o[n],l,a),i(h,l,a),d.categorywaydim+=a}}),u.length&&(o.itemname=u),h.length&&(o.seriesname=h),o}function ll(t,e,n){var i={},r=ol(t);if(!r)return i;var o,a=e.sourceformat,s=e.dimensionsdefine;(a===om||a===am)&&y(s,function(t,e){"name"===(i(t)?t.name:t)&&(o=e)});var l=function(){function t(t){return null!=t.v&&null!=t.n}for(var i={},r={},l=[],u=0,h=math.min(5,n);h>u;u++){var c=el(e.data,a,e.serieslayoutby,s,e.startindex,u);l.push(c);var p=c===cm.not;if(p&&null==i.v&&u!==o&&(i.v=u),(null==i.n||i.n===i.v||!p&&l[i.n]===cm.not)&&(i.n=u),t(i)&&l[i.n]!==cm.not)return i;p||(c===cm.might&&null==r.v&&u!==o&&(r.v=u),(null==r.n||r.n===r.v)&&(r.n=u))}return t(i)?i:t(r)?r:null}();if(l){i.value=[l.v];var u=null!=o?o:l.n;i.itemname=[u],i.seriesname=[u]}return i}function ol(t){var e=t.get("data",!0);return e?void 0:ur(t.ecmodel,"dataset",{index:t.get("datasetindex",!0),id:t.get("datasetid",!0)},ex).models[0]}function rl(t){return t.get("transform",!0)||t.get("fromtransformresult",!0)?ur(t.ecmodel,"dataset",{index:t.get("fromdatasetindex",!0),id:t.get("fromdatasetid",!0)},ex).models:[]}function bl(t,e){return el(t.data,t.sourceformat,t.serieslayoutby,t.dimensionsdefine,t.startindex,e)}function el(t,e,n,i,r,o){function a(t){var e=c(t);return null!=t&&isfinite(t)&&""!==t?e?cm.might:cm.not:e&&"-"!==t?cm.must:void 0}var s,l=5;if(p(t))return cm.not;var u,h;if(i){var c=i[o];i(c)?(u=c.name,h=c.type):c(c)&&(u=c)}if(null!=h)return"ordinal"===h?cm.must:cm.not;if(e===rm){var p=t;if(n===hm){for(var f=p[o],d=0;d<(f||[]).length&&l>d;d++)if(null!=(s=a(f[r+d])))return s}else for(var d=0;dd;d++){var g=p[r+d];if(g&&null!=(s=a(g[o])))return s}}else if(e===om){var y=t;if(!u)return cm.not;for(var d=0;dd;d++){var v=y[d];if(v&&null!=(s=a(v[u])))return s}}else if(e===am){var m=t;if(!u)return cm.not;var f=m[u];if(!f||p(f))return cm.not;for(var d=0;dd;d++)if(null!=(s=a(f[d])))return s}else if(e===im)for(var _=t,d=0;d<_.length&&l>d;d++){var v=_[d],x=wi(v);if(!m(x))return cm.not;if(null!=(s=a(x[o])))return s}return cm.not}function nl(t,e,n){var i=fm.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}function zl(t,e){for(var n=t.length,i=0;n>i;i++)if(t[i].length>e)return t[i];return t[n-1]}function fl(t,e,n,i,r,o,a){o=o||t;var s=e(o),l=s.paletteidx||0,u=s.palettenamemap=s.palettenamemap||{};if(u.hasownproperty(r))return u[r];var h=null!=a&&i?zl(i,a):n;if(h=h||n,h&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteidx=(l+1)%h.length,c}}function vl(t,e){e(t).paletteidx=0,e(t).palettenamemap={}}function hl(t,e){if(e){var n=e.seriesindex,i=e.seriesid,r=e.seriesname;return null!=n&&t.componentindex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function gl(t,e){var n=t.color&&!t.colorlayer;y(e,function(e,i){"colorlayer"===i&&n||ks.hasclass(i)||("object"==typeof e?t[i]=t[i]?l(t[i],e,!1):s(e):null==t[i]&&(t[i]=e))})}function wl(t,e,n){if(m(e)){var i=y();return y(e,function(t){if(null!=t){var e=tr(t,null);null!=e&&i.set(t,!0)}}),_(n,function(e){return e&&i.get(e[t])})}var r=tr(e,null);return _(n,function(e){return e&&null!=r&&e[t]===r})}function ul(t,e){return e.hasownproperty("subtype")?_(t,function(t){return t&&t.subtype===e.subtype}):t}function xl(t){var e=y();return t&&y(hi(t.replacemerge),function(t){e.set(t,!0)}),{replacemergemaintypemap:e}}function yl(t,e,n){function i(t){y(e,function(e){e(t,n)})}var r,o,a=[],s=t.baseoption,l=t.timeline,u=t.options,h=t.media,c=!!t.media,p=!!(u||l||s&&s.timeline);return s?(o=s,o.timeline||(o.timeline=l)):((p||c)&&(t.options=t.media=null),o=t),c&&m(h)&&y(h,function(t){t&&t.option&&(t.query?a.push(t):r||(r=t))}),i(o),y(u,function(t){return i(t)}),y(a,function(t){return i(t.option)}),{baseoption:o,timelineoptions:u||[],mediadefault:r,medialist:a}}function jl(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return y(t,function(t,e){var n=e.match(im);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].tolowercase();ql(i[a],t,o)||(r=!1)}}),r}function ql(t,e,n){return"min"===n?t>=e:"max"===n?e>=t:t===e}function zl(t,e){return t.join(",")===e.join(",")}function kl(t){var e=t&&t.itemstyle;if(e)for(var n=0,i=om.length;i>n;n++){var r=om[n],o=e.normal,a=e.emphasis;o&&o[r]&&(t[r]=t[r]||{},t[r].normal?l(t[r].normal,o[r]):t[r].normal=o[r],o[r]=null),a&&a[r]&&(t[r]=t[r]||{},t[r].emphasis?l(t[r].emphasis,a[r]):t[r].emphasis=a[r],a[r]=null)}}function $l(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,c(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r,r.focus&&(t.emphasis.focus=r.focus),r.blurscope&&(t.emphasis.blurscope=r.blurscope))}}function jl(t){$l(t,"itemstyle"),$l(t,"linestyle"),$l(t,"areastyle"),$l(t,"label"),$l(t,"labelline"),$l(t,"upperlabel"),$l(t,"edgelabel")}function ql(t,e){var n=lm(t)&&t[e],i=lm(n)&&n.textstyle;if(i)for(var r=0,o=q_.length;o>r;r++){var a=q_[r];i.hasownproperty(a)&&(n[a]=i[a])}}function tu(t){t&&(jl(t),ql(t,"label"),t.emphasis&&ql(t.emphasis,"label"))}function eu(t){if(lm(t)){kl(t),jl(t),ql(t,"label"),ql(t,"upperlabel"),ql(t,"edgelabel"),t.emphasis&&(ql(t.emphasis,"label"),ql(t.emphasis,"upperlabel"),ql(t.emphasis,"edgelabel"));var e=t.markpoint;e&&(kl(e),tu(e));var n=t.markline;n&&(kl(n),tu(n));var i=t.markarea;i&&tu(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!p(o))for(var a=0;a=0;d--){var g=t[d];if(s||(p=g.data.rawindexof(g.stackedbydimension,c)),p>=0){var y=g.data.getbyrawindex(g.stackresultdimension,p);if(h>=0&&y>0||0>=h&&0>y){h=ci(h,y),f=y;break}}}return i[0]=h,i[1]=f,i})})}function yu(t){return t instanceof nm}function vu(t,e,n){n=n||xu(t);var i=e.serieslayoutby,r=wu(t,n,i,e.sourceheader,e.dimensions),o=new nm({data:t,sourceformat:n,serieslayoutby:i,dimensionsdefine:r.dimensionsdefine,startindex:r.startindex,dimensionsdetectedcount:r.dimensionsdetectedcount,metarawoption:s(e)}); return o}function mu(t){return new nm({data:t,sourceformat:p(t)?sm:im})}function _u(t){return new nm({data:t.data,sourceformat:t.sourceformat,serieslayoutby:t.serieslayoutby,dimensionsdefine:s(t.dimensionsdefine),startindex:t.startindex,dimensionsdetectedcount:t.dimensionsdetectedcount})}function xu(t){var e=lm;if(p(t))e=sm;else if(m(t)){0===t.length&&(e=rm);for(var n=0,i=t.length;i>n;n++){var r=t[n];if(null!=r){if(m(r)){e=rm;break}if(i(r)){e=om;break}}}}else if(i(t))for(var o in t)if(z(t,o)&&g(t[o])){e=am;break}return e}function wu(t,e,n,i,r){var o,a;if(!t)return{dimensionsdefine:su(r),startindex:a,dimensionsdetectedcount:o};if(e===rm){var s=t;"auto"===i||null==i?mu(function(t){null!=t&&"-"!==t&&(c(t)?null==a&&(a=1):a=0)},n,s,10):a=k(i)?i:i?1:0,r||1!==a||(r=[],mu(function(t,e){r[e]=null!=t?t+"":""},n,s,1/0)),o=r?r.length:n===hm?s.length:s[0]?s[0].length:null}else if(e===om)r||(r=bu(t));else if(e===am)r||(r=[],y(t,function(t,e){r.push(e)}));else if(e===im){var l=wi(t[0]);o=m(l)&&l.length||1}return{startindex:a,dimensionsdefine:su(r),dimensionsdetectedcount:o}}function bu(t){for(var e,n=0;nr;r++)t(n[r]?n[r][0]:null,r);else for(var o=n[0]||[],r=0;rr;r++)t(o[r],r)}function tu(t){var e=t.sourceformat;return e===om||e===am}function cu(t,e){var n=vm[iu(t,e)];return n}function du(t,e){var n=gm[iu(t,e)];return n}function ku(t){var e=um[t];return e}function iu(t,e){return t===rm?t+"_"+e:t}function au(t,e,n){if(t){var i=t.getrawdataitem(e);if(null!=i){var r=t.getstore(),o=r.getsource().sourceformat;if(null!=n){var a=t.getdimensionindex(n),s=r.getdimensionproperty(a);return ku(o)(i,a,s)}var l=i;return o===im&&(l=wi(i)),l}}}function pu(t){var e,n;return i(t)?t.type&&(n=t):e=t,{markuptext:e,markupfragment:n}}function lu(t){return new jm(t)}function ou(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+ii(t)),null==t||""===t?0/0:+t)}function ru(t,e){var n=new $m,i=t.data,r=n.sourceformat=t.sourceformat,o=t.startindex,a="";t.serieslayoutby!==um&&vi(a);var s=[],l={},u=t.dimensionsdefine;if(u)y(u,function(t,e){var n=t.name,i={index:e,name:n,displayname:t.displayname};if(s.push(i),null!=n){var r="";z(l,n)&&vi(r),l[n]=i}});else for(var h=0;ho;o++)r.push(n[o].slice());return r}if(e===om){for(var r=[],o=0,a=n.length;a>o;o++)r.push(h({},n[o]));return r}}function nu(t,e,n){return null!=n?"number"==typeof n||!isnan(n)&&!z(e,n)?t[n]:z(e,n)?e[n]:void 0:void 0}function zu(t){return s(t)}function fu(t){t=s(t);var e=t.type,n="";e||vi(n);var i=e.split(":");2!==i.length&&vi(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isbuiltin=r,jm.set(e,t)}function vu(t,e,n){var i=hi(t),r=i.length,o="";r||vi(o);for(var a=0,s=r;s>a;a++){var l=i[a];e=hu(l,e,n,1===r?null:a),a!==s-1&&(e.length=math.max(e.length,1))}return e}function hu(t,e){var n="";e.length||vi(n),i(t)||vi(n);var i=t.type,r=jm.get(i);r||vi(n);var o=v(e,function(t){return ru(t,r)}),a=hi(r.transform({upstream:o[0],upstreamlist:o,config:s(t.config)}));return v(a,function(t,n){var i="";i(t)||vi(i),t.data||vi(i);var r=xu(t.data);gu(r)||vi(i);var o,a=e[0];if(a&&0===n&&!t.dimensions){var s=a.startindex;s&&(t.data=a.data.slice(0,s).concat(t.data)),o={serieslayoutby:um,sourceheader:s,dimensions:a.metarawoption.dimensions}}else o={serieslayoutby:um,sourceheader:0,dimensions:t.dimensions};return vu(t.data,o,null)})}function gu(t){return t===rm||t===om}function wu(t){return t>65535?tt:et}function uu(){return[1/0,-1/0]}function xu(t){var e=t.constructor;return e===array?t.slice():new e(t)}function yu(t,e,n,i,r){var o=rt[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;s>u;u++)l[u]=a[u];t[e]=l}}else t[e]=new o(i)}function ju(t){var e=t.option.transform;e&&u(t.option.transform)}function qu(t){return"series"===t.maintype}function zu(t){throw new error(t)}function ku(t,e){var n=t.color||"#6e7079",i=t.fontsize||12,r=t.fontweight||"400",o=t.color||"#464646",a=t.fontsize||14,s=t.fontweight||"900";return"html"===e?{namestyle:"font-size:"+gl(i+"")+"px;color:"+gl(n)+";font-weight:"+gl(r+""),valuestyle:"font-size:"+gl(a+"")+"px;color:"+gl(o)+";font-weight:"+gl(s+"")}:{namestyle:{fontsize:i,fill:n,fontweight:r},valuestyle:{fontsize:a,fill:o,fontweight:s}}}function $u(t,e){return e.type=t,e}function ju(t){return z(ht,t.type)&&ht[t.type]}function qu(t,e,n,i){var r=[],o=e.blocks||[];g(!o||m(o)),o=o||[];var a=t.ordermode;if(e.sortblocks&&a){o=o.slice();var s={valueasc:"asc",valuedesc:"desc"};if(z(s,a)){var l=new km(s[a],null);o.sort(function(t,e){return l.evaluate(t.sortparam,e.sortparam)})}else"seriesdesc"===a&&o.reverse()}var u=eh(e);return y(o,function(e,n){var o=ju(e).build(t,e,n>0?u.html:0,i);null!=o&&r.push(o)}),r.length?"richtext"===t.rendermode?r.join(u.richtext):nh(r.join(""),n):void 0}function th(t,e,n,i,r,o){if(t){var a=ju(t);a.planlayout(t);var s={useutc:r,rendermode:n,ordermode:i,markupstylecreator:e};return a.build(s,t,0,o)}}function eh(t){var e=t.__gaplevelbetweensubblocks;return{html:lt[e],richtext:ut[e]}}function nh(t,e){var n='
',i="margin: "+e+"px 0 0";return'
'+t+n+"
"}function ih(t,e,n){var i=e?"margin-left:2px":"";return''+gl(t)+""}function rh(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return''+v(t,function(t){return gl(t)}).join("  ")+""}function oh(t,e,n){return t.markupstylecreator.wraprichtextstyle(e,n)}function ah(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupstylecreator.wraprichtextstyle(e.join(" "),o)}function sh(t,e){var n=t.getdata().getitemvisual(e,"style"),i=n[t.visualdrawtype];return wl(i)}function lh(t,e){var n=t.get("padding");return null!=n?n:"richtext"===e?[8,10]:10}function uh(t){var e,n,i,r,o=t.series,a=t.dataindex,s=t.multipleseries,l=o.getdata(),u=l.mapdimensionsall("defaultedtooltip"),h=u.length,c=o.getrawvalue(a),p=m(c),f=sh(o,a);if(h>1||p&&!h){var d=hh(c,o,a,u,f);e=d.inlinevalues,n=d.inlinevaluetypes,i=d.blocks,r=d.inlinevalues[0]}else if(h){var g=l.getdimensioninfo(u[0]);r=e=au(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=er(o),v=y&&o.name||"",m=l.getname(a),_=s?v:m;return $u("section",{header:v,noheader:s||!y,sortparam:r,blocks:[$u("namevalue",{markertype:"item",markercolor:f,name:_,noname:!w(_),value:e,valuetype:n})].concat(i||[])})}function hh(t,e,n,i,r){function o(t,e){var n=a.getdimensioninfo(e);n&&n.otherdims.tooltip!==!1&&(s?h.push($u("namevalue",{markertype:"subitem",markercolor:r,name:n.displayname,value:t,valuetype:n.type})):(l.push(t),u.push(n.type)))}var a=e.getdata(),s=m(t,function(t,e,n){var i=a.getdimensioninfo(n);return t=t||i&&i.tooltip!==!1&&null!=i.displayname},!1),l=[],u=[],h=[];return i.length?y(i,function(t){o(au(a,n,t),t)}):y(t,o),{inlinevalues:l,inlinevaluetypes:u,blocks:h}}function ch(t,e){return t.getname(e)||t.getid(e)}function ph(t){var e=t.name;er(t)||(t.name=fh(t)||e)}function fh(t){var e=t.getrawdata(),n=e.mapdimensionsall("seriesname"),i=[];return y(n,function(t){var n=e.getdimensioninfo(t);n.displayname&&i.push(n.displayname)}),i.join(" ")}function dh(t){return t.model.getrawdata().count()}function gh(t){var e=t.model;return e.setdata(e.getrawdata().cloneshallow()),yh}function yh(t,e){e.outputdata&&t.end>e.outputdata.count()&&e.model.getrawdata().cloneshallow(e.outputdata)}function vh(t,e){y(j(t.changable_methods,t.downsample_methods),function(n){t.wrapmethod(n,s(mh,e))})}function mh(t,e){var n=_h(t);return n&&n.setoutputend((e||this).count()),e}function _h(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 xh(){var t=ar();return function(e){var n=t(e),i=e.pipelinecontext,r=!!n.large,o=!!n.progressiverender,a=n.large=!(!i||!i.large),s=n.progressiverender=!(!i||!i.progressiverender);return!(r===a&&o===s)&&"reset"}}function wh(t,e,n){t&&("emphasis"===e?ea:na)(t,n)}function bh(t,e,n){var i=or(t,e),r=e&&null!=e.highlightkey?sa(e.highlightkey):null;null!=i?y(hi(i),function(e){wh(t.getitemgraphicel(e),n,r)}):t.eachitemgraphicel(function(t){wh(t,n,r)})}function sh(t){return vt(t.model)}function mh(t){var e=t.model,n=t.ecmodel,i=t.api,r=t.payload,o=e.pipelinecontext.progressiverender,a=t.view,s=r&&yt(r).updatemethod,l=o?"incrementalpreparerender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),xt[l]}function th(t,e,n){function i(){h=(new date).gettime(),c=null,t.apply(a,s||[])}var r,o,a,s,l,u=0,h=0,c=null;e=e||0;var p=function(){for(var t=[],p=0;p=0?i():c=settimeout(i,-o),u=r};return p.clear=function(){c&&(cleartimeout(c),c=null)},p.debouncenextcall=function(t){l=t},p}function ch(t,e,n,i){var r=t[e];if(r){var o=r[wt]||r,a=r[st],s=r[bt];if(s!==n||a!==i){if(null==n||!i)return t[e]=o;r=t[e]=th(o,n,"debounce"===i),r[wt]=o,r[st]=i,r[bt]=n}return r}}function dh(t,e){var n=t.visualstylemapper||tt[e];return n?n:(console.warn("unkown style type '"+e+"'."),tt.itemstyle)}function kh(t,e){var n=t.visualdrawtype||ct[e];return n?n:(console.warn("unkown style type '"+e+"'."),"fill")}function ih(t,e){e=e||{},c(e,{text:"loading",textcolor:"#000",fontsize:12,fontweight:"normal",fontstyle:"normal",fontfamily:"sans-serif",maskcolor:"rgba(255, 255, 255, 0.8)",showspinner:!0,color:"#5470c6",spinnerradius:10,linewidth:5,zlevel:0});var n=new v_,i=new cw({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4});n.add(i);var r=new aw({style:{text:e.text,fill:e.textcolor,fontsize:e.fontsize,fontweight:e.fontweight,fontstyle:e.fontstyle,fontfamily:e.fontfamily},zlevel:e.zlevel,z:10001}),o=new cw({style:{fill:"none"},textcontent:r,textconfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});n.add(o);var a;return e.showspinner&&(a=new vb({shape:{startangle:-pt/2,endangle:-pt/2+.1,r:e.spinnerradius},style:{stroke:e.color,linecap:"round",linewidth:e.linewidth},zlevel:e.zlevel,z:10001}),a.animateshape(!0).when(1e3,{endangle:3*pt/2}).start("circularinout"),a.animateshape(!0).when(1e3,{startangle:3*pt/2}).delay(300).start("circularinout"),n.add(a)),n.resize=function(){var n=r.getboundingrect().width,s=e.showspinner?e.spinnerradius:0,l=(t.getwidth()-2*s-(e.showspinner&&n?10:0)-n)/2-(e.showspinner&&n?0:5+n/2)+(e.showspinner?0:n/2)+(n?0:s),u=t.getheight()/2;e.showspinner&&a.setshape({cx:l,cy:u}),o.setshape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setshape({x:0,y:0,width:t.getwidth(),height:t.getheight()})},n.resize(),n}function ah(t){t.overallreset(t.ecmodel,t.api,t.payload)}function ph(t){return t.overallprogress&&lh}function lh(){this.agent.dirty(),this.getdownstream().dirty()}function oh(){this.agent&&this.agent.dirty()}function rh(t){return t.plan?t.plan(t.model,t.ecmodel,t.api,t.payload):null}function bh(t){t.useclearvisual&&t.data.clearallvisual();var e=t.resetdefines=hi(t.reset(t.model,t.ecmodel,t.api,t.payload));return e.length>1?v(e,function(t,e){return eh(e)}):ot}function eh(t){return function(e,n){var i=n.data,r=n.resetdefines[t];if(r&&r.dataeach)for(var o=e.start;o0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:k(t)?[t]:m(t)?t:null):null}function tc(t){var e=t.stroke;return!(null==e||"none"===e||!(t.linewidth>0))}function ec(t){return"string"==typeof t&&"none"!==t}function nc(t){var e=t.fill;return null!=e&&"none"!==e}function ic(t,e){if(null!=e.fillopacity&&1!==e.fillopacity){var n=t.globalalpha;t.globalalpha=e.fillopacity*e.opacity,t.fill(),t.globalalpha=n}else t.fill()}function rc(t,e){if(null!=e.strokeopacity&&1!==e.strokeopacity){var n=t.globalalpha;t.globalalpha=e.strokeopacity*e.opacity,t.stroke(),t.globalalpha=n}else t.stroke()}function oc(t,e,n){var i=cr(e.image,e.__image,n);if(kr(i)){var r=t.createpattern(i,e.repeat||"repeat");if("function"==typeof dommatrix&&r.settransform){var o=new dommatrix;o.rotateself(0,0,(e.rotation||0)/math.pi*180),o.scaleself(e.scalex||1,e.scaley||1),o.translateself(e.x||0,e.y||0),r.settransform(o)}return r}}function ac(t,e,n,i){var r=tc(n),o=nc(n),a=n.strokepercent,s=1>a,l=!e.path;e.silent&&!s||!l||e.createpathproxy();var u=e.path||rc;if(!i){var h=n.fill,c=n.stroke,p=o&&!!h.colorstops,f=r&&!!c.colorstops,d=o&&!!h.image,g=r&&!!c.image,y=void 0,m=void 0,_=void 0,x=void 0,w=void 0;(p||f)&&(w=e.getboundingrect()),p&&(y=e.__dirty?$h(t,h,w):e.__canvasfillgradient,e.__canvasfillgradient=y),f&&(m=e.__dirty?$h(t,c,w):e.__canvasstrokegradient,e.__canvasstrokegradient=m),d&&(_=e.__dirty||!e.__canvasfillpattern?oc(t,h,e):e.__canvasfillpattern,e.__canvasfillpattern=_),g&&(x=e.__dirty||!e.__canvasstrokepattern?oc(t,c,e):e.__canvasstrokepattern,e.__canvasstrokepattern=_),p?t.fillstyle=y:d&&(_?t.fillstyle=_:o=!1),f?t.strokestyle=m:g&&(x?t.strokestyle=x:r=!1)}var b=n.linedash&&n.linewidth>0&&qh(n.linedash,n.linewidth),s=n.linedashoffset,m=!!t.setlinedash,t=e.getglobalscale();if(u.setscale(t[0],t[1],e.segmentignorethreshold),b){var c=n.strokenoscale&&e.getlinescale?e.getlinescale():1;c&&1!==c&&(b=v(b,function(t){return t/c}),s/=c)}var d=!0;(l||e.__dirty&km||b&&!m&&r)&&(u.setdpr(t.dpr),s?u.setcontext(null):(u.setcontext(t),d=!1),u.reset(),b&&!m&&(u.setlinedash(b),u.setlinedashoffset(s)),e.buildpath(u,e.shape,i),u.tostatic(),e.pathupdated()),d&&u.rebuildpath(t,s?a:1),b&&m&&(t.setlinedash(b),t.linedashoffset=s),i||(n.strokefirst?(r&&rc(t,n),o&&ic(t,n)):(o&&ic(t,n),r&&rc(t,n))),b&&m&&t.setlinedash([])}function sc(t,e,n){var i=e.__image=cr(n.image,e.__image,e,e.onload);if(i&&kr(i)){var r=n.x||0,o=n.y||0,a=e.getwidth(),s=e.getheight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.swidth&&n.sheight){var u=n.sx||0,h=n.sy||0;t.drawimage(i,u,h,n.swidth,n.sheight,r,o,a,s)}else if(n.sx&&n.sy){var u=n.sx,h=n.sy,c=a-u,p=s-h;t.drawimage(i,u,h,c,p,r,o,a,s)}else t.drawimage(i,r,o,a,s)}}function lc(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||l_,t.textalign=n.textalign,t.textbaseline=n.textbaseline;var r=void 0;if(t.setlinedash){var o=n.linedash&&n.linewidth>0&&qh(n.linedash,n.linewidth),a=n.linedashoffset;if(o){var s=n.strokenoscale&&e.getlinescale?e.getlinescale():1;s&&1!==s&&(o=v(o,function(t){return t/s}),a/=s),t.setlinedash(o),t.linedashoffset=a,r=!0}}n.strokefirst?(tc(n)&&t.stroketext(i,n.x,n.y),nc(n)&&t.filltext(i,n.x,n.y)):(nc(n)&&t.filltext(i,n.x,n.y),tc(n)&&t.stroketext(i,n.x,n.y)),r&&t.setlinedash([])}}function uc(t,e,n,i,r){var o=!1;if(!i&&(n=n||{},e===n))return!1;if(i||e.opacity!==n.opacity){o||(yc(t,r),o=!0);var a=math.max(math.min(e.opacity,1),0);t.globalalpha=isnan(a)?yx.opacity:a}(i||e.blend!==n.blend)&&(o||(yc(t,r),o=!0),t.globalcompositeoperation=e.blend||yx.blend);for(var s=0;so;o++){var l=i[o];l.beforebrush&&l.beforebrush(),l.innerbeforebrush(),_c(t,l,s,o===a-1),l.innerafterbrush(),l.afterbrush&&l.afterbrush(),s.prevel=l}for(var u=0,h=r.length;h>u;u++){var l=r[u];l.beforebrush&&l.beforebrush(),l.innerbeforebrush(),_c(t,l,s,u===h-1),l.innerafterbrush(),l.afterbrush&&l.afterbrush(),s.prevel=l}e.cleartemporaldisplayables(),e.notclear=!0,t.restore()}function wc(t,e){function n(t){function e(){for(var t=1,e=0,n=m.length;n>e;++e)t=fi(t,m[e]);for(var i=1,e=0,n=v.length;n>e;++e)i=fi(i,v[e].length);t*=i;var r=_*m.length*v.length;return{width:math.max(1,math.min(t,s.maxtilewidth)),height:math.max(1,math.min(r,s.maxtileheight))}}function n(){function t(t,e,n,a,l){var u=o?1:i,h=jh(l,t*u,e*u,n*u,a*u,s.color,s.symbolkeepaspect);o?w.appendchild(r.painter.paintone(h)):mc(d,h)}d&&(d.clearrect(0,0,x.width,x.height),s.backgroundcolor&&(d.fillstyle=s.backgroundcolor,d.fillrect(0,0,x.width,x.height)));for(var e=0,n=0;n=e))for(var a=-_,l=0,u=0,h=0;a=s)break;if(f%2===0){var m=.5*(1-s.symbolsize),t=p+g[h][f]*m,c=a+y[l]*m,d=g[h][f]*s.symbolsize,k=y[l]*s.symbolsize,i=m/2%v[c].length;t(t,c,d,k,v[c][i])}p+=g[h][f],++m,++f,f===g[h].length&&(f=0)}++h,h===g.length&&(h=0)}a+=y[l],++u,++l,l===y.length&&(l=0)}}for(var a=[i],l=!0,u=0;u0?parseint(i,10)/100:i?parsefloat(i):0;var o={};fc(n,o,o);var a=o.stopcolor||n.getattribute("stop-color")||"#000000";e.colorstops.push({offset:r,color:a})}n=n.nextsibling}}function pc(t,e){t&&t.__inheritedstyle&&(e.__inheritedstyle||(e.__inheritedstyle={}),c(e.__inheritedstyle,t.__inheritedstyle))}function lc(t){for(var e=nc(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=nc(a);switch(r=r||vn(),s){case"translate":un(r,r,[parsefloat(l[0]),parsefloat(l[1]||"0")]);break;case"scale":yn(r,r,[parsefloat(l[0]),parsefloat(l[1]||l[0])]);break;case"rotate":xn(r,r,-parsefloat(l[0])*sc);break;case"skewx":var u=math.tan(parsefloat(l[0])*sc);wn(r,[1,0,u,1,0,0],r);break;case"skewy":var h=math.tan(parsefloat(l[0])*sc);wn(r,[1,h,0,1,0,0],r);break;case"matrix":r[0]=parsefloat(l[0]),r[1]=parsefloat(l[1]),r[2]=parsefloat(l[2]),r[3]=parsefloat(l[3]),r[4]=parsefloat(l[4]),r[5]=parsefloat(l[5])}}e.setlocaltransform(r)}}function fc(t,e,n){var i=t.getattribute("style");if(i){mc.lastindex=0;for(var r;null!=(r=mc.exec(i));){var o=r[1],a=z(dc,o)?dc[o]:null;a&&(e[a]=r[2]);var s=z(yc,o)?yc[o]:null;s&&(n[s]=r[2])}}}function vc(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=o,r=s,o=l,i.push([s/n,l/n])}return i}function zc(t,e){return t=jc(t),v(_(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,i=t.geometry,r=[];if("polygon"===i.type){var o=i.coordinates;r.push({type:"polygon",exterior:o[0],interiors:o.slice(1)})}if("multipolygon"===i.type){var o=i.coordinates;y(o,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})})}var a=new kc(n[e||"name"],r,n.cp);return a.properties=n,a})}function kc(t,e){if("china"===t){for(var n=0;n=0)){nk.push(n);var o=lt.wrapstagehandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function sp(t,e){zd[t]=e}function mp(t){r("createcanvas",t)}function tp(t,e,n){wc.registermap(t,e,n)}function cp(t){return wc.getmapforuser(t)}function dp(t){return null==t?0:t.length||1}function kp(t){return t}function ip(t,e){var n={},i=n.encode={},r=y(),o=[],a=[],s={};y(t.dimensions,function(e){var n=t.getdimensioninfo(e),l=n.coorddim;if(l){var u=n.coorddimindex;ap(i,l)[u]=e,n.isextracoord||(r.set(l,1),lp(n.type)&&(o[0]=e),ap(s,l)[u]=t.getdimensionindex(n.name)),n.defaulttooltip&&a.push(e)}nm.each(function(t,e){var r=ap(i,e),o=n.otherdims[e];null!=o&&o!==!1&&(r[o]=n.name)})});var l=[],u={};r.each(function(t,e){var n=i[e];u[e]=n[0],l=l.concat(n)}),n.datadimsoncoord=l,n.datadimindicesoncoord=v(l,function(e){return t.getdimensioninfo(e).storedimindex}),n.encodefirstdimnotextra=u;var h=i.label;h&&h.length&&(o=h.slice());var c=i.tooltip;return c&&c.length?a=c.slice():a.length||(a=o.slice()),i.defaultedlabel=o,i.defaultedtooltip=a,n.useroutput=new fk(s,e),n}function ap(t,e){return t.hasownproperty(e)||(t[e]=[]),t[e]}function pp(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function lp(t){return!("ordinal"===t||"time"===t)}function op(t){return t instanceof vk}function rp(t){for(var e=y(),n=0;n<(t||[]).length;n++){var i=t[n],r=i(i)?i.name:i;null!=r&&null==e.get(r)&&e.set(r,n)}return e}function bp(t){var e=gk(t);return e.dimnamemap||(e.dimnamemap=rp(t.dimensionsdefine))}function ep(t){return t>30}function np(t,e){return zp(t,e).dimensions}function zp(t,e){function n(t){var e=m[t];if(0>e){var n=a[t],i=i(n)?n:{name:n},r=new dk,o=i.name;null!=o&&null!=d.get(o)&&(r.name=r.displayname=o),null!=i.type&&(r.type=i.type),null!=i.displayname&&(r.displayname=i.displayname);var s=l.length;return m[t]=s,r.storedimindex=t,l.push(r),r}return l[e]}function i(t,e,n){null!=nm.get(e)?t.otherdims[e]=n:(t.coorddim=e,t.coorddimindex=n,s.set(e,!0))}function r(t){null==t.name&&(t.name=t.coorddim)}yu(t)||(t=mu(t)),e=e||{};var o=e.coorddimensions||[],a=e.dimensionsdefine||t.dimensionsdefine||[],s=y(),l=[],u=vp(t,o,a,e.dimensionscount),p=e.canomitunuseddimensions&&ep(u),f=a===t.dimensionsdefine,d=f?bp(t):rp(a),g=e.encodedefine;!g&&e.encodedefaulter&&(g=e.encodedefaulter(t,u));for(var v=y(g),m=new nt(u),_=0;__;_++)n(_);v.each(function(t,e){var r=hi(t).slice();if(1===r.length&&!c(r[0])&&r[0]<0)return void v.set(e,!1);var o=v.set(e,[]);y(r,function(t,r){var a=c(t)?d.get(t):t;null!=a&&u>a&&(o[r]=a,i(n(a),e,r))})});var x=0;y(o,function(t){var e,r,o,a;if(c(t))e=t,a={};else{a=t,e=a.name;var s=a.ordinalmeta;a.ordinalmeta=null,a=h({},a),a.ordinalmeta=s,r=a.dimsdef,o=a.otherdims,a.name=a.coorddim=a.coorddimindex=a.dimsdef=a.otherdims=null}var l=v.get(e);if(l!==!1){if(l=hi(l),!l.length)for(var p=0;p<(r&&r.length||1);p++){for(;u>x&&null!=n(x).coorddim;)x++;u>x&&l.push(x++)}y(l,function(t,s){var l=n(t);if(f&&null!=a.type&&(l.type=a.type),i(c(l,a),e,s),null==l.name&&r){var u=r[s];!i(u)&&(u={name:u}),l.name=l.displayname=u.name,l.defaulttooltip=u.defaulttooltip}o&&c(l.otherdims,o)})}});var w=e.generatecoord,b=e.generatecoordcount,s=null!=b;b=w?b||1:0;var m=w||"value";if(p)y(l,function(t){r(t)}),l.sort(function(t,e){return t.storedimindex-e.storedimindex});else for(var t=0;u>t;t++){var d=n(t),k=d.coorddim;null==k&&(d.coorddim=hp(m,s,s),d.coorddimindex=0,(!w||0>=b)&&(d.isextracoord=!0),b--),r(d),null!=d.type||bl(t,t)!==cm.must&&(!d.isextracoord||null==d.otherdims.itemname&&null==d.otherdims.seriesname)||(d.type="ordinal")}return fp(l),new vk({source:t,dimensions:l,fulldimensioncount:u,dimensionomitted:p})}function fp(t){for(var e=y(),n=0;n0&&(i.name=r+(o-1)),o++,e.set(r,o)}}function vp(t,e,n,i){var r=math.max(t.dimensionsdetectedcount||1,e.length,n.length,i||0);return y(e,function(t){var e;i(t)&&(e=t.dimsdef)&&(r=math.max(r,e.length))}),r}function hp(t,e,n){var i=e.data;if(n||i.hasownproperty(t)){for(var r=0;i.hasownproperty(t+r);)r++;t+=r}return e.set(t,!0),t}function gp(t){var e=t.get("coordinatesystem"),n=new ck(e),i=dk[e];return i?(i(t,n,n.axismap,n.categoryaxismap),n):void 0}function wp(t){return"category"===t.get("type")}function up(t,e,n){n=n||{};var i,r,o,a=n.byindex,s=n.stackedcoorddimension;xp(e)?i=e:(r=e.schema,i=r.dimensions,o=e.store);var l,u,h,c,p=!(!t||!t.get("stack"));if(y(i,function(t,e){c(t)&&(i[e]=t={name:t}),p&&!t.isextracoord&&(a||l||!t.ordinalmeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coorddim||(u=t))}),!u||a||l||(a=!0),u){h="__\x00ecstackresult_"+t.id,c="__\x00ecstackedover_"+t.id,l&&(l.createinvertedindices=!0);var f=u.coorddim,d=u.type,g=0;y(i,function(t){t.coorddim===f&&g++});var v={name:h,coorddim:f,coorddimindex:g,type:d,isextracoord:!0,iscalculationcoord:!0,storedimindex:i.length},m={name:c,coorddim:c,coorddimindex:g+1,type:d,isextracoord:!0,iscalculationcoord:!0,storedimindex:i.length+1};r?(o&&(v.storedimindex=o.ensurecalculationdimension(c,d),m.storedimindex=o.ensurecalculationdimension(h,d)),r.appendcalculationdimension(v),r.appendcalculationdimension(m)):(i.push(v),i.push(m))}return{stackeddimension:u&&u.name,stackedbydimension:l&&l.name,isstackedbyindex:a,stackedoverdimension:c,stackresultdimension:h}}function xp(t){return!op(t.schema)}function yp(t,e){return!!e&&e===t.getcalculationinfo("stackeddimension")}function jp(t,e){return yp(t,e)?t.getcalculationinfo("stackresultdimension"):e}function qp(t,e){var n,i=t.get("coordinatesystem"),r=km.get(i);return e&&e.coordsysdims&&(n=v(e.coordsysdims,function(t){var n={name:t},i=e.axismap.get(t);if(i){var r=i.get("type");n.type=pp(r)}return n})),n||(n=r&&(r.getdimensionsinfo?r.getdimensionsinfo():r.dimensions.slice())||["x","y"]),n}function zp(t,e,n){var i,r;return n&&y(t,function(t,o){var a=t.coorddim,s=n.categoryaxismap.get(a);s&&(null==i&&(i=o),t.ordinalmeta=s.getordinalmeta(),e&&(t.createinvertedindices=!0)),null!=t.otherdims.itemname&&(r=!0)}),r||null==i||(t[i].otherdims.itemname=0),i}function kp(t,e,n){n=n||{};var i,r=e.getsourcemanager(),o=!1;t?(o=!0,i=mu(t)):(i=r.getsource(),o=i.sourceformat===im);var a=gp(e),s=qp(e,a),l=n.useencodedefaulter,u=t(l)?l:l?s(pl,s,e):null,h={coorddimensions:s,generatecoord:n.generatecoord,encodedefine:e.getencode(),encodedefaulter:u,canomitunuseddimensions:!o},c=zp(i,h),p=zp(c.dimensions,n.createinvertedindices,a),f=o?null:r.getshareddatastore(c),d=up(e,{schema:c,store:f}),g=new tk(c,e);g.setcalculationinfo(d);var y=null!=p&&$p(i)?function(t,e,n,i){return i===p?n:this.defaultdimvaluegetter(t,e,n,i)}:null;return g.hasitemoption=!1,g.initdata(o?i:f,null,y),g}function $p(t){if(t.sourceformat===im){var e=jp(t.data||[]);return null!=e&&!m(wi(e))}}function jp(t){for(var e=0;ea&&(a=r.interval=n),null!=i&&a>i&&(a=r.interval=i);var s=r.intervalprecision=ef(a),l=r.nicetickextent=[pk(math.ceil(t[0]/a)*a,s),pk(math.floor(t[1]/a)*a,s)];return rf(l,t),r}function ef(t){return bi(t)+2}function nf(t,e,n){t[e]=math.max(math.min(t[e],n[1]),n[0])}function rf(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),nf(t,0,e),nf(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function of(t,e){return t>=e[0]&&t<=e[1]}function af(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function sf(t,e){return t*(e[1]-e[0])+e[0]}function lf(t){return t.get("stack")||bk+t.seriesindex}function uf(t){return t.dim+t.index}function hf(t,e){var n=[];return e.eachseriesbytype(t,function(t){gf(t)&&!yf(t)&&n.push(t)}),n}function cf(t){var e={};y(t,function(t){var n=t.coordinatesystem,i=n.getbaseaxis();if("time"===i.type||"value"===i.type)for(var r=t.getdata(),o=i.dim+"_"+i.index,a=r.getdimensionindex(r.mapdimension(i.dim)),s=r.getstore(),l=0,u=s.count();u>l;++l){var h=s.get(a,l);e[o]?e[o].push(h):e[o]=[h]}});var n={};for(var i in e)if(e.hasownproperty(i)){var r=e[i];if(r){r.sort(function(t,e){return t-e});for(var o=null,a=1;a0&&(o=null===o?s:math.min(o,s))}n[i]=o}}return n}function pf(t){var e=cf(t),n=[];return y(t,function(t){var i,r=t.coordinatesystem,o=r.getbaseaxis(),a=o.getextent();if("category"===o.type)i=o.getbandwidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],u=math.abs(a[1]-a[0]),h=o.scale.getextent(),c=math.abs(h[1]-h[0]);i=l?u/c*l:u}else{var p=t.getdata();i=math.abs(a[1]-a[0])/p.count()}var f=_i(t.get("barwidth"),i),d=_i(t.get("barmaxwidth"),i),g=_i(t.get("barminwidth")||1,i),y=t.get("bargap"),v=t.get("barcategorygap");n.push({bandwidth:i,barwidth:f,barmaxwidth:d,barminwidth:g,bargap:y,barcategorygap:v,axiskey:uf(o),stackid:lf(t)})}),ff(n)}function ff(t){var e={};y(t,function(t){var n=t.axiskey,i=t.bandwidth,r=e[n]||{bandwidth:i,remainedwidth:i,autowidthcount:0,categorygap:null,gap:"20%",stacks:{}},o=r.stacks;e[n]=r;var a=t.stackid;o[a]||r.autowidthcount++,o[a]=o[a]||{width:0,maxwidth:0};var s=t.barwidth;s&&!o[a].width&&(o[a].width=s,s=math.min(r.remainedwidth,s),r.remainedwidth-=s);var l=t.barmaxwidth;l&&(o[a].maxwidth=l);var u=t.barminwidth;u&&(o[a].minwidth=u);var h=t.bargap;null!=h&&(r.gap=h);var c=t.barcategorygap;null!=c&&(r.categorygap=c)});var n={};return y(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandwidth,o=t.categorygap;if(null==o){var a=w(i).length;o=math.max(35-4*a,15)+"%"}var s=_i(o,r),l=_i(t.gap,1),u=t.remainedwidth,h=t.autowidthcount,c=(u-s)/(h+(h-1)*l);c=math.max(c,0),y(i,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,u-=i+l*i,h--}else{var i=c;e&&i>e&&(i=math.min(e,u)),n&&n>i&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}}),c=(u-s)/(h+(h-1)*l),c=math.max(c,0);var p,f=0;y(i,function(t){t.width||(t.width=c),p=t,f+=t.width*(1+l)}),p&&(f-=p.width*l);var d=-f/2;y(i,function(t,i){n[e][i]=n[e][i]||{bandwidth:r,offset:d,width:t.width},d+=t.width*(1+l)})}),n}function df(t,e,n){if(t&&e){var i=t[uf(e)];return null!=i&&null!=n?i[lf(n)]:i}}function gf(t){return t.coordinatesystem&&"cartesian2d"===t.coordinatesystem.type}function yf(t){return t.pipelinecontext&&t.pipelinecontext.large}function vf(t,e){return e.toglobalcoord(e.datatocoord("log"===e.type?1:0))}function mf(t,e,n,i){var r=ii(e),o=ii(n),a=function(t){return $s(r,t,i)===$s(o,t,i)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},h=function(){return u()&&a("hour")},c=function(){return h()&&a("minute")},p=function(){return c()&&a("second")},f=function(){return p()&&a("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return h();case"minute":return c();case"second":return p();case"millisecond":return f()}}function _f(t){return t/=os,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function xf(t){var e=30*os;return t/=e,t>6?6:t>3?3:t>2?2:1}function wf(t){return t/=ls,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function bf(t,e){return t/=e?ps:as,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function sf(t){return li(t,!0)}function mf(t,e,n){var i=new date(t);switch(xs(e)){case"year":case"month":i[al(n)](0);case"day":i[sl(n)](1);case"hour":i[ll(n)](0);case"minute":i[ul(n)](0);case"second":i[hl(n)](0),i[cl(n)](0)}return i.gettime()}function tf(t,e,n,i){function r(t,e,n,r,o,a,s){for(var l=new date(e),u=e,h=l[r]();n>u&&u<=i[1];)s.push({value:u}),h+=t,l[o](h),u=l.gettime();s.push({value:u,notadd:!0})}function o(t,o,a){var s=[],l=!o.length;if(!mf(xs(t),i[0],i[1],n)){l&&(o=[{value:mf(new date(i[0]),t,n)},{value:i[1]}]);for(var u=0;u1&&0===u&&a.unshift({value:a[0].value-p})}}for(var u=0;u=i[0]&&x<=i[1]&&c++)}var w=(i[1]-i[0])/e;if(c>1.5*w&&p>w/1.5)break;if(u.push(y),c>w||t===s[f])break}h=[]}}}for(var b=_(v(u,function(t){return _(t,function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notadd})}),function(t){return t.length>0}),s=[],m=b.length-1,f=0;f0&&i>0||0>n&&0>i)}function rf(t){var e=t.getlabelmodel().get("formatter"),n="category"===t.type?t.scale.getextent()[0]:null;return"time"===t.scale.type?function(e){return function(n,i){return t.scale.getformattedlabel(n,i,e)}}(e):"string"==typeof e?function(e){return function(n){var i=t.scale.getlabel(n),r=e.replace("{value}",null!=i?i:"");return r}}(e):"function"==typeof e?function(e){return function(i,r){return null!=n&&(r=i.value-n),e(bf(t,i),r,null!=i.level?{level:i.level}:null)}}(e):function(e){return t.scale.getlabel(e)}}function bf(t,e){return"category"===t.type?t.scale.getlabel(e):e.value}function ef(t){var e=t.model,n=t.scale;if(e.get(["axislabel","show"])&&!n.isblank()){var i,r,o=n.getextent();n instanceof lk?r=n.count():(i=n.getticks(),r=i.length);var a,s=t.getlabelmodel(),l=rf(t),u=1;r>40&&(u=math.ceil(r/40));for(var h=0;r>h;h+=u){var c=i?i[h]:{value:o[0]+h},p=l(c,h),f=s.gettextrect(p),d=nf(f,s.get("rotate")||0);a?a.union(d):a=d}return a}}function nf(t,e){var n=e*math.pi/180,i=t.width,r=t.height,o=i*math.abs(math.cos(n))+math.abs(r*math.sin(n)),a=i*math.abs(math.sin(n))+math.abs(r*math.cos(n)),s=new a_(t.x,t.y,o,a);return s}function zf(t){var e=t.get("interval");return null==e?"auto":e}function ff(t){return"category"===t.type&&0===zf(t.getlabelmodel())}function vf(t,e){var n={};return y(t.mapdimensionsall(e),function(e){n[jp(t,e)]=!0}),w(n)}function hf(t){return kp(null,t)}function gf(t,e){var n=e;e instanceof xs||(n=new xs(e));var i=lf(n);return i.setextent(t[0],t[1]),pf(i,n),i}function wf(t){d(t,qk)}function uf(t,e){return e=e||{},is(t,null,null,"normal"!==e.state)}function xf(t){return m(t)?void y(t,function(t){xf(t)}):void(p(ni,t)>=0||(ni.push(t),t(t)&&(t={install:t}),t.install(ii)))}function yf(t){return"category"===t.type?qf(t):$f(t)}function jf(t,e){return"category"===t.type?kf(t,e):{ticks:v(t.scale.getticks(),function(t){return t.value})}}function qf(t){var e=t.getlabelmodel(),n=zf(t,e);return!e.get("show")||t.scale.isblank()?{labels:[],labelcategoryinterval:n.labelcategoryinterval}:n}function zf(t,e){var n=jf(t,"labels"),i=zf(e),r=qf(n,i);if(r)return r;var o,a;return t(i)?o=od(t,i):(a="auto"===i?ed(t):i,o=rd(t,a)),td(n,i,{labels:o,labelcategoryinterval:a})}function kf(t,e){var n=jf(t,"ticks"),i=zf(e),r=qf(n,i);if(r)return r;var o,a;if((!e.get("show")||t.scale.isblank())&&(o=[]),t(i))o=od(t,i,!0);else if("auto"===i){var s=zf(t,t.getlabelmodel());a=s.labelcategoryinterval,o=v(s.labels,function(t){return t.tickvalue})}else a=i,o=rd(t,a,!0);return td(n,i,{ticks:o,tickcategoryinterval:a})}function $f(t){var e=t.scale.getticks(),n=rf(t);return{labels:v(e,function(e,i){return{level:e.level,formattedlabel:n(e,i),rawlabel:t.scale.getlabel(e),tickvalue:e.value}})}}function jf(t,e){return ui(t)[e]||(ui(t)[e]=[])}function qf(t,e){for(var n=0;n40&&(s=math.max(1,math.floor(a/40)));for(var l=o[0],u=t.datatocoord(l+1)-t.datatocoord(l),h=math.abs(u*math.cos(i)),c=math.abs(u*math.sin(i)),p=0,f=0;l<=o[1];l+=s){var d=0,g=0,y=qn(n({value:l}),e.font,"center","top");d=1.3*y.width,g=1.3*y.height,p=math.max(p,d,7),f=math.max(f,g,7)}var v=p/h,m=f/c;isnan(v)&&(v=1/0),isnan(m)&&(m=1/0);var _=math.max(0,math.floor(math.min(v,m))),x=ui(t.model),w=t.getextent(),b=x.lastautointerval,s=x.lasttickcount;return null!=b&&null!=s&&math.abs(b-_)<=1&&math.abs(s-a)<=1&&b>_&&x.axisextent0===w[0]&&x.axisextent1===w[1]?_=b:(x.lasttickcount=a,x.lastautointerval=_,x.axisextent0=w[0],x.axisextent1=w[1]),_}function id(t){var e=t.getlabelmodel();return{axisrotate:t.getrotate?t.getrotate():t.ishorizontal&&!t.ishorizontal()?90:0,labelrotate:e.get("rotate")||0,font:e.getfont()}}function rd(t,e,n){function i(t){var e={value:t};l.push(n?t:{formattedlabel:r(e),rawlabel:o.getlabel(e),tickvalue:t})}var r=rf(t),o=t.scale,a=o.getextent(),s=t.getlabelmodel(),l=[],u=math.max((e||0)+1,1),h=a[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=math.round(math.ceil(h/u)*u));var p=ff(t),f=s.get("showminlabel")||p,d=s.get("showmaxlabel")||p;f&&h!==a[0]&&i(a[0]);for(var g=h;g<=a[1];g+=u)i(g);return d&&g-u!==a[1]&&i(a[1]),l}function od(t,e,n){var i=t.scale,r=rf(t),o=[];return y(i.getticks(),function(t){var a=i.getlabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedlabel:r(t),rawlabel:a,tickvalue:s})}),o}function ad(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function sd(t,e,n,i){function r(t,e){return t=xi(t),e=xi(e),p?t>e:e>t}var o=e.length;if(t.onband&&!n&&o){var a,s,l=t.getextent();if(1===o)e[0].coord=l[0],a=e[1]={coord:l[0]};else{var u=e[o-1].tickvalue-e[0].tickvalue,h=(e[o-1].coord-e[0].coord)/u;y(e,function(t){t.coord-=h/2});var c=t.scale.getextent();s=1+c[1]-e[o-1].tickvalue,a={coord:e[o-1].coord+h*s},e.push(a)}var p=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],a.coord)&&(i?a.coord=l[1]:e.pop()),i&&r(a.coord,l[1])&&e.push({coord:l[1]})}}function ld(t){var e=ks.extend(t);return ks.registerclass(e),e}function ud(t){var e=gt.extend(t);return gt.registerclass(e),e}function hd(t){var e=dt.extend(t);return dt.registerclass(e),e}function cd(t){var e=mt.extend(t);return mt.registerclass(e),e}function pd(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function fd(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=math.sqrt(a*a+s*s);a/=u,s/=u;var h=a*n+t,c=s*n+e;if(math.abs(i-r)%pi<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=po(r),r=po(p)}else i=po(i),r=po(r);i>r&&(r+=pi);var f=math.atan2(s,a);if(0>f&&(f+=pi),f>=i&&r>=f||f+pi>=i&&r>=f+pi)return l[0]=h,l[1]=c,u-n;var d=n*math.cos(i)+t,g=n*math.sin(i)+e,y=n*math.cos(r)+t,v=n*math.sin(r)+e,m=(d-a)*(d-a)+(g-s)*(g-s),_=(y-a)*(y-a)+(v-s)*(v-s);return _>m?(l[0]=d,l[1]=g,math.sqrt(m)):(l[0]=y,l[1]=v,math.sqrt(_))}function dd(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,c=i-e,p=math.sqrt(h*h+c*c);h/=p,c/=p;var f=l*h+u*c,d=f/p;s&&(d=math.min(math.max(d,0),1)),d*=p;var g=a[0]=t+d*h,y=a[1]=e+d*c;return math.sqrt((g-r)*(g-r)+(y-o)*(y-o))}function gd(t,e,n,i,r,o,a){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=math.min(math.max(r,t),s),h=a[1]=math.min(math.max(o,e),l);return math.sqrt((u-r)*(u-r)+(h-o)*(h-o))}function yd(t,e,n){var i=gd(e.x,e.y,e.width,e.height,t.x,t.y,gi);return n.set(gi[0],gi[1]),i}function vd(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,h=e.data,c=t.x,p=t.y,f=0;f=f&&(s=i,l=r);var s=(c-y)*_/m+y;g=fd(y,v,_,x,x+w,b,s,p,gi),o=math.cos(x+w)*m+y,a=math.sin(x+w)*_+v;break;case fi.r:s=o=h[f++],l=a=h[f++];var m=h[f++],t=h[f++];g=gd(s,l,m,t,c,p,gi);break;case fi.z:g=dd(o,a,s,l,c,p,gi,!0),o=s,a=l}u>g&&(u=g,n.set(gi[0],gi[1]))}return u}function md(t,e){if(t){var n=t.gettextguideline(),i=t.gettextcontent();if(i&&n){var r=t.textguidelineconfig||{},o=[[0,0],[0,0],[0,0]],a=r.candidates||di,s=i.getboundingrect().clone();s.applytransform(i.getcomputedtransform());var l=1/0,u=r.anchor,h=t.getcomputedtransform(),c=h&&jn([],h),p=e.get("length2")||0;u&&mi.copy(u);for(var f=0;fy&&(l=y,vi.transform(h),mi.transform(h),mi.toarray(o[0]),vi.toarray(o[1]),yi.toarray(o[2]))}_d(o,e.get("minturnangle")),n.setshape({points:o})}}}function _d(t,e){if(180>=e&&e>0){e=e/180*math.pi,yi.fromarray(t[0]),vi.fromarray(t[1]),mi.fromarray(t[2]),w_.sub(_i,yi,vi),w_.sub(xi,mi,vi);var n=_i.len(),i=xi.len();if(!(.001>n||.001>i)){_i.scale(1/n),xi.scale(1/i);var r=_i.dot(xi),o=math.cos(e);if(r>o){var a=dd(vi.x,vi.y,mi.x,mi.y,yi.x,yi.y,wi,!1);bi.fromarray(wi),bi.scaleandadd(xi,a/math.tan(math.pi-e));var s=mi.x!==vi.x?(bi.x-vi.x)/(mi.x-vi.x):(bi.y-vi.y)/(mi.y-vi.y);if(isnan(s))return;0>s?w_.copy(bi,vi):s>1&&w_.copy(bi,mi),bi.toarray(t[1])}}}}function xd(t,e,n){if(180>=n&&n>0){n=n/180*math.pi,yi.fromarray(t[0]),vi.fromarray(t[1]),mi.fromarray(t[2]),w_.sub(_i,vi,yi),w_.sub(xi,mi,vi);var i=_i.len(),r=xi.len();if(!(.001>i||.001>r)){_i.scale(1/i),xi.scale(1/r);var o=_i.dot(e),a=math.cos(n);if(a>o){var s=dd(vi.x,vi.y,mi.x,mi.y,yi.x,yi.y,wi,!1);bi.fromarray(wi);var l=math.pi/2,u=math.acos(xi.dot(e)),h=l+u-n;if(h>=l)w_.copy(bi,mi);else{bi.scaleandadd(xi,s/math.tan(math.pi/2-h));var c=mi.x!==vi.x?(bi.x-vi.x)/(mi.x-vi.x):(bi.y-vi.y)/(mi.y-vi.y);if(isnan(c))return;0>c?w_.copy(bi,vi):c>1&&w_.copy(bi,mi)}bi.toarray(t[1])}}}}function wd(t,e,n,i){var r="normal"===n,o=r?t:t.ensurestate(n);o.ignore=e;var a=i.get("smooth");a&&a===!0&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getmodel("linestyle").getlinestyle();r?t.usestyle(s):o.style=s}function bd(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveto(i[0][0],i[0][1]),n>0&&i.length>=3){var r=im(i[0],i[1]),o=im(i[1],i[2]);if(!r||!o)return t.lineto(i[1][0],i[1][1]),void t.lineto(i[2][0],i[2][1]);var a=math.min(r,o)*n,s=de([],i[1],i[0],a/r),l=de([],i[1],i[2],a/o),u=de([],s,l,.5);t.beziercurveto(s[0],s[1],s[0],s[1],u[0],u[1]),t.beziercurveto(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;ht){var i=math.min(e,-t);if(i>0){l(i*n,0,c);var r=i+t;0>r&&u(-r*n,1)}else u(-t*n,1)}}function l(n,i,r){0!==n&&(d=!0);for(var o=i;r>o;o++){var a=t[o],s=a.rect;s[e]+=n,a.label[e]+=n}}function u(i,r){for(var o=[],a=0,s=1;c>s;s++){var u=t[s-1].rect,h=math.max(t[s].rect[e]-u[e]-u[n],0);o.push(h),a+=h}if(a){var p=math.min(math.abs(i)/a,r);if(i>0)for(var s=0;c-1>s;s++){var f=o[s]*p;l(f,0,s+1)}else for(var s=c-1;s>0;s--){var f=o[s-1]*p;l(-f,s,c)}}}function h(t){var e=0>t?-1:1;t=math.abs(t);for(var n=math.ceil(t/(c-1)),i=0;c-1>i;i++)if(e>0?l(n,0,i+1):l(-n,c-i-1,c),t-=n,0>=t)return}var c=t.length;if(!(2>c)){t.sort(function(t,n){return t.rect[e]-n.rect[e]});for(var p,f=0,d=!1,g=[],y=0,v=0;c>v;v++){var m=t[v],_=m.rect;p=_[e]-f,0>p&&(_[e]-=p,m.label[e]-=p,d=!0);var x=math.max(-p,0);g.push(x),y+=x,f=_[e]+_[n]}y>0&&o&&l(-y/c,0,c);var w,b,s=t[0],m=t[c-1];return a(),0>w&&u(-w,.8),0>b&&u(b,.8),a(),s(w,b,1),s(b,w,-1),a(),0>w&&h(-w),0>b&&h(b),d}}function dd(t,e,n,i){return cd(t,"x","width",e,n,i)}function kd(t,e,n,i){return cd(t,"y","height",e,n,i)}function id(t){function e(t){if(!t.ignore){var e=t.ensurestate("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}var n=[];t.sort(function(t,e){return e.priority-t.priority});for(var i=new a_(0,0,0,0),r=0;ri?(i=c,_-=c):x+=t;var r=w+b*i;e.setitemlayout(n,{angle:i,startangle:w,endangle:r,clockwise:g,cx:a,cy:s,r0:u,r:y?mi(t,m,[u,l]):l}),w=r}),zi>_&&p)if(.001>=_){var s=zi/p;e.each(i,function(t,n){if(!isnan(t)){var i=e.getitemlayout(n);i.angle=s,i.startangle=h+b*n*s,i.endangle=h+b*(n+1)*s}})}else d=_/x,w=h,e.each(i,function(t,n){if(!isnan(t)){var i=e.getitemlayout(n),r=i.angle===c?c:t*d;i.startangle=w,i.endangle=w+b*r,w+=b*r}})})}function ud(t){return{seriestype:t,reset:function(t,e){var n=e.findcomponents({maintype:"legend"});if(n&&n.length){var i=t.getdata();i.filterself(function(t){for(var e=i.getname(t),r=0;rn?a:o,c=math.abs(l.label.y-n);if(c>u.maxy){var p=l.label.x-e-l.len2*r,f=i+l.len,d=math.abs(p)f;f++)if("outer"===t[f].position&&"labelline"===t[f].labelalignto){var d=t[f].label.x-u;t[f].linepoints[1][0]+=d,t[f].label.x=u}kd(t,l,l+a)&&c(t)}}function yd(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=number.max_value,c=-number.max_value,p=0;pl?-1:1)*c,v=z;d="edge"===w?0>l?p+b:p+c-b:f+(0>l?-x:x),k=v,i=[[b,e],[n,z],[f,v]]}a=r?"center":"edge"===w?l>0?"right":"left":l>0?"left":"right"}var h,g=m.get("rotate");if("number"==typeof g)h=g*(math.pi/180);else if("center"===_)h=0;else{var w=0>l?-p+math.pi:-p;"radial"===g||g===!0?h=w:"tangential"===g&&"outside"!==_&&"outer"!==_?(h=w+math.pi/2,h>math.pi/2&&(h-=math.pi)):h=0}if(s=!!h,d.x=d,d.y=k,d.rotation=h,d.setstyle({verticalalign:"middle"}),r){d.setstyle({align:a});var u=d.states.select;u&&(u.x+=d.x,u.y+=d.y)}else{var x=d.getboundingrect().clone();x.applytransform(d.getcomputedtransform());var y=(d.style.margin||0)+2.1;x.y-=y/2,x.height+=y,a.push({label:d,labelline:g,position:_,len:t,len2:c,minturnangle:m.get("minturnangle"),maxsurfaceangle:m.get("maxsurfaceangle"),surfacenormal:new w_(l,o),linepoints:i,textalign:a,labeldistance:x,labelalignto:w,edgedistance:b,bleedmargin:s,rect:x})}u.settextconfig({inside:r})}}),!s&&t.get("avoidlabeloverlap")&&yd(a,i,r,h,c,d,p,f);for(var g=0;gi?!1:!0})}}}function jd(t){t.registerchartview(gi),t.registerseriesmodel(ui),gh("pie",t.registeraction),t.registerlayout(s(wd,"pie")),t.registerprocessor(ud("pie")),t.registerprocessor($d("pie"))}function qd(t,n,i,r){y(qi,function(o,a){var s=l(l({},ji[a],!0),r,!0),u=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n+"axis."+a,e}return e(i,t),i.prototype.mergedefaultandtheme=function(t,e){var n=tl(this),i=n?dl(t):{},r=e.gettheme();l(t,r.get(a+"axis")),l(t,this.getdefaultoption()),t.type=tg(t),n&&cl(t,i,n)},i.prototype.optionupdated=function(){var t=this.option;"category"===t.type&&(this.__ordinalmeta=ak.createbyaxismodel(this))},i.prototype.getcategories=function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalmeta.categories:void 0},i.prototype.getordinalmeta=function(){return this.__ordinalmeta},i.type=n+"axis."+a,i.defaultoption=s,i}(i);t.registercomponentmodel(u)}),t.registersubtypedefaulter(n+"axis",tg)}function tg(t){return t.type||(t.data?"category":"value")}function eg(t){return"interval"===t.type||"time"===t.type}function ng(t,e,n){n=n||{};var i=t.coordinatesystem,r=e.axis,o={},a=r.getaxesonzeroof()[0],s=r.position,l=a?"onzero":s,u=r.dim,h=i.getrect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onzero:2},f=e.get("offset")||0,d="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(a){var g=a.toglobalcoord(a.datatocoord(0));d[p.onzero]=math.max(math.min(g,d[1]),d[0])}o.position=["y"===u?d[p[l]]:c[0],"x"===u?d[p[l]]:c[3]],o.rotation=math.pi/2*("x"===u?0:1);var y={top:-1,bottom:1,left:-1,right:1};o.labeldirection=o.tickdirection=o.namedirection=y[s],o.labeloffset=a?d[p[s]]-d[p.onzero]:0,e.get(["axistick","inside"])&&(o.tickdirection=-o.tickdirection),n(n.labelinside,e.get(["axislabel","inside"]))&&(o.labeldirection=-o.labeldirection);var v=e.get(["axislabel","rotate"]);return o.labelrotate="top"===l?-v:v,o.z2=1,o}function ig(t){return"cartesian2d"===t.get("coordinatesystem")}function rg(t){var e={xaxismodel:null,yaxismodel:null};return y(e,function(n,i){var r=i.replace(/model$/,""),o=t.getreferringcomponents(r,ex).models[0];e[i]=o}),e}function og(t,e){return t.getcoordsysmodel()===e}function ag(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getaxesonzeroof=function(){return o?[o]:[]};var o,a=t[e],s=n.model,l=s.get(["axisline","onzero"]),u=s.get(["axisline","onzeroaxisindex"]);if(l){if(null!=u)sg(a[u])&&(o=a[u]);else for(var h in a)if(a.hasownproperty(h)&&sg(a[h])&&!i[r(a[h])]){o=a[h];break}o&&(i[r(o)]=!0)}}function sg(t){return t&&"category"!==t.type&&"time"!==t.type&&of(t)}function lg(t,e){var n=t.getextent(),i=n[0]+n[1];t.toglobalcoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.tolocalcoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function ug(t,e,n,i){var r,o,a=di(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return ki(a-oa/2)?(o=l?"bottom":"top",r="center"):ki(a-1.5*oa)?(o=l?"top":"bottom",r="center"):(o="middle",r=1.5*oa>a&&a>oa/2?l?"left":"right":l?"right":"left"),{rotation:a,textalign:r,textverticalalign:o}}function hg(t,e,n){if(!ff(t.axis)){var i=t.get(["axislabel","showminlabel"]),r=t.get(["axislabel","showmaxlabel"]);e=e||[],n=n||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],p=n[n.length-2];i===!1?(cg(o),cg(u)):pg(o,a)&&(i?(cg(a),cg(h)):(cg(o),cg(u))),r===!1?(cg(s),cg(c)):pg(l,s)&&(r?(cg(l),cg(p)):(cg(s),cg(c)))}}function cg(t){t&&(t.ignore=!0)}function pg(t,e){var n=t&&t.getboundingrect().clone(),i=e&&e.getboundingrect().clone();if(n&&i){var r=hn([]);return xn(r,r,-t.rotation),n.applytransform(wn([],r,t.getlocaltransform())),i.applytransform(wn([],r,e.getlocaltransform())),n.intersect(i)}}function fg(t){return"middle"===t||"center"===t}function dg(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function mg(t){var e=tg(t);if(e){var n=e.axispointermodel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=dg(n);null==o&&(r.status=s?"show":"hide");var l=i.getextent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0?2:0),ma(t,function(n,i){"inherit"===t[i]&&(t[i]=e[i])})}var s=e.getmodel("itemstyle"),l=s.getitemstyle(),u=0===t.lastindexof("empty",0)?"fill":"stroke";l.decal=i.decal,"inherit"===l.fill&&(l.fill=i[r]),"inherit"===l.stroke&&(l.stroke=i[u]),"inherit"===l.opacity&&(l.opacity=("fill"===r?i:n).opacity),a(l,i);var h=e.getmodel("linestyle"),c=h.getlinestyle();if(a(c,n),"auto"===l.fill&&(l.fill=i.fill),"auto"===l.stroke&&(l.stroke=i.fill),"auto"===c.stroke&&(c.stroke=i.fill),!o){var p=e.get("inactiveborderwidth"),f=l[u];l.linewidth="auto"===p?i.linewidth>0&&f?2:0:l.linewidth,l.fill=e.get("inactivecolor"),l.stroke=e.get("inactivebordercolor"),c.stroke=h.get("inactivecolor"),c.linewidth=h.get("inactivewidth")}return{itemstyle:l,linestyle:c}}function bg(t){var e=t.icon||"roundrect",n=jh(e,0,0,t.itemwidth,t.itemheight,t.itemstyle.fill,t.symbolkeepaspect);return n.setstyle(t.itemstyle),n.rotation=(t.iconrotate||0)*math.pi/180,n.setorigin([t.itemwidth/2,t.itemheight/2]),e.indexof("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.linewidth=2),n}function eg(t,e,n,i){fg(t,e,n,i),n.dispatchaction({type:"legendtoggleselect",name:null!=t?t:e}),zg(t,e,n,i)}function ng(t){for(var e,n=t.getzr().storage.getdisplaylist(),i=0,r=n.length;r>i&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverlayer}function zg(t,e,n,i){ng(n)||n.dispatchaction({type:"highlight",seriesname:t,name:e,excludeseriesid:i})}function fg(t,e,n,i){ng(n)||n.dispatchaction({type:"downplay",seriesname:t,name:e,excludeseriesid:i})}function vg(t){var e=t.findcomponents({maintype:"legend"});e&&e.length&&t.filterseries(function(t){for(var n=0;na||m(a))return{point:[]};var s=o.getitemgraphicel(a),l=n.coordinatesystem;if(n.gettooltipposition)i=n.gettooltipposition(a)||[];else if(l&&l.datatopoint)if(t.isstacked){var u=l.getbaseaxis(),h=l.getotheraxis(u),c=h.dim,p=u.dim,f="x"===c||"radius"===c?1:0,d=o.mapdimension(p),g=[];g[f]=o.get(d,a),g[1-f]=o.get(o.getcalculationinfo("stackresultdimension"),a),i=l.datatopoint(g)||[]}else i=l.datatopoint(o.getvalues(v(l.dimensions,function(t){return o.mapdimension(t)}),a))||[];else if(s){var y=s.getboundingrect().clone();y.applytransform(s.transform),i=[y.x+y.width/2,y.y+y.height/2]}return{point:i,el:s}}function yy(t,e,n){var i=t.currtrigger,r=[t.x,t.y],o=t,a=t.dispatchaction||$v(n.dispatchaction,n),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){cy(r)&&(r=gy({seriesindex:o.seriesindex,dataindex:o.dataindex},e).point);var l=cy(r),u=o.axesinfo,h=s.axesinfo,c="leave"===i||cy(r),p={},f={},d={list:[],map:{}},g={showpointer:s(_y,f),showtooltip:s(xy,d)};y(s.coordsysmap,function(t,e){var n=l||t.containpoint(r);y(s.coordsysaxesinfo[e],function(t){var e=t.axis,i=my(u,t);if(!c&&n&&(!u||i)){var o=i&&i.value;null!=o||l||(o=e.pointtodata(r)),null!=o&&vy(t,o,g,!1,p)}})});var v={};return y(h,function(t,e){var n=t.linkgroup;n&&!f[e]&&y(n.axesinfo,function(e,i){var r=f[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,ty(e),ty(t)))),v[t.key]=o}})}),y(v,function(t,e){vy(h[e],t,g,!0,p)}),wy(f,h,p),by(d,r,t,a),sy(h,a,n),p}}function vy(t,e,n,i,r){var o=t.axis;if(!o.scale.isblank()&&o.containdata(e)){if(!t.involveseries)return void n.showpointer(t,e);var a=my(e,t),s=a.payloadbatch,l=a.snaptovalue;s[0]&&null==r.seriesindex&&h(r,s[0]),!i&&t.snap&&o.containdata(l)&&null!=l&&(e=l),n.showpointer(t,e,s),n.showtooltip(t,a,l)}}function my(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=number.max_value,s=-1;return y(e.seriesmodels,function(e){var l,u,h=e.getdata().mapdimensionsall(i);if(e.getaxistooltipdata){var c=e.getaxistooltipdata(h,t,n);u=c.dataindices,l=c.nestestvalue}else{if(u=e.getdata().indicesofnearest(h[0],t,"category"===n.type?.5:null),!u.length)return;l=e.getdata().get(h[0],u[0])}if(null!=l&&isfinite(l)){var p=t-l,f=math.abs(p);a>=f&&((a>f||p>=0&&0>s)&&(a=f,s=p,r=l,o.length=0),y(u,function(t){o.push({seriesindex:e.seriesindex,dataindexinside:t,dataindex:e.getdata().getrawindex(t)})}))}}),{payloadbatch:o,snaptovalue:r}}function _y(t,e,n,i){t[e.key]={value:n,payloadbatch:i}}function xy(t,e,n,i){var r=n.payloadbatch,o=e.axis,a=o.model,s=e.axispointermodel;if(e.triggertooltip&&r.length){var l=e.coordsys.model,u=kg(l),h=t.map[u];h||(h=t.map[u]={coordsysid:l.id,coordsysindex:l.componentindex,coordsystype:l.type,coordsysmaintype:l.maintype,databyaxis:[]},t.list.push(h)),h.databyaxis.push({axisdim:o.dim,axisindex:a.componentindex,axistype:a.type,axisid:a.id,value:i,valuelabelopt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesdataindices:r.slice()})}}function wy(t,e,n){var i=n.axesinfo=[];y(e,function(e,n){var r=e.axispointermodel.option,o=t[n];o?(!e.usehandle&&(r.status="show"),r.value=o.value,r.seriesdataindices=(o.payloadbatch||[]).slice()):!e.usehandle&&(r.status="hide"),"show"===r.status&&i.push({axisdim:e.axis.dim,axisindex:e.axis.model.componentindex,value:r.value})})}function by(t,e,n,i){if(cy(e)||!t.list.length)return void i({type:"hidetip"});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})}function sy(t,e,n){var i=n.getzr(),r="axispointerlasthighlights",o=ga(i)[r]||{},a=ga(i)[r]={};y(t,function(t){var e=t.axispointermodel.option;"show"===e.status&&y(e.seriesdataindices,function(t){var e=t.seriesindex+" | "+t.dataindex;a[e]=t})});var s=[],l=[];y(o,function(t,e){!a[e]&&l.push(t)}),y(a,function(t,e){!o[e]&&s.push(t)}),l.length&&n.dispatchaction({type:"downplay",escapeconnect:!0,notblur:!0,batch:l}),s.length&&n.dispatchaction({type:"highlight",escapeconnect:!0,notblur:!0,batch:s})}function my(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}}function ty(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 cy(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function dy(t){ua.registeraxispointerclass("cartesianaxispointer",ea),t.registercomponentmodel(za),t.registercomponentview(ha),t.registerpreprocessor(function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!m(e)&&(t.axispointer.link=[e])}}),t.registerprocessor(t.priority.processor.statistic,function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=mg(t,e)}),t.registeraction({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},yy)}function ky(t){var e=t.get("confine");return null!=e?!!e:"richtext"===t.get("rendermode")}function iy(t){if(ev.domsupported)for(var e=document.documentelement.style,n=0,i=t.length;i>n;n++)if(t[n]in e)return t[n]}function ay(t,e){if(!t)return e;e=dl(e,!0);var n=t.indexof(e);return t=-1===n?e:"-"+t.slice(0,n)+"-"+e,t.tolowercase()}function py(t,e){var n=t.currentstyle||document.defaultview&&document.defaultview.getcomputedstyle(t);return n?e?n[e]:n:null}function ly(t){return t="left"===t?"right":"right"===t?"left":"top"===t?"bottom":"top"}function oy(t,e,n){if(!c(n)||"inside"===n)return"";var i=t.get("backgroundcolor"),r=t.get("borderwidth");e=wl(e);var o,a=ly(n),s=math.max(1.5*math.round(r),6),l="",u=ja+":";p(["left","right"],a)>-1?(l+="top:50%",u+="translatey(-50%) rotate("+(o="left"===a?-225:-45)+"deg)"):(l+="left:50%",u+="translatex(-50%) rotate("+(o="top"===a?225:45)+"deg)");var h=o*math.pi/180,c=s+r,f=c*math.abs(math.cos(h))+c*math.abs(math.sin(h)),d=math.round(100*((f-math.sqrt2*r)/2+math.sqrt2*r-(f-c)/2))/100;l+=";"+a+":-"+d+"px";var g=e+" solid "+r+"px;",y=["position:absolute;width:"+s+"px;height:"+s+"px;",l+";"+u+";","border-bottom:"+g,"border-right:"+g,"background-color:"+i+";"];return'
'}function ry(t,e){var n="cubic-bezier(0.23,1,0.32,1)",i=" "+t/2+"s "+n,r="opacity"+i+",visibility"+i;return e||(i=" "+t+"s "+n,r+=ev.transformsupported?","+ja+i:",left"+i+",top"+i),ya+":"+r}function by(t,e,n){var i=t.tofixed(0)+"px",r=e.tofixed(0)+"px";if(!ev.transformsupported)return n?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=ev.transform3dsupported,a="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return n?"top:0;left:0;"+ja+":"+a+";":[["top",0],["left",0],[ua,a]]}function ey(t){var e=[],n=t.get("fontsize"),i=t.gettextcolor();i&&e.push("color:"+i),e.push("font:"+t.getfont()),n&&e.push("line-height:"+math.round(3*n/2)+"px");var r=t.get("textshadowcolor"),o=t.get("textshadowblur")||0,a=t.get("textshadowoffsetx")||0,s=t.get("textshadowoffsety")||0;return r&&o&&e.push("text-shadow:"+a+"px "+s+"px "+o+"px "+r),y(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function ny(t,e,n){var i=[],r=t.get("transitionduration"),o=t.get("backgroundcolor"),a=t.get("shadowblur"),s=t.get("shadowcolor"),l=t.get("shadowoffsetx"),u=t.get("shadowoffsety"),h=t.getmodel("textstyle"),c=lh(t,"html"),p=l+"px "+u+"px "+a+"px "+s;return i.push("box-shadow:"+p),e&&r&&i.push(ry(r,n)),o&&(ev.canvassupported?i.push("background-color:"+o):(i.push("background-color:#"+un(o)),i.push("filter:alpha(opacity=70)"))),y(["width","color","radius"],function(e){var n="border-"+e,r=dl(n),o=t.get(r);null!=o&&i.push(n+":"+o+("color"===e?"":"px"))}),i.push(ey(h)),null!=c&&i.push("padding:"+vs(c).join("px ")+"px"),i.join(";")+";"}function zy(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getviewportroot();a&&xe(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getviewportrootoffset();s&&(t[0]+=s.offsetleft,t[1]+=s.offsettop)}t[2]=t[0]/e.getwidth(),t[3]=t[1]/e.getheight()}function fy(t){return math.max(0,t)}function vy(t){var e=fy(t.shadowblur||0),n=fy(t.shadowoffsetx||0),i=fy(t.shadowoffsety||0);return{left:fy(e-n),right:fy(e+n),top:fy(e-i),bottom:fy(e+i)}}function hy(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getwidth(),t[3]=t[1]/e.getheight()}function gy(t,e,n){var i,r=e.ecmodel;n?(i=new xs(n,r,r),i=new xs(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof xs&&(a=a.get("tooltip",!0)),c(a)&&(a={formatter:a}),a&&(i=new xs(a,i,r)))}return i}function wy(t,e){return t.dispatchaction||$v(e.dispatchaction,e)}function uy(t,e,n,i,r,o,a){var s=n.getsize(),l=s[0],u=s[1];return null!=o&&(t+l+o+2>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}function xy(t,e,n,i,r){var o=n.getsize(),a=o[0],s=o[1];return t=math.min(t+a,i)-a,e=math.min(e+s,r)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}function yy(t,e,n,i){var r=n[0],o=n[1],a=math.ceil(math.sqrt2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}function jy(t){return"center"===t||"middle"===t}function qy(t,e,n){var i=lr(t).queryoptionmap,r=i.keys()[0];if(r&&"series"!==r){var o=ur(e,r,i.get(r),{usedefault:!1,enableall:!1,enablenone:!1}),a=o.models[0];if(a){var s,l=n.getviewofcomponentmodel(a);return l.group.traverse(function(e){var n=ow(e).tooltipconfig;return n&&n.name===t.name?(s=e,!0):void 0}),s?{componentmaintype:r,componentindex:a.componentindex,el:s}:void 0}}}function zy(t){xf(dy),t.registercomponentmodel(wa),t.registercomponentview(ep),t.registeraction({type:"showtip",event:"showtip",update:"tooltip:manuallyshowtip"},function(){}),t.registeraction({type:"hidetip",event:"hidetip",update:"tooltip:manuallyhidetip"},function(){})}function ky(t){return document.createelementns("http://www.w3.org/2000/svg",t)}function $y(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexof("rgba")>-1){var n=on(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e} }function jy(t,e,n){function i(){for(var i=-1*a;a>=i;i+=2){var s,u=l[i-1],h=l[i+1],c=(h?h.newpos:0)-i;u&&(l[i-1]=void 0);var p=u&&u.newpos+1=0&&o>c;if(p||f){if(!p||f&&u.newpos=r&&c+1>=o)return ev(s.components);l[i]=s}else l[i]=void 0}a++}n||(n=function(t,e){return t===e}),t=t.slice(),e=e.slice();var r=e.length,o=t.length,a=1,s=r+o,l=[{newpos:-1,components:[]}],u=qy(l[0],e,t,0,n);if(l[0].newpos+1>=r&&u+1>=o){for(var h=[],c=0;c=a;){var p=i();if(p)return p}}function qy(t,e,n,i,r){for(var o=e.length,a=n.length,s=t.newpos,l=s-i,u=0;o>s+1&&a>l+1&&r(e[s+1],n[l+1]);)s++,l++,u++;return u&&t.components.push({count:u,added:!1,removed:!1,indices:[]}),t.newpos=s,l}function tv(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n,indices:[]}:t.push({count:1,added:e,removed:n,indices:[]})}function ev(t){for(var e=0,n=t.length,i=0,r=0;n>e;e++){var o=t[e];if(o.removed){for(var a=r;at&&t>-up}function sv(t){var e=t.fill;return null!=e&&e!==np}function lv(t){var e=t.stroke;return null!=e&&e!==np}function uv(t,e){e&&hv(t,"transform","matrix("+rv(e[0])+","+rv(e[1])+","+rv(e[2])+","+rv(e[3])+","+ov(e[4])+","+ov(e[5])+")")}function hv(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setattribute(e,n)}function cv(t,e,n){t.setattributens("http://www.w3.org/1999/xlink",e,n)}function pv(t,e,n){t.setattributens("http://www.w3.org/xml/1998/namespace",e,n)}function fv(t,e,n){var i=null==e.opacity?1:e.opacity;if(n instanceof bw)return void hv(t,"opacity",i+"");if(sv(e)){var r=$y(e.fill);hv(t,"fill",r.color),hv(t,"fill-opacity",(null!=e.fillopacity?e.fillopacity*r.opacity*i:r.opacity*i)+"")}else hv(t,"fill",np);if(lv(e)){var o=$y(e.stroke);hv(t,"stroke",o.color);var a=e.linewidth,s=e.strokenoscale?n.getlinescale():1;hv(t,"stroke-width",(s?a/s:0)+""),hv(t,"paint-order",e.strokefirst?"stroke":"fill"),hv(t,"stroke-opacity",(null!=e.strokeopacity?e.strokeopacity*o.opacity*i:o.opacity*i)+"");var l=e.linedash&&a>0&&qh(e.linedash,a);if(l){var u=e.linedashoffset;s&&1!==s&&(l=v(l,function(t){return t/s}),u&&(u/=s,u=ip(u))),hv(t,"stroke-dasharray",l.join(",")),hv(t,"stroke-dashoffset",(u||0)+"")}else hv(t,"stroke-dasharray",np);e.linecap&&hv(t,"stroke-linecap",e.linecap),e.linejoin&&hv(t,"stroke-linejoin",e.linejoin),e.miterlimit&&hv(t,"stroke-miterlimit",e.miterlimit+"")}else hv(t,"stroke",np)}function dv(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}function gv(t){return"linear"===t.type}function yv(t){return"radial"===t.type}function vv(t){return t&&("linear"===t.type||"radial"===t.type)}function mv(t){return t&&(!!t.image||!!t.svgelement)}function _v(t){var e=[];if(t)for(var n=0;n0}function wv(t){return t&&(t.shadowblur||t.shadowoffsetx||t.shadowoffsety)}function bv(t){var e=t.style,n=t.getglobalscale();return[e.shadowcolor,(e.shadowblur||0).tofixed(2),(e.shadowoffsetx||0).tofixed(2),(e.shadowoffsety||0).tofixed(2),n[0],n[1]].join(",")}function sv(t){return parseint(t,10)}function mv(t){return t instanceof vw?cp:t instanceof bw?pp:t instanceof _w?dp:cp}function tv(t,e){return e&&t&&e.parentnode!==t}function cv(t,e,n){if(tv(t,e)&&n){var i=n.nextsibling;i?t.insertbefore(e,i):t.appendchild(e)}}function dv(t,e){if(tv(t,e)){var n=t.firstchild;n?t.insertbefore(e,n):t.appendchild(e)}}function kv(t,e){e&&t&&e.parentnode===t&&t.removechild(e)}function iv(t){t&&t.parentnode&&t.parentnode.removechild(t)}function av(t){return t.__svgel}function pv(t){return function(){a('in svg mode painter not support method "'+t+'"')}}var lv=function(t,e){return(lv=object.setprototypeof||{__proto__:[]}instanceof array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)object.prototype.hasownproperty.call(e,n)&&(t[n]=e[n])})(t,e)},ov=function(){return ov=object.assign||function(t){for(var e,n=1,i=arguments.length;i>n;n++){e=arguments[n];for(var r in e)object.prototype.hasownproperty.call(e,r)&&(t[r]=e[r])}return t},ov.apply(this,arguments)},rv=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newedge=!1,this.wechat=!1}return t}(),bv=function(){function t(){this.browser=new rv,this.node=!1,this.wxa=!1,this.worker=!1,this.canvassupported=!1,this.svgsupported=!1,this.toucheventssupported=!1,this.pointereventssupported=!1,this.domsupported=!1,this.transformsupported=!1,this.transform3dsupported=!1}return t}(),ev=new bv;"object"==typeof wx&&"function"==typeof wx.getsysteminfosync?(ev.wxa=!0,ev.canvassupported=!0,ev.toucheventssupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?(ev.worker=!0,ev.canvassupported=!0):"undefined"==typeof navigator?(ev.node=!0,ev.canvassupported=!0,ev.svgsupported=!0):i(navigator.useragent,ev);var nv={"[object function]":!0,"[object regexp]":!0,"[object date]":!0,"[object error]":!0,"[object canvasgradient]":!0,"[object canvaspattern]":!0,"[object image]":!0,"[object canvas]":!0},zv={"[object int8array]":!0,"[object uint8array]":!0,"[object uint8clampedarray]":!0,"[object int16array]":!0,"[object uint16array]":!0,"[object int32array]":!0,"[object uint32array]":!0,"[object float32array]":!0,"[object float64array]":!0},fv=object.prototype.tostring,vv=array.prototype,hv=vv.foreach,gv=vv.filter,wv=vv.slice,uv=vv.map,xv=function(){}.constructor,yv=xv?xv.prototype:null,jv="__proto__",qv={},zv=2311,kv=function(){return qv.createcanvas()};qv.createcanvas=function(){return document.createelement("canvas")};var $v=yv&&t(yv.bind)?yv.call.bind(yv.bind):b,jv="__ec_primitive__",qv=function(){function t(e){function n(t,e){i?r.set(t,e):r.set(e,t)}this.data={};var i=m(e);this.data={};var r=this;e instanceof t?e.each(n):e&&y(e,n)}return t.prototype.get=function(t){return this.data.hasownproperty(t)?this.data[t]:null},t.prototype.set=function(t,e){return this.data[t]=e},t.prototype.each=function(t,e){for(var n in this.data)this.data.hasownproperty(n)&&t.call(e,this.data[n],n)},t.prototype.keys=function(){return w(this.data)},t.prototype.removekey=function(t){delete this.data[t]},t}(),tm=(object.freeze||object)({$override:r,guid:o,logerror:a,clone:s,merge:l,mergeall:u,extend:h,defaults:c,createcanvas:kv,indexof:p,inherits:f,mixin:d,isarraylike:g,each:y,map:v,reduce:m,filter:_,find:x,keys:w,bind:$v,curry:s,isarray:m,isfunction:t,isstring:c,isstringsafe:d,isnumber:k,isobject:i,isbuiltinobject:a,istypedarray:p,isdom:l,isgradientobject:o,isimagepatternobject:r,isregexp:b,eqnan:e,retrieve:n,retrieve2:z,retrieve3:f,slice:v,normalizecssarray:h,assert:g,trim:w,setasprimitive:u,isprimitive:x,hashmap:qv,createhashmap:y,concatarray:j,createobject:q,hasown:z,noop:k}),em=re,nm=oe,im=ce,rm=pe,om=(object.freeze||object)({create:$,copy:j,clone:q,set:te,add:ee,scaleandadd:ne,sub:ie,len:re,length:em,lensquare:oe,lengthsquare:nm,mul:ae,div:se,dot:le,scale:ue,normalize:he,distance:ce,dist:im,distancesquare:pe,distsquare:rm,negate:fe,lerp:de,applytransform:ge,min:ye,max:ve}),am=function(){function t(t,e){this.target=t,this.toptarget=e&&e.toptarget}return t}(),sm=function(){function t(t){this.handler=t,t.on("mousedown",this._dragstart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragend,this)}return t.prototype._dragstart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingtarget=e,e.dragging=!0,this._x=t.offsetx,this._y=t.offsety,this.handler.dispatchtoelement(new am(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingtarget;if(e){var n=t.offsetx,i=t.offsety,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchtoelement(new am(e,t),"drag",t.event);var a=this.handler.findhover(n,i,e).target,s=this._droptarget;this._droptarget=a,e!==a&&(s&&a!==s&&this.handler.dispatchtoelement(new am(s,t),"dragleave",t.event),a&&a!==s&&this.handler.dispatchtoelement(new am(a,t),"dragenter",t.event))}},t.prototype._dragend=function(t){var e=this._draggingtarget;e&&(e.dragging=!1),this.handler.dispatchtoelement(new am(e,t),"dragend",t.event),this._droptarget&&this.handler.dispatchtoelement(new am(this._droptarget,t),"drop",t.event),this._draggingtarget=null,this._droptarget=null},t}(),lm=function(){function t(t){t&&(this._$eventprocessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventprocessor;null!=e&&o&&o.normalizequery&&(e=o.normalizequery(e)),r[t]||(r[t]=[]);for(var a=0;ar;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},t.prototype.trigger=function(t){for(var e=[],n=1;ns;s++){var l=i[s];if(!r||!r.filter||null==l.query||r.filter(t,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return r&&r.aftertrigger&&r.aftertrigger(t),this},t.prototype.triggerwithcontext=function(t){for(var e=[],n=1;nl;l++){var u=i[l];if(!r||!r.filter||null==u.query||r.filter(t,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,e[0]);break;case 2:u.h.call(a,e[0],e[1]);break;default:u.h.apply(a,e.slice(1,o-1))}}return r&&r.aftertrigger&&r.aftertrigger(t),this},t}(),um=math.log(2),hm="___zreventsaved",cm=[],pm="undefined"!=typeof window&&!!window.addeventlistener,fm=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,dm=[],gm=pm?function(t){t.preventdefault(),t.stoppropagation(),t.cancelbubble=!0}:function(t){t.returnvalue=!1,t.cancelbubble=!0},ym=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._dotrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._dotrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;a>o;o++){var s=i[o],l=te(n,s,{});r.points.push([l.zrx,l.zry]),r.touches.push(s)}this._track.push(r)}},t.prototype._recognize=function(t){for(var e in vm)if(vm.hasownproperty(e)){var n=vm[e](this._track,t);if(n)return n}},t}(),vm={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var o=le(i)/le(r);!isfinite(o)&&(o=1),e.pinchscale=o;var a=oe(i);return e.pinchx=a[0],e.pinchy=a[1],{type:"pinch",target:t[0].target,event:e}}}}},mm="silent",_m=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return e(n,t),n.prototype.dispose=function(){},n.prototype.setcursor=function(){},n}(lm),xm=function(){function t(t,e){this.x=t,this.y=e}return t}(),wm=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],bm=function(t){function n(e,n,i,r){var o=t.call(this)||this;return o._hovered=new xm(0,0),o.storage=e,o.painter=n,o.painterroot=r,i=i||new _m,o.proxy=null,o.sethandlerproxy(i),o._draggingmgr=new sm(o),o}return e(n,t),n.prototype.sethandlerproxy=function(t){this.proxy&&this.proxy.dispose(),t&&(y(wm,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},n.prototype.mousemove=function(t){var e=t.zrx,n=t.zry,i=ne(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(r=this.findhover(r.x,r.y),o=r.target);var a=this._hovered=i?new xm(e,n):this.findhover(e,n),s=a.target,l=this.proxy;l.setcursor&&l.setcursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchtoelement(r,"mouseout",t),this.dispatchtoelement(a,"mousemove",t),s&&s!==o&&this.dispatchtoelement(a,"mouseover",t)},n.prototype.mouseout=function(t){var e=t.zreventcontrol;"only_globalout"!==e&&this.dispatchtoelement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},n.prototype.resize=function(){this._hovered=new xm(0,0)},n.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},n.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},n.prototype.setcursorstyle=function(t){var e=this.proxy;e.setcursor&&e.setcursor(t)},n.prototype.dispatchtoelement=function(t,e,n){t=t||{};var i=t.target;if(!i||!i.silent){for(var r="on"+e,o=re(e,t,n);i&&(i[r]&&(o.cancelbubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hosttarget?i.__hosttarget:i.parent,!o.cancelbubble););o.cancelbubble||(this.trigger(e,o),this.painter&&this.painter.eachotherlayer&&this.painter.eachotherlayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},n.prototype.findhover=function(t,e,n){for(var i=this.storage.getdisplaylist(),r=new xm(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=ee(i[o],t,e))&&(!r.toptarget&&(r.toptarget=i[o]),a!==mm)){r.target=i[o];break}}return r},n.prototype.processgesture=function(t,e){this._gesturemgr||(this._gesturemgr=new ym);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;var o=new xm;o.target=i.target,this.dispatchtoelement(o,r,i.event)}},n}(lm);y(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){bm.prototype[t]=function(e){var n,i,r=e.zrx,o=e.zry,a=ne(this,r,o);if("mouseup"===t&&a||(n=this.findhover(r,o),i=n.target),"mousedown"===t)this._downel=i,this._downpoint=[e.zrx,e.zry],this._upel=i;else if("mouseup"===t)this._upel=i;else if("click"===t){if(this._downel!==this._upel||!this._downpoint||im(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(n,t,e)}});var sm,mm=32,tm=7,cm=1,dm=2,km=4,im=!1,am=function(){function t(){this._roots=[],this._displaylist=[],this._displaylistlen=0,this.displayablesortfunc=je}return t.prototype.traverse=function(t,e){for(var n=0;ni;i++)this._updateandadddisplayable(e[i],null,t);n.length=this._displaylistlen,ev.canvassupported&&xe(n,je)},t.prototype._updateandadddisplayable=function(t,e,n){if(!t.ignore||n){t.beforeupdate(),t.update(),t.afterupdate();var i=t.getclippath();if(t.ignoreclip)e=null;else if(i){e=e?e.slice():[];for(var r=i,o=t;r;)r.parent=o,r.updatetransform(),e.push(r),o=r,r=r.getclippath()}if(t.childrenref){for(var a=t.childrenref(),s=0;s0&&(u.__clippaths=[]),isnan(u.z)&&(ye(),u.z=0),isnan(u.z2)&&(ye(),u.z2=0),isnan(u.zlevel)&&(ye(),u.zlevel=0),this._displaylist[this._displaylistlen++]=u}var h=t.getdecalelement&&t.getdecalelement();h&&this._updateandadddisplayable(h,e,n);var c=t.gettextguideline();c&&this._updateandadddisplayable(c,e,n);var p=t.gettextcontent();p&&this._updateandadddisplayable(p,e,n)}},t.prototype.addroot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delroot=function(t){if(t instanceof array)for(var e=0,n=t.length;n>e;e++)this.delroot(t[e]);else{var i=p(this._roots,t);i>=0&&this._roots.splice(i,1)}},t.prototype.delallroots=function(){this._roots=[],this._displaylist=[],this._displaylistlen=0},t.prototype.getroots=function(){return this._roots},t.prototype.dispose=function(){this._displaylist=null,this._roots=null},t}();sm="undefined"!=typeof window&&(window.requestanimationframe&&window.requestanimationframe.bind(window)||window.msrequestanimationframe&&window.msrequestanimationframe.bind(window)||window.mozrequestanimationframe||window.webkitrequestanimationframe)||function(t){return settimeout(t,16)};var pm=sm,lm={linear:function(t){return t},quadraticin:function(t){return t*t},quadraticout:function(t){return t*(2-t)},quadraticinout:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicin:function(t){return t*t*t},cubicout:function(t){return--t*t*t+1},cubicinout:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticin:function(t){return t*t*t*t},quarticout:function(t){return 1- --t*t*t*t},quarticinout:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticin:function(t){return t*t*t*t*t},quinticout:function(t){return--t*t*t*t*t+1},quinticinout:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalin:function(t){return 1-math.cos(t*math.pi/2)},sinusoidalout:function(t){return math.sin(t*math.pi/2)},sinusoidalinout:function(t){return.5*(1-math.cos(math.pi*t))},exponentialin:function(t){return 0===t?0:math.pow(1024,t-1)},exponentialout:function(t){return 1===t?1:1-math.pow(2,-10*t)},exponentialinout:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*math.pow(1024,t-1):.5*(-math.pow(2,-10*(t-1))+2)},circularin:function(t){return 1-math.sqrt(1-t*t)},circularout:function(t){return math.sqrt(1- --t*t)},circularinout:function(t){return(t*=2)<1?-.5*(math.sqrt(1-t*t)-1):.5*(math.sqrt(1-(t-=2)*t)+1)},elasticin:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*math.asin(1/n)/(2*math.pi),-(n*math.pow(2,10*(t-=1))*math.sin(2*(t-e)*math.pi/i)))},elasticout:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*math.asin(1/n)/(2*math.pi),n*math.pow(2,-10*t)*math.sin(2*(t-e)*math.pi/i)+1)},elasticinout:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*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/i):n*math.pow(2,-10*(t-=1))*math.sin(2*(t-e)*math.pi/i)*.5+1)},backin:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backout:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backinout:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bouncein:function(t){return 1-lm.bounceout(1-t)},bounceout:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceinout:function(t){return.5>t?.5*lm.bouncein(2*t):.5*lm.bounceout(2*t-1)+.5}},om=function(){function t(t){this._initialized=!1,this._starttime=0,this._pausedtime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._starttime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedtime+=e);var n=(t-this._starttime-this._pausedtime)/this._life;0>n&&(n=0),n=math.min(n,1);var i=this.easing,r="string"==typeof i?lm[i]:i,o="function"==typeof r?r(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1},t.prototype._restart=function(t){var e=(t-this._starttime-this._pausedtime)%this._life;this._starttime=t-e+this.gap,this._pausedtime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}(),rm=function(){function t(t){this.value=t}return t}(),bm=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new rm(t);return this.insertentry(e),e},t.prototype.insertentry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.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--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),em=function(){function t(t){this._list=new bm,this._maxsize=10,this._map={},this._maxsize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastremovedentry;if(o>=this._maxsize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastremovedentry=s}a?a.value=e:a=new rm(e),a.key=t,n.insertentry(a),i[t]=a}return r},t.prototype.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},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),nm={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]},zm=new em(20),fm=null,vm=hn,hm=cn,gm=(object.freeze||object)({parse:on,lift:ln,tohex:un,fastlerp:hn,fastmaptocolor:vm,lerp:cn,maptocolor:hm,modifyhsl:pn,modifyalpha:fn,stringify:dn,lum:gn,random:yn}),wm=array.prototype.slice,um=[0,0,0,0],xm=function(){function t(t){this.keyframes=[],this.maxtime=0,this.arrdim=0,this.interpolable=!0,this._needssort=!1,this._isallvalueequal=!0,this._lastframe=0,this._lastframepercent=0,this.propname=t}return t.prototype.isfinished=function(){return this._finished},t.prototype.setfinished=function(){this._finished=!0,this._additivetrack&&this._additivetrack.setfinished()},t.prototype.needsanimate=function(){return!this._isallvalueequal&&this.keyframes.length>=2&&this.interpolable&&this.maxtime>0},t.prototype.getadditivetrack=function(){return this._additivetrack},t.prototype.addkeyframe=function(t,e){t>=this.maxtime?this.maxtime=t:this._needssort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(g(e)){var r=an(e);if(i>0&&this.arrdim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isallvalueequal&&(1===r?mn(e,o.value)||(this._isallvalueequal=!1):this._isallvalueequal=!1)}this.arrdim=r}else{if(this.arrdim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=on(e);a?(e=a,this.isvaluecolor=!0):this.interpolable=!1}else if("number"!=typeof e||isnan(e))return void(this.interpolable=!1);if(this._isallvalueequal&&i>0){var o=n[i-1];this.isvaluecolor&&!mn(o.value,e)?this._isallvalueequal=!1:o.value!==e&&(this._isallvalueequal=!1)}}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needssort&&e.sort(function(t,e){return t.time-e.time});for(var n=this.arrdim,i=e.length,r=e[i-1],o=0;i>o;o++)e[o].percent=e[o].time/this.maxtime,n>0&&o!==i-1&&sn(e[o].value,r.value,n);if(t&&this.needsanimate()&&t.needsanimate()&&n===t.arrdim&&this.isvaluecolor===t.isvaluecolor&&!t._finished){this._additivetrack=t;for(var a=e[0].value,o=0;i>o;o++)0===n?e[o].additivevalue=this.isvaluecolor?wn([],e[o].value,a,-1):e[o].value-a:1===n?e[o].additivevalue=wn([],e[o].value,a,-1):2===n&&(e[o].additivevalue=bn([],e[o].value,a,-1))}},t.prototype.step=function(t,e){if(!this._finished){this._additivetrack&&this._additivetrack._finished&&(this._additivetrack=null);var n,i=null!=this._additivetrack,r=i?"additivevalue":"value",o=this.keyframes,a=this.keyframes.length,s=this.propname,l=this.arrdim,u=this.isvaluecolor;if(0>e)n=0;else if(e=0&&!(o[n].percent<=e);n--);n=math.min(n,a-2)}else{for(n=this._lastframe;a>n&&!(o[n].percent>e);n++);n=math.min(n-1,a-2)}var c=o[n+1],p=o[n];if(p&&c){this._lastframe=n,this._lastframepercent=e;var f=c.percent-p.percent;if(0!==f){var d=(e-p.percent)/f,g=i?this._additivevalue:u?um:t[s];if((l>0||u)&&!g&&(g=this._additivevalue=[]),this.usespline){var y=o[n][r],v=o[0===n?n:n-1][r],m=o[n>a-2?a-1:n+1][r],_=o[n>a-3?a-1:n+2][r];if(l>0)1===l?cn(g,v,y,m,_,d,d*d,d*d*d):dn(g,v,y,m,_,d,d*d,d*d*d);else if(u)cn(g,v,y,m,_,d,d*d,d*d*d),i||(t[s]=in(g));else{var x=void 0;x=this.interpolable?tn(v,y,m,_,d,d*d,d*d*d):m,i?this._additivevalue=x:t[s]=x}}else if(l>0)1===l?_n(g,p[r],c[r],d):xn(g,p[r],c[r],d);else if(u)_n(g,p[r],c[r],d),i||(t[s]=in(g));else{var x=void 0;x=this.interpolable?vn(p[r],c[r],d):mn(p[r],c[r],d),i?this._additivevalue=x:t[s]=x}i&&this._addtotarget(t)}}}},t.prototype._addtotarget=function(t){var e=this.arrdim,n=this.propname,i=this._additivevalue;0===e?this.isvaluecolor?(on(t[n],um),wn(um,um,i,1),t[n]=in(um)):t[n]=t[n]+i:1===e?wn(t[n],t[n],i,1):2===e&&bn(t[n],t[n],i,1)},t}(),ym=function(){function t(t,e,n){return this._tracks={},this._trackkeys=[],this._delay=0,this._maxtime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?void a("can' use additive animation on looped animation."):void(this._additiveanimators=n)}return t.prototype.gettarget=function(){return this._target},t.prototype.changetarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenwithkeys(t,e,w(e))},t.prototype.whenwithkeys=function(t,e,n){for(var i=this._tracks,r=0;rn;n++)t[n].call(this)},t.prototype._abortedcallback=function(){this._settracksfinished();var t=this.animation,e=this._abortedcbs;if(t&&t.removeclip(this._clip),this._clip=null,e)for(var n=0;n0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addkeyframe(a.time,t[i]),r.prepare(r.getadditivetrack())}}}},t}(),jm=function(t){function n(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedtime=0,n._pausestart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n.onframe=e.onframe||function(){},n}return e(n,t),n.prototype.addclip=function(t){t.animation&&this.removeclip(t),this._clipshead?(this._clipstail.next=t,t.prev=this._clipstail,t.next=null,this._clipstail=t):this._clipshead=this._clipstail=t,t.animation=this},n.prototype.addanimator=function(t){t.animation=this;var e=t.getclip();e&&this.addclip(e)},n.prototype.removeclip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipshead=n,n?n.prev=e:this._clipstail=e,t.next=t.prev=t.animation=null}},n.prototype.removeanimator=function(t){var e=t.getclip();e&&this.removeclip(e),t.animation=null},n.prototype.update=function(t){for(var e=(new date).gettime()-this._pausedtime,n=e-this._time,i=this._clipshead;i;){var r=i.next,o=i.step(e,n);o?(i.ondestroy&&i.ondestroy(),this.removeclip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},n.prototype._startloop=function(){function t(){e._running&&(pm(t),!e._paused&&e.update())}var e=this;this._running=!0,pm(t)},n.prototype.start=function(){this._running||(this._time=(new date).gettime(),this._pausedtime=0,this._startloop())},n.prototype.stop=function(){this._running=!1},n.prototype.pause=function(){this._paused||(this._pausestart=(new date).gettime(),this._paused=!0)},n.prototype.resume=function(){this._paused&&(this._pausedtime+=(new date).gettime()-this._pausestart,this._paused=!1)},n.prototype.clear=function(){for(var t=this._clipshead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipshead=this._clipstail=null},n.prototype.isfinished=function(){return null==this._clipshead},n.prototype.animate=function(t,e){e=e||{},this.start();var n=new ym(t,e.loop);return this.addanimator(n),n},n}(lm),qm=300,zm=ev.domsupported,km=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=v(t,function(t){var e=t.replace("mouse","pointer");return n.hasownproperty(e)?e:t});return{mouse:t,touch:e,pointer:i}}(),$m={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},jm=!1,qm=function(){function t(t,e){this.stoppropagation=k,this.stopimmediatepropagation=k,this.preventdefault=k,this.type=e.type,this.target=this.currenttarget=t.dom,this.pointertype=e.pointertype,this.clientx=e.clientx,this.clienty=e.clienty}return t}(),t_={mousedown:function(t){t=ke(this.dom,t),this.__maypointercapture=[t.zrx,t.zry],this.trigger("mousedown",t)},mousemove:function(t){t=ke(this.dom,t);var e=this.__maypointercapture;!e||t.zrx===e[0]&&t.zry===e[1]||this.__togglepointercapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ke(this.dom,t),this.__togglepointercapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=ke(this.dom,t);var e=t.toelement||t.relatedtarget;bn(this,e)||(this.__pointercapturing&&(t.zreventcontrol="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){jm=!0,t=ke(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){jm||(t=ke(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=ke(this.dom,t),on(t),this.__lasttouchmoment=new date,this.handler.processgesture(t,"start"),t_.mousemove.call(this,t),t_.mousedown.call(this,t)},touchmove:function(t){t=ke(this.dom,t),on(t),this.handler.processgesture(t,"change"),t_.mousemove.call(this,t)},touchend:function(t){t=ke(this.dom,t),on(t),this.handler.processgesture(t,"end"),t_.mouseup.call(this,t),+new date-+this.__lasttouchmoment1e-10&&m_(t[3]-1)>1e-10?math.sqrt(m_(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copytransform=function(t){for(var e=this,n=0;nn&&(t+=n,n=-n),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=b_(t.x,this.x),n=b_(t.y,this.y);this.width=isfinite(this.x)&&isfinite(this.width)?s_(t.x+t.width,this.x+this.width)-e:t.width,this.height=isfinite(this.y)&&isfinite(this.height)?s_(t.y+t.height,this.y+this.height)-n:t.height,this.x=e,this.y=n},t.prototype.applytransform=function(e){t.applytransform(this,this,e)},t.prototype.calculatetransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=vn();return un(r,r,[-e.x,-e.y]),yn(r,r,[n,i]),un(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(l>o||r>u||h>s||a>c);if(n){var f=1/0,d=0,g=math.abs(o-l),y=math.abs(u-r),v=math.abs(s-h),m=math.abs(c-a),_=math.min(g,y),x=math.min(v,m);l>o||r>u?_>d&&(d=_,y>g?w_.set(i_,-g,0):w_.set(i_,y,0)):f>_&&(f=_,y>g?w_.set(k_,g,0):w_.set(k_,-y,0)),h>s||a>c?x>d&&(d=x,m>v?w_.set(i_,0,-v):w_.set(i_,0,m)):f>_&&(f=_,m>v?w_.set(k_,0,v):w_.set(k_,0,-m))}return n&&w_.copy(n,p?k_:i_),p},t.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isfinite=function(){return isfinite(this.x)&&isfinite(this.y)&&isfinite(this.width)&&isfinite(this.height)},t.prototype.iszero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applytransform=function(e,n,i){if(!i)return void(e!==n&&t.copy(e,n));if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}m_.x=c_.x=n.x,m_.y=d_.y=n.y,t_.x=d_.x=n.x+n.width,t_.y=c_.y=n.y+n.height,m_.transform(i),d_.transform(i),t_.transform(i),c_.transform(i),e.x=b_(m_.x,t_.x,c_.x,d_.x),e.y=b_(m_.y,t_.y,c_.y,d_.y);var l=s_(m_.x,t_.x,c_.x,d_.x),u=s_(m_.y,t_.y,c_.y,d_.y);e.width=l-e.x,e.height=u-e.y},t}(),p_={},l_="12px sans-serif",o_={measuretext:kn},r_="__zr_normal__",b_=["x","y","scalex","scaley","originx","originy","rotation","ignore"],e_={x:!0,y:!0,scalex:!0,scaley:!0,originx:!0,originy:!0,rotation:!0,ignore:!1},n_={},z_=new a_(0,0,0,0),f_=function(){function t(t){this.id=o(),this.animators=[],this.currentstates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.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.markredraw()},t.prototype.beforeupdate=function(){},t.prototype.afterupdate=function(){},t.prototype.update=function(){this.updatetransform(),this.__dirty&&this.updateinnertext()},t.prototype.updateinnertext=function(t){var e=this._textcontent;if(e&&(!e.ignore||t)){this.textconfig||(this.textconfig={});var n=this.textconfig,i=n.local,r=e.innertransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copytransform(e),null!=n.position){var u=z_;u.copy(n.layoutrect?n.layoutrect:this.getboundingrect()),i||u.applytransform(this.transform),this.calculatetextposition?this.calculatetextposition(n_,n,u):ri(n_,n,u),r.x=n_.x,r.y=n_.y,o=n_.align,a=n_.verticalalign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=ii(h[0],u.width),p=ii(h[1],u.height)),l=!0,r.originx=-r.x+c+(i?0:u.x),r.originy=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var f=n.offset;f&&(r.x+=f[0],r.y+=f[1],l||(r.originx=-f[0],r.originy=-f[1]));var d=null==n.inside?"string"==typeof n.position&&n.position.indexof("inside")>=0:n.inside,g=this._innertextdefaultstyle||(this._innertextdefaultstyle={}),y=void 0,v=void 0,m=void 0;d&&this.canbeinsidetext()?(y=n.insidefill,v=n.insidestroke,(null==y||"auto"===y)&&(y=this.getinsidetextfill()),(null==v||"auto"===v)&&(v=this.getinsidetextstroke(y),m=!0)):(y=n.outsidefill,v=n.outsidestroke,(null==y||"auto"===y)&&(y=this.getoutsidefill()),(null==v||"auto"===v)&&(v=this.getoutsidestroke(y),m=!0)),y=y||"#000",(y!==g.fill||v!==g.stroke||m!==g.autostroke||o!==g.align||a!==g.verticalalign)&&(s=!0,g.fill=y,g.stroke=v,g.autostroke=m,g.align=o,g.verticalalign=a,e.setdefaulttextstyle(g)),e.__dirty|=cm,s&&e.dirtystyle(!0)}},t.prototype.canbeinsidetext=function(){return!0},t.prototype.getinsidetextfill=function(){return"#fff"},t.prototype.getinsidetextstroke=function(){return"#000"},t.prototype.getoutsidefill=function(){return this.__zr&&this.__zr.isdarkmode()?h_:u_},t.prototype.getoutsidestroke=function(){var t=this.__zr&&this.__zr.getbackgroundcolor(),e="string"==typeof t&&on(t);e||(e=[255,255,255,1]);for(var n=e[3],i=this.__zr.isdarkmode(),r=0;3>r;r++)e[r]=e[r]*n+(i?0:255)*(1-n);return e[3]=1,dn(e,"rgba")},t.prototype.traverse=function(){},t.prototype.attrkv=function(t,e){"textconfig"===t?this.settextconfig(e):"textcontent"===t?this.settextcontent(e):"clippath"===t?this.setclippath(e):"extra"===t?(this.extra=this.extra||{},h(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markredraw()},t.prototype.show=function(){this.ignore=!1,this.markredraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrkv(t,e);else if(i(t))for(var n=t,i=w(n),r=0;r0},t.prototype.getstate=function(t){return this.states[t]},t.prototype.ensurestate=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearstates=function(t){this.usestate(r_,!1,t)},t.prototype.usestate=function(t,e,n,i){var r=t===r_,o=this.hasstate();if(o||!r){var s=this.currentstates,l=this.statetransition;if(!(p(s,t)>=0)||!e&&1!==s.length){var u;if(this.stateproxy&&!r&&(u=this.stateproxy(t)),u||(u=this.states&&this.states[t]),!u&&!r)return void a("state "+t+" not exists.");r||this.savecurrenttonormalstate(u);var h=!!(u&&u.hoverlayer||i);h&&this._togglehoverlayerflag(!0),this._applystateobj(t,u,this._normalstate,e,!n&&!this.__inhover&&l&&l.duration>0,l);var c=this._textcontent,f=this._textguide;return c&&c.usestate(t,e,n,h),f&&f.usestate(t,e,n,h),r?(this.currentstates=[],this._normalstate={}):e?this.currentstates.push(t):this.currentstates=[t],this._updateanimationtargets(),this.markredraw(),!h&&this.__inhover&&(this._togglehoverlayerflag(!1),this.__dirty&=~cm),u}}},t.prototype.usestates=function(t,e,n){if(t.length){var i=[],r=this.currentstates,o=t.length,a=o===r.length;if(a)for(var s=0;o>s;s++)if(t[s]!==r[s]){a=!1;break}if(a)return;for(var s=0;o>s;s++){var l=t[s],u=void 0;this.stateproxy&&(u=this.stateproxy(l,t)),u||(u=this.states[l]),u&&i.push(u)}var h=i[o-1],c=!!(h&&h.hoverlayer||n);c&&this._togglehoverlayerflag(!0);var p=this._mergestates(i),f=this.statetransition;this.savecurrenttonormalstate(p),this._applystateobj(t.join(","),p,this._normalstate,!1,!e&&!this.__inhover&&f&&f.duration>0,f);var d=this._textcontent,g=this._textguide;d&&d.usestates(t,e,c),g&&g.usestates(t,e,c),this._updateanimationtargets(),this.currentstates=t.slice(),this.markredraw(),!c&&this.__inhover&&(this._togglehoverlayerflag(!1),this.__dirty&=~cm)}else this.clearstates()},t.prototype._updateanimationtargets=function(){for(var t=0;t=0){var n=this.currentstates.slice();n.splice(e,1),this.usestates(n)}},t.prototype.replacestate=function(t,e,n){var i=this.currentstates.slice(),r=p(i,t),o=p(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.usestates(i)},t.prototype.togglestate=function(t,e){e?this.usestate(t,!0):this.removestate(t)},t.prototype._mergestates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)}),this.animators.push(t),n&&n.animation.addanimator(t),n&&n.wakeup()},t.prototype.updateduringanimation=function(){this.markredraw()},t.prototype.stopanimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;i>o;o++){var a=n[o];t&&t!==a.scope?r.push(a):a.stop(e)}return this.animators=r,this},t.prototype.animateto=function(t,e,n){oi(this,t,e,n)},t.prototype.animatefrom=function(t,e,n){oi(this,t,e,n,!0)},t.prototype._transitionstate=function(t,e,n,i){for(var r=oi(this,e,n,i),o=0;o8)&&(n("position","_legacypos","x","y"),n("scale","_legacyscale","scalex","scaley"),n("origin","_legacyorigin","originx","originy"))}(),t}();d(f_,lm),d(f_,__);var v_=function(t){function n(e){var n=t.call(this)||this;return n.isgroup=!0,n._children=[],n.attr(e),n}return e(n,t),n.prototype.childrenref=function(){return this._children},n.prototype.children=function(){return this._children.slice()},n.prototype.childat=function(t){return this._children[t]},n.prototype.childofname=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doadd(t))}return this},n.prototype.replace=function(t,e){var n=p(this._children,t);return n>=0&&this.replaceat(e,n),this},n.prototype.replaceat=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeselffromzr(r),this._doadd(t)}return this},n.prototype._doadd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addselftozr(e),e&&e.refresh()},n.prototype.remove=function(t){var e=this.__zr,n=this._children,i=p(n,t);return 0>i?this:(n.splice(i,1),t.parent=null,e&&t.removeselffromzr(e),e&&e.refresh(),this)},n.prototype.removeall=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillframeaccum++,this._stillframeaccum>this._sleepafterstill&&this.animation.stop())},t.prototype.setsleepafterstill=function(t){this._sleepafterstill=t},t.prototype.wakeup=function(){this.animation.start(),this._stillframeaccum=0},t.prototype.addhover=function(){},t.prototype.removehover=function(){},t.prototype.clearhover=function(){},t.prototype.refreshhover=function(){this._needsrefreshhover=!0},t.prototype.refreshhoverimmediately=function(){this._needsrefreshhover=!1,this.painter.refreshhover&&"canvas"===this.painter.gettype()&&this.painter.refreshhover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearanimation=function(){this.animation.clear()},t.prototype.getwidth=function(){return this.painter.getwidth()},t.prototype.getheight=function(){return this.painter.getheight()},t.prototype.pathtoimage=function(t,e){return this.painter.pathtoimage?this.painter.pathtoimage(t,e):void 0},t.prototype.setcursorstyle=function(t){this.handler.setcursorstyle(t)},t.prototype.findhover=function(t,e){return this.handler.findhover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getroots(),e=0;e0&&(this._ux=ew(n/s_/t)||0,this._uy=ew(n/s_/e)||0)},t.prototype.setdpr=function(t){this.dpr=t},t.prototype.setcontext=function(t){this._ctx=t},t.prototype.getcontext=function(){return this._ctx},t.prototype.beginpath=function(){return this._ctx&&this._ctx.beginpath(),this.reset(),this},t.prototype.reset=function(){this._savedata&&(this._len=0),this._linedash&&(this._linedash=null,this._dashoffset=0),this._pathseglen&&(this._pathseglen=null,this._pathlen=0),this._version++},t.prototype.moveto=function(t,e){return this._drawpendingpt(),this.adddata(wx.m,t,e),this._ctx&&this._ctx.moveto(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineto=function(t,e){var n=ew(t-this._xi),i=ew(e-this._yi),r=n>this._ux||i>this._uy;if(this.adddata(wx.l,t,e),this._ctx&&r&&(this._needsdash?this._dashedlineto(t,e):this._ctx.lineto(t,e)),r)this._xi=t,this._yi=e,this._pendingptdist=0;else{var o=n*n+i*i;o>this._pendingptdist&&(this._pendingptx=t,this._pendingpty=e,this._pendingptdist=o)}return this},t.prototype.beziercurveto=function(t,e,n,i,r,o){return this._drawpendingpt(),this.adddata(wx.c,t,e,n,i,r,o),this._ctx&&(this._needsdash?this._dashedbezierto(t,e,n,i,r,o):this._ctx.beziercurveto(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticcurveto=function(t,e,n,i){return this._drawpendingpt(),this.adddata(wx.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},t.prototype.arc=function(t,e,n,i,r,o){this._drawpendingpt(),ow[0]=i,ow[1]=r,lo(ow,o),i=ow[0],r=ow[1];var a=r-i;return this.adddata(wx.a,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=jx(r)*n+t,this._yi=qx(r)*n+e,this},t.prototype.arcto=function(t,e,n,i,r){return this._drawpendingpt(),this._ctx&&this._ctx.arcto(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawpendingpt(),this._ctx&&this._ctx.rect(t,e,n,i),this.adddata(wx.r,t,e,n,i),this},t.prototype.closepath=function(){this._drawpendingpt(),this.adddata(wx.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},t.prototype.fill=function(t){t&&t.fill(),this.tostatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.tostatic()},t.prototype.setlinedash=function(t){if(t instanceof array){this._linedash=t,this._dashidx=0;for(var e=0,n=0;nn;n++)this.data[n]=t[n];this._len=e},t.prototype.appendpath=function(t){t instanceof array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;e>r;r++)n+=t[r].len();rw&&this.data instanceof float32array&&(this.data=new float32array(i+n));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;at.length&&(this._expanddata(),t=this.data);for(var e=0;e0&&(this._ctx&&this._ctx.lineto(this._pendingptx,this._pendingpty),this._pendingptdist=0)},t.prototype._expanddata=function(){if(!(this.data instanceof array)){for(var t=[],e=0;es&&(s=r+s),s%=r,f-=s*h,d-=s*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=d||0>c&&d>=e);)i=this._dashidx,n=o[i],f+=h*n,d+=c*n,this._dashidx=(i+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>d||0>c&&d>u||a[i%2?"moveto":"lineto"](h>=0?kx(f,t):$x(f,t),c>=0?kx(d,e):$x(d,e));h=f-t,c=d-e,this._dashoffset=-tw(h*h+c*c)},t.prototype._dashedbezierto=function(t,e,n,i,r,o){var a,s,l,u,h,c=this._ctx,p=this._dashsum,f=this._dashoffset,d=this._linedash,g=this._xi,y=this._yi,v=0,m=this._dashidx,_=d.length,x=0;for(0>f&&(f=p+f),f%=p,a=0;1>a;a+=.1)s=gr(g,t,n,r,a+.1)-gr(g,t,n,r,a),l=gr(y,e,i,o,a+.1)-gr(y,e,i,o,a),v+=tw(s*s+l*l);for(;_>m&&(x+=d[m],!(x>f));m++);for(a=(x-f)/v;1>=a;)u=gr(g,t,n,r,a),h=gr(y,e,i,o,a),m%2?c.moveto(u,h):c.lineto(u,h),a+=d[m]/v,m=(m+1)%_;m%2!==0&&c.lineto(r,o),s=r-u,l=o-h,this._dashoffset=-tw(s*s+l*l)},t.prototype._dashedquadraticto=function(t,e,n,i){var r=n,o=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,o)},t.prototype.tostatic=function(){if(this._savedata){this._drawpendingpt();var t=this.data;t instanceof array&&(t.length=this._len,rw&&this._len>11&&(this.data=new float32array(t)))}},t.prototype.getboundingrect=function(){yx[0]=yx[1]=qx[0]=qx[1]=number.max_value,jx[0]=jx[1]=zx[0]=zx[1]=-number.max_value;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tc;){var p=t[c++],f=1===c;f&&(r=t[c],o=t[c+1],a=r,s=o);var d=-1;switch(p){case wx.m:r=a=t[c++],o=s=t[c++];break;case wx.l:var g=t[c++],y=t[c++],v=g-r,m=y-o;(ew(v)>n||ew(m)>i||c===e-1)&&(d=math.sqrt(v*v+m*m),r=g,o=y);break;case wx.c:var _=t[c++],x=t[c++],g=t[c++],y=t[c++],w=t[c++],b=t[c++];d=qr(r,o,_,x,g,y,w,b,10),r=w,o=b;break;case wx.q:var _=t[c++],x=t[c++],g=t[c++],y=t[c++];d=eo(r,o,_,x,g,y,10),r=g,o=y;break;case wx.a:var s=t[c++],m=t[c++],t=t[c++],c=t[c++],d=t[c++],k=t[c++],i=k+d;c+=1;{!t[c++]}f&&(a=jx(d)*t+s,s=qx(d)*c+m),d=$x(t,c)*kx(iw,math.abs(k)),r=jx(i)*t+s,o=qx(i)*c+m;break;case wx.r:a=r=t[c++],s=o=t[c++];var a=t[c++],p=t[c++];d=2*a+2*p;break;case wx.z:var v=a-r,m=s-o;d=math.sqrt(v*v+m*m),r=a,o=s}d>=0&&(l[h++]=d,u+=d)}return this._pathlen=u,u},t.prototype.rebuildpath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p,f=this.data,d=this._ux,g=this._uy,y=this._len,v=1>e,m=0,_=0,x=0;if(!v||(this._pathseglen||this._calculatelength(),l=this._pathseglen,u=this._pathlen,h=e*u))t:for(var w=0;y>w;){var b=f[w++],s=1===w;switch(s&&(r=f[w],o=f[w+1],n=r,i=o),b!==wx.l&&x>0&&(t.lineto(c,p),x=0),b){case wx.m:n=r=f[w++],i=o=f[w++],t.moveto(r,o);break;case wx.l:a=f[w++],s=f[w++];var m=ew(a-r),t=ew(s-o);if(m>d||t>g){if(v){var c=l[_++];if(m+c>h){var d=(h-m)/c;t.lineto(r*(1-d)+a*d,o*(1-d)+s*d);break t}m+=c}t.lineto(a,s),r=a,o=s,x=0}else{var k=m*m+t*t;k>x&&(c=a,p=s,x=k)}break;case wx.c:var i=f[w++],a=f[w++],p=f[w++],l=f[w++],o=f[w++],r=f[w++];if(v){var c=l[_++];if(m+c>h){var d=(h-m)/c;yr(r,i,p,o,d,ux),yr(o,a,l,r,d,xx),t.beziercurveto(ux[1],xx[1],ux[2],xx[2],ux[3],xx[3]);break t}m+=c}t.beziercurveto(i,a,p,l,o,r),r=o,o=r;break;case wx.q:var i=f[w++],a=f[w++],p=f[w++],l=f[w++];if(v){var c=l[_++];if(m+c>h){var d=(h-m)/c;qr(r,i,p,d,ux),qr(o,a,l,d,xx),t.quadraticcurveto(ux[1],xx[1],ux[2],xx[2]);break t}m+=c}t.quadraticcurveto(i,a,p,l),r=p,o=l;break;case wx.a:var b=f[w++],e=f[w++],n=f[w++],z=f[w++],f=f[w++],v=f[w++],h=f[w++],g=!f[w++],w=n>z?n:z,u=ew(n-z)>.001,x=f+v,y=!1;if(v){var c=l[_++];m+c>h&&(x=f+v*(h-m)/c,y=!0),m+=c}if(u&&t.ellipse?t.ellipse(b,e,n,z,h,f,x,g):t.arc(b,e,w,f,x,g),y)break t;s&&(n=jx(f)*n+b,i=qx(f)*z+e),r=jx(x)*n+b,o=qx(x)*z+e;break;case wx.r:n=r=f[w],i=o=f[w+1],a=f[w++],s=f[w++];var j=f[w++],q=f[w++];if(v){var c=l[_++];if(m+c>h){var z=h-m;t.moveto(a,s),t.lineto(a+kx(z,j),s),z-=j,z>0&&t.lineto(a+j,s+kx(z,q)),z-=q,z>0&&t.lineto(a+$x(j-z,0),s+q),z-=j,z>0&&t.lineto(a,s+$x(q-z,0));break t}m+=c}t.rect(a,s,j,q);break;case wx.z:if(v){var c=l[_++];if(m+c>h){var d=(h-m)/c;t.lineto(r*(1-d)+n*d,o*(1-d)+i*d);break t}m+=c}t.closepath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():array.prototype.slice.call(n),e._len=this._len,e},t.cmd=wx,t.initdefaultprops=function(){var e=t.prototype;e._savedata=!0,e._needsdash=!1,e._dashoffset=0,e._dashidx=0,e._dashsum=0,e._ux=0,e._uy=0,e._pendingptdist=0,e._version=0}(),t}(),sw=2*math.pi,lw=2*math.pi,uw=aw.cmd,hw=2*math.pi,cw=1e-4,pw=[-1,-1,-1],fw=[-1,-1],dw=c({fill:"#000",stroke:null,strokepercent:1,fillopacity:1,strokeopacity:1,linedashoffset:0,linewidth:1,linecap:"butt",miterlimit:10,strokenoscale:!1,strokefirst:!1},yx),gw={style:c({fill:!0,stroke:!0,strokepercent:!0,fillopacity:!0,strokeopacity:!0,linedashoffset:!0,linewidth:!0,miterlimit:!0},vx.style)},yw=["x","y","rotation","scalex","scaley","originx","originy","invisible","culling","z","z2","zlevel","parent"],vw=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.update=function(){var e=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalel=this._decalel||new n;r.buildpath===n.prototype.buildpath&&(r.buildpath=function(t){e.buildpath(t,e.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowcolor=null,i.strokefirst&&(o.stroke=null);for(var s=0;s.5?u_:e>.2?c_:h_}if(t)return h_}return u_},n.prototype.getinsidetextstroke=function(t){var e=this.style.fill;if(c(e)){var n=this.__zr,i=!(!n||!n.isdarkmode()),r=gn(t,0)0))},n.prototype.hasfill=function(){var t=this.style,e=t.fill;return null!=e&&"none"!==e},n.prototype.getboundingrect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createpathproxy());var r=this.path;(i||this.__dirty&km)&&(r.beginpath(),this.buildpath(r,this.shape,!1),this.pathupdated()),t=r.getboundingrect()}if(this._rect=t,this.hasstroke()&&this.path&&this.path.len()>0){var o=this._rectwithstroke||(this._rectwithstroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokenoscale?this.getlinescale():1,s=e.linewidth;if(!this.hasfill()){var l=this.strokecontainthreshold;s=math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},n.prototype.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 o=this.path;if(this.hasstroke()){var a=r.linewidth,s=r.strokenoscale?this.getlinescale():1;if(s>1e-10&&(this.hasfill()||(a=math.max(a,this.strokecontainthreshold)),so(o,a/s,t,e)))return!0}if(this.hasfill())return bo(o,t,e)}return!1},n.prototype.dirtyshape=function(){this.__dirty|=km,this._rect&&(this._rect=null),this._decalel&&this._decalel.dirtyshape(),this.markredraw()},n.prototype.dirty=function(){this.dirtystyle(),this.dirtyshape()},n.prototype.animateshape=function(t){return this.animate("shape",t)},n.prototype.updateduringanimation=function(t){"style"===t?this.dirtystyle():"shape"===t?this.dirtyshape():this.markredraw()},n.prototype.attrkv=function(e,n){"shape"===e?this.setshape(n):t.prototype.attrkv.call(this,e,n)},n.prototype.setshape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:h(n,t),this.dirtyshape(),this},n.prototype.shapechanged=function(){return!!(this.__dirty&km)},n.prototype.createstyle=function(t){return q(dw,t)},n.prototype._innersavetonormal=function(e){t.prototype._innersavetonormal.call(this,e);var n=this._normalstate;e.shape&&!n.shape&&(n.shape=h({},this.shape))},n.prototype._applystateobj=function(e,n,i,r,o,a){t.prototype._applystateobj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=h({},i.shape),h(s,n.shape)):(s=h({},r?this.shape:i.shape),h(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=h({},this.shape);for(var u={},c=w(s),p=0;p0},n.prototype.hasfill=function(){var t=this.style,e=t.fill;return null!=e&&"none"!==e},n.prototype.createstyle=function(t){return q(mw,t)},n.prototype.setboundingrect=function(t){this._rect=t},n.prototype.getboundingrect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=qn(e,t.font,t.textalign,t.textbaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasstroke()){var i=t.linewidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},n.initdefaultprops=function(){var t=n.prototype;t.dirtyrecttolerance=10}(),n}(xx);_w.prototype.type="tspan";var xw=c({x:0,y:0},yx),ww={style:c({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,swidth:!0,sheight:!0},vx.style)},bw=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.createstyle=function(t){return q(xw,t)},n.prototype._getsize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i=mo(e.image)?e.image:this.__image;if(!i)return 0;var r="width"===t?"height":"width",o=e[r];return null==o?i[t]:i[t]/i[r]*o},n.prototype.getwidth=function(){return this._getsize("width")},n.prototype.getheight=function(){return this._getsize("height")},n.prototype.getanimationstyleprops=function(){return ww},n.prototype.getboundingrect=function(){var t=this.style;return this._rect||(this._rect=new a_(t.x||0,t.y||0,this.getwidth(),this.getheight())),this._rect},n}(xx);bw.prototype.type="image";var sw=math.round,mw=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),tw={},cw=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultshape=function(){return new mw},n.prototype.buildpath=function(t,e){var n,i,r,o;if(this.subpixeloptimize){var a=do(tw,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?to(t,e):t.rect(n,i,r,o)},n.prototype.iszeroarea=function(){return!this.shape.width||!this.shape.height},n}(vw);cw.prototype.type="rect";var dw={fill:"#000"},kw=2,iw={style:c({fill:!0,stroke:!0,fillopacity:!0,strokeopacity:!0,linewidth:!0,fontsize:!0,lineheight:!0,width:!0,height:!0,textshadowcolor:!0,textshadowblur:!0,textshadowoffsetx:!0,textshadowoffsety:!0,backgroundcolor:!0,padding:!0,bordercolor:!0,borderwidth:!0,borderradius:!0},vx.style)},aw=function(t){function n(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultstyle=dw,n.attr(e),n}return e(n,t),n.prototype.childrenref=function(){return this._children},n.prototype.update=function(){t.prototype.update.call(this),this.stylechanged()&&this._updatesubtexts();for(var e=0;e0,t=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakall"===t.overflow),c=r.calculatedlineheight,d=0;dm&&(k=x[m],!k.align||"left"===k.align);)this._placetoken(k,t,b,g,t,"left",v),s-=k.width,t+=k.width,m++;for(;d>=0&&(k=x[d],"right"===k.align);)this._placetoken(k,t,b,g,c,"right",v),s-=k.width,c-=k.width,d--;for(t+=(i-(t-d)-(y-c)-s)/2;d>=m;)k=x[m],this._placetoken(k,t,b,g,t+k.width/2,"center",v),t+=k.width,m++;g+=b}},n.prototype._placetoken=function(t,e,n,i,r,o,a){var s=e.rich[t.stylename]||{};s.text=t.text;var l=t.verticalalign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2);var h=!t.islineholder&&bo(s);h&&this._renderbackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var c=!!s.backgroundcolor,p=t.textpadding;p&&(r=oo(r,o,p),u-=t.height/2-p[0]-t.innerheight/2);var f=this._getorcreatechild(_w),d=f.createstyle();f.usestyle(d);var g=this._defaultstyle,y=!1,v=0,m=lo("fill"in s?s.fill:"fill"in e?e.fill:(y=!0,g.fill)),_=po("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||a||g.autostroke&&!y?null:(v=kw,g.stroke)),x=s.textshadowblur>0||e.textshadowblur>0;d.text=t.text,d.x=r,d.y=u,x&&(d.shadowblur=s.textshadowblur||e.textshadowblur||0,d.shadowcolor=s.textshadowcolor||e.textshadowcolor||"transparent",d.shadowoffsetx=s.textshadowoffsetx||e.textshadowoffsetx||0,d.shadowoffsety=s.textshadowoffsety||e.textshadowoffsety||0),d.textalign=o,d.textbaseline="middle",d.font=t.font||l_,d.opacity=f(s.opacity,e.opacity,1),_&&(d.linewidth=f(s.linewidth,e.linewidth,v),d.linedash=z(s.linedash,e.linedash),d.linedashoffset=e.linedashoffset||0,d.stroke=_),m&&(d.fill=m);var w=t.contentwidth,b=t.contentheight;f.setboundingrect(new a_(ti(d.x,w,d.textalign),ei(d.y,b,d.textbaseline),w,b))},n.prototype._renderbackground=function(t,e,n,i,r,o){var a,s,l=t.backgroundcolor,u=t.borderwidth,h=t.bordercolor,c=l&&l.image,p=l&&!c,f=t.borderradius,d=this;if(p||t.lineheight||u&&h){a=this._getorcreatechild(cw),a.usestyle(a.createstyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=f,a.dirtyshape()}if(p){var y=a.style;y.fill=l||null,y.fillopacity=z(t.fillopacity,1)}else if(c){s=this._getorcreatechild(bw),s.onload=function(){d.dirtystyle()};var v=s.style;v.image=l.image,v.x=n,v.y=i,v.width=r,v.height=o}if(u&&h){var y=a.style;y.linewidth=u,y.stroke=h,y.strokeopacity=z(t.strokeopacity,1),y.linedash=t.borderdash,y.linedashoffset=t.borderdashoffset||0,a.strokecontainthreshold=0,a.hasfill()&&a.hasstroke()&&(y.strokefirst=!0,y.linewidth*=2)}var m=(a||s).style;m.shadowblur=t.shadowblur||0,m.shadowcolor=t.shadowcolor||"transparent",m.shadowoffsetx=t.shadowoffsetx||0,m.shadowoffsety=t.shadowoffsety||0,m.opacity=f(t.opacity,e.opacity,1)},n.makefont=function(t){var e="";if(t.fontsize||t.fontfamily||t.fontweight){var n="";n="string"!=typeof t.fontsize||-1===t.fontsize.indexof("px")&&-1===t.fontsize.indexof("rem")&&-1===t.fontsize.indexof("em")?isnan(+t.fontsize)?"12px":t.fontsize+"px":t.fontsize,e=[t.fontstyle,t.fontweight,n,t.fontfamily||"sans-serif"].join(" ")}return e&&w(e)||t.textfont||t.font},n}(xx),pw={left:!0,right:1,center:1},lw={top:1,bottom:1,middle:1},ow=ar(),rw=function(t,e,n,i){if(i){var r=ow(i);r.dataindex=n,r.datatype=e,r.seriesindex=t,"group"===i.type&&i.traverse(function(i){var r=ow(i);r.seriesindex=t,r.dataindex=n,r.datatype=e})}},bw=1,ew={},nw=ar(),zw=0,fw=1,vw=2,hw=["emphasis","blur","select"],gw=["normal","emphasis","blur","select"],ww=10,uw=9,xw="highlight",yw="downplay",jw="select",qw="unselect",zw="toggleselect",kw=new em(100),$w=["emphasis","blur","select"],jw={itemstyle:"getitemstyle",linestyle:"getlinestyle",areastyle:"getareastyle"},qw=aw.cmd,tb=[[],[],[]],eb=math.sqrt,nb=math.atan2,ib=math.sqrt,rb=math.sin,ob=math.cos,ab=math.pi,sb=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,lb=/-?([0-9]*\.)?[0-9]+([ee]-?[0-9]+)?/g,ub=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.applytransform=function(){},n}(vw),hb=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),cb=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultshape=function(){return new hb},n.prototype.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)},n}(vw);cb.prototype.type="circle";var pb=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),fb=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultshape=function(){return new pb},n.prototype.buildpath=function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveto(i-o,r),t.beziercurveto(i-o,r-l,i-s,r-a,i,r-a),t.beziercurveto(i+s,r-a,i+o,r-l,i+o,r),t.beziercurveto(i+o,r+l,i+s,r+a,i,r+a),t.beziercurveto(i-s,r+a,i-o,r+l,i-o,r),t.closepath()},n}(vw);fb.prototype.type="ellipse";var db=math.pi,gb=2*db,yb=math.sin,vb=math.cos,mb=math.acos,_b=math.atan2,xb=math.abs,wb=math.sqrt,bb=math.max,sb=math.min,mb=1e-4,tb=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startangle=0,this.endangle=2*math.pi,this.clockwise=!0,this.cornerradius=0,this.innercornerradius=0 }return t}(),cb=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultshape=function(){return new tb},n.prototype.buildpath=function(t,e){va(t,e)},n.prototype.iszeroarea=function(){return this.shape.startangle===this.shape.endangle||this.shape.r===this.shape.r0},n}(vw);cb.prototype.type="sector";var db=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),kb=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultshape=function(){return new db},n.prototype.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)},n}(vw);kb.prototype.type="ring";var ib=function(){function t(){this.points=null,this.smooth=0,this.smoothconstraint=null}return t}(),ab=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultshape=function(){return new ib},n.prototype.buildpath=function(t,e){ua(t,e,!0)},n}(vw);ab.prototype.type="polygon";var pb=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothconstraint=null}return t}(),lb=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultstyle=function(){return{stroke:"#000",fill:null}},n.prototype.getdefaultshape=function(){return new pb},n.prototype.buildpath=function(t,e){ua(t,e,!1)},n}(vw);lb.prototype.type="polyline";var ob={},rb=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),bb=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultstyle=function(){return{stroke:"#000",fill:null}},n.prototype.getdefaultshape=function(){return new rb},n.prototype.buildpath=function(t,e){var n,i,r,o;if(this.subpixeloptimize){var a=co(ob,e,this.style);n=a.x1,i=a.y1,r=a.x2,o=a.y2}else n=e.x1,i=e.y1,r=e.x2,o=e.y2;var s=e.percent;0!==s&&(t.moveto(n,i),1>s&&(r=n*(1-s)+r*s,o=i*(1-s)+o*s),t.lineto(r,o))},n.prototype.pointat=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},n}(vw);bb.prototype.type="line";var eb=[],nb=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}(),zb=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultstyle=function(){return{stroke:"#000",fill:null}},n.prototype.getdefaultshape=function(){return new nb},n.prototype.buildpath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveto(n,i),null==l||null==u?(1>h&&(qr(n,a,r,h,eb),a=eb[1],r=eb[2],qr(i,s,o,h,eb),s=eb[1],o=eb[2]),t.quadraticcurveto(a,s,r,o)):(1>h&&(yr(n,a,l,r,h,eb),a=eb[1],l=eb[2],r=eb[3],yr(i,s,u,o,h,eb),s=eb[1],u=eb[2],o=eb[3]),t.beziercurveto(a,s,l,u,r,o)))},n.prototype.pointat=function(t){return xa(this.shape,t,!1)},n.prototype.tangentat=function(t){var e=xa(this.shape,t,!0);return he(e,e)},n}(vw);zb.prototype.type="bezier-curve";var fb=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startangle=0,this.endangle=2*math.pi,this.clockwise=!0}return t}(),vb=function(t){function n(e){return t.call(this,e)||this}return e(n,t),n.prototype.getdefaultstyle=function(){return{stroke:"#000",fill:null}},n.prototype.getdefaultshape=function(){return new fb},n.prototype.buildpath=function(t,e){var n=e.cx,i=e.cy,r=math.max(e.r,0),o=e.startangle,a=e.endangle,s=e.clockwise,l=math.cos(o),u=math.sin(o);t.moveto(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)},n}(vw);vb.prototype.type="arc";var hb=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return e(n,t),n.prototype._updatepathdirty=function(){for(var t=this.shape.paths,e=this.shapechanged(),n=0;nn;n++)this._corners[n]=new w_;for(var n=0;2>n;n++)this._axes[n]=new w_;t&&this.fromboundingrect(t,e)}return t.prototype.fromboundingrect=function(t,e){var n=this._corners,i=this._axes,r=t.x,o=t.y,a=r+t.width,s=o+t.height;if(n[0].set(r,o),n[1].set(a,o),n[2].set(a,s),n[3].set(r,s),e)for(var l=0;4>l;l++)n[l].transform(e);w_.sub(i[0],n[1],n[0]),w_.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var l=0;2>l;l++)this._origin[l]=i[l].dot(n[0])},t.prototype.intersect=function(t,e){var n=!0,i=!e;return jb.set(1/0,1/0),qb.set(0,0),!this._intersectcheckoneside(this,t,jb,qb,i,1)&&(n=!1,i)?n:!this._intersectcheckoneside(t,this,jb,qb,i,-1)&&(n=!1,i)?n:(i||w_.copy(e,n?jb:qb),n)},t.prototype._intersectcheckoneside=function(t,e,n,i,r,o){for(var a=!0,s=0;2>s;s++){var l=this._axes[s];if(this._getprojminmaxonaxis(s,t._corners,xb),this._getprojminmaxonaxis(s,e._corners,yb),xb[1]yb[1]){if(a=!1,r)return a;var u=math.abs(yb[0]-xb[1]),h=math.abs(xb[0]-yb[1]);math.min(u,h)>i.len()&&(h>u?w_.scale(i,l,-u*o):w_.scale(i,l,h*o))}else if(n){var u=math.abs(yb[0]-xb[1]),h=math.abs(xb[0]-yb[1]);math.min(u,h)u?w_.scale(n,l,u*o):w_.scale(n,l,-h*o))}}return a},t.prototype._getprojminmaxonaxis=function(t,e,n){for(var i=this._axes[t],r=this._origin,o=e[0].dot(i)+r[t],a=o,s=o,l=1;l-1?ms:cs}():cs;vs(ts,bs),vs(ms,ss);var as=1e3,ps=60*as,ls=60*ps,os=24*ls,rs=365*os,bs={year:"{yyyy}",month:"{mmm}",day:"{d}",hour:"{hh}:{mm}",minute:"{hh}:{mm}",second:"{hh}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {sss}",none:"{yyyy}-{mm}-{dd} {hh}:{mm}:{ss} {sss}"},es="{yyyy}-{mm}-{dd}",ns={year:"{yyyy}",month:"{yyyy}-{mm}",day:es,hour:es+" "+bs.hour,minute:es+" "+bs.minute,second:es+" "+bs.second,millisecond:bs.none},zs=["year","month","day","hour","minute","second","millisecond"],fs=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"],vs=h,hs=/([&<>"'])/g,gs={"&":"&","<":"<",">":">",'"':""","'":"'"},ws=["a","b","c","d","e","f","g"],us=function(t,e){return"{"+t+(null==e?"":e)+"}"},xs=y,ys=["left","right","top","bottom","width","height"],js=[["width","left","right"],["height","top","bottom"]],qs=sl,zs=(s(sl,"vertical"),s(sl,"horizontal"),ar()),ks=function(t){function n(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=es("ec_cpt_model"),r}return e(n,t),n.prototype.init=function(t,e,n){this.mergedefaultandtheme(t,n)},n.prototype.mergedefaultandtheme=function(t,e){var n=tl(this),i=n?dl(t):{},r=e.gettheme();l(t,r.get(this.maintype)),l(t,this.getdefaultoption()),n&&cl(t,i,n)},n.prototype.mergeoption=function(t){l(this.option,t,!0);var e=tl(this);e&&cl(this.option,t,e)},n.prototype.optionupdated=function(){},n.prototype.getdefaultoption=function(){var t=this.constructor;if(!yr(t))return t.defaultoption;var e=zs(this);if(!e.defaultoption){for(var n=[],i=t;i;){var r=i.prototype.defaultoption;r&&n.push(r),i=i.superclass}for(var o={},a=n.length-1;a>=0;a--)o=l(o,n[a],!0);e.defaultoption=o}return e.defaultoption},n.prototype.getreferringcomponents=function(t,e){var n=t+"index",i=t+"id";return ur(this.ecmodel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},n.prototype.getboxlayoutparams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},n.protoinitialize=function(){var t=n.prototype;t.type="component",t.id="",t.name="",t.maintype="",t.subtype="",t.componentindex=0}(),n}(xs);_r(ks,xs),sr(ks),ns(ks),zs(ks,il);var $s="";"undefined"!=typeof navigator&&($s=navigator.platform||"");var js,qs,tm="rgba(0, 0, 0, 0.2)",em={darkmode:"auto",colorby:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientcolor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:tm,dasharrayx:[1,0],dasharrayy:[2,5],symbolsize:1,rotation:math.pi/6},{color:tm,symbol:"circle",dasharrayx:[[8,8],[0,8,8,0]],dasharrayy:[6,0],symbolsize:.8},{color:tm,dasharrayx:[1,0],dasharrayy:[4,3],rotation:-math.pi/4},{color:tm,dasharrayx:[[6,6],[0,6,6,0]],dasharrayy:[6,0]},{color:tm,dasharrayx:[[1,0],[1,6]],dasharrayy:[1,0,6,0],rotation:math.pi/4},{color:tm,symbol:"triangle",dasharrayx:[[9,9],[0,9,9,0]],dasharrayy:[7,2],symbolsize:.75}]}},textstyle:{fontfamily:$s.match(/^win/)?"microsoft yahei":"sans-serif",fontsize:12,fontstyle:"normal",fontweight:"normal"},blendmode:null,stateanimation:{duration:300,easing:"cubicout"},animation:"auto",animationduration:1e3,animationdurationupdate:500,animationeasing:"cubicinout",animationeasingupdate:"cubicinout",animationthreshold:2e3,progressivethreshold:3e3,progressive:400,hoverlayerthreshold:3e3,useutc:!1},nm=y(["tooltip","label","itemname","itemid","itemgroupid","seriesname"]),im="original",rm="arrayrows",om="objectrows",am="keyedcolumns",sm="typedarray",lm="unknown",um="column",hm="row",cm={must:1,might:2,not:3},pm=ar(),fm=y(),dm=ar(),gm=(ar(),function(){function t(){}return t.prototype.getcolorfrompalette=function(t,e,n){var i=hi(this.get("color",!0)),r=this.get("colorlayer",!0);return fl(this,dm,i,r,t,e,n)},t.prototype.clearcolorpalette=function(){vl(this,dm)},t}()),ym="\x00_ec_inner",vm=1,mm=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new xs(i),this._locale=new xs(r),this._optionmanager=o},n.prototype.setoption=function(t,e,n){var i=xl(e);this._optionmanager.setoption(t,n,i),this._resetoption(null,i)},n.prototype.resetoption=function(t,e){return this._resetoption(t,xl(e))},n.prototype._resetoption=function(t,e){var n=!1,i=this._optionmanager;if(!t||"recreate"===t){var r=i.mountoption("recreate"===t);this.option&&"recreate"!==t?(this.restoredata(),this._mergeoption(r,e)):qs(this,r),n=!0}if(("timeline"===t||"media"===t)&&this.restoredata(),!t||"recreate"===t||"timeline"===t){var o=i.gettimelineoption(this);o&&(n=!0,this._mergeoption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getmediaoption(this);a.length&&y(a,function(t){n=!0,this._mergeoption(t,e)},this)}return n},n.prototype.mergeoption=function(t){this._mergeoption(t,null)},n.prototype._mergeoption=function(t,e){function n(e){var n=nl(this,e,hi(t[e])),a=r.get(e),s=a?c&&c.get(e)?"replacemerge":"normalmerge":"replaceall",l=xi(a,n,s);ir(l,e,ks),i[e]=null,r.set(e,null),o.set(e,0);var u=[],p=[],f=0;y(l,function(t,n){var i=t.existing,r=t.newoption;if(r){var o="series"===e,a=ks.getclass(e,t.keyinfo.subtype,!o);if(!a)return;if(i&&i.constructor===a)i.name=t.keyinfo.name,i.mergeoption(r,this),i.optionupdated(r,!1);else{var s=h({componentindex:n},t.keyinfo);i=new a(r,this,this,s),h(i,s),t.brandnew&&(i.__requirenewview=!0),i.init(r,this,this),i.optionupdated(null,!0)}}else i&&(i.mergeoption({},this),i.optionupdated({},!1));i?(u.push(i.option),p.push(i),f++):(u.push(void 0),p.push(void 0))},this),i[e]=u,r.set(e,p),o.set(e,f),"series"===e&&js(this)}var i=this.option,r=this._componentsmap,o=this._componentscount,a=[],u=y(),c=e&&e.replacemergemaintypemap;al(this),y(t,function(t,e){null!=t&&(ks.hasclass(e)?e&&(a.push(e),u.set(e,!0)):i[e]=null==i[e]?s(t):l(i[e],t,!0))}),c&&c.each(function(t,e){ks.hasclass(e)&&!u.get(e)&&(a.push(e),u.set(e,!0))}),ks.topologicaltravel(a,ks.getallclassmaintypes(),n,this),this._seriesindices||js(this)},n.prototype.getoption=function(){var t=s(this.option);return y(t,function(e,n){if(ks.hasclass(n)){for(var i=hi(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!nr(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}}),delete t[ym],t},n.prototype.gettheme=function(){return this._theme},n.prototype.getlocalemodel=function(){return this._locale},n.prototype.setupdatepayload=function(t){this._payload=t},n.prototype.getupdatepayload=function(){return this._payload},n.prototype.getcomponent=function(t,e){var n=this._componentsmap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;ra;a++)jl(n[a].query,t,e)&&r.push(a);return!r.length&&i&&(r=[-1]),r.length&&!zl(r,this._currentmediaindices)&&(o=v(r,function(t){return s(-1===t?i.option:n[t].option)})),this._currentmediaindices=r,o},t}(),pm=y,lm=i,om=["areastyle","linestyle","nodestyle","linkstyle","chordstyle","label","labelline"],rm=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],bm=["grid","geo","parallel","legend","toolbox","title","visualmap","datazoom","timeline"],em=[["borderradius","barborderradius"],["bordercolor","barbordercolor"],["borderwidth","barborderwidth"]],nm=function(){function t(t){this.data=t.data||(t.sourceformat===am?{}:[]),this.sourceformat=t.sourceformat||lm,this.serieslayoutby=t.serieslayoutby||um,this.startindex=t.startindex||0,this.dimensionsdetectedcount=t.dimensionsdetectedcount,this.metarawoption=t.metarawoption;var e=this.dimensionsdefine=t.dimensionsdefine;if(e)for(var n=0;no;o++)e[o]=n[r+o];return e},i=function(t,e,n,i){for(var r=this._data,o=this._dimsize,a=0;o>a;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],h=e-t,c=n[a],p=0;h>p;p++){var f=r[p*o+a];c[t+p]=f,l>f&&(l=f),f>u&&(u=f)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimsize:0};e={},e[rm+"_"+um]={pure:!0,appenddata:t},e[rm+"_"+hm]={pure:!0,appenddata:function(){throw new error('do not support appenddata when set serieslayoutby: "row".')}},e[om]={pure:!0,appenddata:t},e[am]={pure:!0,appenddata:function(t){var e=this._data;y(t,function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])})}},e[im]={appenddata:t},e[sm]={persistent:!1,pure:!0,appenddata:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},bm=e}(),t}(),fm=function(t,e,n,i){return t[i]},vm=(_m={},_m[rm+"_"+um]=function(t,e,n,i){return t[i+e]},_m[rm+"_"+hm]=function(t,e,n,i,r){i+=e;for(var o=r||[],a=t,s=0;s=0&&(s=o.interpolatedvalue[l])}return null!=s?s+"":""})}},t.prototype.getrawvalue=function(t,e){return au(this.getdata(e),t)},t.prototype.formattooltip=function(){},t}(),jm=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._ondirty=t.ondirty,this._dirty=!0}return t.prototype.perform=function(t){function e(t){return!(t>=1)&&(t=1),t}var n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputdata=n.context.outputdata}this.__pipeline&&(this.__pipeline.currenttask=this);var o;this._plan&&!i&&(o=this._plan(this.context));var a=e(this._modby),s=this._moddatacount||0,l=e(t&&t.modby),u=t&&t.moddatacount||0;(a!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=this._doreset(i)),this._modby=l,this._moddatacount=u;var c=t&&t.step;if(this._dueend=n?n._outputdueend:this._count?this._count(this.context):1/0,this._progress){var p=this._dueindex,f=math.min(null!=c?this._dueindex+c:1/0,this._dueend);if(!i&&(h||f>p)){var d=this._progress;if(m(d))for(var g=0;gi?i++:null}function e(){var t=i%a*r+math.ceil(i/a),e=i>=n?null:o>t?t:i;return i++,e}var n,i,r,o,a,s={reset:function(l,u,h,c){i=l,n=u,r=h,o=c,a=math.ceil(o/r),s.next=r>1&&o>0?e:t}};return s}(),zm=(y({number:function(t){return parsefloat(t)},time:function(t){return+ii(t)},trim:function(t){return"string"==typeof t?w(t):t}}),{lt:function(t,e){return e>t},lte:function(t,e){return e>=t},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}}),km=(function(){function t(t,e){if("number"!=typeof e){var n="";vi(n)}this._opfn=zm[t],this._rvalfloat=bi(e)}return t.prototype.evaluate=function(t){return"number"==typeof t?this._opfn(t,this._rvalfloat):this._opfn(bi(t),this._rvalfloat)},t}(),function(){function t(t,e){var n="desc"===t;this._resultlt=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=typeof t,i=typeof e,r="number"===n?t:bi(t),o="number"===i?e:bi(e),a=isnan(r),s=isnan(o);if(a&&(r=this._incomparable),s&&(o=this._incomparable),a&&s){var l="string"===n,u="string"===i;l&&(r=u?t:0),u&&(o=l?e:0)}return o>r?this._resultlt:r>o?-this._resultlt:0},t}()),$m=(function(){function t(t,e){this._rval=e,this._iseq=t,this._rvaltypeof=typeof e,this._rvalfloat=bi(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvaltypeof||"number"!==n&&"number"!==this._rvaltypeof||(e=bi(t)===this._rvalfloat)}return this._iseq?e:!e},t}(),function(){function t(){}return t.prototype.getrawdata=function(){throw new error("not supported")},t.prototype.getrawdataitem=function(){throw new error("not supported")},t.prototype.clonerawdata=function(){},t.prototype.getdimensioninfo=function(){},t.prototype.clonealldimensioninfo=function(){},t.prototype.count=function(){},t.prototype.retrievevalue=function(){},t.prototype.retrievevaluefromitem=function(){},t.prototype.convertvalue=function(t,e){return ou(t,e)},t}()),jm=y(),qm="undefined",tt=typeof uint32array===qm?array:uint32array,et=typeof uint16array===qm?array:uint16array,nt=typeof int32array===qm?array:int32array,it=typeof float64array===qm?array:float64array,rt={"float":it,"int":nt,ordinal:array,number:array,time:it},ot=function(){function t(){this._chunks=[],this._rawextent=[],this._extent=[],this._count=0,this._rawcount=0,this._calcdimnametoidx=y()}return t.prototype.initdata=function(t,e,n){this._provider=t,this._chunks=[],this._indices=null,this.getrawindex=this._getrawidxidentity;var i=t.getsource(),r=this.defaultdimvaluegetter=mm[i.sourceformat];this._dimvaluegetter=n||r,this._rawextent=[];tu(i);this._dimensions=v(e,function(t){return{type:t.type,property:t.property}}),this._initdatafromprovider(0,t.count())},t.prototype.getprovider=function(){return this._provider},t.prototype.getsource=function(){return this._provider.getsource()},t.prototype.ensurecalculationdimension=function(t,e){var n=this._calcdimnametoidx,i=this._dimensions,r=n.get(t);if(null!=r){if(i[r].type===e)return r}else r=i.length;return i[r]={type:e},n.set(t,r),this._chunks[r]=new rt[e||"float"](this._rawcount),this._rawextent[r]=uu(),r},t.prototype.collectordinalmeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],r=this._rawextent,o=i.ordinaloffset||0,a=n.length;0===o&&(r[t]=uu());for(var s=r[t],l=o;a>l;l++){var u=n[l]=e.parseandcollect(n[l]);s[0]=math.min(u,s[0]),s[1]=math.max(u,s[1])}i.ordinalmeta=e,i.ordinaloffset=a,i.type="ordinal"},t.prototype.getordinalmeta=function(t){var e=this._dimensions[t],n=e.ordinalmeta;return n},t.prototype.getdimensionproperty=function(t){var e=this._dimensions[t];return e&&e.property},t.prototype.appenddata=function(t){var e=this._provider,n=this.count();e.appenddata(t);var i=e.count();return e.persistent||(i+=n),i>n&&this._initdatafromprovider(n,i,!0),[n,i]},t.prototype.appendvalues=function(t,e){for(var n=this._chunks,i=this._dimensions,r=i.length,o=this._rawextent,a=this.count(),s=a+math.max(t.length,e||0),l=0;r>l;l++){var u=i[l];yu(n,l,u.type,s,!0)}for(var h=[],c=a;s>c;c++)for(var p=c-a,f=0;r>f;f++){var u=i[f],d=mm.arrayrows.call(this,t[p]||h,u.property,p,f);n[f][c]=d;var g=o[f];dg[1]&&(g[1]=d)}return this._rawcount=this._count=s,{start:a,end:s}},t.prototype._initdatafromprovider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawextent,l=v(o,function(t){return t.property}),u=0;a>u;u++){var h=o[u];s[u]||(s[u]=uu()),yu(r,u,h.type,e,n)}if(i.fillstorage)i.fillstorage(t,e,r,s);else for(var c=[],p=t;e>p;p++){c=i.getitem(p,c);for(var f=0;a>f;f++){var d=r[f],g=this._dimvaluegetter(c,l[f],p,f);d[p]=g;var y=s[f];gy[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawcount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&er;r++)n.push(this.get(i[r],e));return n},t.prototype.getbyrawindex=function(t,e){if(!(e>=0&&ei;i++){var o=this.get(t,i);isnan(o)||(n+=o)}return n},t.prototype.getmedian=function(t){var e=[];this.each([t],function(t){isnan(t)||e.push(t)});var n=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},t.prototype.indexofrawindex=function(t){if(t>=this._rawcount||0>t)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n=i;){var o=(i+r)/2|0;if(e[o]t))return o;r=o-1}}return-1},t.prototype.indicesofnearest=function(t,e,n){var i=this._chunks,r=i[t],o=[];if(!r)return o;null==n&&(n=1/0);for(var a=1/0,s=-1,l=0,u=0,h=this.count();h>u;u++){var c=this.getrawindex(u),p=e-r[c],f=math.abs(p);n>=f&&((a>f||f===a&&p>=0&&0>s)&&(a=f,s=p,l=0),p===s&&(o[l++]=u))}return o.length=l,o},t.prototype.getindices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===array){t=new n(i);for(var r=0;i>r;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else{var n=wu(this._rawcount);t=new n(this.count());for(var r=0;rc;c++){var p=void 0,f=n.getrawindex(c);if(0===s)p=e(c);else if(1===s){var d=h[u][f];p=e(d,c)}else{for(var g=0;s>g;g++)a[g]=h[t[g]][f];a[g]=c,p=e.apply(null,a)}p&&(o[l++]=f)}return i>l&&(n._indices=o),n._count=l,n._extent=[],n._updategetrawidx(),n},t.prototype.selectrange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=w(t),r=i.length;if(!r)return this;var o=e.count(),a=wu(e._rawcount),s=new a(o),l=0,u=i[0],h=t[u][0],c=t[u][1],p=e._chunks,f=!1;if(!e._indices){var d=0;if(1===r){for(var g=p[i[0]],y=0;n>y;y++){var v=g[y];(v>=h&&c>=v||isnan(v))&&(s[l++]=d),d++}f=!0}else if(2===r){for(var g=p[i[0]],m=p[i[1]],_=t[i[1]][0],x=t[i[1]][1],y=0;n>y;y++){var v=g[y],b=m[y];(v>=h&&c>=v||isnan(v))&&(b>=_&&x>=b||isnan(b))&&(s[l++]=d),d++}f=!0}}if(!f)if(1===r)for(var y=0;o>y;y++){var s=e.getrawindex(y),v=p[i[0]][s];(v>=h&&c>=v||isnan(v))&&(s[l++]=s)}else for(var y=0;o>y;y++){for(var m=!0,s=e.getrawindex(y),t=0;r>t;t++){var c=i[t],v=p[c][s];(vt[c][1])&&(m=!1)}m&&(s[l++]=e.getrawindex(y))}return o>l&&(e._indices=s),e._count=l,e._extent=[],e._updategetrawidx(),e},t.prototype.map=function(t,e){var n=this.clone(t);return this._updatedims(n,t,e),n},t.prototype.modify=function(t,e){this._updatedims(this,t,e)},t.prototype._updatedims=function(t,e,n){for(var i=t._chunks,r=[],o=e.length,a=t.count(),s=[],l=t._rawextent,u=0;uh;h++){for(var c=t.getrawindex(h),p=0;o>p;p++)s[p]=i[e[p]][c];s[o]=h;var f=n&&n.apply(null,s);if(null!=f){"object"!=typeof f&&(r[0]=f,f=r);for(var u=0;uy[1]&&(y[1]=g)}}}},t.prototype.lttbdownsample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks,s=a[t],l=this.count(),u=0,h=math.floor(1/e),c=this.getrawindex(0),p=new(wu(this._rawcount))(math.ceil(l/h)+2);p[u++]=c;for(var f=1;l-1>f;f+=h){for(var d=math.min(f+h,l-1),g=math.min(f+2*h,l),y=(g+d)/2,v=0,m=d;g>m;m++){var _=this.getrawindex(m),x=s[_];isnan(x)||(v+=x)}v/=g-d;var w=f,b=math.min(f+h,l),s=f-1,m=s[c];n=-1,r=w;for(var m=w;b>m;m++){var _=this.getrawindex(m),x=s[_];isnan(x)||(i=math.abs((s-y)*(x-m)-(s-m)*(v-m)),i>n&&(n=i,r=_))}p[u++]=r,c=r}return p[u++]=this.getrawindex(l-1),o._count=u,o._indices=p,o.getrawindex=this._getrawidx,o},t.prototype.downsample=function(t,e,n,i){for(var r=this.clone([t],!0),o=r._chunks,a=[],s=math.floor(1/e),l=o[t],u=this.count(),h=r._rawextent[t]=uu(),c=new(wu(this._rawcount))(math.ceil(u/s)),p=0,f=0;u>f;f+=s){s>u-f&&(s=u-f,a.length=s);for(var d=0;s>d;d++){var g=this.getrawindex(f+d);a[d]=l[g]}var y=n(a),v=this.getrawindex(math.min(f+i(a,y)||0,u-1));l[v]=y,yh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r._updategetrawidx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();o>r;r++){var a=this.getrawindex(r);switch(n){case 0:e(r);break;case 1:e(i[t[0]][a],r);break;case 2:e(i[t[0]][a],i[t[1]][a],r);break;default:for(var s=0,l=[];n>s;s++)l[s]=i[t[s]][a];l[s]=r,e.apply(null,l)}}},t.prototype.getdataextent=function(t){var e=this._chunks[t],n=uu();if(!e)return n;var i,r=this.count(),o=!this._indices;if(o)return this._rawextent[t].slice();if(i=this._extent[t])return i.slice();i=n;for(var a=i[0],s=i[1],l=0;r>l;l++){var u=this.getrawindex(l),h=e[u];a>h&&(a=h),h>s&&(s=h)}return i=[a,s],this._extent[t]=i,i},t.prototype.getrawdataitem=function(t){var e=this.getrawindex(t);if(this._provider.persistent)return this._provider.getitem(e);for(var n=[],i=this._chunks,r=0;ri;i++)e[i]=this._indices[i]}else e=new t(this._indices);return e}return null},t.prototype._getrawidxidentity=function(t){return t},t.prototype._getrawidx=function(t){return t=0?this._indices[t]:-1},t.prototype._updategetrawidx=function(){this.getrawindex=this._indices?this._getrawidx:this._getrawidxidentity},t.internalfield=function(){function t(t,e,n,i){return ou(t[i],this._dimensions[i])}mm={arrayrows:t,objectrows:function(t,e,n,i){return ou(t[e],this._dimensions[i])},keyedcolumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return ou(r instanceof array?r[i]:r,this._dimensions[i])},typedarray:function(t,e,n,i){return t[i]}}}(),t}(),at=function(){function t(t){this._sourcelist=[],this._storelist=[],this._upstreamsignlist=[],this._versionsignbase=0,this._dirty=!0,this._sourcehost=t}return t.prototype.dirty=function(){this._setlocalsource([],[]),this._storelist=[],this._dirty=!0},t.prototype._setlocalsource=function(t,e){this._sourcelist=t,this._upstreamsignlist=e,this._versionsignbase++,this._versionsignbase>9e10&&(this._versionsignbase=0)},t.prototype._getversionsign=function(){return this._sourcehost.uid+"_"+this._versionsignbase},t.prototype.preparesource=function(){this._isdirty()&&(this._createsource(),this._dirty=!1)},t.prototype._createsource=function(){this._setlocalsource([],[]);var t,e,n=this._sourcehost,i=this._getupstreamsourcemanagers(),r=!!i.length;if(qu(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.preparesource(),l=u.getsource(),a=l.data,s=l.sourceformat,e=[u._getversionsign()]}else a=o.get("data",!0),s=p(a)?sm:im,e=[];var h=this._getsourcemetarawoption()||{},c=l&&l.metarawoption||{},p=z(h.serieslayoutby,c.serieslayoutby)||null,f=z(h.sourceheader,c.sourceheader)||null,d=z(h.dimensions,c.dimensions),g=p!==c.serieslayoutby||!!f!=!!c.sourceheader||d;t=g?[vu(a,{serieslayoutby:p,sourceheader:f,dimensions:d},s)]:[]}else{var y=n;if(r){var v=this._applytransform(i);t=v.sourcelist,e=v.upstreamsignlist}else{var m=y.get("source",!0);t=[vu(m,this._getsourcemetarawoption(),null)],e=[]}}this._setlocalsource(t,e)},t.prototype._applytransform=function(t){var e=this._sourcehost,n=e.get("transform",!0),i=e.get("fromtransformresult",!0);if(null!=i){var r="";1!==t.length&&zu(r)}var o,a=[],s=[];return y(t,function(t){t.preparesource();var e=t.getsource(i||0),n="";null==i||e||zu(n),a.push(e),s.push(t._getversionsign())}),n?o=vu(n,a,{datasetindex:e.componentindex}):null!=i&&(o=[_u(a[0])]),{sourcelist:o,upstreamsignlist:s}},t.prototype._isdirty=function(){if(this._dirty)return!0;for(var t=this._getupstreamsourcemanagers(),e=0;e1||e>0&&!t.noheader,i=0;y(t.blocks,function(t){ju(t).planlayout(t);var e=t.__gaplevelbetweensubblocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noheader)?0:1))}),t.__gaplevelbetweensubblocks=i},build:function(t,e,n,i){var r=e.noheader,o=eh(e),a=qu(t,e,r?n:o.html,i);if(r)return a;var s=yl(e.header,"ordinal",t.useutc),l=ku(i,t.rendermode).namestyle;return"richtext"===t.rendermode?oh(t,s,l)+o.richtext+a:nh('
'+gl(s)+"
"+a,n)}},namevalue:{planlayout:function(t){t.__gaplevelbetweensubblocks=0},build:function(t,e,n,i){var r=t.rendermode,o=e.noname,a=e.novalue,s=!e.markertype,l=e.name,u=e.value,h=t.useutc;if(!o||!a){var c=s?"":t.markupstylecreator.maketooltipmarker(e.markertype,e.markercolor||"#333",r),p=o?"":yl(l,"ordinal",h),f=e.valuetype,d=a?[]:m(u)?v(u,function(t,e){return yl(t,m(f)?f[e]:f,h)}):[yl(u,m(f)?f[0]:f,h)],g=!s||!o,y=!s&&o,m=ku(i,r),_=m.namestyle,x=m.valuestyle;return"richtext"===r?(s?"":c)+(o?"":oh(t,p,_))+(a?"":ah(t,d,g,y,x)):nh((s?"":c)+(o?"":ih(p,!s,_))+(a?"":rh(d,g,y,x)),n)}}}},ct=function(){function t(){this.richtextstyles={},this._nextstylenameid=ni()}return t.prototype._generatestylename=function(){return"__ec_auto_"+this._nextstylenameid++},t.prototype.maketooltipmarker=function(t,e,n){var i="richtext"===n?this._generatestylename():null,r=ml({color:e,type:t,rendermode:n,markerid:i});return c(r)?r:(this.richtextstyles[i]=r.style,r.content)},t.prototype.wraprichtextstyle=function(t,e){var n={};m(e)?y(e,function(t){return h(n,t)}):h(n,e);var i=this._generatestylename();return this.richtextstyles[i]=n,"{"+i+"|"+t+"}"},t}(),pt=ar(),ft="__universaltransitionenabled",dt=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._selecteddataindicesmap={},e}return e(n,t),n.prototype.init=function(t,e,n){this.seriesindex=this.componentindex,this.datatask=lu({count:dh,reset:gh}),this.datatask.context={model:this},this.mergedefaultandtheme(t,n);var i=pt(this).sourcemanager=new at(this);i.preparesource();var r=this.getinitialdata(t,n);vh(r,this),this.datatask.context.data=r,pt(this).databeforeprocessed=r,ph(this),this._initselectedmapfromdata(r)},n.prototype.mergedefaultandtheme=function(t,e){var n=tl(this),i=n?dl(t):{},r=this.subtype;ks.hasclass(r)&&(r+="series"),l(t,e.gettheme().get(this.subtype)),l(t,this.getdefaultoption()),gi(t,"label",["show"]),this.filldatatextstyle(t.data),n&&cl(t,i,n)},n.prototype.mergeoption=function(t,e){t=l(this.option,t,!0),this.filldatatextstyle(t.data);var n=tl(this);n&&cl(this.option,t,n);var i=pt(this).sourcemanager;i.dirty(),i.preparesource();var r=this.getinitialdata(t,e);vh(r,this),this.datatask.dirty(),this.datatask.context.data=r,pt(this).databeforeprocessed=r,ph(this),this._initselectedmapfromdata(r)},n.prototype.filldatatextstyle=function(t){if(t&&!p(t))for(var e=["show"],n=0;nthis.getshallow("animationthreshold")&&(t=!1),!!t},n.prototype.restoredata=function(){this.datatask.dirty()},n.prototype.getcolorfrompalette=function(t,e,n){var i=this.ecmodel,r=gm.prototype.getcolorfrompalette.call(this,t,e,n);return r||(r=i.getcolorfrompalette(t,e,n)),r},n.prototype.coorddimtodatadim=function(t){return this.getrawdata().mapdimensionsall(t)},n.prototype.getprogressive=function(){return this.get("progressive")},n.prototype.getprogressivethreshold=function(){return this.get("progressivethreshold")},n.prototype.select=function(t,e){this._innerselect(this.getdata(e),t)},n.prototype.unselect=function(t,e){var n=this.option.selectedmap;if(n)for(var i=this.getdata(e),r=0;r=0&&n.push(r)}return n},n.prototype.isselected=function(t,e){var n=this.option.selectedmap;if(!n)return!1;var i=this.getdata(e),r=ch(i,t);return n[r]||!1},n.prototype.isuniversaltransitionenabled=function(){if(this[ft])return!0;var t=this.option.universaltransition;return t?t===!0?!0:t&&t.enabled:!1},n.prototype._innerselect=function(t,e){var n,i,r=this.option.selectedmode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedmap||(this.option.selectedmap={}),s=0;o>s;s++){var l=e[s],u=ch(t,l);a[u]=!0,this._selecteddataindicesmap[u]=t.getrawindex(l)}else if("single"===r||r===!0){var h=e[o-1],u=ch(t,h);this.option.selectedmap=(n={},n[u]=!0,n),this._selecteddataindicesmap=(i={},i[u]=t.getrawindex(h),i)}},n.prototype._initselectedmapfromdata=function(t){if(!this.option.selectedmap){var e=[];t.hasitemoption&&t.each(function(n){var i=t.getrawdataitem(n);i&&i.selected&&e.push(n)}),e.length>0&&this._innerselect(t,e)}},n.registerclass=function(t){return ks.registerclass(t)},n.protoinitialize=function(){var t=n.prototype;t.type="series.__base__",t.seriesindex=0,t.ignorestyleondata=!1,t.hassymbolvisual=!1,t.defaultsymbol="circle",t.visualstyleaccesspath="itemstyle",t.visualdrawtype="fill"}(),n}(ks);d(dt,ym),d(dt,gm),_r(dt,ks);var gt=function(){function t(){this.group=new v_,this.uid=es("viewcomponent")}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.dispose=function(){},t.prototype.updateview=function(){},t.prototype.updatelayout=function(){},t.prototype.updatevisual=function(){},t.prototype.blurseries=function(){},t}();vr(gt),sr(gt);var yt=ar(),vt=xh(),mt=function(){function t(){this.group=new v_,this.uid=es("viewchart"),this.rendertask=lu({plan:sh,reset:mh}),this.rendertask.context={view:this}}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.highlight=function(t,e,n,i){bh(t.getdata(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){bh(t.getdata(),i,"normal")},t.prototype.remove=function(){this.group.removeall()},t.prototype.dispose=function(){},t.prototype.updateview=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updatelayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updatevisual=function(t,e,n,i){this.render(t,e,n,i)},t.markupdatemethod=function(t,e){yt(t).updatemethod=e},t.protoinitialize=function(){var e=t.prototype;e.type="chart"}(),t}();vr(mt,["dispose"]),sr(mt);var _t,xt={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)}}},wt="\x00__throttleoriginmethod",bt="\x00__throttlerate",st="\x00__throttletype",mt=ar(),tt={itemstyle:mr(vs,!0),linestyle:mr(ds,!0)},ct={linestyle:"stroke",itemstyle:"fill"},dt={createonallseries:!0,performrawseries:!0,reset:function(t,e){var n=t.getdata(),i=t.visualstyleaccesspath||"itemstyle",r=t.getmodel(i),o=dh(t,i),a=o(r),s=r.getshallow("decal");s&&(n.setvisual("decal",s),s.dirty=!0);var l=kh(t,i),u=a[l],c=t(u)?u:null,p="auto"===a.fill||"auto"===a.stroke;if(!a[l]||c||p){var f=t.getcolorfrompalette(t.name,null,e.getseriescount());a[l]||(a[l]=f,n.setvisual("colorfrompalette",!0)),a.fill="auto"===a.fill||"function"==typeof a.fill?f:a.fill,a.stroke="auto"===a.stroke||"function"==typeof a.stroke?f:a.stroke}return n.setvisual("style",a),n.setvisual("drawtype",l),!e.isseriesfiltered(t)&&c?(n.setvisual("colorfrompalette",!1),{dataeach:function(e,n){var i=t.getdataparams(n),r=h({},a);r[l]=c(i),e.setitemvisual(n,"style",r)}}):void 0}},kt=new xs,it={createonallseries:!0,performrawseries:!0,reset:function(t,e){if(!t.ignorestyleondata&&!e.isseriesfiltered(t)){var n=t.getdata(),i=t.visualstyleaccesspath||"itemstyle",r=dh(t,i),o=n.getvisual("drawtype");return{dataeach:n.hasitemoption?function(t,e){var n=t.getrawdataitem(e);if(n&&n[i]){kt.option=n[i];var a=r(kt),s=t.ensureuniqueitemvisual(e,"style");h(s,a),kt.option.decal&&(t.setitemvisual(e,"decal",kt.option.decal),kt.option.decal.dirty=!0),o in a&&t.setitemvisual(e,"colorfrompalette",!1)}}:null}}}},at={performrawseries:!0,overallreset:function(t){var e=y();t.eachseries(function(t){var n=t.getcolorby();if(!t.iscolorbyseries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),mt(t).scope=r}}),t.eachseries(function(e){if(!e.iscolorbyseries()&&!t.isseriesfiltered(e)){var n=e.getrawdata(),i={},r=e.getdata(),o=mt(e).scope,a=e.visualstyleaccesspath||"itemstyle",s=kh(e,a);r.each(function(t){var e=r.getrawindex(t);i[e]=t}),n.each(function(t){var a=i[t],l=r.getitemvisual(a,"colorfrompalette");if(l){var u=r.ensureuniqueitemvisual(a,"style"),h=n.getname(t)||t+"",c=n.count();u[s]=e.getcolorfrompalette(h,o,c)}})}})}},pt=math.pi,lt=function(){function t(t,e,n,i){this._stagetaskmap=y(),this.ecinstance=t,this.api=e,n=this._dataprocessorhandlers=n.slice(),i=this._visualhandlers=i.slice(),this._allhandlers=n.concat(i)}return t.prototype.restoredata=function(t,e){t.restoredata(e),this._stagetaskmap.each(function(t){var e=t.overalltask;e&&e.dirty()})},t.prototype.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,o=r?n.step:null,a=i&&i.moddatacount,s=null!=a?math.ceil(a/o):null;return{step:o,modby:s,moddatacount:a}}},t.prototype.getpipeline=function(t){return this._pipelinemap.get(t)},t.prototype.updatestreammodes=function(t,e){var n=this._pipelinemap.get(t.uid),i=t.getdata(),r=i.count(),o=n.progressiveenabled&&e.incrementalpreparerender&&r>=n.threshold,a=t.get("large")&&r>=t.get("largethreshold"),s="mod"===t.get("progressivechunkmode")?r:null;t.pipelinecontext=n.context={progressiverender:o,moddatacount:s,large:a}},t.prototype.restorepipelines=function(t){var e=this,n=e._pipelinemap=y();t.eachseries(function(t){var i=t.getprogressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getprogressivethreshold(),progressiveenabled:i&&!(t.preventincremental&&t.preventincremental()),blockindex:-1,step:math.round(i||700),count:0}),e._pipe(t,t.datatask)})},t.prototype.preparestagetasks=function(){var t=this._stagetaskmap,e=this.api.getmodel(),n=this.api;y(this._allhandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";g(!(i.reset&&i.overallreset),o),i.reset&&this._createseriesstagetask(i,r,e,n),i.overallreset&&this._createoverallstagetask(i,r,e,n)},this)},t.prototype.prepareview=function(t,e,n,i){var r=t.rendertask,o=r.context;o.model=e,o.ecmodel=n,o.api=i,r.__block=!t.incrementalpreparerender,this._pipe(e,r)},t.prototype.performdataprocessortasks=function(t,e){this._performstagetasks(this._dataprocessorhandlers,t,e,{block:!0})},t.prototype.performvisualtasks=function(t,e,n){this._performstagetasks(this._visualhandlers,t,e,n)},t.prototype._performstagetasks=function(t,e,n,i){function r(t,e){return t.setdirty&&(!t.dirtymap||t.dirtymap.get(e.__pipeline.id))}i=i||{};var o=!1,a=this;y(t,function(t){if(!i.visualtype||i.visualtype===t.visualtype){var s=a._stagetaskmap.get(t.uid),l=s.seriestaskmap,u=s.overalltask;if(u){var h,c=u.agentstubmap;c.each(function(t){r(i,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),a.updatepayload(u,n);var p=a.getperformargs(u,i.block);c.each(function(t){t.perform(p)}),u.perform(p)&&(o=!0)}else l&&l.each(function(s){r(i,s)&&s.dirty();var l=a.getperformargs(s,i.block);l.skip=!t.performrawseries&&e.isseriesfiltered(s.context.model),a.updatepayload(s,n),s.perform(l)&&(o=!0)})}}),this.unfinished=o||this.unfinished},t.prototype.performseriestasks=function(t){var e;t.eachseries(function(t){e=t.datatask.perform()||e}),this.unfinished=e||this.unfinished},t.prototype.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)})},t.prototype.updatepayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createseriesstagetask=function(t,e,n,i){function r(e){var r=e.uid,l=s.set(r,a&&a.get(r)||lu({plan:rh,reset:bh,count:nh}));l.context={model:e,ecmodel:n,api:i,useclearvisual:t.isvisual&&!t.islayout,plan:t.plan,reset:t.reset,scheduler:o},o._pipe(e,l)}var o=this,a=e.seriestaskmap,s=e.seriestaskmap=y(),l=t.seriestype,u=t.gettargetseries;t.createonallseries?n.eachrawseries(r):l?n.eachrawseriesbytype(l,r):u&&u(n,i).each(r)},t.prototype._createoverallstagetask=function(t,e,n,i){function r(t){var e=t.uid,n=l.set(e,s&&s.get(e)||(p=!0,lu({reset:ph,ondirty:oh})));n.context={model:t,overallprogress:c},n.agent=a,n.__block=c,o._pipe(t,n)}var o=this,a=e.overalltask=e.overalltask||lu({reset:ah}); a.context={ecmodel:n,api:i,overallreset:t.overallreset,scheduler:o};var s=a.agentstubmap,l=a.agentstubmap=y(),u=t.seriestype,h=t.gettargetseries,c=!0,p=!1,f="";g(!t.createonallseries,f),u?n.eachrawseriesbytype(u,r):h?h(n,i).each(r):(c=!1,y(n.getseries(),r)),p&&a.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelinemap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxinpipeline=i.count++,e.__pipeline=i},t.wrapstagehandler=function(t,e){return t(t)&&(t={overallreset:t,seriestype:zh(t)}),t.uid=es("stagehandler"),e&&(t.visualtype=e),t},t}(),ot=eh(0),rt={},bt={};fh(rt,mm),fh(bt,cm),rt.eachseriesbytype=rt.eachrawseriesbytype=function(t){_t=t},rt.eachcomponent=function(t){"series"===t.maintype&&t.subtype&&(_t=t.subtype)};var et=["#37a2da","#32c5e9","#67e0e3","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e062ae","#e690d1","#e7bcf3","#9d96f5","#8378ea","#96bfff"],nt={color:et,colorlayer:[["#37a2da","#ffd85c","#fd7b5f"],["#37a2da","#67e0e3","#ffdb5c","#ff9f7f","#e062ae","#9d96f5"],["#37a2da","#32c5e9","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e7bcf3","#8378ea","#96bfff"],et]},zt="#b9b8ce",ft="#100c2a",vt=function(){return{axisline:{linestyle:{color:zt}},splitline:{linestyle:{color:"#484753"}},splitarea:{areastyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorsplitline:{linestyle:{color:"#20203b"}}}},ht=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],gt={darkmode:!0,color:ht,backgroundcolor:ft,axispointer:{linestyle:{color:"#817f91"},crossstyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textstyle:{color:zt}},textstyle:{color:zt},title:{textstyle:{color:"#eef1fa"},subtextstyle:{color:"#b9b8ce"}},toolbox:{iconstyle:{bordercolor:zt}},datazoom:{bordercolor:"#71708a",textstyle:{color:zt},brushstyle:{color:"rgba(135,163,206,0.3)"},handlestyle:{color:"#353450",bordercolor:"#c5cbe3"},movehandlestyle:{color:"#b0b6c3",opacity:.3},fillercolor:"rgba(135,163,206,0.2)",emphasis:{handlestyle:{bordercolor:"#91b7f2",color:"#4d587d"},movehandlestyle:{color:"#636d9a",opacity:.7}},databackground:{linestyle:{color:"#71708a",width:1},areastyle:{color:"#71708a"}},selecteddatabackground:{linestyle:{color:"#87a3ce"},areastyle:{color:"#87a3ce"}}},visualmap:{textstyle:{color:zt}},timeline:{linestyle:{color:zt},label:{color:zt},controlstyle:{color:zt,bordercolor:zt}},calendar:{itemstyle:{color:ft},daylabel:{color:zt},monthlabel:{color:zt},yearlabel:{color:zt}},timeaxis:vt(),logaxis:vt(),valueaxis:vt(),categoryaxis:vt(),line:{symbol:"circle"},graph:{color:ht},gauge:{title:{color:zt},axisline:{linestyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axislabel:{color:zt},detail:{color:"#eef1fa"}},candlestick:{itemstyle:{color:"#f64e56",color0:"#54ea92",bordercolor:"#f64e56",bordercolor0:"#54ea92"}}};gt.categoryaxis.splitline.show=!1;var wt=function(){function t(){}return t.prototype.normalizequery=function(t){var e={},n={},i={};if(c(t)){var r=dr(t);e.maintype=r.main||null,e.subtype=r.sub||null}else{var o=["index","name","id"],a={name:1,dataindex:1,datatype:1};y(t,function(t,r){for(var s=!1,l=0;l0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.maintype=c,e[u.tolowercase()]=t,s=!0)}}a.hasownproperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptquery:e,dataquery:n,otherquery:i}},t.prototype.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,o=i.packedevent,a=i.model,s=i.view;if(!a||!s)return!0;var l=e.cptquery,u=e.dataquery;return n(l,a,"maintype")&&n(l,a,"subtype")&&n(l,a,"index","componentindex")&&n(l,a,"name")&&n(l,a,"id")&&n(u,o,"name")&&n(u,o,"dataindex")&&n(u,o,"datatype")&&(!s.filterforexposedevent||s.filterforexposedevent(t,e.otherquery,r,o))},t.prototype.aftertrigger=function(){this.eventinfo=null},t}(),ut={createonallseries:!0,performrawseries:!0,reset:function(t,e){function n(e,n){var i=t.getrawvalue(n),a=t.getdataparams(n);u&&e.setitemvisual(n,"symbol",r(i,a)),h&&e.setitemvisual(n,"symbolsize",o(i,a)),c&&e.setitemvisual(n,"symbolrotate",s(i,a)),p&&e.setitemvisual(n,"symboloffset",l(i,a))}var i=t.getdata();if(t.legendicon&&i.setvisual("legendicon",t.legendicon),t.hassymbolvisual){var r=t.get("symbol"),o=t.get("symbolsize"),a=t.get("symbolkeepaspect"),s=t.get("symbolrotate"),l=t.get("symboloffset"),u=t(r),h=t(o),c=t(s),p=t(l),f=u||h||c||p,d=!u&&r?r:t.defaultsymbol,g=h?null:o,y=c?null:s,v=p?null:l;if(i.setvisual({legendicon:t.legendicon||d,symbol:d,symbolsize:g,symbolkeepaspect:a,symbolrotate:y,symboloffset:v}),!e.isseriesfiltered(t))return{dataeach:f?n:null}}}},xt={createonallseries:!0,performrawseries:!0,reset:function(t,e){function n(t,e){var n=t.getitemmodel(e),i=n.getshallow("symbol",!0),r=n.getshallow("symbolsize",!0),o=n.getshallow("symbolrotate",!0),a=n.getshallow("symboloffset",!0),s=n.getshallow("symbolkeepaspect",!0);null!=i&&t.setitemvisual(e,"symbol",i),null!=r&&t.setitemvisual(e,"symbolsize",r),null!=o&&t.setitemvisual(e,"symbolrotate",o),null!=a&&t.setitemvisual(e,"symboloffset",a),null!=s&&t.setitemvisual(e,"symbolkeepaspect",s)}if(t.hassymbolvisual&&!e.isseriesfiltered(t)){var i=t.getdata();return{dataeach:i.hasitemoption?n:null}}}},yt=math.round(9*math.random()),jt="function"==typeof object.defineproperty,qt=function(){function t(){this._id="__ec_inner_"+yt++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return jt?object.defineproperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype["delete"]=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==object(t))throw typeerror("value of weakmap is not a non-null object.");return t},t}(),zt=vw.extend({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,o=e.height/2;t.moveto(n,i-o),t.lineto(n+r,i+o),t.lineto(n-r,i+o),t.closepath()}}),kt=vw.extend({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,o=e.height/2;t.moveto(n,i-o),t.lineto(n+r,i),t.lineto(n,i+o),t.lineto(n-r,i),t.closepath()}}),$t=vw.extend({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,o=math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=math.asin(s/a),h=math.cos(u)*a,c=math.sin(u),p=math.cos(u),f=.6*a,d=.7*a;t.moveto(n-h,l+s),t.arc(n,l,a,math.pi-u,2*math.pi+u),t.beziercurveto(n+h-c*f,l+s+p*f,n,i-d,n,i),t.beziercurveto(n,i-d,n-h+c*f,l+s+p*f,n-h,l+s),t.closepath()}}),jt=vw.extend({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,o=e.y,a=i/3*2;t.moveto(r,o),t.lineto(r+a,o+n),t.lineto(r,o+n/4*3),t.lineto(r-a,o+n),t.lineto(r,o),t.closepath()}}),qt={line:bb,rect:cw,roundrect:cw,square:cw,circle:cb,diamond:kt,pin:$t,arrow:jt,triangle:zt},tc={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 o=math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},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}},ec={};y(qt,function(t,e){ec[e]=new t});for(var nc,ic=vw.extend({type:"symbol",shape:{symboltype:"",x:0,y:0,width:0,height:0},calculatetextposition:function(t,e,n){var i=ri(t,e,n),r=this.shape;return r&&"pin"===r.symboltype&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildpath:function(t,e,n){var i=e.symboltype;if("none"!==i){var r=ec[i];r||(i="rect",r=ec[i]),tc[i](e.x,e.y,e.width,e.height,r.shape),r.buildpath(t,r.shape,n)}}}),rc=new aw(!0),oc=["shadowblur","shadowoffsetx","shadowoffsety"],ac=[["linecap","butt"],["linejoin","miter"],["miterlimit",10]],sc=1,lc=2,uc=3,hc=4,cc=new qt,pc=new em(100),fc=["symbol","symbolsize","symbolkeepaspect","color","backgroundcolor","dasharrayx","dasharrayy","maxtilewidth","maxtileheight"],dc={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-anchor":"textalign",visibility:"visibility",display:"display"},gc=w(dc),yc={"alignment-baseline":"textbaseline","stop-color":"stopcolor"},vc=w(yc),mc=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=kc(t);if(!n)throw new error("illegal svg");this._defsusepending=[];var i=new v_;this._root=i;var r=[],o=n.getattribute("viewbox")||"",a=parsefloat(n.getattribute("width")||e.width),s=parsefloat(n.getattribute("height")||e.height);isnan(a)&&(a=null),isnan(s)&&(s=null),oc(n,i,null,!0,!1);for(var l=n.firstchild;l;)this._parsenode(l,i,r,null,!1,!1),l=l.nextsibling;ec(this._defs,this._defsusepending),this._defsusepending=[];var u,h;if(o){var c=nc(o);c.length>=4&&(u={x:parsefloat(c[0]||0),y:parsefloat(c[1]||0),width:parsefloat(c[2]),height:parsefloat(c[3])})}if(u&&null!=a&&null!=s&&(h=hc(u,{x:0,y:0,width:a,height:s}),!e.ignoreviewbox)){var p=i;i=new v_,i.add(p),p.scalex=p.scaley=h.scale,p.x=h.x,p.y=h.y}return e.ignorerootclip||null==a||null==s||i.setclippath(new cw({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewboxrect:u,viewboxtransform:h,named:r}},t.prototype._parsenode=function(t,e,n,i,r,o){var a,s=t.nodename.tolowercase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=nc[s];if(u&&z(nc,s)){a=u.call(this,t,e);var h=t.getattribute("name");if(h){var c={name:h,namedfrom:null,svgnodetaglower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedfrom:i,svgnodetaglower:s,el:a});e.add(a)}}var p=_c[s];if(p&&z(_c,s)){var f=p.call(this,t),d=t.getattribute("id");d&&(this._defs[d]=f)}}if(a&&a.isgroup)for(var g=t.firstchild;g;)1===g.nodetype?this._parsenode(g,a,n,l,r,o):3===g.nodetype&&o&&this._parsetext(g,a),g=g.nextsibling},t.prototype._parsetext=function(t,e){var n=new _w({style:{text:t.textcontent},silent:!0,x:this._textx||0,y:this._texty||0});pc(e,n),oc(t,n,this._defsusepending,!1,!1),rc(n,e);var i=n.style,r=i.fontsize;r&&9>r&&(i.fontsize=9,n.scalex*=r/9,n.scaley*=r/9);var o=(i.fontsize||i.fontfamily)&&[i.fontstyle,i.fontweight,(i.fontsize||12)+"px",i.fontfamily||"sans-serif"].join(" ");i.font=o;var a=n.getboundingrect();return this._textx+=a.width,e.add(n),n},t.internalfield=function(){nc={g:function(t,e){var n=new v_;return pc(e,n),oc(t,n,this._defsusepending,!1,!1),n},rect:function(t,e){var n=new cw;return pc(e,n),oc(t,n,this._defsusepending,!1,!1),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.silent=!0,n},circle:function(t,e){var n=new cb;return pc(e,n),oc(t,n,this._defsusepending,!1,!1),n.setshape({cx:parsefloat(t.getattribute("cx")||"0"),cy:parsefloat(t.getattribute("cy")||"0"),r:parsefloat(t.getattribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new bb;return pc(e,n),oc(t,n,this._defsusepending,!1,!1),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.silent=!0,n},ellipse:function(t,e){var n=new fb;return pc(e,n),oc(t,n,this._defsusepending,!1,!1),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.silent=!0,n},polygon:function(t,e){var n,i=t.getattribute("points");i&&(n=lc(i));var r=new ab({shape:{points:n||[]},silent:!0});return pc(e,r),oc(t,r,this._defsusepending,!1,!1),r},polyline:function(t,e){var n,i=t.getattribute("points");i&&(n=lc(i));var r=new lb({shape:{points:n||[]},silent:!0});return pc(e,r),oc(t,r,this._defsusepending,!1,!1),r},image:function(t,e){var n=new bw;return pc(e,n),oc(t,n,this._defsusepending,!1,!1),n.setstyle({image:t.getattribute("xlink:href")||t.getattribute("href"),x:+t.getattribute("x"),y:+t.getattribute("y"),width:+t.getattribute("width"),height:+t.getattribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getattribute("x")||"0",i=t.getattribute("y")||"0",r=t.getattribute("dx")||"0",o=t.getattribute("dy")||"0";this._textx=parsefloat(n)+parsefloat(r),this._texty=parsefloat(i)+parsefloat(o);var a=new v_;return pc(e,a),oc(t,a,this._defsusepending,!1,!0),a},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",o=t.getattribute("dy")||"0",a=new v_;return pc(e,a),oc(t,a,this._defsusepending,!1,!0),this._textx+=parsefloat(r),this._texty+=parsefloat(o),a},path:function(t,e){var n=t.getattribute("d")||"",i=ba(n);return pc(e,i),oc(t,i,this._defsusepending,!1,!1),i.silent=!0,i}}}(),t}(),_c={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),o=new wb(e,n,i,r);return ic(t,o),ac(t,o),o},radialgradient:function(t){var e=parseint(t.getattribute("cx")||"0",10),n=parseint(t.getattribute("cy")||"0",10),i=parseint(t.getattribute("r")||"0",10),r=new ub(e,n,i);return ic(t,r),ac(t,r),r}},xc=/^url\(\s*#(.*?)\)/,wc=/-?([0-9]*\.)?[0-9]+([ee]-?[0-9]+)?/g,bc=/(translate|scale|rotate|skewx|skewy|matrix)\(([\-\s0-9\.ee,]*)\)/g,sc=math.pi/180,mc=/([^\s:;]+)\s*:\s*([^:;]+)/g,tc=1e-8,cc=[],dc=function(){function t(t){this.name=t}return t.prototype.getcenter=function(){},t}(),kc=function(t){function n(e,n,i){var r=t.call(this,e)||this;if(r.type="geojson",r.geometries=n,i)i=[i[0],i[1]];else{var o=r.getboundingrect();i=[o.x+o.width/2,o.y+o.height/2]}return r._center=i,r}return e(n,t),n.prototype.getboundingrect=function(){var t=this._rect;if(t)return t;for(var e=number.max_value,n=[e,e],i=[-e,-e],r=[],o=[],a=this.geometries,s=0;si;i++)if("polygon"===n[i].type){var o=n[i].exterior,a=n[i].interiors;if(uc(o,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(uc(a[s],t[0],t[1]))continue t;return!0}}return!1},n.prototype.transformto=function(t,e,n,i){var r=this.getboundingrect(),o=r.width/r.height;n?i||(i=n/o):n=o*i;for(var a=new a_(t,e,n,i),s=r.calculatetransform(a),l=this.geometries,u=0;u0&&t.unfinished);t.unfinished||this._zr.flush()}}},n.prototype.getdom=function(){return this._dom},n.prototype.getid=function(){return this.id},n.prototype.getzr=function(){return this._zr},n.prototype.setoption=function(t,e,n){if(!this._disposed){var i,r,o;if(i(e)&&(n=e.lazyupdate,i=e.silent,r=e.replacemerge,o=e.transition,e=e.notmerge),this[cd]=!0,!this._model||e){var a=new am(this._api),s=this._theme,l=this._model=new mm;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setoption(t,{replacemerge:r},yd);var u={seriestransition:o,optionchanged:!0};n?(this[pd]={silent:i,updateparams:u},this[cd]=!1,this.getzr().wakeup()):(wd(this),md.update.call(this,null,u),this._zr.flush(),this[pd]=null,this[cd]=!1,kd.call(this,i),id.call(this,i))}},n.prototype.settheme=function(){console.error("echarts#settheme() is deprecated in echarts 3.0")},n.prototype.getmodel=function(){return this._model},n.prototype.getoption=function(){return this._model&&this._model.getoption()},n.prototype.getwidth=function(){return this._zr.getwidth()},n.prototype.getheight=function(){return this._zr.getheight()},n.prototype.getdevicepixelratio=function(){return this._zr.painter.dpr||xc&&window.devicepixelratio||1},n.prototype.getrenderedcanvas=function(t){return ev.canvassupported?(t=t||{},this._zr.painter.getrenderedcanvas({backgroundcolor:t.backgroundcolor||this._model.get("backgroundcolor"),pixelratio:t.pixelratio||this.getdevicepixelratio()})):void 0},n.prototype.getsvgdataurl=function(){if(ev.svgsupported){var t=this._zr,e=t.storage.getdisplaylist();return y(e,function(t){t.stopanimation(null,!0)}),t.painter.todataurl()}},n.prototype.getdataurl=function(t){if(!this._disposed){t=t||{};var e=t.excludecomponents,n=this._model,i=[],r=this;y(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 o="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.getrenderedcanvas(t).todataurl("image/"+(t&&t.type||"png"));return y(i,function(t){t.group.ignore=!1}),o}},n.prototype.getconnecteddataurl=function(t){if(!this._disposed&&ev.canvassupported){var e="svg"===t.type,n=this.group,i=math.min,r=math.max,o=1/0;if($d[n]){var a=o,l=o,u=-o,h=-o,c=[],p=t&&t.pixelratio||this.getdevicepixelratio();y(kd,function(o){if(o.group===n){var p=e?o.getzr().painter.getsvgdom().innerhtml:o.getrenderedcanvas(s(t)),f=o.getdom().getboundingclientrect();a=i(f.left,a),l=i(f.top,l),u=r(f.right,u),h=r(f.bottom,h),c.push({dom:p,left:f.left,top:f.top})}}),a*=p,l*=p,u*=p,h*=p;var f=u-a,d=h-l,g=kv(),v=pi(g,{renderer:e?"svg":"canvas"});if(v.resize({width:f,height:d}),e){var m="";return y(c,function(t){var e=t.left-a,n=t.top-l;m+=''+t.dom+""}),v.painter.getsvgroot().innerhtml=m,t.connectedbackgroundcolor&&v.painter.setbackgroundcolor(t.connectedbackgroundcolor),v.refreshimmediately(),v.painter.todataurl()}return t.connectedbackgroundcolor&&v.add(new cw({shape:{x:0,y:0,width:f,height:d},style:{fill:t.connectedbackgroundcolor}})),y(c,function(t){var e=new bw({style:{x:t.left*p-a,y:t.top*p-l,image:t.dom}});v.add(e)}),v.refreshimmediately(),g.todataurl("image/"+(t&&t.type||"png"))}return this.getdataurl(t)}},n.prototype.converttopixel=function(t,e){return td(this,"converttopixel",t,e)},n.prototype.convertfrompixel=function(t,e){return td(this,"convertfrompixel",t,e)},n.prototype.containpixel=function(t,e){if(!this._disposed){var n,i=this._model,r=sr(i,t);return y(r,function(t,i){i.indexof("models")>=0&&y(t,function(t){var r=t.coordinatesystem;if(r&&r.containpoint)n=n||!!r.containpoint(e);else if("seriesmodels"===i){var o=this._chartsmap[t.__viewid];o&&o.containpoint&&(n=n||o.containpoint(e,t))}},this)},this),!!n}},n.prototype.getvisual=function(t,e){var n=this._model,i=sr(n,t,{defaultmaintype:"series"}),r=i.seriesmodel,o=r.getdata(),a=i.hasownproperty("dataindexinside")?i.dataindexinside:i.hasownproperty("dataindex")?o.indexofrawindex(i.dataindex):null;return null!=a?vh(o,a,e):hh(o,e)},n.prototype.getviewofcomponentmodel=function(t){return this._componentsmap[t.__viewid]},n.prototype.getviewofseriesmodel=function(t){return this._chartsmap[t.__viewid]},n.prototype._initevents=function(){var t=this;y(gd,function(e){var n=function(n){var i,r=t.getmodel(),o=n.target,a="globalout"===e;if(a?i={}:o&&xh(o,function(t){var e=ow(t);if(e&&null!=e.dataindex){var n=e.datamodel||r.getseriesbyindex(e.seriesindex);return i=n&&n.getdataparams(e.dataindex,e.datatype)||{},!0}return e.eventdata?(i=h({},e.eventdata),!0):void 0},!0),i){var s=i.componenttype,l=i.componentindex;("markline"===s||"markpoint"===s||"markarea"===s)&&(s="series",l=i.seriesindex);var u=s&&null!=l&&r.getcomponent(s,l),c=u&&t["series"===u.maintype?"_chartsmap":"_componentsmap"][u.__viewid];i.event=n,i.type=e,t._$eventprocessor.eventinfo={targetel:o,packedevent:i,model:u,view:c},t.trigger(e,i)}};n.zreventfulcallatlast=!0,t._zr.on(e,n,t)}),y(ud,function(e,n){t._messagecenter.on(n,function(t){this.trigger(n,t)},t)}),y(["selectchanged"],function(e){t._messagecenter.on(e,function(t){this.trigger(e,t)},t)}),uh(this._messagecenter,this,this._api)},n.prototype.isdisposed=function(){return this._disposed},n.prototype.clear=function(){this._disposed||this.setoption({series:[]},!0)},n.prototype.dispose=function(){if(!this._disposed){this._disposed=!0,hr(this.getdom(),tk,"");var t=this,e=t._api,n=t._model;y(t._componentsviews,function(t){t.dispose(n,e)}),y(t._chartsviews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsmap=t._componentsmap=t._chartsviews=t._componentsviews=t._scheduler=t._api=t._zr=t._throttledzrflush=t._theme=t._coordsysmgr=t._messagecenter=null,delete kd[t.id]}},n.prototype.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[pd]&&(null==i&&(i=this[pd].silent),n=!0,this[pd]=null),this[cd]=!0,n&&wd(this),md.update.call(this,{type:"resize",animation:h({duration:0},t&&t.animation)}),this[cd]=!1,kd.call(this,i),id.call(this,i)}}},n.prototype.showloading=function(t,e){if(!this._disposed&&(i(t)&&(e=t,t=""),t=t||"default",this.hideloading(),zd[t])){var n=zd[t](this._api,e),i=this._zr;this._loadingfx=n,i.add(n)}},n.prototype.hideloading=function(){this._disposed||(this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null)},n.prototype.makeactionfromevent=function(t){var e=h({},t);return e.type=ud[t.type],e},n.prototype.dispatchaction=function(t,e){if(!this._disposed&&(i(e)||(e={silent:!!e}),wd[t.type]&&this._model)){if(this[cd])return void this._pendingactions.push(t);var n=e.silent;dd.call(this,t,n);var i=e.flush;i?this._zr.flush():i!==!1&&ev.browser.wechat&&this._throttledzrflush(),kd.call(this,n),id.call(this,n)}},n.prototype.updatelabellayout=function(){uc.trigger("series:layoutlabels",this._model,this._api,{updatedseries:[]})},n.prototype.appenddata=function(t){if(!this._disposed){var e=t.seriesindex,n=this.getmodel(),i=n.getseriesbyindex(e);i.appenddata(t),this._scheduler.unfinished=!0,this.getzr().wakeup()}},n.internalfield=function(){function t(t){for(var e=[],n=t.currentstates,i=0;ie.get("hoverlayerthreshold")&&!ev.node&&!ev.worker&&e.eachseries(function(e){if(!e.preventusinghoverlayer){var n=t._chartsmap[e.__viewid];n.__alive&&n.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverlayer=!0)})}})}function i(t,e){var n=t.get("blendmode")||null;e.group.traverse(function(t){t.isgroup||(t.style.blend=n),t.eachpendingdisplayable&&t.eachpendingdisplayable(function(t){t.style.blend=n})})}function r(t,e){t.preventautoz||o(e.group,t.get("z")||0,t.get("zlevel")||0,-1/0)}function o(t,e,n,i){var r=t.gettextcontent(),a=t.gettextguideline(),s=t.isgroup;if(s)for(var l=t.childrenref(),u=0;u0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse(function(e){if(e.states&&e.states.emphasis){if(ka(e))return;if(e instanceof vw&&ca(e),e.__dirty){var n=e.prevstates;n&&e.usestates(n)}if(r){e.statetransition=a;var i=e.gettextcontent(),o=e.gettextguideline();i&&(i.statetransition=a),o&&(o.statetransition=a)}e.__dirty&&t(e)}})}wd=function(t){var e=t._scheduler;e.restorepipelines(t._model),e.preparestagetasks(),bd(t,!0),bd(t,!1),e.plan()},bd=function(t,e){function n(t){var n=t.__requirenewview;t.__requirenewview=!1;var u="_ec_"+t.id+"_"+t.type,h=!n&&a[u];if(!h){var c=dr(t.type),p=e?gt.getclass(c.main,c.sub):mt.getclass(c.sub); h=new p,h.init(i,l),a[u]=h,o.push(h),s.add(h.group)}t.__viewid=h.__id=u,h.__alive=!0,h.__model=t,h.group.__eccomponentinfo={maintype:t.maintype,index:t.componentindex},!e&&r.prepareview(h,t,i,l)}for(var i=t._model,r=t._scheduler,o=e?t._componentsviews:t._chartsviews,a=e?t._componentsmap:t._chartsmap,s=t._zr,l=t._api,u=0;u1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performrestadd(r,n)},t.prototype._executemultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initindexmap(t,n,r,"_oldkeygetter"),this._initindexmap(e,i,o,"_newkeygetter");for(var a=0;a1&&1===c)this._updatemanytoone&&this._updatemanytoone(u,l),i[s]=null;else if(1===h&&c>1)this._updateonetomany&&this._updateonetomany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updatemanytomany&&this._updatemanytomany(u,l),i[s]=null;else if(h>1)for(var p=0;h>p;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performrestadd(o,i)},t.prototype._performrestadd=function(t,e){for(var n=0;n1)for(var a=0;o>a;a++)this._add&&this._add(r[a]);else 1===o&&this._add&&this._add(r);e[i]=null}},t.prototype._initindexmap=function(t,e,n,i){for(var r=this._diffmodemultiple,o=0;oo;o++){var s=void 0,l=void 0,u=void 0,h=this.dimensions[a];if(h&&h.storedimindex===o)s=e?h.name:null,l=h.type,u=h.ordinalmeta,a++;else{var c=this.getsourcedimension(o);c&&(s=e?c.name:null,l=c.type)}r.push({property:s,type:l,ordinalmeta:u}),!e||null==s||h&&h.iscalculationcoord||(i+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),i+="$",i+=yk[l]||"f",u&&(i+=u.uid),i+="$"}var p=this.source,f=[p.serieslayoutby,p.startindex,i].join("$$");return{dimensions:r,hash:f}},t.prototype.makeoutputdimensionnames=function(){for(var t=[],e=0,n=0;ea;a++){var s=a-i;this._namelist[a]=e[s],o&&hk(this,a)}},t.prototype._updateordinalmeta=function(){for(var t=this._store,e=this.dimensions,n=0;n=e)){var n=this._store,i=n.getprovider();this._updateordinalmeta();var r=this._namelist,o=this._idlist,a=i.getsource().sourceformat,s=a===im;if(s&&!i.pure)for(var l=[],u=t;e>u;u++){var h=i.getitem(u,l);if(!this.hasitemoption&&ui(h)&&(this.hasitemoption=!0),h){var c=h.name;null==r[u]&&null!=c&&(r[u]=tr(c,null));var p=h.id;null==o[u]&&null!=p&&(o[u]=tr(p,null))}}if(this._shouldmakeidfromname())for(var u=t;e>u;u++)hk(this,u);rk(this)}},t.prototype.getapproximateextent=function(t){return this._approximateextent[t]||this._store.getdataextent(this._getstoredimindex(t))},t.prototype.setapproximateextent=function(t,e){e=this.getdimension(e),this._approximateextent[e]=t.slice()},t.prototype.getcalculationinfo=function(t){return this._calculationinfo[t]},t.prototype.setcalculationinfo=function(t,e){mk(t)?h(this._calculationinfo,t):this._calculationinfo[t]=e},t.prototype.getname=function(t){var e=this.getrawindex(t),n=this._namelist[e];return null==n&&null!=this._namedimidx&&(n=ak(this,this._namedimidx,e)),null==n&&(n=""),n},t.prototype._getcategory=function(t,e){var n=this._store.get(t,e),i=this._store.getordinalmeta(t);return i?i.categories[n]:n},t.prototype.getid=function(t){return ok(this,this.getrawindex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,e){var n=this._store,i=this._diminfos[t];return i?n.get(i.storedimindex,e):void 0},t.prototype.getbyrawindex=function(t,e){var n=this._store,i=this._diminfos[t];return i?n.getbyrawindex(i.storedimindex,e):void 0},t.prototype.getindices=function(){return this._store.getindices()},t.prototype.getdataextent=function(t){return this._store.getdataextent(this._getstoredimindex(t))},t.prototype.getsum=function(t){return this._store.getsum(this._getstoredimindex(t))},t.prototype.getmedian=function(t){return this._store.getmedian(this._getstoredimindex(t))},t.prototype.getvalues=function(t,e){var n=this,i=this._store;return m(t)?i.getvalues(_k(t,function(t){return n._getstoredimindex(t)}),e):i.getvalues(t)},t.prototype.hasvalue=function(t){for(var e=this._dimsummary.datadimindicesoncoord,n=0,i=e.length;i>n;n++)if(isnan(this._store.get(e[n],t)))return!1;return!0},t.prototype.indexofname=function(t){for(var e=0,n=this._store.count();n>e;e++)if(this.getname(e)===t)return e;return-1},t.prototype.getrawindex=function(t){return this._store.getrawindex(t)},t.prototype.indexofrawindex=function(t){return this._store.indexofrawindex(t)},t.prototype.rawindexof=function(t,e){var n=t&&this._invertedindicesmap[t],i=n[e];return null==i||isnan(i)?bk:i},t.prototype.indicesofnearest=function(t,e,n){return this._store.indicesofnearest(this._getstoredimindex(t),e,n)},t.prototype.each=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=[]);var i=n||this,r=_k(sk(t),this._getstoredimindex,this);this._store.each(r,i?$v(e,i):e)},t.prototype.filterself=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=[]);var i=n||this,r=_k(sk(t),this._getstoredimindex,this);return this._store=this._store.filter(r,i?$v(e,i):e),this},t.prototype.selectrange=function(t){var e=this,n={},i=w(t),r=[];return y(i,function(i){var o=e._getstoredimindex(i);n[o]=t[i],r.push(o)}),this._store=this._store.selectrange(n),this},t.prototype.maparray=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},t.prototype.map=function(t,e,n,i){var r=n||i||this,o=_k(sk(t),this._getstoredimindex,this),a=uk(this);return a._store=this._store.map(o,r?$v(e,r):e),a},t.prototype.modify=function(t,e,n,i){var r=n||i||this,o=_k(sk(t),this._getstoredimindex,this);this._store.modify(o,r?$v(e,r):e)},t.prototype.downsample=function(t,e,n,i){var r=uk(this);return r._store=this._store.downsample(this._getstoredimindex(t),e,n,i),r},t.prototype.lttbdownsample=function(t,e){var n=uk(this);return n._store=this._store.lttbdownsample(this._getstoredimindex(t),e),n},t.prototype.getrawdataitem=function(t){return this._store.getrawdataitem(t)},t.prototype.getitemmodel=function(t){var e=this.hostmodel,n=this.getrawdataitem(t);return new xs(n,e,e&&e.ecmodel)},t.prototype.diff=function(t){var e=this;return new pk(t?t.getstore().getindices():[],this.getstore().getindices(),function(e){return ok(t,e)},function(t){return ok(e,t)})},t.prototype.getvisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setvisual=function(t,e){this._visual=this._visual||{},mk(t)?h(this._visual,t):this._visual[t]=e},t.prototype.getitemvisual=function(t,e){var n=this._itemvisuals[t],i=n&&n[e];return null==i?this.getvisual(e):i},t.prototype.hasitemvisual=function(){return this._itemvisuals.length>0},t.prototype.ensureuniqueitemvisual=function(t,e){var n=this._itemvisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getvisual(e),m(r)?r=r.slice():mk(r)&&(r=h({},r)),i[e]=r),r},t.prototype.setitemvisual=function(t,e,n){var i=this._itemvisuals[t]||{};this._itemvisuals[t]=i,mk(e)?h(i,e):i[e]=n},t.prototype.clearallvisual=function(){this._visual={},this._itemvisuals=[]},t.prototype.setlayout=function(t,e){if(mk(t))for(var n in t)t.hasownproperty(n)&&this.setlayout(n,t[n]);else this._layout[t]=e},t.prototype.getlayout=function(t){return this._layout[t]},t.prototype.getitemlayout=function(t){return this._itemlayouts[t]},t.prototype.setitemlayout=function(t,e,n){this._itemlayouts[t]=n?h(this._itemlayouts[t]||{},e):e},t.prototype.clearitemlayouts=function(){this._itemlayouts.length=0},t.prototype.setitemgraphicel=function(t,e){var n=this.hostmodel&&this.hostmodel.seriesindex;rw(n,this.datatype,t,e),this._graphicels[t]=e},t.prototype.getitemgraphicel=function(t){return this._graphicels[t]},t.prototype.eachitemgraphicel=function(t,e){y(this._graphicels,function(n,i){n&&t&&t.call(e,n,i)})},t.prototype.cloneshallow=function(e){return e||(e=new t(this._schema?this._schema:_k(this.dimensions,this._getdiminfo,this),this.hostmodel)),lk(e,this),e._store=this._store,e},t.prototype.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(v(arguments)))})},t.internalfield=function(){rk=function(t){var e=t._invertedindicesmap;y(e,function(n,i){var r=t._diminfos[i],o=r.ordinalmeta,a=t._store;if(o){n=e[i]=new xk(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}}}(),t}(),ck=function(){function t(t){this.coordsysdims=[],this.axismap=y(),this.categoryaxismap=y(),this.coordsysname=t}return t}(),dk={cartesian2d:function(t,e,n,i){var r=t.getreferringcomponents("xaxis",ex).models[0],o=t.getreferringcomponents("yaxis",ex).models[0];e.coordsysdims=["x","y"],n.set("x",r),n.set("y",o),wp(r)&&(i.set("x",r),e.firstcategorydimindex=0),wp(o)&&(i.set("y",o),null==e.firstcategorydimindex&&(e.firstcategorydimindex=1))},singleaxis:function(t,e,n,i){var r=t.getreferringcomponents("singleaxis",ex).models[0];e.coordsysdims=["single"],n.set("single",r),wp(r)&&(i.set("single",r),e.firstcategorydimindex=0)},polar:function(t,e,n,i){var r=t.getreferringcomponents("polar",ex).models[0],o=r.findaxismodel("radiusaxis"),a=r.findaxismodel("angleaxis");e.coordsysdims=["radius","angle"],n.set("radius",o),n.set("angle",a),wp(o)&&(i.set("radius",o),e.firstcategorydimindex=0),wp(a)&&(i.set("angle",a),null==e.firstcategorydimindex&&(e.firstcategorydimindex=1))},geo:function(t,e){e.coordsysdims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecmodel,o=r.getcomponent("parallel",t.get("parallelindex")),a=e.coordsysdims=o.dimensions.slice();y(o.parallelaxisindex,function(t,o){var s=r.getcomponent("parallelaxis",t),l=a[o];n.set(l,s),wp(s)&&(i.set(l,s),null==e.firstcategorydimindex&&(e.firstcategorydimindex=o))})}},kk=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getsetting=function(t){return this._setting[t]},t.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},t.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},t.prototype.getextent=function(){return this._extent.slice()},t.prototype.setextent=function(t,e){var n=this._extent;isnan(t)||(n[0]=t),isnan(e)||(n[1]=e)},t.prototype.isinextentrange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isblank=function(){return this._isblank},t.prototype.setblank=function(t){this._isblank=t},t}();sr(kk);var ik=0,ak=function(){function t(t){this.categories=t.categories||[],this._needcollect=t.needcollect,this._deduplication=t.deduplication,this.uid=++ik}return t.createbyaxismodel=function(e){var n=e.option,i=n.data,r=i&&v(i,qp);return new t({categories:r,needcollect:!r,deduplication:n.dedplication!==!1})},t.prototype.getordinal=function(t){return this._getorcreatemap().get(t)},t.prototype.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=this._getorcreatemap();return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=0/0),e},t.prototype._getorcreatemap=function(){return this._map||(this._map=y(this.categories))},t}(),pk=xi,lk=function(t){function n(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getsetting("ordinalmeta");return i||(i=new ak({})),m(i)&&(i=new ak({categories:v(i,function(t){return i(t)?t.value:t})})),n._ordinalmeta=i,n._extent=n.getsetting("extent")||[0,i.categories.length-1],n}return e(n,t),n.prototype.parse=function(t){return"string"==typeof t?this._ordinalmeta.getordinal(t):math.round(t)},n.prototype.contain=function(t){return t=this.parse(t),of(t,this._extent)&&null!=this._ordinalmeta.categories[t]},n.prototype.normalize=function(t){return t=this._getticknumber(this.parse(t)),af(t,this._extent)},n.prototype.scale=function(t){return t=math.round(sf(t,this._extent)),this.getrawordinalnumber(t)},n.prototype.getticks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},n.prototype.getminorticks=function(){},n.prototype.setsortinfo=function(t){if(null==t)return void(this._ordinalnumbersbytick=this._ticksbyordinalnumber=null);for(var e=t.ordinalnumbers,n=this._ordinalnumbersbytick=[],i=this._ticksbyordinalnumber=[],r=0,o=this._ordinalmeta.categories.length,a=math.min(o,e.length);a>r;++r){var s=e[r];n[r]=s,i[s]=r}for(var l=0;o>r;++r){for(;null!=i[l];)l++;n.push(l),i[l]=r}},n.prototype._getticknumber=function(t){var e=this._ticksbyordinalnumber;return e&&t>=0&&t=0&&t=t},n.prototype.getordinalmeta=function(){return this._ordinalmeta},n.prototype.niceticks=function(){},n.prototype.niceextent=function(){},n.type="ordinal",n}(kk);kk.registerclass(lk);var ok=xi,rk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalprecision=2,e}return e(n,t),n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return of(t,this._extent)},n.prototype.normalize=function(t){return af(t,this._extent)},n.prototype.scale=function(t){return sf(t,this._extent)},n.prototype.setextent=function(t,e){var n=this._extent;isnan(t)||(n[0]=parsefloat(t)),isnan(e)||(n[1]=parsefloat(e))},n.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setextent(e[0],e[1])},n.prototype.getinterval=function(){return this._interval},n.prototype.setinterval=function(t){this._interval=t,this._niceextent=this._extent.slice(),this._intervalprecision=ef(t)},n.prototype.getticks=function(t){var e=this._interval,n=this._extent,i=this._niceextent,r=this._intervalprecision,o=[];if(!e)return o;var a=1e4;n[0]a)return[];var l=o.length?o[o.length-1].value:i[1];return n[1]>l&&o.push(t?{value:ok(l+e,r)}:{value:n[1]}),o},n.prototype.getminorticks=function(t){for(var e=this.getticks(!0),n=[],i=this.getextent(),r=1;rs;){var c=ok(a.value+(s+1)*h);c>i[0]&&cr&&(r=-r,i.reverse());var o=tf(i,t,e,n);this._intervalprecision=o.intervalprecision,this._interval=o.interval,this._niceextent=o.nicetickextent}},n.prototype.niceextent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixmax?e[0]-=n/2:(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]=ok(math.floor(e[0]/r)*r)),t.fixmax||(e[1]=ok(math.ceil(e[1]/r)*r))},n.type="interval",n}(kk);kk.registerclass(rk);var bk="__ec_stack_",ek=.5,nk="undefined"!=typeof float32array?float32array:array,zk=({seriestype:"bar",plan:xh(),reset:function(t){if(gf(t)&&yf(t)){var e=t.getdata(),n=t.coordinatesystem,i=n.master.getrect(),r=n.getbaseaxis(),o=n.getotheraxis(r),a=e.getdimensionindex(e.mapdimension(o.dim)),s=e.getdimensionindex(e.mapdimension(r.dim)),l=o.ishorizontal(),u=l?0:1,h=df(pf([t]),r,t).width;return h>ek||(h=ek),{progress:function(t,e){for(var c,p=t.count,f=new nk(2*p),d=new nk(2*p),g=new nk(p),y=[],v=[],m=0,_=0,x=e.getstore();null!=(c=t.next());)v[u]=x.get(a,c),v[1-u]=x.get(s,c),y=n.datatopoint(v,null),d[m]=l?i.x+i.width:y[0],f[m++]=y[0],d[m]=l?y[1]:i.y+i.height,f[m++]=y[1],g[_++]=c; e.setlayout({largepoints:f,largedataindices:g,largebackgroundpoints:d,barwidth:h,valueaxisstart:vf(r,o,!1),backgroundstart:l?i.x:i.y,valueaxishorizontal:l})}}}}},function(t,e,n,i){for(;i>n;){var r=n+i>>>1;t[r][1]n&&(this._approxinterval=n);var o=vk.length,a=math.min(zk(vk,this._approxinterval,0,o),o-1);this._interval=vk[a][1],this._minlevelunit=vk[math.max(a-1,0)][0]},n.prototype.parse=function(t){return"number"==typeof t?t:+ii(t)},n.prototype.contain=function(t){return of(this.parse(t),this._extent)},n.prototype.normalize=function(t){return af(this.parse(t),this._extent)},n.prototype.scale=function(t){return sf(t,this._extent)},n.type="time",n}(rk),vk=[["second",as],["minute",ps],["hour",ls],["quarter-day",6*ls],["half-day",12*ls],["day",1.2*os],["half-week",3.5*os],["week",7*os],["month",31*os],["quarter",95*os],["half-year",rs/2],["year",rs]];kk.registerclass(fk);var hk=kk.prototype,gk=rk.prototype,wk=xi,uk=math.floor,xk=math.ceil,yk=math.pow,jk=math.log,qk=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalscale=new rk,e._interval=0,e}return e(n,t),n.prototype.getticks=function(t){var e=this._originalscale,n=this._extent,i=e.getextent(),r=gk.getticks.call(this,t);return v(r,function(t){var e=t.value,r=xi(yk(this.base,e));return r=e===n[0]&&this._fixmin?cf(r,i[0]):r,r=e===n[1]&&this._fixmax?cf(r,i[1]):r,{value:r}},this)},n.prototype.setextent=function(t,e){var n=this.base;t=jk(t)/jk(n),e=jk(e)/jk(n),gk.setextent.call(this,t,e)},n.prototype.getextent=function(){var t=this.base,e=hk.getextent.call(this);e[0]=yk(t,e[0]),e[1]=yk(t,e[1]);var n=this._originalscale,i=n.getextent();return this._fixmin&&(e[0]=cf(e[0],i[0])),this._fixmax&&(e[1]=cf(e[1],i[1])),e},n.prototype.unionextent=function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=jk(t[0])/jk(e),t[1]=jk(t[1])/jk(e),hk.unionextent.call(this,t)},n.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},n.prototype.niceticks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(1/0===n||0>=n)){var i=ai(n),r=t/n*i;for(.5>=r&&(i*=10);!isnan(i)&&math.abs(i)<1&&math.abs(i)>0;)i*=10;var o=[xi(xk(e[0]/i)*i),xi(uk(e[1]/i)*i)];this._interval=i,this._niceextent=o}},n.prototype.niceextent=function(t){gk.niceextent.call(this,t),this._fixmin=t.fixmin,this._fixmax=t.fixmax},n.prototype.parse=function(t){return t},n.prototype.contain=function(t){return t=jk(t)/jk(this.base),of(t,this._extent)},n.prototype.normalize=function(t){return t=jk(t)/jk(this.base),af(t,this._extent)},n.prototype.scale=function(t){return t=sf(t,this._extent),yk(this.base,t)},n.type="log",n}(kk),zk=qk.prototype;zk.getminorticks=gk.getminorticks,zk.getlabel=gk.getlabel,kk.registerclass(qk);var kk=function(){function t(t,e,n){this._prepareparams(t,e,n)}return t.prototype._prepareparams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),0>a&&0>s&&!u&&(s=0));var c=this._determinedmin,p=this._determinedmax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minfixed:l,maxfixed:u,isblank:h}},t.prototype.modifydataminmax=function(t,e){this[jk[t]]=e},t.prototype.setdeterminedminmax=function(t,e){var n=$k[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),$k={min:"_determinedmin",max:"_determinedmax"},jk={min:"_datamin",max:"_datamax"},qk=function(){function t(){}return t.prototype.getneedcrosszero=function(){var t=this.option;return!t.scale},t.prototype.getcoordsysmodel=function(){},t}(),ti={isdimensionstacked:yp,enabledatastack:up,getstackeddimension:jp},ei=(object.freeze||object)({createlist:hf,getlayoutrect:ml,datastack:ti,createscale:gf,mixinaxismodelcommonmethods:wf,getecdata:ow,createtextstyle:uf,createdimensions:np,createsymbol:jh,enablehoveremphasis:ma}),ni=[],ii={registerpreprocessor:pp,registerprocessor:fp,registerpostinit:dp,registerpostupdate:gp,registerupdatelifecycle:yp,registeraction:vp,registercoordinatesystem:mp,registerlayout:xp,registervisual:wp,registertransform:ik,registerloading:sp,registermap:tp,priority:hd,componentmodel:ks,componentview:gt,seriesmodel:dt,chartview:mt,registercomponentmodel:function(t){ks.registerclass(t)},registercomponentview:function(t){gt.registerclass(t)},registerseriesmodel:function(t){dt.registerclass(t)},registerchartview:function(t){mt.registerclass(t)},registersubtypedefaulter:function(t,e){ks.registersubtypedefaulter(t,e)},registerpainter:function(t,e){yi(t,e)}},ri=(object.freeze||object)({linearmap:mi,round:xi,asc:wi,getprecision:bi,getprecisionsafe:si,getpixelprecision:mi,getpercentwithprecision:ti,max_safe_integer:z_,remradian:di,isradianaroundzero:ki,parsedate:ii,quantity:ai,quantityexponent:pi,nice:li,quantile:oi,reformintervals:ri,isnumeric:ei,numerictonumber:bi}),oi=(object.freeze||object)({parse:ii,format:qs}),ai=(object.freeze||object)({extendshape:es,extendpath:ns,makepath:os,makeimage:as,mergepath:is,resizepath:ls,createicon:_s,updateprops:qa,initprops:za,gettransform:cs,clippointsbyrect:vs,cliprectbyrect:ms,registershape:is,getshapeclass:rs,group:v_,image:bw,text:aw,circle:cb,ellipse:fb,sector:cb,ring:kb,polygon:ab,polyline:lb,rect:cw,line:bb,beziercurve:zb,arc:vb,incrementaldisplayable:$b,compoundpath:hb,lineargradient:wb,radialgradient:ub,boundingrect:a_}),si=(object.freeze||object)({addcommas:fl,tocamelcase:dl,normalizecssarray:vs,encodehtml:gl,formattpl:vl,gettooltipmarker:ml,formattime:_l,capitalfirst:xl,truncatetext:ir,gettextrect:pl}),li=(object.freeze||object)({map:v,each:y,indexof:p,inherits:f,reduce:m,filter:_,bind:$v,curry:s,isarray:m,isstring:c,isobject:i,isfunction:t,extend:h,defaults:c,clone:s,merge:l}),ui=ar(),hi=[0,1],ci=function(){function t(t,e,n){this.onband=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=math.min(e[0],e[1]),i=math.max(e[0],e[1]);return t>=n&&i>=t},t.prototype.containdata=function(t){return this.scale.contain(t)},t.prototype.getextent=function(){return this._extent.slice()},t.prototype.getpixelprecision=function(t){return mi(t||this.scale.getextent(),this._extent)},t.prototype.setextent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.datatocoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onband&&"ordinal"===i.type&&(n=n.slice(),ad(n,i.count())),mi(t,hi,n,e)},t.prototype.coordtodata=function(t,e){var n=this._extent,i=this.scale;this.onband&&"ordinal"===i.type&&(n=n.slice(),ad(n,i.count()));var r=mi(t,n,hi,e);return this.scale.scale(r)},t.prototype.pointtodata=function(){},t.prototype.gettickscoords=function(t){t=t||{};var e=t.tickmodel||this.gettickmodel(),n=jf(this,e),i=n.ticks,r=v(i,function(t){return{coord:this.datatocoord("ordinal"===this.scale.type?this.scale.getrawordinalnumber(t):t),tickvalue:t}},this),o=e.get("alignwithlabel");return sd(this,r,o,t.clamp),r},t.prototype.getminortickscoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getmodel("minortick"),e=t.get("splitnumber");e>0&&100>e||(e=5);var n=this.scale.getminorticks(e),i=v(n,function(t){return v(t,function(t){return{coord:this.datatocoord(t),tickvalue:t}},this)},this);return i},t.prototype.getviewlabels=function(){return yf(this).labels},t.prototype.getlabelmodel=function(){return this.model.getmodel("axislabel")},t.prototype.gettickmodel=function(){return this.model.getmodel("axistick")},t.prototype.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},t.prototype.calculatecategoryinterval=function(){return nd(this)},t}(),pi=2*math.pi,fi=aw.cmd,di=["top","right","bottom","left"],gi=[],yi=new w_,vi=new w_,mi=new w_,_i=new w_,xi=new w_,wi=[],bi=new w_,si=["align","verticalalign","width","height","fontsize"],mi=new __,ti=ar(),ci=ar(),di=["x","y","rotation"],ki=function(){function t(){this._labellist=[],this._chartviewlist=[]}return t.prototype.clearlabels=function(){this._labellist=[],this._chartviewlist=[]},t.prototype._addlabel=function(t,e,n,i,r){var o=i.style,a=i.__hosttarget,s=a.textconfig||{},l=i.getcomputedtransform(),u=i.getboundingrect().plain();a_.applytransform(u,u,l),l?mi.setlocaltransform(l):(mi.x=mi.y=mi.rotation=mi.originx=mi.originy=0,mi.scalex=mi.scaley=1);var h,c=i.__hosttarget;if(c){h=c.getboundingrect().plain();var p=c.getcomputedtransform();a_.applytransform(h,h,p)}var f=h&&c.gettextguideline();this._labellist.push({label:i,labelline:f,seriesmodel:n,dataindex:t,datatype:e,layoutoption:r,computedlayoutoption:null,rect:u,hostrect:h,priority:h?h.width*h.height:0,defaultattr:{ignore:i.ignore,labelguideignore:f&&f.ignore,x:mi.x,y:mi.y,scalex:mi.scalex,scaley:mi.scaley,rotation:mi.rotation,style:{x:o.x,y:o.y,align:o.align,verticalalign:o.verticalalign,width:o.width,height:o.height,fontsize:o.fontsize},cursor:i.cursor,attachedpos:s.position,attachedrot:s.rotation}})},t.prototype.addlabelsofseries=function(t){var e=this;this._chartviewlist.push(t);var n=t.__model,i=n.get("labellayout");(t(i)||w(i).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var r=t.gettextcontent(),o=ow(t);r&&!r.disablelabellayout&&e._addlabel(o.dataindex,o.datatype,n,r,i)})},t.prototype.updatelayoutconfig=function(t){function e(t,e){return function(){md(t,e)}}for(var n=t.getwidth(),i=t.getheight(),r=0;r=0&&n.attr(r.oldlayoutselect),p(h,"emphasis")>=0&&n.attr(r.oldlayoutemphasis)),qa(n,l,e,s)}else if(n.attr(l),!hs(n).valueanimation){var c=z(n.style.opacity,1);n.style.opacity=0,za(n,{style:{opacity:c}},e,s)}if(r.oldlayout=l,n.states.select){var f=r.oldlayoutselect={};ld(f,l,di),ld(f,n.states.select,di)}if(n.states.emphasis){var d=r.oldlayoutemphasis={};ld(d,l,di),ld(d,n.states.emphasis,di)}bs(n,s,u,e,e)}if(i&&!i.ignore&&!i.invisible){var r=ci(i),o=r.oldlayout,g={points:i.shape.points};o?(i.attr({shape:o}),qa(i,{shape:g},e)):(i.setshape(g),i.style.strokepercent=0,za(i,{style:{strokepercent:1}},e)),r.oldlayout=g}},t}(),ii=ar();xf(od);var ai=function(t){function n(e,n,i){var r=t.call(this)||this;r.motionblur=!1,r.lastframealpha=.7,r.dpr=1,r.virtual=!1,r.config={},r.incremental=!1,r.zlevel=0,r.maxrepaintrectcount=5,r.__dirty=!0,r.__firsttimepaint=!0,r.__used=!1,r.__drawindex=0,r.__startindex=0,r.__endindex=0,r.__prevstartindex=null,r.__prevendindex=null;var o;i=i||s_,"string"==typeof e?o=bd(e,n,i):i(e)&&(o=e,e=o.id),r.id=e,r.dom=o;var a=o.style;return a&&(o.onselectstart=rd,a.webkituserselect="none",a.userselect="none",a.webkittaphighlightcolor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderwidth="0"),r.domback=null,r.ctxback=null,r.painter=n,r.config=null,r.dpr=i,r}return e(n,t),n.prototype.getelementcount=function(){return this.__endindex-this.__startindex},n.prototype.afterbrush=function(){this.__prevstartindex=this.__startindex,this.__prevendindex=this.__endindex},n.prototype.initcontext=function(){this.ctx=this.dom.getcontext("2d"),this.ctx.dpr=this.dpr},n.prototype.setunpainted=function(){this.__firsttimepaint=!0},n.prototype.createbackbuffer=function(){var t=this.dpr;this.domback=bd("back-"+this.id,this.painter,t),this.ctxback=this.domback.getcontext("2d"),1!==t&&this.ctxback.scale(t,t)},n.prototype.createrepaintrects=function(t,e,n,i){function r(t){if(t.isfinite()&&!t.iszero())if(0===o.length){var e=new a_(0,0,0,0);e.copy(t),o.push(e)}else{for(var n=!1,i=1/0,r=0,u=0;ug&&(i=g,r=u)}}if(s&&(o[r].union(t),n=!0),!n){var e=new a_(0,0,0,0);e.copy(t),o.push(e)}s||(s=o.length>=a)}}if(this.__firsttimepaint)return this.__firsttimepaint=!1,null;for(var o=[],a=this.maxrepaintrectcount,s=!1,l=new a_(0,0,0,0),u=this.__startindex;uo;o++){var a=t[o];a.__inhover&&(n||(n=this._hoverlayer=this.getlayer(pi)),i||(i=n.ctx,i.save()),_c(i,a,r,o===e-1))}i&&i.restore()}},t.prototype.gethoverlayer=function(){return this.getlayer(pi)},t.prototype.paintone=function(t,e){mc(t,e)},t.prototype._paintlist=function(t,e,n,i){if(this._redrawid===i){n=n||!1,this._updatelayerstatus(t);var r=this._dopaintlist(t,e,n),o=r.finished,a=r.needsrefreshhover;if(this._needsmanuallycompositing&&this._compositemanually(),a&&this._painthoverlist(t),o)this.eachlayer(function(t){t.afterbrush&&t.afterbrush()});else{var s=this;pm(function(){s._paintlist(t,e,n,i)})}}},t.prototype._compositemanually=function(){var t=this.getlayer(li).ctx,e=this._domroot.width,n=this._domroot.height;t.clearrect(0,0,e,n),this.eachbuiltinlayer(function(i){i.virtual&&t.drawimage(i.dom,0,0,e,n)})},t.prototype._dopaintlist=function(t,e,n){for(var i=this,r=[],o=this._opts.usedirtyrect,a=0;a15)break}}n.prevelclippaths&&l.restore()};if(c)if(0===c.length)m=s.__endindex;else for(var x=p.dpr,w=0;w0&&t>i[0]){for(l=0;r-1>l&&!(i[l]t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=e,!e.virtual)if(s){var u=s.dom;u.nextsibling?o.insertbefore(e.dom,u.nextsibling):o.appendchild(e.dom)}else o.firstchild?o.insertbefore(e.dom,o.firstchild):o.appendchild(e.dom);e.__painter=this},t.prototype.eachlayer=function(t,e){for(var n=this._zlevellist,i=0;i0?oi:0),this._needsmanuallycompositing),h.__builtin__||a("zlevel "+u+" has been used by unkown layer "+h.id),h!==s&&(h.__used=!0,h.__startindex!==o&&(h.__dirty=!0),h.__startindex=o,h.__drawindex=h.incremental?-1:o,e(o),s=h),i.__dirty&cm&&!i.__inhover&&(h.__dirty=!0,h.incremental&&h.__drawindex<0&&(h.__drawindex=o))}e(o),this.eachbuiltinlayer(function(t){!t.__used&&t.getelementcount()>0&&(t.__dirty=!0,t.__startindex=t.__endindex=t.__drawindex=0),t.__dirty&&t.__drawindex<0&&(t.__drawindex=t.__startindex)})},t.prototype.clear=function(){return this.eachbuiltinlayer(this._clearlayer),this},t.prototype._clearlayer=function(t){t.clear()},t.prototype.setbackgroundcolor=function(t){this._backgroundcolor=t,y(this._layers,function(t){t.setunpainted()})},t.prototype.configlayer=function(t,e){if(e){var n=this._layerconfig;n[t]?l(n[t],e,!0):n[t]=e;for(var i=0;is;s++){var u=a[s];_c(n,u,o,s===l-1)}return e.dom},t.prototype.getwidth=function(){return this._width},t.prototype.getheight=function(){return this._height},t.prototype._getsize=function(t){var e=this._opts,n=["width","height"][t],i=["clientwidth","clientheight"][t],r=["paddingleft","paddingtop"][t],o=["paddingright","paddingbottom"][t];if(null!=e[n]&&"auto"!==e[n])return parsefloat(e[n]);var a=this.root,s=document.defaultview.getcomputedstyle(a);return(a[i]||ed(s[n])||ed(a.style[n]))-(ed(s[r])||0)-(ed(s[o])||0)|0},t.prototype.pathtoimage=function(t,e){e=e||this.dpr;var n=document.createelement("canvas"),i=n.getcontext("2d"),r=t.getboundingrect(),o=t.style,a=o.shadowblur*e,s=o.shadowoffsetx*e,l=o.shadowoffsety*e,u=t.hasstroke()?o.linewidth:0,c=math.max(u/2,-s+a),p=math.max(u/2,s+a),f=math.max(u/2,-l+a),d=math.max(u/2,l+a),g=r.width+c+p,y=r.height+f+d;n.width=g*e,n.height=y*e,i.scale(e,e),i.clearrect(0,0,g,y),i.dpr=e;var v={x:t.x,y:t.y,scalex:t.scalex,scaley:t.scaley,rotation:t.rotation,originx:t.originx,originy:t.originy};t.x=c-r.x,t.y=f-r.y,t.rotation=0,t.scalex=1,t.scaley=1,t.updatetransform(),t&&_c(i,t,{inhover:!1,viewwidth:this._width,viewheight:this._height},!0);var m=new bw({style:{x:0,y:0,image:n}});return h(t,v),m},t}(),ei=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return e(n,t),n.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourcemanager=new at(this),ju(this)},n.prototype.mergeoption=function(e,n){t.prototype.mergeoption.call(this,e,n),ju(this)},n.prototype.optionupdated=function(){this._sourcemanager.dirty()},n.prototype.getsourcemanager=function(){return this._sourcemanager},n.type="dataset",n.defaultoption={serieslayoutby:um},n}(ks),ni=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return e(n,t),n.type="dataset",n}(gt);xf([fd,vd]),xf(od);var zi=2*math.pi,fi=math.pi/180,vi=math.pi/180,hi=function(t){function n(e,n,i){var r=t.call(this)||this;r.z2=2;var o=new aw;return r.settextcontent(o),r.updatedata(e,n,i,!0),r}return e(n,t),n.prototype.updatedata=function(t,e,n,i){var r=this,o=t.hostmodel,a=t.getitemmodel(e),s=a.getmodel("emphasis"),l=t.getitemlayout(e),u=h(zd(a.getmodel("itemstyle"),l,!0),l);if(isnan(u.startangle))return void r.setshape(u);if(i){r.setshape(u);var c=o.getshallow("animationtype");"scale"===c?(r.shape.r=l.r0,za(r,{shape:{r:l.r}},o,e)):null!=n?(r.setshape({startangle:n,endangle:n}),za(r,{shape:{startangle:l.startangle,endangle:l.endangle}},o,e)):(r.shape.endangle=l.startangle,qa(r,{shape:{endangle:l.endangle}},o,e))}else ts(r),qa(r,{shape:u},o,e);r.usestyle(t.getitemvisual(e,"style")),xa(r,a);var p=(l.startangle+l.endangle)/2,f=o.get("selectedoffset"),d=math.cos(p)*f,g=math.sin(p)*f,y=a.getshallow("cursor");y&&r.attr("cursor",y),this._updatelabel(o,t,e),r.ensurestate("emphasis").shape=ov({r:l.r+(s.get("scale")?s.get("scalesize")||0:0)},zd(s.getmodel("itemstyle"),l)),h(r.ensurestate("select"),{x:d,y:g,shape:zd(a.getmodel(["select","itemstyle"]),l)}),h(r.ensurestate("blur"),{shape:zd(a.getmodel(["blur","itemstyle"]),l)});var v=r.gettextguideline(),m=r.gettextcontent();v&&h(v.ensurestate("select"),{x:d,y:g}),h(m.ensurestate("select"),{x:d,y:g}),ma(this,s.get("focus"),s.get("blurscope"))},n.prototype._updatelabel=function(t,e,n){var i=this,r=e.getitemmodel(n),o=r.getmodel("labelline"),a=e.getitemvisual(n,"style"),s=a&&a.fill,l=a&&a.opacity;ds(i,ks(r),{labelfetcher:e.hostmodel,labeldataindex:n,inheritcolor:s,defaultopacity:l,defaulttext:t.getformattedlabel(n,"normal")||e.getname(n)});var u=i.gettextcontent();i.settextconfig({position:null,rotation:null}),u.attr({z2:10});var h=t.get(["label","position"]);if("outside"!==h&&"outer"!==h)i.removetextguideline();else{var c=this.gettextguideline();c||(c=new lb,this.settextguideline(c)),sd(this,md(r),{stroke:s,opacity:f(o.get(["linestyle","opacity"]),l,1)})}},n}(cb),gi=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignorelabellineupdate=!0,e}return e(n,t),n.prototype.init=function(){var t=new v_;this._sectorgroup=t},n.prototype.render=function(t,e,n){var i,r=t.getdata(),o=this._data,a=this.group;if(!o&&r.count()>0){for(var s=r.getitemlayout(0),l=1;isnan(s&&s.startangle)&&l=i.r0}},n.type="pie",n}(mt),wi=function(){function t(t,e){this._getdatawithencodedvisual=t,this._getrawdata=e}return t.prototype.getallnames=function(){var t=this._getrawdata();return t.maparray(t.getname)},t.prototype.containname=function(t){var e=this._getrawdata(); return e.indexofname(t)>=0},t.prototype.indexofname=function(t){var e=this._getdatawithencodedvisual();return e.indexofname(t)},t.prototype.getitemvisual=function(t,e){var n=this._getdatawithencodedvisual();return n.getitemvisual(t,e)},t}(),ui=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendvisualprovider=new wi($v(this.getdata,this),$v(this.getrawdata,this)),this._defaultlabelline(e)},n.prototype.mergeoption=function(){t.prototype.mergeoption.apply(this,arguments)},n.prototype.getinitialdata=function(){return kd(this,{coorddimensions:["value"],encodedefaulter:s(ll,this)})},n.prototype.getdataparams=function(e){var n=this.getdata(),i=t.prototype.getdataparams.call(this,e),r=[];return n.each(n.mapdimension("value"),function(t){r.push(t)}),i.percent=ti(r,e,n.hostmodel.get("percentprecision")),i.$vars.push("percent"),i},n.prototype._defaultlabelline=function(t){gi(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},n.type="series.pie",n.defaultoption={zlevel:0,z:2,legendhoverlink:!0,colorby:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,minshowlabelangle:0,selectedoffset:10,percentprecision:2,stillshowzerosum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignto:"none",edgedistance:"25%",bleedmargin:10,distancetolabelline:5},labelline:{show:!0,length:15,length2:15,smooth:!1,minturnangle:90,maxsurfaceangle:90,linestyle:{width:1,type:"solid"}},itemstyle:{borderwidth:1,borderjoin:"round"},showemptycircle:!0,emptycirclestyle:{color:"lightgray",opacity:1},labellayout:{hideoverlap:!0},emphasis:{scale:!0,scalesize:5},avoidlabeloverlap:!0,animationtype:"expansion",animationduration:1e3,animationtypeupdate:"transition",animationeasingupdate:"cubicinout",animationdurationupdate:500,animationeasing:"cubicinout"},n}(dt);xf(jd);var xi=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.type="grid",n.dependencies=["xaxis","yaxis"],n.layoutmode="box",n.defaultoption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containlabel:!1,backgroundcolor:"rgba(0,0,0,0)",borderwidth:1,bordercolor:"#ccc"},n}(ks),yi=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.getcoordsysmodel=function(){return this.getreferringcomponents("grid",ex).models[0]},n.type="cartesian2daxis",n}(ks);d(yi,qk);var ji={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:"#6e7079",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:["#e0e6f1"],width:1,type:"solid"}},splitarea:{show:!1,areastyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},qi=l({boundarygap:!0,deduplication:null,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},ji),zi=l({boundarygap:[0,0],axisline:{show:"auto"},axistick:{show:"auto"},splitnumber:5,minortick:{show:!1,splitnumber:5,length:3,linestyle:{}},minorsplitline:{show:!1,linestyle:{color:"#f4f7fd",width:1}}},ji),ki=l({scale:!0,splitnumber:6,axislabel:{showminlabel:!1,showmaxlabel:!1,rich:{primary:{fontweight:"bold"}}},splitline:{show:!1}},zi),$i=c({scale:!0,logbase:10},zi),ji={category:qi,value:zi,time:ki,log:$i},qi={value:1,category:1,time:1,log:1},ta=function(){function t(t){this.type="cartesian",this._dimlist=[],this._axes={},this.name=t||""}return t.prototype.getaxis=function(t){return this._axes[t]},t.prototype.getaxes=function(){return v(this._dimlist,function(t){return this._axes[t]},this)},t.prototype.getaxesbyscale=function(t){return t=t.tolowercase(),_(this.getaxes(),function(e){return e.scale.type===t})},t.prototype.addaxis=function(t){var e=t.dim;this._axes[e]=t,this._dimlist.push(e)},t}(),ea=["x","y"],na=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ea,e}return e(n,t),n.prototype.calcaffinetransform=function(){this._transform=this._invtransform=null;var t=this.getaxis("x").scale,e=this.getaxis("y").scale;if(eg(t)&&eg(e)){var n=t.getextent(),i=e.getextent(),r=this.datatopoint([n[0],i[0]]),o=this.datatopoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,p=this._transform=[l,0,0,u,h,c];this._invtransform=jn([],p)}}},n.prototype.getbaseaxis=function(){return this.getaxesbyscale("ordinal")[0]||this.getaxesbyscale("time")[0]||this.getaxis("x")},n.prototype.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]))},n.prototype.containdata=function(t){return this.getaxis("x").containdata(t[0])&&this.getaxis("y").containdata(t[1])},n.prototype.datatopoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isfinite(i)&&null!=r&&isfinite(r))return ge(n,t,this._transform);var o=this.getaxis("x"),a=this.getaxis("y");return n[0]=o.toglobalcoord(o.datatocoord(i,e)),n[1]=a.toglobalcoord(a.datatocoord(r,e)),n},n.prototype.clampdata=function(t,e){var n=this.getaxis("x").scale,i=this.getaxis("y").scale,r=n.getextent(),o=i.getextent(),a=n.parse(t[0]),s=i.parse(t[1]);return e=e||[],e[0]=math.min(math.max(math.min(r[0],r[1]),a),math.max(r[0],r[1])),e[1]=math.min(math.max(math.min(o[0],o[1]),s),math.max(o[0],o[1])),e},n.prototype.pointtodata=function(t,e){var n=[];if(this._invtransform)return ge(n,t,this._invtransform);var i=this.getaxis("x"),r=this.getaxis("y");return n[0]=i.coordtodata(i.tolocalcoord(t[0]),e),n[1]=r.coordtodata(r.tolocalcoord(t[1]),e),n},n.prototype.getotheraxis=function(t){return this.getaxis("x"===t.dim?"y":"x")},n.prototype.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]),r=math.max(t[0],t[1])-n,o=math.max(e[0],e[1])-i;return new a_(n,i,r,o)},n}(ta),ia=function(t){function n(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return e(n,t),n.prototype.ishorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},n.prototype.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},n.prototype.pointtodata=function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},n.prototype.setcategorysortinfo=function(t){return"category"!==this.type?!1:(this.model.option.categorysortinfo=t,void this.scale.setsortinfo(t))},n}(ci),ra=function(){function t(t,e,n){this.type="grid",this._coordsmap={},this._coordslist=[],this._axesmap={},this._axeslist=[],this.axispointerenabled=!0,this.dimensions=ea,this._initcartesian(t,e,n),this.model=t}return t.prototype.getrect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesmap;this._updatescale(t,this.model),y(n.x,function(t){pf(t.scale,t.model)}),y(n.y,function(t){pf(t.scale,t.model)});var i={};y(n.x,function(t){ag(n,"y",t,i)}),y(n.y,function(t){ag(n,"x",t,i)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){function i(){y(s,function(t){var e=t.ishorizontal(),n=e?[0,a.width]:[0,a.height],i=t.inverse?1:0;t.setextent(n[i],n[1-i]),lg(t,e?a.x:a.y)})}var r=t.getboxlayoutparams(),o=!n&&t.get("containlabel"),a=ml(r,{width:e.getwidth(),height:e.getheight()});this._rect=a;var s=this._axeslist;i(),o&&(y(s,function(t){if(!t.model.get(["axislabel","inside"])){var e=ef(t);if(e){var n=t.ishorizontal()?"height":"width",i=t.model.get(["axislabel","margin"]);a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i)}}}),i()),y(this._coordslist,function(t){t.calcaffinetransform()})},t.prototype.getaxis=function(t,e){var n=this._axesmap[t];return null!=n?n[e||0]:void 0},t.prototype.getaxes=function(){return this._axeslist.slice()},t.prototype.getcartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsmap[n]}i(t)&&(e=t.yaxisindex,t=t.xaxisindex);for(var i=0,r=this._coordslist;i0?"top":"bottom",i="center"):ki(o-oa)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&oa>o?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textalign:i,textverticalalign:r}},t.makeaxiseventdatabase=function(t){var e={componenttype:t.maintype,componentindex:t.componentindex};return e[t.maintype+"index"]=t.componentindex,e},t.islabelsilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerevent")||e&&e.show)},t}(),sa={axisline:function(t,e,n,i){var r=e.get(["axisline","show"]);if("auto"===r&&t.handleautoshown&&(r=t.handleautoshown("axisline")),r){var o=e.axis.getextent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(ge(s,s,a),ge(l,l,a));var u=h({linecap:"round"},e.getmodel(["axisline","linestyle"]).getlinestyle()),c=new bb({subpixeloptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokecontainthreshold:t.strokecontainthreshold||5,silent:!0,z2:1});c.anid="line",n.add(c);var p=e.get(["axisline","symbol"]);if(null!=p){var f=e.get(["axisline","symbolsize"]);"string"==typeof p&&(p=[p,p]),("string"==typeof f||"number"==typeof f)&&(f=[f,f]);var d=qh(e.get(["axisline","symboloffset"])||0,f),g=f[0],v=f[1];y([{rotate:t.rotation+math.pi/2,offset:d[0],r:0},{rotate:t.rotation-math.pi/2,offset:d[1],r:math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(e,i){if("none"!==p[i]&&null!=p[i]){var r=jh(p[i],-g/2,-v/2,g,v,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*math.cos(t.rotation),y:s[1]-o*math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}})}}},axisticklabel:function(t,e,n,i){var r=gg(n,i,e,t),o=vg(n,i,e,t);if(hg(e,o,r),yg(n,i,e,t.tickdirection),e.get(["axislabel","hideoverlap"])){var a=td(v(o,function(t){return{label:t,priority:t.z2,defaultattr:{ignore:t.ignore}}}));id(a)}},axisname:function(t,e,n,i){var r=n(t.axisname,e.get("name"));if(r){var o,a=e.get("namelocation"),s=t.namedirection,l=e.getmodel("nametextstyle"),u=e.get("namegap")||0,h=e.axis.getextent(),c=h[0]>h[1]?-1:1,p=["start"===a?h[0]-c*u:"end"===a?h[1]+c*u:(h[0]+h[1])/2,fg(a)?t.labeloffset+s*u:0],f=e.get("namerotate");null!=f&&(f=f*oa/180);var d;fg(a)?o=aa.innertextlayout(t.rotation,null!=f?f:t.rotation,s):(o=ug(t.rotation,a,f||0,h),d=t.axisnameavailablewidth,null!=d&&(d=math.abs(d/math.sin(o.rotation)),!isfinite(d)&&(d=null)));var g=l.getfont(),y=e.get("nametruncate",!0)||{},v=y.ellipsis,m=n(t.nametruncatemaxwidth,y.maxwidth,d),_=new aw({x:p[0],y:p[1],rotation:o.rotation,silent:aa.islabelsilent(e),style:is(l,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:l.gettextcolor()||e.get(["axisline","linestyle","color"]),align:l.get("align")||o.textalign,verticalalign:l.get("verticalalign")||o.textverticalalign}),z2:1});if(ms({el:_,componentmodel:e,itemname:r}),_.__fulltext=r,_.anid="name",e.get("triggerevent")){var x=aa.makeaxiseventdatabase(e);x.targettype="axisname",x.name=r,ow(_).eventdata=x}i.add(_),_.updatetransform(),n.add(_),_.decomposetransform()}}},la={},ua=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(e,n,i){this.axispointerclass&&mg(e),t.prototype.render.apply(this,arguments),this._doupdateaxispointerclass(e,i,!0)},n.prototype.updateaxispointer=function(t,e,n){this._doupdateaxispointerclass(t,n,!1)},n.prototype.remove=function(t,e){var n=this._axispointer;n&&n.remove(e)},n.prototype.dispose=function(e,n){this._disposeaxispointer(n),t.prototype.dispose.apply(this,arguments)},n.prototype._doupdateaxispointerclass=function(t,e,i){var r=n.getaxispointerclass(this.axispointerclass);if(r){var o=cg(t);o?(this._axispointer||(this._axispointer=new r)).render(t,o,e,i):this._disposeaxispointer(e)}},n.prototype._disposeaxispointer=function(t){this._axispointer&&this._axispointer.dispose(t),this._axispointer=null},n.registeraxispointerclass=function(t,e){la[t]=e},n.getaxispointerclass=function(t){return t&&la[t]},n.type="axis",n}(gt),ha=ar(),ca=["axisline","axisticklabel","axisname"],pa=["splitarea","splitline","minorsplitline"],fa=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.axispointerclass="cartesianaxispointer",e}return e(n,t),n.prototype.render=function(e,n,i,r){this.group.removeall();var o=this._axisgroup;if(this._axisgroup=new v_,this.group.add(this._axisgroup),e.get("show")){var a=e.getcoordsysmodel(),s=ng(a,e),l=new aa(e,h({handleautoshown:function(){for(var t=a.coordinatesystem.getcartesians(),n=0;n=0},n.prototype.getorient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},n.type="legend.plain",n.dependencies=["series"],n.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,symbolrotate:"inherit",symbolkeepaspect:!0,inactivecolor:"#ccc",inactivebordercolor:"#ccc",inactiveborderwidth:"auto",itemstyle:{color:"inherit",opacity:"inherit",bordercolor:"inherit",borderwidth:"auto",bordercap:"inherit",borderjoin:"inherit",borderdashoffset:"inherit",bordermiterlimit:"inherit"},linestyle:{width:"auto",color:"inherit",inactivecolor:"#ccc",inactivewidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashoffset:"inherit",miterlimit:"inherit"},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}},n}(ks),sa=s,ma=y,ta=v_,ca=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.newlinedisabled=!1,e}return e(n,t),n.prototype.init=function(){this.group.add(this._contentgroup=new ta),this.group.add(this._selectorgroup=new ta),this._isfirstrender=!0},n.prototype.getcontentgroup=function(){return this._contentgroup},n.prototype.getselectorgroup=function(){return this._selectorgroup},n.prototype.render=function(t,e,n){var i=this._isfirstrender;if(this._isfirstrender=!1,this.resetinner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorposition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderinner(r,t,e,n,a,o,s);var l=t.getboxlayoutparams(),u={width:n.getwidth(),height:n.getheight()},h=t.get("padding"),p=ml(l,u,h),f=this.layoutinner(t,r,p,i,a,s),d=ml(c({width:f.width,height:f.height},l),u,h);this.group.x=d.x-f.x,this.group.y=d.y-f.y,this.group.markredraw(),this.group.add(this._backgroundel=og(f,t))}},n.prototype.resetinner=function(){this.getcontentgroup().removeall(),this._backgroundel&&this.group.remove(this._backgroundel),this.getselectorgroup().removeall()},n.prototype.renderinner=function(t,e,n,i,r,o,a){var s=this.getcontentgroup(),l=y(),u=e.get("selectedmode"),h=[];n.eachrawseries(function(t){!t.get("legendhoverlink")&&h.push(t.id)}),ma(e.getdata(),function(r,o){var a=r.get("name");if(!this.newlinedisabled&&(""===a||"\n"===a)){var c=new ta;return c.newline=!0,void s.add(c)}var p=n.getseriesbyname(a)[0];if(!l.get(a))if(p){var f=p.getdata(),d=f.getvisual("legendlinestyle")||{},g=f.getvisual("legendicon"),y=f.getvisual("style"),v=this._createitem(p,a,o,r,e,t,d,y,g,u);v.on("click",sa(eg,a,null,i,h)).on("mouseover",sa(zg,p.name,null,i,h)).on("mouseout",sa(fg,p.name,null,i,h)),l.set(a,!0)}else n.eachrawseries(function(n){if(!l.get(a)&&n.legendvisualprovider){var s=n.legendvisualprovider;if(!s.containname(a))return;var c=s.indexofname(a),p=s.getitemvisual(c,"style"),f=s.getitemvisual(c,"legendicon"),d=on(p.fill);d&&0===d[3]&&(d[3]=.2,p.fill=dn(d,"rgba"));var g=this._createitem(n,a,o,r,e,t,{},p,f,u);g.on("click",sa(eg,null,a,i,h)).on("mouseover",sa(zg,null,a,i,h)).on("mouseout",sa(fg,null,a,i,h)),l.set(a,!0)}},this)},this),r&&this._createselector(r,e,i,o,a)},n.prototype._createselector=function(t,e,n){var i=this.getselectorgroup();ma(t,function(t){var r=t.type,o=new aw({style:{x:0,y:0,align:"center",verticalalign:"middle"},onclick:function(){n.dispatchaction({type:"all"===r?"legendallselect":"legendinverseselect"})}});i.add(o);var a=e.getmodel("selectorlabel"),s=e.getmodel(["emphasis","selectorlabel"]);ds(o,{normal:a,emphasis:s},{defaulttext:t.title}),ma(o)})},n.prototype._createitem=function(t,e,n,i,r,o,a,s,l,u){var h=t.visualdrawtype,c=r.get("itemwidth"),p=r.get("itemheight"),f=r.isselected(e),d=i.get("symbolrotate"),g=i.get("symbolkeepaspect"),y=i.get("icon");l=y||l||"roundrect";var v=rg(l,i,a,s,h,f),m=new ta,_=i.getmodel("textstyle");if("function"!=typeof t.getlegendicon||y&&"inherit"!==y){var x="inherit"===y&&t.getdata().getvisual("symbol")?"inherit"===d?t.getdata().getvisual("symbolrotate"):d:0;m.add(bg({itemwidth:c,itemheight:p,icon:l,iconrotate:x,itemstyle:v.itemstyle,linestyle:v.linestyle,symbolkeepaspect:g}))}else m.add(t.getlegendicon({itemwidth:c,itemheight:p,icon:l,iconrotate:d,itemstyle:v.itemstyle,linestyle:v.linestyle,symbolkeepaspect:g}));var w="left"===o?c+5:-5,b=o,s=r.get("formatter"),m=e;"string"==typeof s&&s?m=s.replace("{name}",null!=e?e:""):"function"==typeof s&&(m=s(e));var t=i.get("inactivecolor");m.add(new aw({style:is(_,{text:m,x:w,y:p/2,fill:f?_.gettextcolor():t,align:b,verticalalign:"middle"})}));var c=new cw({shape:m.getboundingrect(),invisible:!0}),d=i.getmodel("tooltip");return d.get("show")&&ms({el:c,componentmodel:r,itemname:e,itemtooltipoption:d.option}),m.add(c),m.eachchild(function(t){t.silent=!0}),c.silent=!u,this.getcontentgroup().add(m),ma(m),m.__legenddataindex=n,m},n.prototype.layoutinner=function(t,e,n,i,r,o){var a=this.getcontentgroup(),s=this.getselectorgroup();qs(t.get("orient"),a,t.get("itemgap"),n.width,n.height);var l=a.getboundingrect(),u=[-l.x,-l.y];if(s.markredraw(),a.markredraw(),r){qs("horizontal",s,t.get("selectoritemgap",!0));var h=s.getboundingrect(),c=[-h.x,-h.y],p=t.get("selectorbuttongap",!0),f=t.getorient().index,d=0===f?"width":"height",g=0===f?"height":"width",y=0===f?"y":"x";"end"===o?c[f]+=l[d]+p:u[f]+=h[d]+p,c[1-f]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[d]=l[d]+p+h[d],v[g]=math.max(l[g],h[g]),v[y]=math.min(0,h[y]+c[1-f]),v}return a.x=u[0],a.y=u[1],this.group.getboundingrect()},n.prototype.remove=function(){this.getcontentgroup().removeall(),this._isfirstrender=!0},n.type="legend.plain",n}(gt),da=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.setscrolldataindex=function(t){this.option.scrolldataindex=t},n.prototype.init=function(e,n,i){var r=dl(e);t.prototype.init.call(this,e,n,i),ug(this,e,r)},n.prototype.mergeoption=function(e,n){t.prototype.mergeoption.call(this,e,n),ug(this,this.option,e)},n.type="legend.scroll",n.defaultoption=fs(ba.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}),n}(ba),ka=v_,ia=["width","height"],aa=["x","y"],pa=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e.newlinedisabled=!0,e._currentindex=0,e}return e(n,t),n.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containergroup=new ka),this._containergroup.add(this.getcontentgroup()),this.group.add(this._controllergroup=new ka)},n.prototype.resetinner=function(){t.prototype.resetinner.call(this),this._controllergroup.removeall(),this._containergroup.removeclippath(),this._containergroup.__rectsize=null},n.prototype.renderinner=function(e,n,i,r,o,a,s){function l(t,e){var i=t+"dataindex",o=_s(n.get("pageicons",!0)[n.getorient().name][e],{onclick:$v(u._pagego,u,i,n,r)},{x:-p[0]/2,y:-p[1]/2,width:p[0],height:p[1]});o.name=t,h.add(o)}var u=this;t.prototype.renderinner.call(this,e,n,i,r,o,a,s);var h=this._controllergroup,c=n.get("pageiconsize",!0),p=m(c)?c:[c,c];l("pageprev",0);var f=n.getmodel("pagetextstyle");h.add(new aw({name:"pagetext",style:{text:"xx/xx",fill:f.gettextcolor(),font:f.getfont(),verticalalign:"middle",align:"center"},silent:!0})),l("pagenext",1)},n.prototype.layoutinner=function(t,e,n,i,r,o){var a=this.getselectorgroup(),l=t.getorient().index,u=ia[l],h=aa[l],c=ia[1-l],p=aa[1-l];r&&qs("horizontal",a,t.get("selectoritemgap",!0));var f=t.get("selectorbuttongap",!0),d=a.getboundingrect(),g=[-d.x,-d.y],y=s(n);r&&(y[u]=n[u]-d[u]-f);var v=this._layoutcontentandcontroller(t,i,y,l,u,c,p,h);if(r){if("end"===o)g[l]+=v[u]+f;else{var m=d[u]+f;g[l]-=m,v[h]-=m}v[u]+=d[u]+f,g[1-l]+=v[p]+v[c]/2-d[c]/2,v[c]=math.max(v[c],d[c]),v[p]=math.min(v[p],d[p]+g[1-l]),a.x=g[0],a.y=g[1],a.markredraw() }return v},n.prototype._layoutcontentandcontroller=function(t,e,n,i,r,o,a,s){var l=this.getcontentgroup(),u=this._containergroup,h=this._controllergroup;qs(t.get("orient"),l,t.get("itemgap"),i?n.width:null,i?null:n.height),qs("horizontal",h,t.get("pagebuttonitemgap",!0));var c=l.getboundingrect(),p=h.getboundingrect(),f=this._showcontroller=c[r]>n[r],d=[-c.x,-c.y];e||(d[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=z(t.get("pagebuttongap",!0),t.get("itemgap",!0));if(f){var m=t.get("pagebuttonposition",!0);"end"===m?y[i]+=n[r]-p[r]:g[i]+=p[r]+v}y[1-i]+=c[o]/2-p[o]/2,l.setposition(d),u.setposition(g),h.setposition(y);var _={x:0,y:0};if(_[r]=f?n[r]:c[r],_[o]=math.max(c[o],p[o]),_[a]=math.min(0,p[a]+y[1-i]),u.__rectsize=n[r],f){var x={x:0,y:0};x[r]=math.max(n[r]-p[r]-v,0),x[o]=_[o],u.setclippath(new cw({shape:x})),u.__rectsize=x[r]}else h.eachchild(function(t){t.attr({invisible:!0,silent:!0})});var w=this._getpageinfo(t);return null!=w.pageindex&&qa(l,{x:w.contentposition[0],y:w.contentposition[1]},f?t:null),this._updatepageinfoview(t,w),_},n.prototype._pagego=function(t,e,n){var i=this._getpageinfo(e)[t];null!=i&&n.dispatchaction({type:"legendscroll",scrolldataindex:i,legendid:e.id})},n.prototype._updatepageinfoview=function(t,e){var n=this._controllergroup;y(["pageprev","pagenext"],function(i){var r=i+"dataindex",o=null!=e[r],a=n.childofname(i);a&&(a.setstyle("fill",o?t.get("pageiconcolor",!0):t.get("pageiconinactivecolor",!0)),a.cursor=o?"pointer":"default")});var i=n.childofname("pagetext"),r=t.get("pageformatter"),o=e.pageindex,a=null!=o?o+1:0,s=e.pagecount;i&&r&&i.setstyle("text",c(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},n.prototype._getpageinfo=function(t){function e(t){if(t){var e=t.getboundingrect(),n=e[l]+t[l];return{s:n,e:n+e[s],i:t.__legenddataindex}}}function n(t,e){return t.e>=e&&t.s<=e+o}var i=t.get("scrolldataindex",!0),r=this.getcontentgroup(),o=this._containergroup.__rectsize,a=t.getorient().index,s=ia[a],l=aa[a],u=this._findtargetitemindex(i),h=r.children(),c=h[u],p=h.length,f=p?1:0,d={contentposition:[r.x,r.y],pagecount:f,pageindex:f-1,pageprevdataindex:null,pagenextdataindex:null};if(!c)return d;var g=e(c);d.contentposition[a]=-g.s;for(var y=u+1,v=g,m=g,_=null;p>=y;++y)_=e(h[y]),(!_&&m.e>v.s+o||_&&!n(_,v.s))&&(v=m.i>v.i?m:_,v&&(null==d.pagenextdataindex&&(d.pagenextdataindex=v.i),++d.pagecount)),m=_;for(var y=u-1,v=g,m=g,_=null;y>=-1;--y)_=e(h[y]),_&&n(m,_.s)||!(v.ia)return!0;if(o){var s=tg(t).seriesdatacount,l=i.getextent();return math.abs(l[0]-l[1])/s>a}return!1}return n===!0},t.prototype.makeeloption=function(){},t.prototype.createpointerel=function(t,e){var n=e.pointer;if(n){var i=la(t).pointerel=new os[n.type](oa(e.pointer));t.add(i)}},t.prototype.createlabelel=function(t,e,n,i){if(e.label){var r=la(t).labelel=new aw(oa(e.label));t.add(r),zg(r,i)}},t.prototype.updatepointerel=function(t,e,n){var i=la(t).pointerel;i&&e.pointer&&(i.setstyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updatelabelel=function(t,e,n,i){var r=la(t).labelel;r&&(r.setstyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),zg(r,i))},t.prototype._renderhandle=function(t){if(!this._dragging&&this.updatehandletransform){var e=this._axispointermodel,n=this._api.getzr(),i=this._handle,r=e.getmodel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return i&&n.remove(i),void(this._handle=null);var a;this._handle||(a=!0,i=this._handle=_s(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){gm(t.event)},onmousedown:ra(this._onhandledragmove,this,0,0),drift:ra(this._onhandledragmove,this),ondragend:ra(this._onhandledragend,this)}),n.add(i)),$g(i,e,!1),i.setstyle(r.getitemstyle(null,["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"]));var s=r.get("size");m(s)||(s=[s,s]),i.scalex=s[0]/2,i.scaley=s[1]/2,ch(this,"_dodispatchaxispointer",r.get("throttle")||0,"fixrate"),this._movehandletovalue(t,a)}},t.prototype._movehandletovalue=function(t,e){jg(this._axispointermodel,!e&&this._moveanimation,this._handle,kg(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},t.prototype._onhandledragmove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updatehandletransform(kg(n),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=i,n.stopanimation(),n.attr(kg(i)),la(n).lastprop=null,this._dodispatchaxispointer()}},t.prototype._dodispatchaxispointer=function(){var t=this._handle;if(t){var e=this._payloadinfo,n=this._axismodel;this._api.dispatchaction({type:"updateaxispointer",x:e.cursorpoint[0],y:e.cursorpoint[1],tooltipoption:e.tooltipoption,axesinfo:[{axisdim:n.axis.dim,axisindex:n.componentindex}]})}},t.prototype._onhandledragend=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axispointermodel.get("value");this._movehandletovalue(e),this._api.dispatchaction({type:"hidetip"})}},t.prototype.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)},t.prototype.doclear=function(){},t.prototype.buildlabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},t}(),ea=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.makeeloption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=ay(a,o).getotheraxis(o).getglobalextent(),u=o.toglobalcoord(o.datatocoord(e,!0));if(s&&"none"!==s){var h=jg(i),c=na[s](o,u,l);c.style=h,t.graphickey=c.type,t.pointer=c}var p=ng(a.model,n);iy(e,t,p,n,i,r)},n.prototype.gethandletransform=function(t,e,n){var i=ng(e.axis.grid.model,e,{labelinside:!1});i.labelmargin=n.get(["handle","margin"]);var r=ny(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labeldirection<0?math.pi:0)}},n.prototype.updatehandletransform=function(t,e,n){var i=n.axis,r=i.grid,o=i.getglobalextent(!0),a=ay(r,i).getotheraxis(i).getglobalextent(),s="x"===i.dim?0:1,l=[t.x,t.y];l[s]+=e[s],l[s]=math.min(o[1],l[s]),l[s]=math.max(o[0],l[s]);var u=(a[1]+a[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalalign:"middle"},{align:"center"}];return{x:l[0],y:l[1],rotation:t.rotation,cursorpoint:h,tooltipoption:c[s]}},n}(ba),na={line:function(t,e,n){var i=ry([e,n[0]],[e,n[1]],sy(t));return{type:"line",subpixeloptimize:!0,shape:i}},shadow:function(t,e,n){var i=math.max(1,t.getbandwidth()),r=n[1]-n[0];return{type:"rect",shape:oy([e-i/2,n[0]],[i,r],sy(t))}}},za=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="axispointer",n.defaultoption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggertooltip:!0,value:null,status:null,link:[],animation:null,animationdurationupdate:200,linestyle:{color:"#b9bec9",width:1,type:"dashed"},shadowstyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundcolor:"auto",bordercolor:null,borderwidth:0,borderradius:3},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}},n}(ks),fa=ar(),va=y,ha=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.prototype.render=function(t,e,n){var i=e.getcomponent("tooltip"),r=t.get("triggeron")||i&&i.get("triggeron")||"mousemove|click";ly("axispointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexof(t)>=0)&&n({type:"updateaxispointer",currtrigger:t,x:e&&e.offsetx,y:e&&e.offsety})})},n.prototype.remove=function(t,e){dy("axispointer",e)},n.prototype.dispose=function(t,e){dy("axispointer",e)},n.type="axispointer",n}(gt),ga=ar(),wa=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return e(n,t),n.type="tooltip",n.dependencies=["axispointer"],n.defaultoption={zlevel:0,z:60,show:!0,showcontent:!0,trigger:"item",triggeron:"mousemove|click",alwaysshowcontent:!1,displaymode:"single",rendermode:"auto",confine:null,showdelay:0,hidedelay:100,transitionduration:.4,enterable:!1,backgroundcolor:"#fff",shadowblur:10,shadowcolor:"rgba(0, 0, 0, .2)",shadowoffsetx:1,shadowoffsety:2,borderradius:4,borderwidth:1,padding:null,extracsstext:"",axispointer:{type:"line",axis:"auto",animation:"auto",animationdurationupdate:200,animationeasingupdate:"exponentialout",crossstyle:{color:"#999",width:1,type:"dashed",textstyle:{}}},textstyle:{color:"#666",fontsize:14}},n}(ks),ua=iy(["transform","webkittransform","otransform","moztransform","mstransform"]),xa=iy(["webkittransition","transition","otransition","moztransition","mstransition"]),ya=ay(xa,"transition"),ja=ay(ua,"transform"),qa="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ev.transform3dsupported?"will-change:transform;":""),za=function(){function t(t,e,n){if(this._show=!1,this._stylecoord=[0,0,0,0],this._enterable=!0,this._firstshow=!0,this._longhide=!0,ev.wxa)return null;var i=document.createelement("div");i.dombelongtozr=!0,this.el=i;var r=this._zr=e.getzr(),o=this._appendtobody=n&&n.appendtobody;zy(this._stylecoord,r,o,e.getwidth()/2,e.getheight()/2),o?document.body.appendchild(i):t.appendchild(i),this._container=t;var a=this;i.onmouseenter=function(){a._enterable&&(cleartimeout(a._hidetimeout),a._show=!0),a._incontent=!0},i.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=r.handler,n=r.painter.getviewportroot();ke(n,t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){a._incontent=!1,a._enterable&&a._show&&a.hidelater(a._hidedelay)}}return t.prototype.update=function(t){var e=this._container,n=py(e,"position"),i=e.style;"absolute"!==i.position&&"absolute"!==n&&(i.position="relative");var r=t.get("alwaysshowcontent");r&&this._moveifresized(),this.el.classname=t.get("classname")||""},t.prototype.show=function(t,e){cleartimeout(this._hidetimeout),cleartimeout(this._longhidetimeout);var n=this.el,i=n.style,r=this._stylecoord;n.innerhtml?i.csstext=qa+ny(t,!this._firstshow,this._longhide)+by(r[0],r[1],!0)+("border-color:"+wl(e)+";")+(t.get("extracsstext")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstshow=!1,this._longhide=!1},t.prototype.setcontent=function(t,e,n,i,r){var o=this.el;if(null==t)return void(o.innerhtml="");var a="";if(c(r)&&"item"===n.get("trigger")&&!ky(n)&&(a=oy(n,i,r)),c(t))o.innerhtml=t+a;else if(t){o.innerhtml="",m(t)||(t=[t]);for(var s=0;s=0?this._tryshow(n,i):"leave"===t&&this._hide(i))},this))},n.prototype._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,databycoordsys:i._lastdatabycoordsys})})}},n.prototype.manuallyshowtip=function(t,e,n,i){if(i.from!==this.uid&&!ev.node){var r=wy(i,n);this._ticket="";var o=i.databycoordsys,a=qy(i,e,n);if(a){var s=a.el.getboundingrect().clone();s.applytransform(a.el.transform),this._tryshow({offsetx:s.x+s.width/2,offsety:s.y+s.height/2,target:a.el,position:i.position,positiondefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=tp;l.x=i.x,l.y=i.y,l.update(),ow(l).tooltipconfig={name:null,option:i.tooltip},this._tryshow({offsetx:i.x,offsety:i.y,target:l},r)}else if(o)this._tryshow({offsetx:i.x,offsety:i.y,position:i.position,databycoordsys:o,tooltipoption:i.tooltipoption},r);else if(null!=i.seriesindex){if(this._manuallyaxisshowtip(t,e,n,i))return;var u=gy(i,e),h=u.point[0],c=u.point[1];null!=h&&null!=c&&this._tryshow({offsetx:h,offsety:c,target:u.el,position:i.position,positiondefault:"bottom"},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},r))}},n.prototype.manuallyhidetip=function(t,e,n,i){var r=this._tooltipcontent;!this._alwaysshowcontent&&this._tooltipmodel&&r.hidelater(this._tooltipmodel.get("hidedelay")),this._lastx=this._lasty=this._lastdatabycoordsys=null,i.from!==this.uid&&this._hide(wy(i,n))},n.prototype._manuallyaxisshowtip=function(t,e,n,i){var r=i.seriesindex,o=i.dataindex,a=e.getcomponent("axispointer").coordsysaxesinfo;if(null!=r&&null!=o&&null!=a){var s=e.getseriesbyindex(r);if(s){var l=s.getdata(),u=gy([l.getitemmodel(o),s,(s.coordinatesystem||{}).model],this._tooltipmodel);if("axis"===u.get("trigger"))return n.dispatchaction({type:"updateaxispointer",seriesindex:r,dataindex:o,position:i.position}),!0}}},n.prototype._tryshow=function(t,e){var n=t.target,i=this._tooltipmodel;if(i){this._lastx=t.offsetx,this._lasty=t.offsety;var r=t.databycoordsys;if(r&&r.length)this._showaxistooltip(r,t);else if(n){this._lastdatabycoordsys=null;var o,a;xh(n,function(t){return null!=ow(t).dataindex?(o=t,!0):null!=ow(t).tooltipconfig?(a=t,!0):void 0},!0),o?this._showseriesitemtooltip(t,o,e):a?this._showcomponentitemtooltip(t,a,e):this._hide(e)}else this._lastdatabycoordsys=null,this._hide(e)}},n.prototype._showormove=function(t,e){var n=t.get("showdelay");e=$v(e,this),cleartimeout(this._showtimout),n>0?this._showtimout=settimeout(e,n):e()},n.prototype._showaxistooltip=function(t,e){var n=this._ecmodel,i=this._tooltipmodel,r=[e.offsetx,e.offsety],o=gy([e.tooltipoption],i),a=this._rendermode,s=[],l=$u("section",{blocks:[],noheader:!0}),u=[],h=new ct;ja(t,function(t){ja(t.databyaxis,function(t){var e=n.getcomponent(t.axisdim+"axis",t.axisindex),i=t.value;if(e&&null!=i){var r=ey(i,e.axis,n,t.seriesdataindices,t.valuelabelopt),o=$u("section",{header:r,noheader:!w(r),sortblocks:!0,blocks:[]});l.blocks.push(o),y(t.seriesdataindices,function(l){var c=n.getseriesbyindex(l.seriesindex),p=l.dataindexinside,f=c.getdataparams(p);if(!(f.dataindex<0)){f.axisdim=t.axisdim,f.axisindex=t.axisindex,f.axistype=t.axistype,f.axisid=t.axisid,f.axisvalue=bf(e.axis,{value:i}),f.axisvaluelabel=r,f.marker=h.maketooltipmarker("item",wl(f.color),a);var d=pu(c.formattooltip(p,!0,null));d.markupfragment&&o.blocks.push(d.markupfragment),d.markuptext&&u.push(d.markuptext),s.push(f)}})}})}),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),f=th(l,h,a,p,n.get("useutc"),o.get("textstyle"));f&&u.unshift(f);var d="richtext"===a?"\n\n":"
",g=u.join(d);this._showormove(o,function(){this._updatecontentnotchangedonaxis(t,s)?this._updateposition(o,c,r[0],r[1],this._tooltipcontent,s):this._showtooltipcontent(o,g,s,math.random()+"",r[0],r[1],c,null,h)})},n.prototype._showseriesitemtooltip=function(t,e,n){var i=this._ecmodel,r=ow(e),o=r.seriesindex,a=i.getseriesbyindex(o),s=r.datamodel||a,l=r.dataindex,u=r.datatype,h=s.getdata(u),c=this._rendermode,p=t.positiondefault,f=gy([h.getitemmodel(l),s,a&&(a.coordinatesystem||{}).model],this._tooltipmodel,p?{position:p}:null),d=f.get("trigger");if(null==d||"item"===d){var g=s.getdataparams(l,u),y=new ct;g.marker=y.maketooltipmarker("item",wl(g.color),c);var v=pu(s.formattooltip(l,!1,u)),m=f.get("order"),_=v.markupfragment?th(v.markupfragment,y,c,m,i.get("useutc"),f.get("textstyle")):v.markuptext,x="item_"+s.name+"_"+l;this._showormove(f,function(){this._showtooltipcontent(f,_,g,x,t.offsetx,t.offsety,t.position,t.target,y)}),n({type:"showtip",dataindexinside:l,dataindex:h.getrawindex(l),seriesindex:o,from:this.uid})}},n.prototype._showcomponentitemtooltip=function(t,e,n){var i=ow(e),r=i.tooltipconfig,o=r.option||{};if(c(o)){var a=o;o={content:a,formatter:a}}var l=[o],u=this._ecmodel.getcomponent(i.componentmaintype,i.componentindex);u&&l.push(u),l.push({formatter:o.content});var h=t.positiondefault,c=gy(l,this._tooltipmodel,h?{position:h}:null),p=c.get("content"),f=math.random()+"",d=new ct;this._showormove(c,function(){var n=s(c.get("formatterparams")||{});this._showtooltipcontent(c,p,n,f,t.offsetx,t.offsety,t.position,e,d)}),n({type:"showtip",from:this.uid})},n.prototype._showtooltipcontent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showcontent")&&t.get("show")){var u=this._tooltipcontent,h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getnearestpoint([r,o],n,t.get("trigger"),t.get("bordercolor")),f=p.color;if(h)if(c(h)){var d=t.ecmodel.get("useutc"),g=m(n)?n[0]:n,y=g&&g.axistype&&g.axistype.indexof("time")>=0;c=h,y&&(c=qs(g.axisvalue,c,d)),c=vl(c,n,!0)}else if(t(h)){var v=$a(function(e,i){e===this._ticket&&(u.setcontent(i,l,t,f,a),this._updateposition(t,a,r,o,u,n,s))},this);this._ticket=i,c=h(n,i,v)}else c=h;u.setcontent(c,l,t,f,a),u.show(t,f),this._updateposition(t,a,r,o,u,n,s)}},n.prototype._getnearestpoint=function(t,e,n,i){return"axis"===n||m(e)?{color:i||("html"===this._rendermode?"#fff":"none")}:m(e)?void 0:{color:i||e.color||e.bordercolor}},n.prototype._doupdateposition=function(t,e,n,i,r,o,a){var s=this._api.getwidth(),l=this._api.getheight();e=e||t.get("position");var u=r.getsize(),h=t.get("align"),c=t.get("verticalalign"),p=a&&a.getboundingrect().clone();if(a&&p.applytransform(a.transform),t(e)&&(e=e([n,i],o,r.el,p,{viewsize:[s,l],contentsize:u.slice()})),m(e))n=qa(e[0],s),i=qa(e[1],l);else if(i(e)){var f=e;f.width=u[0],f.height=u[1];var d=ml(f,{width:s,height:l});n=d.x,i=d.y,h=null,c=null}else if(c(e)&&a){var g=yy(e,p,u,t.get("borderwidth"));n=g[0],i=g[1]}else{var g=uy(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=jy(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=jy(c)?u[1]/2:"bottom"===c?u[1]:0),ky(t)){var g=xy(n,i,r,s,l);n=g[0],i=g[1]}r.moveto(n,i)},n.prototype._updatecontentnotchangedonaxis=function(t,e){var n=this._lastdatabycoordsys,i=this._cbparamslist,r=!!n&&n.length===t.length;return r&&ja(n,function(n,o){var a=n.databyaxis||[],s=t[o]||{},l=s.databyaxis||[];r=r&&a.length===l.length,r&&ja(a,function(t,n){var o=l[n]||{},a=t.seriesdataindices||[],s=o.seriesdataindices||[];r=r&&t.value===o.value&&t.axistype===o.axistype&&t.axisid===o.axisid&&a.length===s.length,r&&ja(a,function(t,e){var n=s[e];r=r&&t.seriesindex===n.seriesindex&&t.dataindex===n.dataindex}),i&&y(t.seriesdataindices,function(t){var n=t.seriesindex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)})})}),this._lastdatabycoordsys=t,this._cbparamslist=e,!!r},n.prototype._hide=function(t){this._lastdatabycoordsys=null,t({type:"hidetip",from:this.uid})},n.prototype.dispose=function(t,e){ev.node||(this._tooltipcontent.dispose(),dy("itemtooltip",e))},n.type="tooltip",n}(gt);xf(zy);var np="none",ip=math.round,rp=math.sin,op=math.cos,ap=math.pi,sp=2*math.pi,lp=180/ap,up=1e-4,hp=function(){function t(){}return t.prototype.reset=function(){this._d=[],this._str=""},t.prototype.moveto=function(t,e){this._add("m",t,e)},t.prototype.lineto=function(t,e){this._add("l",t,e)},t.prototype.beziercurveto=function(t,e,n,i,r,o){this._add("c",t,e,n,i,r,o)},t.prototype.quadraticcurveto=function(t,e,n,i){this._add("q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=0===this._d.length,u=a-o,h=!s,c=math.abs(u),p=av(c-sp)||(h?u>=sp:-u>=sp),f=u>0?u%sp:u%sp+sp,d=!1;d=p?!0:av(c)?!1:f>=ap==!!h;var g=ov(t+n*op(o)),y=ov(e+i*rp(o));p&&(u=h?sp-1e-4:-sp+1e-4,d=!0,l&&this._d.push("m",g,y));var v=ov(t+n*op(o+u)),m=ov(e+i*rp(o+u));return isnan(g)||isnan(y)||isnan(n)||isnan(i)||isnan(r)||isnan(lp)||isnan(v)||isnan(m)?"":void this._d.push("a",ov(n),ov(i),ip(r*lp),+d,+h,v,m)},t.prototype.rect=function(t,e,n,i){this._add("m",t,e),this._add("l",t+n,e),this._add("l",t+n,e+i),this._add("l",t,e+i),this._add("l",t,e),this._add("z")},t.prototype.closepath=function(){this._d.length>0&&this._add("z")},t.prototype._add=function(t){this._d.push(t);for(var e=1;e=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.doupdate=function(t,e){if(t){var n=this.getdefs(!1);if(t[this._domname]&&n.contains(t[this._domname]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domname]=i)}}},t.prototype.add=function(){return null},t.prototype.adddom=function(t){var e=this.getdefs(!0);t.parentnode!==e&&e.appendchild(t)},t.prototype.removedom=function(t){var e=this.getdefs(!1);e&&t[this._domname]&&(e.removechild(t[this._domname]),t[this._domname]=null)},t.prototype.getdoms=function(){var t=this.getdefs(!1);if(!t)return[];var e=[];return y(this._tagnames,function(n){for(var i=t.getelementsbytagname(n),r=0;ri;++i){var o=this.createelement("stop");o.setattribute("offset",100*n[i].offset+"%");var s=n[i].color;if(s.indexof("rgba")>-1){var l=on(s)[3],u=un(s);o.setattribute("stop-color","#"+u),o.setattribute("stop-opacity",l+"")}else o.setattribute("stop-color",n[i].color);e.appendchild(o)}t.__dom=e},n.prototype.markused=function(e){if(e.style){var n=e.style.fill;n&&n.__dom&&t.prototype.markdomused.call(this,n.__dom),n=e.style.stroke,n&&n.__dom&&t.prototype.markdomused.call(this,n.__dom)}},n}(vp),_p=new qt,xp=function(t){function n(e,n){return t.call(this,e,n,["pattern"],"__pattern_in_use__")||this}return e(n,t),n.prototype.addwithoutupdate=function(t,e){if(e&&e.style){var n=this;y(["fill","stroke"],function(i){var r=e.style[i];if(mv(r)){var o=n.getdefs(!0),a=_p.get(r);a?o.contains(a)||n.adddom(a):a=n.add(r),n.markused(e);var s=a.getattribute("id");t.setattribute(i,"url(#"+s+")")}})}},n.prototype.add=function(t){if(mv(t)){var e=this.createelement("pattern");return t.id=null==t.id?this.nextid++:t.id,e.setattribute("id","zr"+this._zrid+"-pattern-"+t.id),e.setattribute("x","0"),e.setattribute("y","0"),e.setattribute("patternunits","userspaceonuse"),this.updatedom(t,e),this.adddom(e),e}},n.prototype.update=function(t){if(mv(t)){var e=this;this.doupdate(t,function(){var n=_p.get(t);e.updatedom(t,n)})}},n.prototype.updatedom=function(t,e){var n=t.svgelement; if(n instanceof svgelement)n.parentnode!==e&&(e.innerhtml="",e.appendchild(n),e.setattribute("width",t.svgwidth+""),e.setattribute("height",t.svgheight+""));else{var i=void 0,r=e.getelementsbytagname("image");if(r.length){if(!t.image)return void e.removechild(r[0]);i=r[0]}else t.image&&(i=this.createelement("image"));if(i){var o=void 0,a=t.image;if("string"==typeof a?o=a:a instanceof htmlimageelement?o=a.src:a instanceof htmlcanvaselement&&(o=a.todataurl()),o){i.setattribute("href",o),i.setattribute("x","0"),i.setattribute("y","0");var s={dirty:function(){}},l=cr(o,i,s,function(t){e.setattribute("width",t.width+""),e.setattribute("height",t.height+"")});l&&l.width&&l.height&&(e.setattribute("width",l.width+""),e.setattribute("height",l.height+"")),e.appendchild(i)}}}var u=t.x||0,h=t.y||0,c=(t.rotation||0)/math.pi*180,p=t.scalex||1,f=t.scaley||1,d="translate("+u+", "+h+") rotate("+c+") scale("+p+", "+f+")";e.setattribute("patterntransform",d),_p.set(t,e)},n.prototype.markused=function(e){e.style&&(mv(e.style.fill)&&t.prototype.markdomused.call(this,_p.get(e.style.fill)),mv(e.style.stroke)&&t.prototype.markdomused.call(this,_p.get(e.style.stroke)))},n}(vp),wp=function(t){function n(e,n){var i=t.call(this,e,n,"clippath","__clippath_in_use__")||this;return i._refgroups={},i._keyduplicatecount={},i}return e(n,t),n.prototype.markallunused=function(){t.prototype.markallunused.call(this);var e=this._refgroups;for(var n in e)e.hasownproperty(n)&&this.markdomunused(e[n]);this._keyduplicatecount={}},n.prototype._getclippathgroup=function(t,e){if(xv(t)){var n=t.__clippaths,i=this._keyduplicatecount,r=_v(n);return jh(n,e&&e.__clippaths)&&(i[r]=i[r]||0,i[r]&&(r+="-"+i[r]),i[r]++),this._refgroups[r]||(this._refgroups[r]=this.createelement("g"))}},n.prototype.update=function(t,e){var n=this._getclippathgroup(t,e);return n&&(this.markdomused(n),this.updatedom(n,t.__clippaths)),n},n.prototype.updatedom=function(t,e){if(e&&e.length>0){var n=this.getdefs(!0),i=e[0],r=void 0,o=void 0;i._dom?(o=i._dom.getattribute("id"),r=i._dom,n.contains(r)||n.appendchild(r)):(o="zr"+this._zrid+"-clip-"+this.nextid,++this.nextid,r=this.createelement("clippath"),r.setattribute("id",o),n.appendchild(r),i._dom=r);var a=this.getsvgproxy(i);a.brush(i);var s=this.getsvgelement(i);r.innerhtml="",r.appendchild(s),t.setattribute("clip-path","url(#"+o+")"),e.length>1&&this.updatedom(r,e.slice(1))}else t&&t.setattribute("clip-path","none")},n.prototype.markused=function(e){var n=this;e.__clippaths&&y(e.__clippaths,function(e){e._dom&&t.prototype.markdomused.call(n,e._dom)})},n.prototype.removeunused=function(){t.prototype.removeunused.call(this);var e={},n=this._refgroups;for(var i in n)if(n.hasownproperty(i)){var r=n[i];this.isdomunused(r)?r.parentnode&&r.parentnode.removechild(r):e[i]=r}this._refgroups=e},n}(vp),bp=function(t){function n(e,n){var i=t.call(this,e,n,["filter"],"__filter_in_use__","_shadowdom")||this;return i._shadowdommap={},i._shadowdompool=[],i}return e(n,t),n.prototype._getfrompool=function(){var t=this._shadowdompool.pop();if(!t){t=this.createelement("filter"),t.setattribute("id","zr"+this._zrid+"-shadow-"+this.nextid++);var e=this.createelement("fedropshadow");t.appendchild(e),this.adddom(t)}return t},n.prototype.update=function(t,e){var n=e.style;if(wv(n)){var i=bv(e),r=e._shadowdom=this._shadowdommap[i];r||(r=this._getfrompool(),this._shadowdommap[i]=r),this.updatedom(t,e,r)}else this.remove(t,e)},n.prototype.remove=function(t,e){null!=e._shadowdom&&(e._shadowdom=null,t.removeattribute("filter"))},n.prototype.updatedom=function(t,e,n){var i=n.children[0],r=e.style,o=e.getglobalscale(),a=o[0],s=o[1];if(a&&s){var l=r.shadowoffsetx||0,u=r.shadowoffsety||0,h=r.shadowblur,c=$y(r.shadowcolor);i.setattribute("dx",l/a+""),i.setattribute("dy",u/s+""),i.setattribute("flood-color",c.color),i.setattribute("flood-opacity",c.opacity+"");var p=h/2/a,f=h/2/s,d=p+" "+f;i.setattribute("stddeviation",d),n.setattribute("x","-100%"),n.setattribute("y","-100%"),n.setattribute("width","300%"),n.setattribute("height","300%"),e._shadowdom=n;var g=n.getattribute("id");t.setattribute("filter","url(#"+g+")")}},n.prototype.removeunused=function(){var t=this.getdefs(!1);if(t){var e=this._shadowdompool,n=this._shadowdommap;for(var i in n)n.hasownproperty(i)&&e.push(n[i]);this._shadowdommap={}}},n}(vp),sp=function(){function t(t,e,n,i){this.type="svg",this.refreshhover=pv("refreshhover"),this.pathtoimage=pv("pathtoimage"),this.configlayer=pv("configlayer"),this.root=t,this.storage=e,this._opts=n=h({},n||{});var r=ky("svg");r.setattributens("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),r.setattributens("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setattribute("version","1.1"),r.setattribute("baseprofile","full"),r.style.csstext="user-select:none;position:absolute;left:0;top:0;";var o=ky("g");r.appendchild(o);var a=ky("g");r.appendchild(a),this._gradientmanager=new mp(i,a),this._patternmanager=new xp(i,a),this._clippathmanager=new wp(i,a),this._shadowmanager=new bp(i,a);var s=document.createelement("div");s.style.csstext="overflow:hidden;position:relative",this._svgdom=r,this._svgroot=a,this._backgroundroot=o,this._viewport=s,t.appendchild(s),s.appendchild(r),this.resize(n.width,n.height),this._visiblelist=[]}return t.prototype.gettype=function(){return"svg"},t.prototype.getviewportroot=function(){return this._viewport},t.prototype.getsvgdom=function(){return this._svgdom},t.prototype.getsvgroot=function(){return this._svgroot},t.prototype.getviewportrootoffset=function(){var t=this.getviewportroot();return t?{offsetleft:t.offsetleft||0,offsettop:t.offsettop||0}:void 0},t.prototype.refresh=function(){var t=this.storage.getdisplaylist(!0);this._paintlist(t)},t.prototype.setbackgroundcolor=function(t){this._backgroundroot&&this._backgroundnode&&this._backgroundroot.removechild(this._backgroundnode);var e=ky("rect");e.setattribute("width",this.getwidth()),e.setattribute("height",this.getheight()),e.setattribute("x",0),e.setattribute("y",0),e.setattribute("id",0);var n=$y(t),i=n.color,r=n.opacity;e.setattribute("fill",i),e.setattribute("fill-opacity",r),this._backgroundroot.appendchild(e),this._backgroundnode=e},t.prototype.createsvgelement=function(t){return ky(t)},t.prototype.paintone=function(t){var e=mv(t);return e&&e.brush(t),av(t)},t.prototype._paintlist=function(t){var e=this._gradientmanager,n=this._patternmanager,i=this._clippathmanager,r=this._shadowmanager;e.markallunused(),n.markallunused(),i.markallunused(),r.markallunused();for(var o=this._svgroot,a=this._visiblelist,s=t.length,l=[],u=0;s>u;u++){var h=t[u],c=mv(h),p=av(h);h.invisible||((h.__dirty||!p)&&(c&&c.brush(h),p=av(h),p&&h.style&&(e.update(h.style.fill),e.update(h.style.stroke),n.update(h.style.fill),n.update(h.style.stroke),r.update(p,h)),h.__dirty=0),p&&l.push(h))}for(var f,d,g=iv(a,l),u=0;u\n\r<"));return"data:image/svg+xml;charset=utf-8,"+n},t}();yi("svg",sp),t.version=yc,t.dependencies=jc,t.priority=hd,t.init=op,t.connect=ap,t.disconnect=sp,t.disconnect=ek,t.dispose=lp,t.getinstancebydom=up,t.getinstancebyid=hp,t.registertheme=cp,t.registerpreprocessor=pp,t.registerprocessor=fp,t.registerpostinit=dp,t.registerpostupdate=gp,t.registerupdatelifecycle=yp,t.registeraction=vp,t.registercoordinatesystem=mp,t.getcoordinatesystemdimensions=_p,t.registerlayout=xp,t.registervisual=wp,t.registerloading=sp,t.setcanvascreator=mp,t.registermap=tp,t.getmap=cp,t.registertransform=ik,t.datatool=ck,t.registerlocale=vs,t.zrender=y_,t.matrix=p_,t.vector=om,t.zrutil=tm,t.color=gm,t.helper=ei,t.number=ri,t.time=oi,t.graphic=ai,t.format=si,t.util=li,t.list=tk,t.componentmodel=ks,t.componentview=gt,t.seriesmodel=dt,t.chartview=mt,t.extendcomponentmodel=ld,t.extendcomponentview=ud,t.extendseriesmodel=hd,t.extendchartview=cd,t.throttle=th,t.use=xf,t.parsegeojson=zc,t.parsegeojson=zc,t.env=ev,t.model=xs,t.axis=ci,t.innerdrawelementoncanvas=mc});