/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Su=function(r,t){return Su=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Su(r,t)};function k(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Su(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var I_=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),P_=function(){function r(){this.browser=new I_,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window!="undefined"}return r}(),tn=new P_;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(tn.wxa=!0,tn.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?tn.worker=!0:typeof navigator=="undefined"?(tn.node=!0,tn.svgSupported=!0):R_(navigator.userAgent,tn);function R_(r,t){var e=t.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(e.firefox=!0,e.version=n[1]),i&&(e.ie=!0,e.version=i[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect!="undefined",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document!="undefined";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var j=tn,kf=12,E_="sans-serif",hn=kf+"px "+E_,k_=20,O_=100,B_="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function N_(r){var t={};if(typeof JSON=="undefined")return t;for(var e=0;e=0)s=o*e.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function l1(r,t,e){for(var n=e?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,c=f.left,v=f.top;o.push(c,v),l=l&&a&&c===a[h]&&v===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=e?ev(s,o):ev(o,s))}function sg(r){return r.nodeName.toUpperCase()==="CANVAS"}var u1=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qs=[],f1=j.browser.firefox&&+j.browser.version.split(".")[0]<39;function Cu(r,t,e,n){return e=e||{},n?nv(r,t,e):f1&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):nv(r,t,e),e}function nv(r,t,e){if(j.domSupported&&r.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(sg(r)){var a=r.getBoundingClientRect();e.zrX=n-a.left,e.zrY=i-a.top;return}else if(Tu(Qs,r,n,i)){e.zrX=Qs[0],e.zrY=Qs[1];return}}e.zrX=e.zrY=0}function Ff(r){return r||window.event}function fe(r,t,e){if(t=Ff(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Cu(r,o,t,e)}else{Cu(r,t,t,e);var a=h1(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&u1.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function h1(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var i=Math.abs(n!==0?n:e),a=n>0?-1:n<0?1:e>0?-1:1;return 3*i*a}function Mu(r,t,e,n){r.addEventListener(t,e,n)}function v1(r,t,e,n){r.removeEventListener(t,e,n)}var ni=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function iv(r){return r.which===2||r.which===3}var c1=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,n){var i=t.touches;if(!!i){for(var a={points:[],touches:[],target:e,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=av(n)/av(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=d1(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}},lg="silent";function p1(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:g1}}function g1(){ni(this.event)}var y1=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(_e),yi=function(){function r(t,e){this.x=t,this.y=e}return r}(),m1=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ug=function(r){k(t,r);function t(e,n,i,a){var o=r.call(this)||this;return o._hovered=new yi(0,0),o.storage=e,o.painter=n,o.painterRoot=a,i=i||new y1,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new n1(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(T(m1,function(n){e.on&&e.on(n,this[n],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var n=e.zrX,i=e.zrY,a=fg(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new yi(n,i):this.findHover(n,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var n=e.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new yi(0,0)},t.prototype.dispatch=function(e,n){var i=this[e];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var n=this.proxy;n.setCursor&&n.setCursor(e)},t.prototype.dispatchToElement=function(e,n,i){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+n,s=p1(n,e,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(e,n,i){for(var a=this.storage.getDisplayList(),o=new yi(e,n),s=a.length-1;s>=0;s--){var l=void 0;if(a[s]!==i&&!a[s].ignore&&(l=_1(a[s],e,n))&&(!o.topTarget&&(o.topTarget=a[s]),l!==lg)){o.target=a[s];break}}return o},t.prototype.processGesture=function(e,n){this._gestureMgr||(this._gestureMgr=new c1);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;e.gestureEvent=o;var s=new yi;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t}(_e);T(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){ug.prototype[r]=function(t){var e=t.zrX,n=t.zrY,i=fg(this,e,n),a,o;if((r!=="mouseup"||!i)&&(a=this.findHover(e,n),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||wu(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function _1(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?lg:!0}return!1}function fg(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var S1=ug,hg=32,mi=7;function x1(r){for(var t=0;r>=hg;)t|=r&1,r>>=1;return r+t}function ov(r,t,e,n){var i=t+1;if(i===e)return 1;if(n(r[i++],r[t])<0){for(;i=0;)i++;return i-t}function w1(r,t,e){for(e--;t>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function js(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(r,t[e+f])>0?o=f+1:l=f}return l}function tl(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(r,t[e+f])<0?l=f:o=f+1}return l}function b1(r,t){var e=mi,n,i,a=0;r.length;var o=[];n=[],i=[];function s(v,d){n[a]=v,i[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]i[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]=mi||b>=mi);if(C)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),d===1){for(y=0;y=0;y--)r[x+y]=r[w+y];r[S]=o[_];return}for(var b=e;;){var C=0,M=0,D=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],C++,M=0,--d===0){D=!0;break}}else if(r[S--]=o[_--],M++,C=0,--p===1){D=!0;break}while((C|M)=0;y--)r[x+y]=r[w+y];if(d===0){D=!0;break}}if(r[S--]=o[_--],--p===1){D=!0;break}if(M=p-js(r[m],o,0,p,p-1,t),M!==0){for(S-=M,_-=M,p-=M,x=S+1,w=_+1,y=0;y=mi||M>=mi);if(D)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),p===1){for(S-=d,m-=d,x=S+1,w=m+1,y=d-1;y>=0;y--)r[x+y]=r[w+y];r[S]=o[_]}else{if(p===0)throw new Error;for(w=S-(p-1),y=0;ys&&(l=s),sv(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),i-=a,e+=a}while(i!==0);o.forceMergeRuns()}}var ne=1,Gi=2,Gn=4,lv=!1;function el(){lv||(lv=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function uv(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var T1=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=uv}return r.prototype.traverse=function(t,e){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(el(),f.z=0),isNaN(f.z2)&&(el(),f.z2=0),isNaN(f.zlevel)&&(el(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,n)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),C1=T1,vg;vg=j.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Du=vg,wo={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)))},elasticOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-wo.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?wo.bounceIn(r*2)*.5:wo.bounceOut(r*2-1)*.5+.5}},cg=wo,Na=Math.pow,Sr=Math.sqrt,No=1e-8,dg=1e-4,fv=Sr(3),Fa=1/3,Oe=di(),ce=di(),Kn=di();function gr(r){return r>-No&&rNo||r<-No}function bt(r,t,e,n,i){var a=1-i;return a*a*(a*r+3*i*t)+i*i*(i*n+3*a*e)}function hv(r,t,e,n,i){var a=1-i;return 3*(((t-r)*a+2*(e-t)*i)*a+(n-e)*i*i)}function Fo(r,t,e,n,i,a){var o=n+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-i,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(gr(f)&&gr(h))if(gr(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var g=h*h-4*f*c;if(gr(g)){var p=h/f,d=-s/o+p,y=-p/2;d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y)}else if(g>0){var m=Sr(g),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Na(-_,Fa):_=Na(_,Fa),S<0?S=-Na(-S,Fa):S=Na(S,Fa);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var w=(2*f*s-3*o*h)/(2*Sr(f*f*f)),x=Math.acos(w)/3,b=Sr(f),C=Math.cos(x),d=(-s-2*b*C)/(3*o),y=(-s+b*(C+fv*Math.sin(x)))/(3*o),M=(-s+b*(C-fv*Math.sin(x)))/(3*o);d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y),M>=0&&M<=1&&(a[v++]=M)}}return v}function gg(r,t,e,n,i){var a=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,l=0;if(gr(o)){if(pg(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var f=a*a-4*o*s;if(gr(f))i[0]=-a/(2*o);else if(f>0){var h=Sr(f),u=(-a+h)/(2*o),c=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function zo(r,t,e,n,i,a){var o=(t-r)*i+r,s=(e-t)*i+t,l=(n-e)*i+e,u=(s-o)*i+o,f=(l-s)*i+s,h=(f-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=n}function yg(r,t,e,n,i,a,o,s,l,u,f){var h,c=.005,v=1/0,d,g,p,y;Oe[0]=l,Oe[1]=u;for(var m=0;m<1;m+=.05)ce[0]=bt(r,e,i,o,m),ce[1]=bt(t,n,a,s,m),p=qn(Oe,ce),p=0&&p=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*a*s;if(gr(f)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var h=Sr(f),u=(-o+h)/(2*a),c=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function mg(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function Ho(r,t,e,n,i){var a=(t-r)*n+r,o=(e-t)*n+t,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=e}function _g(r,t,e,n,i,a,o,s,l){var u,f=.005,h=1/0;Oe[0]=o,Oe[1]=s;for(var c=0;c<1;c+=.05){ce[0]=kt(r,e,i,c),ce[1]=kt(t,n,a,c);var v=qn(Oe,ce);v=0&&v=1?1:Fo(0,n,a,1,l,s)&&bt(0,i,o,1,s[0])}}}var I1=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Wt,this.ondestroy=t.ondestroy||Wt,this.onrestart=t.onrestart||Wt,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=V(t)?t:cg[t]||Sg(t)},r}(),P1=I1,xg=function(){function r(t){this.value=t}return r}(),R1=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new xg(t);return this.insertEntry(e),e},r.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++},r.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--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),E1=function(){function r(t){this._list=new R1,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new xg(e),s.key=t,n.insertEntry(s),i[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],n=this._list;if(e!=null)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),Ta=E1,cv={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]};function xr(r){return r=Math.round(r),r<0?0:r>255?255:r}function Au(r){return r<0?0:r>1?1:r}function rl(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?xr(parseFloat(t)/100*255):xr(parseInt(t,10))}function Go(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Au(parseFloat(t)/100):Au(parseFloat(t))}function nl(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function za(r,t,e){return r+(t-r)*e}function ue(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function Lu(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var wg=new Ta(20),Ha=null;function Mn(r,t){Ha&&Lu(Ha,t),Ha=wg.put(r,Ha||t.slice())}function tr(r,t){if(!!r){t=t||[];var e=wg.get(r);if(e)return Lu(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in cv)return Lu(t,cv[n]),Mn(r,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){ue(t,0,0,0,1);return}return ue(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Mn(r,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){ue(t,0,0,0,1);return}return ue(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Mn(r,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?ue(t,+u[0],+u[1],+u[2],1):ue(t,0,0,0,1);f=Go(u.pop());case"rgb":if(u.length!==3){ue(t,0,0,0,1);return}return ue(t,rl(u[0]),rl(u[1]),rl(u[2]),f),Mn(r,t),t;case"hsla":if(u.length!==4){ue(t,0,0,0,1);return}return u[3]=Go(u[3]),dv(u,t),Mn(r,t),t;case"hsl":if(u.length!==3){ue(t,0,0,0,1);return}return dv(u,t),Mn(r,t),t;default:return}}ue(t,0,0,0,1)}}function dv(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=Go(r[1]),i=Go(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],ue(t,xr(nl(o,a,e+1/3)*255),xr(nl(o,a,e)*255),xr(nl(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function pv(r,t){var e=tr(r);if(e){for(var n=0;n<3;n++)t<0?e[n]=e[n]*(1-t)|0:e[n]=(255-e[n])*t+e[n]|0,e[n]>255?e[n]=255:e[n]<0&&(e[n]=0);return ps(e,e.length===4?"rgba":"rgb")}}function k1(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=tr(t[i]),s=tr(t[a]),l=n-i,u=ps([xr(za(o[0],s[0],l)),xr(za(o[1],s[1],l)),xr(za(o[2],s[2],l)),Au(za(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function ps(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Vo(r,t){var e=tr(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function O1(r){return r.type==="linear"}function B1(r){return r.type==="radial"}(function(){return j.hasGlobalWindow&&V(window.btoa)?function(r){return window.btoa(unescape(r))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return on("Base64 isn't natively supported in the current environment."),null}})();var Iu=Array.prototype.slice;function Ke(r,t,e){return(t-r)*e+r}function il(r,t,e,n){for(var i=t.length,a=0;an?t:r,a=Math.min(e,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=yv,l=e;if(Kt(e)){var u=H1(e);s=u,(u===1&&!ct(e[0])||u===2&&!ct(e[0][0]))&&(o=!0)}else if(ct(e)&&!sa(e))s=Va;else if(z(e))if(!isNaN(+e))s=Va;else{var f=tr(e);f&&(l=f,s=Vi)}else if(cs(e)){var h=O({},l);h.colorStops=H(e.colorStops,function(v){return{offset:v.offset,color:tr(v.color)}}),O1(e)?s=Pu:B1(e)&&(s=Ru),l=h}a===0?this.valType=s:(s!==this.valType||s===yv)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:l,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=V(n)?n:cg[n]||Sg(n)),i.push(c),c},r.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(g,p){return g.time-p.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Wa(i),u=mv(i),f=0;f=0&&!(o[f].percent<=e);f--);f=c(f,s-2)}else{for(f=h;fe);f++);f=c(f-1,s-2)}d=o[f+1],v=o[f]}if(!!(v&&d)){this._lastFr=f,this._lastFrP=e;var p=d.percent-v.percent,y=p===0?1:c((e-v.percent)/p,1);d.easingFunc&&(y=d.easingFunc(y));var m=n?this._additiveValue:u?_i:t[l];if((Wa(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?v.rawValue:d.rawValue;else if(Wa(a))a===Co?il(m,v[i],d[i],y):N1(m,v[i],d[i],y);else if(mv(a)){var _=v[i],S=d[i],w=a===Pu;t[l]={type:w?"linear":"radial",x:Ke(_.x,S.x,y),y:Ke(_.y,S.y,y),colorStops:H(_.colorStops,function(b,C){var M=S.colorStops[C];return{offset:Ke(b.offset,M.offset,y),color:To(il([],b.color,M.color,y))}}),global:S.global},w?(t[l].x2=Ke(_.x2,S.x2,y),t[l].y2=Ke(_.y2,S.y2,y)):t[l].r=Ke(_.r,S.r,y)}else if(u)il(m,v[i],d[i],y),n||(t[l]=To(m));else{var x=Ke(v[i],d[i],y);n?this._additiveValue=x:t[l]=x}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;e===Va?t[n]=t[n]+i:e===Vi?(tr(t[n],_i),Ga(_i,_i,i,1),t[n]=To(_i)):e===Co?Ga(t[n],t[n],i,1):e===bg&&gv(t[n],t[n],i,1)},r}(),V1=function(){function r(t,e,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i){on("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,pt(e),n)},r.prototype.whenWithKeys=function(t,e,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,bo(u),i),this._trackKeys.push(s)}l.addKeyframe(t,bo(e[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}(),zf=V1;function $n(){return new Date().getTime()}var W1=function(r){k(t,r);function t(e){var n=r.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}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var n=e.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(e){if(!!e.animation){var n=e.prev,i=e.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var n=e.getClip();n&&this.removeClip(n),e.animation=null},t.prototype.update=function(e){for(var n=$n()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,e||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(Du(n),!e._paused&&e.update())}Du(n)},t.prototype.start=function(){this._running||(this._time=$n(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=$n(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=$n()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var n=e.next;e.prev=e.next=e.animation=null,e=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,n){n=n||{},this.start();var i=new zf(e,n.loop);return this.addAnimator(i),i},t}(_e),U1=W1,Y1=300,al=j.domSupported,ol=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=H(r,function(i){var a=i.replace("mouse","pointer");return e.hasOwnProperty(a)?a:i});return{mouse:r,touch:t,pointer:n}}(),_v={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Sv=!1;function Eu(r){var t=r.pointerType;return t==="pen"||t==="touch"}function $1(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function sl(r){r&&(r.zrByTouch=!0)}function Z1(r,t){return fe(r.dom,new X1(r,t),!0)}function Tg(r,t){for(var e=t,n=!1;e&&e.nodeType!==9&&!(n=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return n}var X1=function(){function r(t,e){this.stopPropagation=Wt,this.stopImmediatePropagation=Wt,this.preventDefault=Wt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),we={mousedown:function(r){r=fe(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=fe(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=fe(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=fe(this.dom,r);var t=r.toElement||r.relatedTarget;Tg(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Sv=!0,r=fe(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Sv||(r=fe(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=fe(this.dom,r),sl(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),we.mousemove.call(this,r),we.mousedown.call(this,r)},touchmove:function(r){r=fe(this.dom,r),sl(r),this.handler.processGesture(r,"change"),we.mousemove.call(this,r)},touchend:function(r){r=fe(this.dom,r),sl(r),this.handler.processGesture(r,"end"),we.mouseup.call(this,r),+new Date-+this.__lastTouchMomentbv||r<-bv}var Pr=[],Dn=[],ul=la(),fl=Math.abs,rS=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Ir(this.rotation)||Ir(this.x)||Ir(this.y)||Ir(this.scaleX-1)||Ir(this.scaleY-1)||Ir(this.skewX)||Ir(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&wv(n);return}n=n||la(),e?this.getLocalTransform(n):wv(n),t&&(e?Qn(n,t,n):tS(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Pr);var n=Pr[0]<0?-1:1,i=Pr[1]<0?-1:1,a=((Pr[0]-n)*e+n)/Pr[0]||0,o=((Pr[1]-i)*e+i)/Pr[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||la(),gs(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(!!t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Qn(Dn,t.invTransform,e),e=Dn);var n=this.originX,i=this.originY;(n||i)&&(ul[4]=n,ul[5]=i,Qn(Dn,e,ul),Dn[4]-=n,Dn[5]-=i,e=Dn),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&ge(n,n,i),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&ge(n,n,i),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&fl(t[0]-1)>1e-10&&fl(t[3]-1)>1e-10?Math.sqrt(fl(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){nS(this,t)},r.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var d=n+s,g=i+l;e[4]=-d*a-c*g*o,e[5]=-g*o-v*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=c*o,u&&Gf(e,e,u),e[4]+=n+f,e[5]+=i+h,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),ua=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function nS(r,t){for(var e=0;ed&&(d=_,gd&&(d=S,y=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,n){if(!n){t!==e&&r.copy(t,e);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=e.x*i+o,t.y=e.y*a+s,t.width=e.width*i,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Rr.x=kr.x=e.x,Rr.y=Or.y=e.y,Er.x=Or.x=e.x+e.width,Er.y=kr.y=e.y+e.height,Rr.transform(n),Or.transform(n),Er.transform(n),kr.transform(n),t.x=Ua(Rr.x,Er.x,kr.x,Or.x),t.y=Ua(Rr.y,Er.y,kr.y,Or.y);var l=Ya(Rr.x,Er.x,kr.x,Or.x),u=Ya(Rr.y,Er.y,kr.y,Or.y);t.width=l-t.x,t.height=u-t.y},r}(),it=aS,Tv={};function ie(r,t){t=t||hn;var e=Tv[t];e||(e=Tv[t]=new Ta(500));var n=e.get(r);return n==null&&(n=Sn.measureText(r,t).width,e.put(r,n)),n}function Cv(r,t,e,n){var i=ie(r,t),a=Vf(t),o=Wi(0,i,e),s=Vn(0,a,n),l=new it(o,s,i,a);return l}function ms(r,t,e,n){var i=((r||"")+"").split(` `),a=i.length;if(a===1)return Cv(i[0],t,e,n);for(var o=new it(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function Mg(r,t,e){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,f="left",h="top";if(n instanceof Array)l+=dn(n[0],e.width),u+=dn(n[1],e.height),f=null,h=null;else switch(n){case"left":l-=i,u+=s,f="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var hl="__zr_normal__",vl=ua.concat(["ignore"]),oS=br(ua,function(r,t){return r[t]=!0,r},{ignore:!1}),An={},sS=new it(0,0,0,0),Wf=function(){function r(t){this.id=ng(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(e),n.position!=null){var f=sS;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(An,n,f):Mg(An,n,f),a.x=An.x,a.y=An.y,o=An.align,s=An.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=dn(h[0],f.width),v=dn(h[1],f.height)),u=!0,a.originX=-a.x+c+(i?0:f.x),a.originY=-a.y+v+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var d=n.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;g&&this.canBeInsideText()?(y=n.insideFill,m=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=n.outsideFill,m=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==p.fill||m!==p.stroke||_!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(l=!0,p.fill=y,p.stroke=m,p.autoStroke=_,p.align=o,p.verticalAlign=s,e.setDefaultTextStyle(p)),e.__dirty|=ne,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Nu:Bu},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&tr(e);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ps(n,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},O(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(G(t))for(var n=t,i=pt(n),a=0;a0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(hl,!1,t)},r.prototype.useState=function(t,e,n,i){var a=t===hl,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(J(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){on("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,n,f),c&&c.useState(t,e,n,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ne),u}}},r.prototype.useStates=function(t,e,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,d);var g=this._textContent,p=this._textGuide;g&&g.useStates(t,e,c),p&&p.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ne)}},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},r.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),a=J(i,t),o=J(i,e)>=0;a>=0?o?i.splice(a,1):i[a]=e:n&&!o&&i.push(e),this.useStates(i)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,a=[],o=0;o0&&e.during&&a[0].during(function(d,g){e.during(g)});for(var c=0;c0||i.force&&!o.length){var C=void 0,M=void 0,D=void 0;if(s){M={},c&&(C={});for(var S=0;S<_;S++){var y=g[S];M[y]=e[y],c?C[y]=n[y]:e[y]=n[y]}}else if(c){D={};for(var S=0;S<_;S++){var y=g[S];D[y]=bo(e[y]),uS(e,n,y)}}var w=new zf(e,!1,!1,h?Mt(d,function(L){return L.targetName===t}):null);w.targetName=t,i.scope&&(w.scope=i.scope),c&&C&&w.whenWithKeys(0,C,g),D&&w.whenWithKeys(0,D,g),w.whenWithKeys(u==null?500:u,s?M:n,g).delay(f||0),r.addAnimator(w,t),o.push(w)}}var Ag=Wf,Lg=function(r){k(t,r);function t(e){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var n=this._children,i=0;i=0&&(i.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var i=J(this._children,e);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(e,n){var i=this._children,a=i[n];if(e&&e!==this&&e.parent!==this&&e!==a){i[n]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var n=this.__zr;n&&n!==e.__zr&&e.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(e){var n=this.__zr,i=this._children,a=J(i,e);return a<0?this:(i.splice(a,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},r.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},r.prototype.clearAnimation=function(){this.animation.clear()},r.prototype.getWidth=function(){return this.painter.getWidth()},r.prototype.getHeight=function(){return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},r.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},r.prototype.off=function(t,e){this.handler.off(t,e)},r.prototype.trigger=function(t,e){this.handler.trigger(t,e)},r.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}function Tt(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return z(r)?gS(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function xt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),Pg),r=(+r).toFixed(t),e?r:+r}function Yi(r){return r.sort(function(t,e){return t-e}),r}function Qe(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return zu(r)}function zu(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,i=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function Rg(r,t){var e=Math.log,n=Math.LN10,i=Math.floor(e(r[1]-r[0])/n),a=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function FP(r,t,e){if(!r[t])return 0;var n=br(r,function(d,g){return d+(isNaN(g)?0:g)},0);if(n===0)return 0;for(var i=Math.pow(10,e),a=H(r,function(d){return(isNaN(d)?0:d)/n*i*100}),o=i*100,s=H(a,function(d){return Math.floor(d)}),l=br(s,function(d,g){return d+g},0),u=H(a,function(d,g){return d-s[g]});lf&&(f=u[c],h=c);++s[h],u[h]=0,++l}return s[t]/i}function yS(r,t){var e=Math.max(Qe(r),Qe(t)),n=r+t;return e>Pg?n:xt(n,e)}function Eg(r){var t=Math.PI*2;return(r%t+t)%t}function Uo(r){return r>-Dv&&r=10&&t++,t}function kg(r,t){var e=_s(r),n=Math.pow(10,e),i=r/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,r=a*n,e>=-20?+r.toFixed(e<0?-e:0):r}function Tr(r){var t=parseFloat(r);return t==r&&(t!==0||!z(r)||r.indexOf("x")<=0)?t:NaN}function Og(r){return!isNaN(Tr(r))}function Bg(){return Math.round(Math.random()*9)}function Ng(r,t){return t===0?r:Ng(t,r%t)}function Av(r,t){return r==null?t:t==null?r:r*t/Ng(r,t)}var SS="[ECharts] ",Lv={},xS=typeof console!="undefined"&&console.warn&&console.log;function Ss(r,t,e){if(xS){if(e){if(Lv[t])return;Lv[t]=!0}console[r](SS+t)}}function wS(r,t){Ss("log",r,t)}function Ca(r,t){Ss("warn",r,t)}function Bt(r,t){Ss("error",r,t)}function De(r){Ss("warn","DEPRECATED: "+r,!0)}function Ct(r,t,e){De((e?"["+e+"]":"")+(r+" is deprecated, use "+t+" instead."))}function Yo(){for(var r=[],t=0;t=0||a&&J(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var $S=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],ZS=fa($S),XS=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return ZS(this,t,e)},r}(),Hu=new Ta(50);function qS(r){if(typeof r=="string"){var t=Hu.get(r);return t&&t.image}else return r}function Yg(r,t,e,n,i){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=Hu.get(r),o={hostEl:e,cb:n,cbPayload:i};return a?(t=a.image,!ws(t)&&a.pending.push(o)):(t=Sn.loadImage(r,Ov,Ov),t.__zrImageSrc=r,Hu.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function Ov(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=ie(e,t);return u>s&&(e="",u=0),s=r-u,i.ellipsis=e,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function Zg(r,t){var e=t.containerWidth,n=t.font,i=t.contentWidth;if(!e)return"";var a=ie(r,n);if(a<=e)return r;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){r+=t.ellipsis;break}var s=o===0?QS(r,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(r.length*i/a):0;r=r.substr(0,s),a=ie(r,n)}return r===""&&(r=t.placeholder),r}function QS(r,t,e,n){for(var i=0,a=0,o=r.length;av&&u){var d=Math.floor(v/s);h=h.slice(0,d)}if(r&&a&&f!=null)for(var g=$g(f,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),p=0;ps&&gl(e,r.substring(s,u),t,o),gl(e,l[2],t,o,l[1]),s=pl.lastIndex}si){w>0?(m.tokens=m.tokens.slice(0,w),p(m,S,_),e.lines=e.lines.slice(0,y+1)):e.lines=e.lines.slice(0,y);break t}var L=b.width,I=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")x.percentWidth=L,f.push(x),x.contentWidth=ie(x.text,D);else{if(I){var P=b.backgroundColor,E=P&&P.image;E&&(E=qS(E),ws(E)&&(x.width=Math.max(x.width,E.width*A/E.height)))}var R=d&&n!=null?n-S:null;R!=null&&R0&&d+n.accumWidth>n.width&&(f=t.split(` `),u=!0),n.accumWidth=d}else{var g=Xg(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+v,h=g.linesWidths,f=g.lines}}else f=t.split(` `);for(var p=0;p=33&&t<=383}var nx=br(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function ix(r){return rx(r)?!!nx[r]:!0}function Xg(r,t,e,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,h=0;he:i+f+v>e){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=c,f=v)):d?(a.push(l),o.push(u),l=c,u=v):(a.push(c),o.push(v));continue}f+=v,d?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var Gu="__zr_style_"+Math.round(Math.random()*10),sn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},bs={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};sn[Gu]=!0;var Nv=["z","z2","invisible"],ax=["invisible"],ox=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=pt(e),i=0;i1e-4){s[0]=r-e,s[1]=t-n,l[0]=r+e,l[1]=t+n;return}if($a[0]=Sl(i)*e+r,$a[1]=_l(i)*n+t,Za[0]=Sl(a)*e+r,Za[1]=_l(a)*n+t,u(s,$a,Za),f(l,$a,Za),i=i%Nr,i<0&&(i=i+Nr),a=a%Nr,a<0&&(a=a+Nr),i>a&&!o?a+=Nr:ii&&(Xa[0]=Sl(v)*e+r,Xa[1]=_l(v)*n+t,u(s,Xa,s),f(l,Xa,l))}var st={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Fr=[],zr=[],Pe=[],or=[],Re=[],Ee=[],xl=Math.min,wl=Math.max,Hr=Math.cos,Gr=Math.sin,Ze=Math.abs,Vu=Math.PI,dr=Vu*2,bl=typeof Float32Array!="undefined",wi=[];function Tl(r){var t=Math.round(r/Vu*1e8)/1e8;return t%2*Vu}function hx(r,t){var e=Tl(r[0]);e<0&&(e+=dr);var n=e-r[0],i=r[1];i+=n,!t&&i-e>=dr?i=e+dr:t&&e-i>=dr?i=e-dr:!t&&e>i?i=e+(dr-Tl(e-i)):t&&e0&&(this._ux=Ze(n/Wo/t)||0,this._uy=Ze(n/Wo/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(st.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var n=Ze(t-this._xi),i=Ze(e-this._yi),a=n>this._ux||i>this._uy;if(this.addData(st.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)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},r.prototype.bezierCurveTo=function(t,e,n,i,a,o){return this._drawPendingPt(),this.addData(st.C,t,e,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(st.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,a,o){this._drawPendingPt(),wi[0]=i,wi[1]=a,hx(wi,o),i=wi[0],a=wi[1];var s=a-i;return this.addData(st.A,t,e,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,a,o),this._xi=Hr(a)*n+t,this._yi=Gr(a)*n+e,this},r.prototype.arcTo=function(t,e,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,a),this},r.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(st.R,t,e,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(st.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&bl&&(this.data=new Float32Array(e));for(var n=0;nf.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Pe[0]=Pe[1]=Re[0]=Re[1]=Number.MAX_VALUE,or[0]=or[1]=Ee[0]=Ee[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,i=0,a=0,o;for(o=0;on||Ze(_)>i||c===e-1)&&(g=Math.sqrt(m*m+_*_),a=p,o=y);break}case st.C:{var S=t[c++],w=t[c++],p=t[c++],y=t[c++],x=t[c++],b=t[c++];g=M1(a,o,S,w,p,y,x,b,10),a=x,o=b;break}case st.Q:{var S=t[c++],w=t[c++],p=t[c++],y=t[c++];g=A1(a,o,S,w,p,y,10),a=p,o=y;break}case st.A:var C=t[c++],M=t[c++],D=t[c++],A=t[c++],L=t[c++],I=t[c++],P=I+L;c+=1,t[c++],d&&(s=Hr(L)*D+C,l=Gr(L)*A+M),g=wl(D,A)*xl(dr,Math.abs(I)),a=Hr(P)*D+C,o=Gr(P)*A+M;break;case st.R:{s=a=t[c++],l=o=t[c++];var E=t[c++],R=t[c++];g=E*2+R*2;break}case st.Z:{var m=s-a,_=l-o;g=Math.sqrt(m*m+_*_),a=s,o=l;break}}g>=0&&(u[h++]=g,f+=g)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,f,h,c,v=e<1,d,g,p=0,y=0,m,_=0,S,w;if(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,g=this._pathLen,m=e*g,!m))return;t:for(var x=0;x0&&(t.lineTo(S,w),_=0),b){case st.M:s=u=n[x++],l=f=n[x++],t.moveTo(u,f);break;case st.L:{h=n[x++],c=n[x++];var M=Ze(h-u),D=Ze(c-f);if(M>i||D>a){if(v){var A=d[y++];if(p+A>m){var L=(m-p)/A;t.lineTo(u*(1-L)+h*L,f*(1-L)+c*L);break t}p+=A}t.lineTo(h,c),u=h,f=c,_=0}else{var I=M*M+D*D;I>_&&(S=h,w=c,_=I)}break}case st.C:{var P=n[x++],E=n[x++],R=n[x++],U=n[x++],F=n[x++],N=n[x++];if(v){var A=d[y++];if(p+A>m){var L=(m-p)/A;zo(u,P,R,F,L,Fr),zo(f,E,U,N,L,zr),t.bezierCurveTo(Fr[1],zr[1],Fr[2],zr[2],Fr[3],zr[3]);break t}p+=A}t.bezierCurveTo(P,E,R,U,F,N),u=F,f=N;break}case st.Q:{var P=n[x++],E=n[x++],R=n[x++],U=n[x++];if(v){var A=d[y++];if(p+A>m){var L=(m-p)/A;Ho(u,P,R,L,Fr),Ho(f,E,U,L,zr),t.quadraticCurveTo(Fr[1],zr[1],Fr[2],zr[2]);break t}p+=A}t.quadraticCurveTo(P,E,R,U),u=R,f=U;break}case st.A:var $=n[x++],nt=n[x++],at=n[x++],vt=n[x++],dt=n[x++],jt=n[x++],yt=n[x++],$e=!n[x++],Tn=at>vt?at:vt,te=Ze(at-vt)>.001,At=dt+jt,q=!1;if(v){var A=d[y++];p+A>m&&(At=dt+jt*(m-p)/A,q=!0),p+=A}if(te&&t.ellipse?t.ellipse($,nt,at,vt,yt,dt,At,$e):t.arc($,nt,Tn,dt,At,$e),q)break t;C&&(s=Hr(dt)*at+$,l=Gr(dt)*vt+nt),u=Hr(At)*at+$,f=Gr(At)*vt+nt;break;case st.R:s=u=n[x],l=f=n[x+1],h=n[x++],c=n[x++];var et=n[x++],Lr=n[x++];if(v){var A=d[y++];if(p+A>m){var Nt=m-p;t.moveTo(h,c),t.lineTo(h+xl(Nt,et),c),Nt-=et,Nt>0&&t.lineTo(h+et,c+xl(Nt,Lr)),Nt-=Lr,Nt>0&&t.lineTo(h+wl(et-Nt,0),c+Lr),Nt-=et,Nt>0&&t.lineTo(h,c+wl(Lr-Nt,0));break t}p+=A}t.rect(h,c,et,Lr);break;case st.Z:if(v){var A=d[y++];if(p+A>m){var L=(m-p)/A;t.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break t}p+=A}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=st,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}(),Cr=vx;function Ln(r,t,e,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>t+s&&o>n+s||or+s&&a>e+s||at+h&&f>n+h&&f>a+h&&f>s+h||fr+h&&u>e+h&&u>i+h&&u>o+h||ut+u&&l>n+u&&l>a+u||lr+u&&s>e+u&&s>i+u||se||f+ui&&(i+=bi);var c=Math.atan2(l,s);return c<0&&(c+=bi),c>=n&&c<=i||c+bi>=n&&c+bi<=i}function Vr(r,t,e,n,i,a){if(a>t&&a>n||ai?s:0}var sr=Cr.CMD,Wr=Math.PI*2,gx=1e-4;function yx(r,t){return Math.abs(r-t)t&&u>n&&u>a&&u>s||u1&&mx(),v=bt(t,n,a,s,ve[0]),c>1&&(d=bt(t,n,a,s,ve[1]))),c===2?pt&&s>n&&s>a||s=0&&u<=1){for(var f=0,h=kt(t,n,a,u),c=0;ce||s<-e)return 0;var l=Math.sqrt(e*e-s*s);zt[0]=-l,zt[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Wr-1e-4){n=0,i=Wr;var f=a?1:-1;return o>=zt[0]+r&&o<=zt[1]+r?f:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=Wr,i+=Wr);for(var c=0,v=0;v<2;v++){var d=zt[v];if(d+r>o){var g=Math.atan2(s,d),f=a?1:-1;g<0&&(g=Wr+g),(g>=n&&g<=i||g+Wr>=n&&g+Wr<=i)&&(g>Math.PI/2&&g1&&(e||(s+=Vr(l,u,f,h,n,i))),p&&(l=a[d],u=a[d+1],f=l,h=u),g){case sr.M:f=a[d++],h=a[d++],l=f,u=h;break;case sr.L:if(e){if(Ln(l,u,a[d],a[d+1],t,n,i))return!0}else s+=Vr(l,u,a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case sr.C:if(e){if(cx(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=_x(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case sr.Q:if(e){if(dx(l,u,a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=Sx(l,u,a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case sr.A:var y=a[d++],m=a[d++],_=a[d++],S=a[d++],w=a[d++],x=a[d++];d+=1;var b=!!(1-a[d++]);c=Math.cos(w)*_+y,v=Math.sin(w)*S+m,p?(f=c,h=v):s+=Vr(l,u,c,v,n,i);var C=(n-y)*S/_+y;if(e){if(px(y,m,S,w,w+x,b,t,C,i))return!0}else s+=xx(y,m,S,w,w+x,b,C,i);l=Math.cos(w+x)*_+y,u=Math.sin(w+x)*S+m;break;case sr.R:f=l=a[d++],h=u=a[d++];var M=a[d++],D=a[d++];if(c=f+M,v=h+D,e){if(Ln(f,h,c,h,t,n,i)||Ln(c,h,c,v,t,n,i)||Ln(c,v,f,v,t,n,i)||Ln(f,v,f,h,t,n,i))return!0}else s+=Vr(c,h,c,v,n,i),s+=Vr(f,v,f,h,n,i);break;case sr.Z:if(e){if(Ln(l,u,f,h,t,n,i))return!0}else s+=Vr(l,u,f,h,n,i);l=f,u=h;break}}return!e&&!yx(u,h)&&(s+=Vr(l,u,f,h,n,i)||0),s!==0}function bx(r,t,e){return qg(r,0,!1,t,e)}function Tx(r,t,e,n){return qg(r,t,!0,e,n)}var Kg=tt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},sn),Cx={style:tt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},bs.style)},Cl=ua.concat(["invisible","culling","z","z2","zlevel","parent"]),Mx=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){e.buildPath(l,e.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Bu:n>.2?j1:Nu}else if(e)return Nu}return Bu},t.prototype.getInsideTextStroke=function(e){var n=this.style.fill;if(z(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Vo(e,0)0))},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,n=this.style,i=!e;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Gn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||i){s.copy(e);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f==null?4:f)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect(),o=this.style;if(e=i[0],n=i[1],a.contain(e,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Tx(s,l/u,e,n)))return!0}if(this.hasFill())return bx(s,e,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Gn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,n){e==="shape"?this.setShape(n):r.prototype.attrKV.call(this,e,n)},t.prototype.setShape=function(e,n){var i=this.shape;return i||(i=this.shape={}),typeof e=="string"?i[e]=n:O(i,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Gn)},t.prototype.createStyle=function(e){return ds(Kg,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=O({},this.shape))},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=O({},i.shape),O(u,n.shape)):(u=O({},a?this.shape:i.shape),O(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=O({},this.shape);for(var f={},h=pt(u),c=0;c0},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(e){return ds(Dx,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var n=e.text;n!=null?n+="":n="";var i=ms(n,e.font,e.textAlign,e.textBaseline);if(i.x+=e.x||0,i.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(Aa);Qg.prototype.type="tspan";var Wu=Qg,Ax=tt({x:0,y:0},sn),Lx={style:tt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},bs.style)};function Ix(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Jg=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return ds(Ax,e)},t.prototype._getSize=function(e){var n=this.style,i=n[e];if(i!=null)return i;var a=Ix(n.image)?n.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=n[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Lx},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new it(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Aa);Jg.prototype.type="image";var xn=Jg;function Px(r,t){var e=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,f;i<0&&(e=e+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+f>i&&(h=u+f,u*=i/h,f*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(e+s,n),r.lineTo(e+i-l,n),l!==0&&r.arc(e+i-l,n+l,l,-Math.PI/2,0),r.lineTo(e+i,n+a-u),u!==0&&r.arc(e+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(e+f,n+a),f!==0&&r.arc(e+f,n+a-f,f,Math.PI/2,Math.PI),r.lineTo(e,n+s),s!==0&&r.arc(e+s,n+s,s,Math.PI,Math.PI*1.5)}var Zn=Math.round;function jg(r,t,e){if(!!t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(Zn(n*2)===Zn(i*2)&&(r.x1=r.x2=rn(n,s,!0)),Zn(a*2)===Zn(o*2)&&(r.y1=r.y2=rn(a,s,!0))),r}}function ty(r,t,e){if(!!t){var n=t.x,i=t.y,a=t.width,o=t.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=rn(n,s,!0),r.y=rn(i,s,!0),r.width=Math.max(rn(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(rn(i+o,s,!1)-r.y,o===0?0:1)),r}}function rn(r,t,e){if(!t)return r;var n=Zn(r*2);return(n+Zn(t))%2===0?n/2:(n+(e?1:-1))/2}var Rx=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),Ex={},ey=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new Rx},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=ty(Ex,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Px(e,n):e.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(ht);ey.prototype.type="rect";var mt=ey,Vv={fill:"#000"},Wv=2,kx={style:tt({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},bs.style)},ry=function(r){k(t,r);function t(e){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Vv,n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,L=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P=0&&(P=x[I],P.align==="right");)this._placeToken(P,e,C,y,L,"right",_),M-=P.width,L-=P.width,I--;for(A+=(a-(A-p)-(m-L)-M)/2;D<=I;)P=x[D],this._placeToken(P,e,C,y,A+P.width/2,"center",_),A+=P.width,D++;y+=C}},t.prototype._placeToken=function(e,n,i,a,o,s,l){var u=n.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=a+i/2;f==="top"?h=a+e.height/2:f==="bottom"&&(h=a+i-e.height/2);var c=!e.isLineHolder&&Ml(u);c&&this._renderBackground(u,n,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var v=!!u.backgroundColor,d=e.textPadding;d&&(o=qv(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var g=this._getOrCreateChild(Wu),p=g.createStyle();g.useStyle(p);var y=this._defaultStyle,m=!1,_=0,S=Xv("fill"in u?u.fill:"fill"in n?n.fill:(m=!0,y.fill)),w=Zv("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||m)?(_=Wv,y.stroke):null),x=u.textShadowBlur>0||n.textShadowBlur>0;p.text=e.text,p.x=o,p.y=h,x&&(p.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,p.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",p.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,p.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),p.textAlign=s,p.textBaseline="middle",p.font=e.font||hn,p.opacity=Xn(u.opacity,n.opacity,1),Yv(p,u),w&&(p.lineWidth=Xn(u.lineWidth,n.lineWidth,_),p.lineDash=rt(u.lineDash,n.lineDash),p.lineDashOffset=n.lineDashOffset||0,p.stroke=w),S&&(p.fill=S);var b=e.contentWidth,C=e.contentHeight;g.setBoundingRect(new it(Wi(p.x,b,p.textAlign),Vn(p.y,C,p.textBaseline),b,C))},t.prototype._renderBackground=function(e,n,i,a,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,c=l&&!h,v=e.borderRadius,d=this,g,p;if(c||e.lineHeight||u&&f){g=this._getOrCreateChild(mt),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=v,g.dirtyShape()}if(c){var m=g.style;m.fill=l||null,m.fillOpacity=rt(e.fillOpacity,1)}else if(h){p=this._getOrCreateChild(xn),p.onload=function(){d.dirtyStyle()};var _=p.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&f){var m=g.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=rt(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(g||p).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=Xn(e.opacity,n.opacity,1)},t.makeFont=function(e){var n="";return Fx(e)&&(n=[e.fontStyle,e.fontWeight,Nx(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),n&&Ne(n)||e.textFont||e.font},t}(Aa),Ox={left:!0,right:1,center:1},Bx={top:1,bottom:1,middle:1},Uv=["fontStyle","fontWeight","fontSize","fontFamily"];function Nx(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?kf+"px":r+"px"}function Yv(r,t){for(var e=0;e=0,a=!1;if(r instanceof ht){var o=ny(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(In(s)||In(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=O({},n),u=O({},u),u.fill=s):!In(u.fill)&&In(s)?(a=!0,n=O({},n),u=O({},u),u.fill=tc(s)):!In(u.stroke)&&In(l)&&(a||(n=O({},n),u=O({},u)),u.stroke=tc(l)),n.style=u}}if(n&&n.z2==null){a||(n=O({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f!=null?f:Gx)}return n}function Zx(r,t,e){if(e&&e.z2==null){e=O({},e);var n=r.z2SelectLift;e.z2=r.z2+(n!=null?n:Vx)}return e}function Xx(r,t,e){var n=J(r.currentStates,t)>=0,i=r.style.opacity,a=n?null:Yx(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=O({},e),o=O({opacity:n?i:a.opacity*.1},o),e.style=o),e}function Dl(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return $x(this,r,t,e);if(r==="blur")return Xx(this,r,e);if(r==="select")return Zx(this,r,e)}return e}function qx(r){r.stateProxy=Dl;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Dl),e&&(e.stateProxy=Dl)}function nc(r,t){!fy(r,t)&&!r.__highByOuter&&ir(r,iy)}function ic(r,t){!fy(r,t)&&!r.__highByOuter&&ir(r,ay)}function ai(r,t){r.__highByOuter|=1<<(t||0),ir(r,iy)}function oi(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&ir(r,ay)}function Kx(r){ir(r,qf)}function sy(r){ir(r,oy)}function ly(r){ir(r,Wx)}function uy(r){ir(r,Ux)}function fy(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function hy(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(i,a){var o=Zf(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){oy(u)}),s&&e.push(a)),o.isBlured=!1}),T(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(e,!1,t)})}function Uu(r,t,e,n){var i=n.getModel();e=e||"coordinateSystem";function a(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Zo(r,t,e){vy(r,!0),ir(r,qx),nw(r,t,e)}function rw(r){vy(r,!1)}function $u(r,t,e,n){n?rw(r):Zo(r,t,e)}function nw(r,t,e){var n=ft(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var oc=["emphasis","blur","select"],iw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function sc(r,t,e,n){e=e||"itemStyle";for(var i=0;i1&&(o*=Al(d),s*=Al(d));var g=(i===a?-1:1)*Al((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,p=g*o*v/s,y=g*-s*c/o,m=(r+e)/2+Ka(h)*p-qa(h)*y,_=(t+n)/2+qa(h)*p+Ka(h)*y,S=hc([1,0],[(c-p)/o,(v-y)/s]),w=[(c-p)/o,(v-y)/s],x=[(-1*c-p)/o,(-1*v-y)/s],b=hc(w,x);if(Xu(w,x)<=-1&&(b=Ti),Xu(w,x)>=1&&(b=0),b<0){var C=Math.round(b/Ti*1e6)/1e6;b=Ti*2+C%2*Ti}f.addData(u,m,_,o,s,S,b,h,a)}var uw=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,fw=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function hw(r){var t=new Cr;if(!r)return t;var e=0,n=0,i=e,a=n,o,s=Cr.CMD,l=r.match(uw);if(!l)return t;for(var u=0;uP*P+E*E&&(C=D,M=A),{cx:C,cy:M,x0:-f,y0:-h,x1:C*(i/w-1),y1:M*(i/w-1)}}function _w(r){var t;if(B(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function Sw(r,t){var e,n=$i(t.r,0),i=$i(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=cc(u-l),d=v>Ll&&v%Ll;if(d>xe&&(v=d),!(n>xe))r.moveTo(f,h);else if(v>Ll-xe)r.moveTo(f+n*Rn(l),h+n*Ur(l)),r.arc(f,h,n,l,u,!c),i>xe&&(r.moveTo(f+i*Rn(u),h+i*Ur(u)),r.arc(f,h,i,u,l,c));else{var g=void 0,p=void 0,y=void 0,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0,b=void 0,C=void 0,M=void 0,D=void 0,A=void 0,L=void 0,I=void 0,P=void 0,E=n*Rn(l),R=n*Ur(l),U=i*Rn(u),F=i*Ur(u),N=v>xe;if(N){var $=t.cornerRadius;$&&(e=_w($),g=e[0],p=e[1],y=e[2],m=e[3]);var nt=cc(n-i)/2;if(_=ke(nt,y),S=ke(nt,m),w=ke(nt,g),x=ke(nt,p),M=b=$i(_,S),D=C=$i(w,x),(b>xe||C>xe)&&(A=n*Rn(u),L=n*Ur(u),I=i*Rn(l),P=i*Ur(l),vxe){var te=ke(y,M),At=ke(m,M),q=Qa(I,P,E,R,n,te,c),et=Qa(A,L,U,F,n,At,c);r.moveTo(f+q.cx+q.x0,h+q.cy+q.y0),M0&&r.arc(f+q.cx,h+q.cy,te,Pt(q.y0,q.x0),Pt(q.y1,q.x1),!c),r.arc(f,h,n,Pt(q.cy+q.y1,q.cx+q.x1),Pt(et.cy+et.y1,et.cx+et.x1),!c),At>0&&r.arc(f+et.cx,h+et.cy,At,Pt(et.y1,et.x1),Pt(et.y0,et.x0),!c))}else r.moveTo(f+E,h+R),r.arc(f,h,n,l,u,!c);if(!(i>xe)||!N)r.lineTo(f+U,h+F);else if(D>xe){var te=ke(g,D),At=ke(p,D),q=Qa(U,F,A,L,i,-At,c),et=Qa(E,R,I,P,i,-te,c);r.lineTo(f+q.cx+q.x0,h+q.cy+q.y0),D0&&r.arc(f+q.cx,h+q.cy,At,Pt(q.y0,q.x0),Pt(q.y1,q.x1),!c),r.arc(f,h,i,Pt(q.cy+q.y1,q.cx+q.x1),Pt(et.cy+et.y1,et.cx+et.x1),c),te>0&&r.arc(f+et.cx,h+et.cy,te,Pt(et.y1,et.x1),Pt(et.y0,et.x0),!c))}else r.lineTo(f+U,h+F),r.arc(f,h,i,u,l,c)}r.closePath()}}}var xw=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),xy=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new xw},t.prototype.buildPath=function(e,n){Sw(e,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(ht);xy.prototype.type="sector";var Jf=xy,ww=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),wy=function(r){k(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new ww},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.PI*2;e.moveTo(i+n.r,a),e.arc(i,a,n.r,0,o,!1),e.moveTo(i+n.r0,a),e.arc(i,a,n.r0,0,o,!0)},t}(ht);wy.prototype.type="ring";var by=wy;function bw(r,t,e,n){var i=[],a=[],o=[],s=[],l,u,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c=2){if(n){var a=bw(i,n,e,t.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s$r[1]){if(s=!1,a)return s;var f=Math.abs($r[0]-Yr[1]),h=Math.abs(Yr[0]-$r[1]);Math.min(f,h)>i.len()&&(f0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function Ae(r,t,e,n,i,a){th("update",r,t,e,n,i,a)}function Mr(r,t,e,n,i,a){th("enter",r,t,e,n,i,a)}function Jn(r){if(!r.__zr)return!0;for(var t=0;tMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function gc(r){return!r.isGroup}function Qw(r){return r.shape!=null}function Ny(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){gc(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Qw(o)&&(s.shape=O({},o.shape)),s}var a=n(r);t.traverse(function(o){if(gc(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Ae(o,l,e,ft(o).dataIndex)}}})}function Fy(r,t){return H(r,function(e){var n=e[0];n=Ko(n,t.x),n=Qo(n,t.x+t.width);var i=e[1];return i=Ko(i,t.y),i=Qo(i,t.y+t.height),[n,i]})}function Jw(r,t){var e=Ko(r.x,t.x),n=Qo(r.x+r.width,t.x+t.width),i=Ko(r.y,t.y),a=Qo(r.y+r.height,t.y+t.height);if(n>=e&&a>=i)return{x:e,y:i,width:n-e,height:a-i}}function Ls(r,t,e){var n=O({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),tt(i,e),new xn(n)):eh(r.replace("path://",""),n,e,"center")}function jw(r,t,e,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var p=Il(v,d,f,h)/c;return!(p<0||p>1)}function Il(r,t,e,n){return r*n-e*t}function tb(r){return r<=1e-6&&r>=-1e-6}function Is(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,i=z(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&T(pt(l),function(f){cn(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ft(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:tt({content:n,formatterParams:s},i)}}function yc(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function nh(r,t){if(r)if(B(r))for(var e=0;e=0&&s.push(l)}),s}}function oh(r,t){return Q(Q({},r,!0),t,!0)}var gb={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},yb={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},Jo="ZH",sh="EN",va=sh,Lo={},lh={},Wy=j.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return r.indexOf(Jo)>-1?Jo:va}():va;function Uy(r,t){r=r.toUpperCase(),lh[r]=new It(t),Lo[r]=t}function mb(r){if(z(r)){var t=Lo[r.toUpperCase()]||{};return r===Jo||r===sh?K(t):Q(K(t),K(Lo[va]),!1)}else return Q(K(r),K(Lo[va]),!1)}function _b(r){return lh[r]}function Sb(){return lh[va]}Uy(sh,gb);Uy(Jo,yb);var uh=1e3,fh=uh*60,ra=fh*60,pe=ra*24,bc=pe*365,Zi={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}"},to="{yyyy}-{MM}-{dd}",Tc={year:"{yyyy}",month:"{yyyy}-{MM}",day:to,hour:to+" "+Zi.hour,minute:to+" "+Zi.minute,second:to+" "+Zi.second,millisecond:Zi.none},El=["year","month","day","hour","minute","second","millisecond"],Yy=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Zr(r,t){return r+="","0000".substr(0,t-r.length)+r}function jn(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function xb(r){return r===jn(r)}function wb(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Rs(r,t,e,n){var i=rr(r),a=i[hh(e)](),o=i[ti(e)]()+1,s=Math.floor((o-1)/3)+1,l=i[Es(e)](),u=i["get"+(e?"UTC":"")+"Day"](),f=i[ca(e)](),h=(f-1)%12+1,c=i[ks(e)](),v=i[Os(e)](),d=i[Bs(e)](),g=n instanceof It?n:_b(n||Wy)||Sb(),p=g.getModel("time"),y=p.get("month"),m=p.get("monthAbbr"),_=p.get("dayOfWeek"),S=p.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,a%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,m[o-1]).replace(/{MM}/g,Zr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Zr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Zr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Zr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Zr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,Zr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Zr(d,3)).replace(/{S}/g,d+"")}function bb(r,t,e,n,i){var a=null;if(z(e))a=e;else if(V(e))a=e(r.value,t,{level:r.level});else{var o=O({},Zi);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(B(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return Rs(new Date(r.value),a,i,n)}function $y(r,t){var e=rr(r),n=e[ti(t)]()+1,i=e[Es(t)](),a=e[ca(t)](),o=e[ks(t)](),s=e[Os(t)](),l=e[Bs(t)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&a===0,v=c&&i===1,d=v&&n===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function Cc(r,t,e){var n=ct(r)?rr(r):r;switch(t=t||$y(r,e),t){case"year":return n[hh(e)]();case"half-year":return n[ti(e)]()>=6?1:0;case"quarter":return Math.floor((n[ti(e)]()+1)/4);case"month":return n[ti(e)]();case"day":return n[Es(e)]();case"half-day":return n[ca(e)]()/24;case"hour":return n[ca(e)]();case"minute":return n[ks(e)]();case"second":return n[Os(e)]();case"millisecond":return n[Bs(e)]()}}function hh(r){return r?"getUTCFullYear":"getFullYear"}function ti(r){return r?"getUTCMonth":"getMonth"}function Es(r){return r?"getUTCDate":"getDate"}function ca(r){return r?"getUTCHours":"getHours"}function ks(r){return r?"getUTCMinutes":"getMinutes"}function Os(r){return r?"getUTCSeconds":"getSeconds"}function Bs(r){return r?"getUTCMilliseconds":"getMilliseconds"}function Tb(r){return r?"setUTCFullYear":"setFullYear"}function Zy(r){return r?"setUTCMonth":"setMonth"}function Xy(r){return r?"setUTCDate":"setDate"}function qy(r){return r?"setUTCHours":"setHours"}function Ky(r){return r?"setUTCMinutes":"setMinutes"}function Qy(r){return r?"setUTCSeconds":"setSeconds"}function Jy(r){return r?"setUTCMilliseconds":"setMilliseconds"}function jy(r){if(!Og(r))return z(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function tm(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ns=ig,Cb=/([&<>"'])/g,Mb={"&":"&","<":"<",">":">",'"':""","'":"'"};function de(r){return r==null?"":(r+"").replace(Cb,function(t,e){return Mb[e]})}function Qu(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Ne(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?rr(r):r;if(isNaN(+l)){if(s)return"-"}else return Rs(l,n,e)}if(t==="ordinal")return Oo(r)?i(r):ct(r)&&a(r)?r+"":"-";var u=Tr(r);return a(u)?jy(u):Oo(r)?i(r):typeof r=="boolean"?r+"":"-"}var Mc=["a","b","c","d","e","f","g"],kl=function(r,t){return"{"+r+(t==null?"":t)+"}"};function em(r,t,e){B(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function yn(r,t){return t=t||"transparent",z(r)?r:G(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Dc(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Io=T,Ab=["left","right","top","bottom","width","height"],eo=[["width","left","right"],["height","top","bottom"]];function vh(r,t,e,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),h=t.childAt(u+1),c=h&&h.getBoundingRect(),v,d;if(r==="horizontal"){var g=f.width+(c?-c.x+f.x:0);v=a+g,v>n||l.newline?(a=0,v=g,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var p=f.height+(c?-c.y+f.y:0);d=o+p,d>i||l.newline?(a+=s+e,o=0,d=p,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+e:o=d+e)})}var ei=vh;ot(vh,"vertical");ot(vh,"horizontal");function Dr(r,t,e){e=Ns(e||0);var n=t.width,i=t.height,a=Tt(r.left,n),o=Tt(r.top,i),s=Tt(r.right,n),l=Tt(r.bottom,i),u=Tt(r.width,n),f=Tt(r.height,i),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-c-a),isNaN(f)&&(f=i-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/i?u=n*.8:f=i*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=n-s-u-c),isNaN(o)&&(o=i-l-f-h),r.left||r.right){case"center":a=n/2-u/2-e[3];break;case"right":a=n-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-f/2-e[0];break;case"bottom":o=i-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-c-a-(s||0)),isNaN(f)&&(f=i-h-o-(l||0));var d=new it(a+e[3],o+e[0],u,f);return d.margin=e,d}function Lb(r,t,e,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new it(0,0,+t.width||0,+t.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=Dr(tt({width:u.width,height:u.height},t),e,n),c=o?h.x-u.x:0,v=s?h.y-u.y:0;return l==="raw"?(a.x=c,a.y=v):(a.x+=c,a.y+=v),a===r&&r.markRedraw(),!0}function da(r){var t=r.layoutMode||r.constructor.layoutMode;return G(t)?t:t?{type:t}:null}function li(r,t,e){var n=e&&e.ignoreSize;!B(n)&&(n=[n,n]);var i=o(eo[0],0),a=o(eo[1],1);u(eo[0],r,i),u(eo[1],r,a);function o(f,h){var c={},v=0,d={},g=0,p=2;if(Io(f,function(_){d[_]=r[_]}),Io(f,function(_){s(t,_)&&(c[_]=d[_]=t[_]),l(c,_)&&v++,l(d,_)&&g++}),n[h])return l(t,f[1])?d[f[2]]=null:l(t,f[2])&&(d[f[1]]=null),d;if(g===p||!v)return d;if(v>=p)return c;for(var y=0;y=0;l--)s=Q(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var i=e+"Index",a=e+"Id";return Da(this.ecModel,e,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(It);Ug(pi,It);xs(pi);db(pi);pb(pi,Rb);function Rb(r){var t=[];return T(pi.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=H(t,function(e){return Fe(e).main}),r!=="dataset"&&J(t,"dataset")<=0&&t.unshift("dataset"),t}var ut=pi,rm="";typeof navigator!="undefined"&&(rm=navigator.platform||"");var En="rgba(0, 0, 0, 0.2)",Eb={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:En,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:En,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:En,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:En,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:En,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:En,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:rm.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},Ju=Z(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Se="original",Jt="arrayRows",Ie="objectRows",Ue="keyedColumns",er="typedArray",nm="unknown",Ge="column",gi="row",Lt={Must:1,Might:2,Not:3},im=gt();function kb(r){im(r).datasetMap=Z()}function Ob(r,t,e){var n={},i=ch(t);if(!i||!r)return n;var a=[],o=[],s=t.ecModel,l=im(s).datasetMap,u=i.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),T(r,function(g,p){var y=G(g)?g:r[p]={name:g};y.type==="ordinal"&&f==null&&(f=p,h=d(y)),n[y.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});T(r,function(g,p){var y=g.name,m=d(g);if(f==null){var _=c.valueWayDim;v(n[y],_,m),v(o,_,m),c.valueWayDim+=m}else if(f===p)v(n[y],0,m),v(a,0,m);else{var _=c.categoryWayDim;v(n[y],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(g,p,y){for(var m=0;mt)return r[n];return r[e-1]}function Hb(r,t,e,n,i,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!n?e:zb(n,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%f.length,h}}function Gb(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var ro,Ci,Lc,Ol="\0_ec_inner",Ic=1,Vb={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},Wb={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},jo={};function Ub(r){T(r,function(t,e){if(!ut.hasClass(e)){var n=Vb[e];n&&!jo[n]&&(Bt("Component "+e+` is used but not imported. import { `+n+` } from 'echarts/components'; echarts.use([`+n+"]);"),jo[n]=!0)}})}var sm=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,i,a,o,s){a=a||{},this.option=null,this._theme=new It(a),this._locale=new It(o),this._optionManager=s},t.prototype.setOption=function(e,n,i){W(e!=null,"option is null/undefined"),W(e[Ol]!==Ic,"please use chart.getOption()");var a=Ec(n);this._optionManager.setOption(e,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,n){return this._resetOption(e,Ec(n))},t.prototype._resetOption=function(e,n){var i=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");Ub(o),!this.option||e==="recreate"?Lc(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&T(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Z(),u=n&&n.replaceMergeMainTypeMap;kb(this),T(e,function(h,c){h!=null&&(ut.hasClass(c)?c&&(s.push(c),l.set(c,!0)):i[c]=i[c]==null?K(h):Q(i[c],h,!0))}),u&&u.each(function(h,c){ut.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),ut.topologicalTravel(s,ut.getAllClassMainTypes(),f,this);function f(h){var c=Fb(this,h,Ut(e[h])),v=a.get(h),d=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=TS(v,c,d);RS(g,h,ut),i[h]=null,a.set(h,null),o.set(h,0);var p=[],y=[],m=0,_,S;T(g,function(w,x){var b=w.existing,C=w.newOption;if(!C)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var M=h==="series",D=ut.getClass(h,w.keyInfo.subType,!M);if(!D){{var A=w.keyInfo.subType,L=Wb[A];jo[A]||(jo[A]=!0,Bt(L?"Series "+A+` is used but not imported. import { `+L+` } from 'echarts/charts'; echarts.use([`+L+"]);":"Unkown series "+A))}return}if(h==="tooltip"){if(_){S||(Ca("Currently only one tooltip component is allowed."),S=!0);return}_=!0}if(b&&b.constructor===D)b.name=w.keyInfo.name,b.mergeOption(C,this),b.optionUpdated(C,!1);else{var I=O({componentIndex:x},w.keyInfo);b=new D(C,this,this,I),O(b,I),w.brandNew&&(b.__requireNewView=!0),b.init(C,this,this),b.optionUpdated(null,!0)}}b?(p.push(b.option),y.push(b),m++):(p.push(void 0),y.push(void 0))},this),i[h]=p,a.set(h,y),o.set(h,m),h==="series"&&ro(this)}this._seriesIndices||ro(this)},t.prototype.getOption=function(){var e=K(this.option);return T(e,function(n,i){if(ut.hasClass(i)){for(var a=Ut(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!ii(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[i]=a}}),delete e[Ol],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var i=this._componentsMap.get(e);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function eT(r,t){return r.join(",")===t.join(",")}var rT=Qb,ae=T,pa=G,kc=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Nl(r){var t=r&&r.itemStyle;if(!!t)for(var e=0,n=kc.length;e=0;p--){var y=r[p];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,v)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&c>=0&&m>0||l==="samesign"&&c<=0&&m<0){c=yS(c,m),g=m;break}}}return n[0]=c,n[1]=g,n})})}var Fs=function(){function r(t){this.data=t.data||(t.sourceFormat===Ue?{}:[]),this.sourceFormat=t.sourceFormat||nm,this.seriesLayoutBy=t.seriesLayoutBy||Ge,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;ng&&(g=_)}v[0]=d,v[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};Gc=(t={},t[Jt+"_"+Ge]={pure:!0,appendData:a},t[Jt+"_"+gi]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ie]={pure:!0,appendData:a},t[Ue]={pure:!0,appendData:function(o){var s=this._data;T(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[Se]={appendData:a},t[er]={persistent:!1,pure:!0,appendData:function(o){W(Qt(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[p])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(t,e){return ui(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r}();function Yc(r){var t,e;return G(r)?r.type?e=r:console.warn("The return type of `formatTooltip` is not supported: "+Yo(r)):t=r,{text:t,frag:e}}function na(r){return new ST(r)}var ST=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(e?(W(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(W(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var v=this._dueIndex,d=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||v=this._outputDueEnd),this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,n,i,a){$c.reset(e,n,i,a),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:$c.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,n;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(n=e.forceFirstProgress,e=e.progress),B(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex1&&n>0?s:o}};return a;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},wT=function(){function r(t,e){if(!ct(e)){var n="";n='rvalue of "<", ">", "<=", ">=" can only be number in filter.',Gt(n)}this._opFn=mm[t],this._rvalFloat=Tr(e)}return r.prototype.evaluate=function(t){return ct(t)?this._opFn(t,this._rvalFloat):this._opFn(Tr(t),this._rvalFloat)},r}(),bT=function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=ct(t)?t:Tr(t),i=ct(e)?e:Tr(e),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=z(t),l=z(e);s&&(n=l?t:0),l&&(i=s?e:0)}return ni?-this._resultLT:0},r}(),TT=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Tr(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(e=Tr(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function YP(r,t){return r==="eq"||r==="ne"?new TT(r==="eq",t):cn(mm,r)?new wT(r,t):null}var CT=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return Po(t,e)},r}();function MT(r,t){var e=new CT,n=r.data,i=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Ge&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.',Gt(o));var s=[],l={},u=r.dimensionsDefine;if(u)T(u,function(g,p){var y=g.name,m={index:p,name:y,displayName:g.displayName};if(s.push(m),y!=null){var _="";cn(l,y)&&(_='dimension name "'+y+'" duplicated.',Gt(_)),l[y]=m}});else for(var f=0;f65535?kT:OT}function kn(){return[1/0,-1/0]}function BT(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Xc(r,t,e,n,i){var a=xm[e||"float"];if(i){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;up[1]&&(p[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=H(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=p)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(n!=null&&nt)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=f))}return o.length=u,o},r.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 a=0;a=h&&m<=c||isNaN(m))&&(l[u++]=g),g++}d=!0}else if(a===2){for(var p=v[i[0]],_=v[i[1]],S=t[i[1]][0],w=t[i[1]][1],y=0;y=h&&m<=c||isNaN(m))&&(x>=S&&x<=w||isNaN(x))&&(l[u++]=g),g++}d=!0}}if(!d)if(a===1)for(var y=0;y=h&&m<=c||isNaN(m))&&(l[u++]=b)}else for(var y=0;yt[D][1])&&(C=!1)}C&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=p)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,c,v=new(Di(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;df&&(f=h,c=S)}A>0&&Af-d&&(l=f-d,s.length=l);for(var g=0;gh[1]&&(h[1]=y),c[v++]=m}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(!!this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();al&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,n,i,a){return Po(e[a],this._dimensions[a])}Hl={arrayRows:t,objectRows:function(e,n,i,a){return Po(e[n],this._dimensions[a])},keyedColumns:t,original:function(e,n,i,a){var o=e&&(e.value==null?e:e.value);return Po(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,n,i,a){return e[a]}}}(),r}(),wm=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,i,a;if(Ai(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=Qt(s)?er:Se,a=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=rt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=rt(h.sourceHeader,c.sourceHeader),g=rt(h.dimensions,c.dimensions),p=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||g;i=p?[tf(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:g},l)]:[]}else{var y=t;if(n){var m=this._applyTransform(e);i=m.sourceList,a=m.upstreamSignList}else{var _=y.get("source",!0);i=[tf(_,this._getSourceMetaRawOption(),null)],a=[]}}W(i&&a),this._setLocalSource(i,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(W(i!=null||n!=null),i!=null){var a="";t.length!==1&&(a="When using `fromTransformResult`, there should be only one upstream dataset",Kc(a))}var o,s=[],l=[];return T(t,function(u){u.prepareSource();var f=u.getSource(i||0),h="";i!=null&&!f&&(h="Can not retrieve result by `fromTransformResult`: "+i,Kc(h)),s.push(f),l.push(u._getVersionSign())}),n?o=RT(n,s,{datasetIndex:e.componentIndex}):i!=null&&(o=[vT(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return T(r.blocks,function(i){var a=Mm(i);a>=t&&(t=a+ +(n&&(!a||rf(i)&&!i.noHeader)))}),t}return 0}function zT(r,t,e,n){var i=t.noHeader,a=GT(Mm(t)),o=[],s=t.blocks||[];W(!s||B(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(cn(u,l)){var f=new bT(u[l],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}T(s,function(d,g){var p=t.valueFormatter,y=Cm(d)(p?O(O({},r),{valueFormatter:p}):r,d,g>0?a.html:0,n);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(a.richText):nf(o.join(""),i?e:a.html);if(i)return h;var c=Qu(t.header,"ordinal",r.useUTC),v=Tm(n,r.renderMode).nameStyle;return r.renderMode==="richText"?Dm(r,c,v)+a.richText+h:nf('
'+de(c)+"
"+h,e)}function HT(r,t,e,n){var i=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=B(S)?S:[S],H(S,function(w,x){return Qu(w,B(v)?v[x]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),c=a?"":Qu(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value),g=!s||!a,p=!s&&a,y=Tm(n,i),m=y.nameStyle,_=y.valueStyle;return i==="richText"?(s?"":h)+(a?"":Dm(r,c,m))+(o?"":UT(r,d,g,p,_)):nf((s?"":h)+(a?"":VT(c,!s,m))+(o?"":WT(d,g,p,_)),e)}}function Qc(r,t,e,n,i,a){if(!!r){var o=Cm(r),s={useUTC:i,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function GT(r){return{html:NT[r],richText:FT[r]}}function nf(r,t){var e='
',n="margin: "+t+"px 0 0";return'
'+r+e+"
"}function VT(r,t,e){var n=t?"margin-left:2px":"";return''+de(r)+""}function WT(r,t,e,n){var i=e?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return r=B(r)?r:[r],''+H(r,function(o){return de(o)}).join("  ")+""}function Dm(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function UT(r,t,e,n,i){var a=[i],o=n?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(" "):t,a)}function YT(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return yn(n)}function Am(r,t){var e=r.get("padding");return e!=null?e:t==="richText"?[8,10]:10}var Gl=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Bg()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var i=n==="richText"?this._generateStyleName():null,a=Db({color:e,type:t,renderMode:n,markerId:i});return z(a)?a:(W(i),this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};B(e)?T(e,function(a){return O(n,a)}):O(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},r}();function $T(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=B(s),u=YT(t,e),f,h,c,v;if(o>1||l&&!o){var d=ZT(s,t,e,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);v=f=ui(i,e,a[0]),h=g.type}else v=f=l?s[0]:s;var p=Uf(t),y=p&&t.name||"",m=i.getName(e),_=n?y:m;return ga("section",{header:y,noHeader:n||!p,sortParam:v,blocks:[ga("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Ne(_),value:f,valueType:h})].concat(c||[])})}function ZT(r,t,e,n,i){var a=t.getData(),o=br(r,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?T(n,function(h){f(ui(a,e,h),h)}):T(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(ga("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var lr=gt();function no(r,t){return r.getName(t)||r.getId(t)}var XT="__universalTransitionEnabled",Hs=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=na({count:KT,reset:QT}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i);var a=lr(this).sourceManager=new wm(this);a.prepareSource();var o=this.getInitialData(e,i);jc(o,this),this.dataTask.context.data=o,W(o,"getInitialData returned invalid data."),lr(this).dataBeforeProcessed=o,Jc(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=da(this),a=i?Ra(e):{},o=this.subType;ut.hasClass(o)&&(o+="Series"),Q(e,n.getTheme().get(this.subType)),Q(e,this.getDefaultOption()),Pv(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&li(e,a,i)},t.prototype.mergeOption=function(e,n){e=Q(this.option,e,!0),this.fillDataTextStyle(e.data);var i=da(this);i&&li(this.option,e,i);var a=lr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,n);jc(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,lr(this).dataBeforeProcessed=o,Jc(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!Qt(e))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,i){var a=this.ecModel,o=dh.prototype.getColorFromPalette.call(this,e,n,i);return o||(o=a.getColorFromPalette(e,n,i)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var i=this.option.selectedMap;if(!!i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(e,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[no(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[XT])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){G(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,n)}},t.registerClass=function(e){return ut.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(ut);We(Hs,_T);We(Hs,dh);Ug(Hs,ut);function Jc(r){var t=r.name;Uf(r)||(r.name=qT(r)||t)}function qT(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return T(e,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function KT(r){return r.model.getRawData().count()}function QT(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),JT}function JT(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function jc(r,t){T(X_(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,ot(jT,t))})}function jT(r,t){var e=af(r);return e&&e.setOutputEnd((t||this).count()),t}function af(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var ya=Hs,Sh=function(){function r(){this.group=new wt,this.uid=Pa("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){},r.prototype.updateLayout=function(t,e,n,i){},r.prototype.updateVisual=function(t,e,n,i){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();$f(Sh);xs(Sh);var me=Sh;function xh(){var r=gt();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,a=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var Lm=gt(),tC=xh(),wh=function(){function r(){this.group=new wt,this.uid=Pa("viewChart"),this.renderTask=na({plan:eC,reset:rC}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){throw new Error("render method must been implemented")},r.prototype.highlight=function(t,e,n,i){var a=t.getData(i&&i.dataType);if(!a){Bt("Unknown dataType "+i.dataType);return}ed(a,i,"emphasis")},r.prototype.downplay=function(t,e,n,i){var a=t.getData(i&&i.dataType);if(!a){Bt("Unknown dataType "+i.dataType);return}ed(a,i,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.eachRendered=function(t){nh(this.group,t)},r.markUpdateMethod=function(t,e){Lm(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function td(r,t,e){r&&si(r)&&(t==="emphasis"?ai:oi)(r,e)}function ed(r,t,e){var n=pn(r,t),i=t&&t.highlightKey!=null?aw(t.highlightKey):null;n!=null?T(Ut(n),function(a){td(r.getItemGraphicEl(a),e,i)}):r.eachItemGraphicEl(function(a){td(a,e,i)})}$f(wh,["dispose"]);xs(wh);function eC(r){return tC(r.model)}function rC(r){var t=r.model,e=r.ecModel,n=r.api,i=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=i&&Lm(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,i),nC[l]}var nC={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},wr=wh,ts="\0__throttleOriginMethod",rd="\0__throttleRate",nd="\0__throttleType";function Im(r,t,e){var n,i=0,a=0,o=null,s,l,u,f;t=t||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],d=0;d=0?h():o=setTimeout(h,-s),i=n};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function Gs(r,t,e,n){var i=r[t];if(!!i){var a=i[ts]||i,o=i[nd],s=i[rd];if(s!==e||o!==n){if(e==null||!n)return r[t]=a;i=r[t]=Im(a,e,n==="debounce"),i[ts]=a,i[nd]=n,i[rd]=e}return i}}function es(r,t){var e=r[t];e&&e[ts]&&(e.clear&&e.clear(),r[t]=e[ts])}var id=gt(),ad={itemStyle:fa(Vy,!0),lineStyle:fa(Gy,!0)},iC={lineStyle:"stroke",itemStyle:"fill"};function Pm(r,t){var e=r.visualStyleMapper||ad[t];return e||(console.warn("Unkown style type '"+t+"'."),ad.itemStyle)}function Rm(r,t){var e=r.visualDrawType||iC[t];return e||(console.warn("Unkown style type '"+t+"'."),"fill")}var aC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=Pm(r,n),o=a(i),s=i.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=Rm(r,n),u=o[l],f=V(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=c,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||V(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||V(o.stroke)?c:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var g=r.getDataParams(d),p=O({},o);p[l]=f(g),v.setItemVisual(d,"style",p)}}}},Li=new It,oC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=Pm(r,n),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Li.option=l[n];var u=i(Li),f=o.ensureUniqueItemVisual(s,"style");O(f,u),Li.option.decal&&(o.setItemVisual(s,"decal",Li.option.decal),Li.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},sC={performRawSeries:!0,overallReset:function(r){var t=Z();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),id(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),i={},a=e.getData(),o=id(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=Rm(e,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",d=n.count();c[l]=e.getColorFromPalette(v,o,d)}})}})}},io=Math.PI;function lC(r,t){t=t||{},tt(t,{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 e=new wt,n=new mt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var i=new Dt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new mt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new jf({shape:{startAngle:-io/2,endAngle:-io/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:io*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:io*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var uC=function(){function r(t,e,n,i){this._stageTaskMap=Z(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(t,e){if(!!t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Z();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;T(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";o='"reset" and "overallReset" must not be both specified.',W(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,e,n),i.overallReset&&this._createOverallStageTask(i,a,e,n)},this)},r.prototype.prepareView=function(t,e,n,i){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,i){i=i||{};var a=!1,o=this;T(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,d=c.agentStubMap;d.each(function(p){s(i,p)&&(p.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,n);var g=o.getPerformArgs(c,i.block);d.each(function(p){p.perform(g)}),c.perform(g)&&(a=!0)}else h&&h.each(function(p,y){s(i,p)&&p.dirty();var m=o.getPerformArgs(p,i.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(p.context.model),o.updatePayload(p,n),p.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.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)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,i){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Z(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||na({plan:dC,reset:pC,count:yC}));v.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,n,i){var a=this,o=e.overallTask=e.overallTask||na({reset:fC});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Z(),u=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";v='"createOnAllSeries" do not supported for "overallReset", becuase it will block all streams.',W(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):f?f(n,i).each(d):(h=!1,T(n.getSeries(),d));function d(g){var p=g.uid,y=l.set(p,s&&s.get(p)||(c=!0,na({reset:hC,onDirty:cC})));y.context={model:g,overallProgress:h},y.agent=o,y.__block=h,a._pipe(g,y)}c&&o.dirty()},r.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},r.wrapStageHandler=function(t,e){return V(t)&&(t={overallReset:t,seriesType:mC(t)}),t.uid=Pa("stageHandler"),e&&(t.visualType=e),t},r}();function fC(r){r.overallReset(r.ecModel,r.api,r.payload)}function hC(r){return r.overallProgress&&vC}function vC(){this.agent.dirty(),this.getDownstream().dirty()}function cC(){this.agent&&this.agent.dirty()}function dC(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function pC(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Ut(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?H(t,function(e,n){return Em(n)}):gC}var gC=Em(0);function Em(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var a=t.start;a0&&v===u.length-c.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),of=["symbol","symbolSize","symbolRotate","symbolOffset"],ud=of.concat(["symbolKeepAspect"]),wC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&nn(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function sf(r,t,e){for(var n=t.type==="radial"?GC(r,t,e):HC(r,t,e),i=t.colorStops,a=0;a0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:ct(r)?[r]:B(r)?r:null}function zm(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&WC(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var i=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(e=H(e,function(a){return a/i}),n/=i)}return[e,n]}var UC=new Cr(!0);function is(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function fd(r){return typeof r=="string"&&r!=="none"}function as(r){var t=r.fill;return t!=null&&t!=="none"}function hd(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function vd(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function lf(r,t,e){var n=Yg(t.image,t.__image,e);if(ws(n)){var i=r.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*q_),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function YC(r,t,e,n){var i,a=is(e),o=as(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||UC,h=t.__dirty;if(!n){var c=e.fill,v=e.stroke,d=o&&!!c.colorStops,g=a&&!!v.colorStops,p=o&&!!c.image,y=a&&!!v.image,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0;(d||g)&&(x=t.getBoundingRect()),d&&(m=h?sf(r,c,x):t.__canvasFillGradient,t.__canvasFillGradient=m),g&&(_=h?sf(r,v,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),p&&(S=h||!t.__canvasFillPattern?lf(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(w=h||!t.__canvasStrokePattern?lf(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),d?r.fillStyle=m:p&&(S?r.fillStyle=S:o=!1),g?r.strokeStyle=_:y&&(w?r.strokeStyle=w:a=!1)}var b=t.getGlobalScale();f.setScale(b[0],b[1],t.segmentIgnoreThreshold);var C,M;r.setLineDash&&e.lineDash&&(i=zm(t),C=i[0],M=i[1]);var D=!0;(u||h&Gn)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),D=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),D&&f.rebuildPath(r,l?s:1),C&&(r.setLineDash(C),r.lineDashOffset=M),n||(e.strokeFirst?(a&&vd(r,e),o&&hd(r,e)):(o&&hd(r,e),a&&vd(r,e))),C&&r.setLineDash([])}function $C(r,t,e){var n=t.__image=Yg(e.image,t.__image,t,t.onload);if(!(!n||!ws(n))){var i=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(n,u,f,e.sWidth,e.sHeight,i,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,c=s-f;r.drawImage(n,u,f,h,c,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function ZC(r,t,e){var n,i=e.text;if(i!=null&&(i+=""),i){r.font=e.font||hn,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=zm(t),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(is(e)&&r.strokeText(i,e.x,e.y),as(e)&&r.fillText(i,e.x,e.y)):(as(e)&&r.fillText(i,e.x,e.y),is(e)&&r.strokeText(i,e.x,e.y)),a&&r.setLineDash([])}}var cd=["shadowBlur","shadowOffsetX","shadowOffsetY"],dd=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Hm(r,t,e,n,i){var a=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){qt(r,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?sn.opacity:o}(n||t.blend!==e.blend)&&(a||(qt(r,i),a=!0),r.globalCompositeOperation=t.blend||sn.blend);for(var s=0;so.maxTileWidth&&R("maxTileWidth"),E>o.maxTileHeight&&R("maxTileHeight")}return{width:Math.max(1,Math.min(A,o.maxTileWidth)),height:Math.max(1,Math.min(E,o.maxTileHeight))}}function D(){C&&(C.clearRect(0,0,w.width,w.height),o.backgroundColor&&(C.fillStyle=o.backgroundColor,C.fillRect(0,0,w.width,w.height)));for(var A=0,L=0;L0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,n,i){if(this[Rt]){Bt("`setOption` should not be called during main process.");return}if(this._disposed){re(this.id);return}var a,o,s;if(G(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Rt]=!0,!this._model||n){var l=new rT(this._api),u=this._theme,f=this._model=new lm;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},hf);var h={seriesTransition:s,optionChanged:!0};if(i)this[$t]={silent:a,updateParams:h},this[Rt]=!1,this.getZr().wakeUp();else{try{Bn(this),ur.update.call(this,null,h)}catch(c){throw this[$t]=null,this[Rt]=!1,c}this._ssr||this._zr.flush(),this[$t]=null,this[Rt]=!1,Ii.call(this,a),Pi.call(this,a)}},t.prototype.setTheme=function(){De("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||wd&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return Ct("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;if(n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;if(n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(!!j.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return T(n,function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){re(this.id);return}e=e||{};var n=e.excludeComponents,i=this._model,a=[],o=this;T(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return T(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){re(this.id);return}var n=e.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Id[i]){var l=s,u=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();T(aa,function(_,S){if(_.group===i){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(K(e)),x=_.getDom().getBoundingClientRect();l=a(x.left,l),u=a(x.top,u),f=o(x.right,f),h=o(x.bottom,h),c.push({dom:w,left:x.left,top:x.top})}}),l*=v,u*=v,f*=v,h*=v;var d=f-l,g=h-u,p=Sn.createCanvas(),y=Mv(p,{renderer:n?"svg":"canvas"});if(y.resize({width:d,height:g}),n){var m="";return T(c,function(_){var S=_.left-l,w=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new mt({shape:{x:0,y:0,width:d,height:g},style:{fill:e.connectedBackgroundColor}})),T(c,function(_){var S=new xn({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),p.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return $l(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return $l(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){re(this.id);return}var i=this._model,a,o=Ji(i,e);return T(o,function(s,l){l.indexOf("Models")>=0&&T(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint?a=a||h.containPoint(n,u):console.warn(l+": "+(h?"The found component do not support containPoint.":"No view mapping to the found component."))}else console.warn(l+": containPoint is not supported")},this)},this),!!a},t.prototype.getVisual=function(e,n){var i=this._model,a=Ji(i,e,{defaultMainType:"series"}),o=a.seriesModel;o||console.warn("There is no specified seires model");var s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?TC(s,l,n):CC(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;T(_M,function(n){var i=function(a){var o=e.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&qi(s,function(d){var g=ft(d);if(g&&g.dataIndex!=null){var p=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=p&&p.getDataParams(g.dataIndex,g.dataType)||{},!0}else if(g.eventData)return l=O({},g.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var c=f&&h!=null&&o.getComponent(f,h),v=c&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];!u&&!(c&&v)&&console.warn("model or view can not be found by params"),l.event=a,l.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},e.trigger(n,l)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)}),T(ia,function(n,i){e._messageCenter.on(i,function(a){this.trigger(i,a)},e)}),T(["selectchanged"],function(n){e._messageCenter.on(n,function(i){this.trigger(n,i)},e)}),MC(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){re(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){re(this.id);return}this._disposed=!0;var e=this.getDom();e&&Gg(this.getDom(),Ch,"");var n=this,i=n._api,a=n._model;T(n._componentsViews,function(o){o.dispose(a,i)}),T(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete aa[n.id]},t.prototype.resize=function(e){if(this[Rt]){Bt("`resize` should not be called during main process.");return}if(this._disposed){re(this.id);return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=e&&e.silent;this[$t]&&(a==null&&(a=this[$t].silent),i=!0,this[$t]=null),this[Rt]=!0;try{i&&Bn(this),ur.update.call(this,{type:"resize",animation:O({duration:0},e&&e.animation)})}catch(o){throw this[Rt]=!1,o}this[Rt]=!1,Ii.call(this,a),Pi.call(this,a)}},t.prototype.showLoading=function(e,n){if(this._disposed){re(this.id);return}if(G(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!vf[e]){console.warn("Loading effects "+e+" not exists.");return}var i=vf[e](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},t.prototype.hideLoading=function(){if(this._disposed){re(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=O({},e);return n.type=ia[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){re(this.id);return}if(G(n)||(n={silent:!!n}),!!ss[e.type]&&!!this._model){if(this[Rt]){this._pendingActions.push(e);return}var i=n.silent;Xl.call(this,e,i);var a=n.flush;a?this._zr.flush():a!==!1&&j.browser.weChat&&this._throttledZrFlush(),Ii.call(this,i),Pi.call(this,i)}},t.prototype.updateLabelLayout=function(){be.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){re(this.id);return}var n=e.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);W(e.data&&a),a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Bn=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Yl(h,!0),Yl(h,!1),c.plan()},Yl=function(h,c){for(var v=h._model,d=h._scheduler,g=c?h._componentsViews:h._chartsViews,p=c?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_c.get("hoverLayerThreshold")&&!j.node&&!j.worker&&c.eachSeries(function(p){if(!p.preventUsingHoverLayer){var y=h._chartsMap[p.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(h,c){if(!h.preventAutoZ){var v=h.get("z")||0,d=h.get("zlevel")||0;c.eachRendered(function(g){return l(g,v,d,-1/0),!0})}}function l(h,c,v,d){var g=h.getTextContent(),p=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Jn(y))return;if(y instanceof ht&&ow(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=p;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=p),S&&(S.stateTransition=p)}y.__dirty&&i(y)}})}Ad=function(h){return new(function(c){k(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var g=d.__ecComponentInfo;if(g!=null)return h._model.getComponent(g.mainType,g.index);d=d.parent}},v.prototype.enterEmphasis=function(d,g){ai(d,g),oe(h)},v.prototype.leaveEmphasis=function(d,g){oi(d,g),oe(h)},v.prototype.enterBlur=function(d){Kx(d),oe(h)},v.prototype.leaveBlur=function(d){sy(d),oe(h)},v.prototype.enterSelect=function(d){ly(d),oe(h)},v.prototype.leaveSelect=function(d){uy(d),oe(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},v}(um))(h)},t0=function(h){function c(v,d){for(var g=0;g=0)){Pd.push(e);var a=Bm.wrapStageHandler(e,i);a.__prio=t,a.__raw=e,r.push(a)}}function o0(r,t){vf[r]=t}function MM(r,t,e){var n=iM("registerMap");n&&n(r,t,e)}var DM=PT;bn(bh,aC);bn(Vs,oC);bn(Vs,sC);bn(bh,wC);bn(Vs,bC);bn(Xm,eM);i0(hm);a0(sM,fT);o0("default",lC);Ye({type:ln,event:ln,update:ln},Wt);Ye({type:Do,event:Do,update:Do},Wt);Ye({type:ji,event:ji,update:ji},Wt);Ye({type:Ao,event:Ao,update:Ao},Wt);Ye({type:ta,event:ta,update:ta},Wt);n0("light",_C);n0("dark",SC);function Ri(r){return r==null?0:r.length||1}function Rd(r){return r}var AM=function(){function r(t,e,n,i,a,o){this._old=t,this._new=e,this._oldKeyGetter=n||Rd,this._newKeyGetter=i||Rd,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),i[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var Ei=G,fr=H,BM=typeof Int32Array=="undefined"?Array:Int32Array,NM="e\0\0",Ed=-1,FM=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],zM=["_approximateExtent"],kd,fo,ki,Nn,Ql,ho,Jl,HM=function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;l0(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=0),i&&(c.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Z();T(o,function(p){g.set(a[p].storeDimIndex,p)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var n=this._dimIdxToName.get(e);if(n!=null)return n;var i=this._schema.getSourceDimension(e);if(i)return i.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(ct(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);if(e==null)throw new Error("Unkown dimension "+t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(n){return e.hasOwnProperty(n)?e[n]:void 0}:function(n){return e[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(e==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,n=e.encode[t];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,n){var i=this,a;if(t instanceof ef&&(a=t),!a){var o=this.dimensions,s=gh(t)||Kt(t)?new dm(t,o.length):t;a=new ef;var l=fr(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=IM(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=i;s=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Se;if(l&&!i.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[e];return a==null&&(a=this.getVisual(e),B(a)?a=a.slice():Ei(a)&&(a=O({},a)),i[e]=a),a},r.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Ei(e)?O(i,e):i[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Ei(t)?O(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?O(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Hx(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){T(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:fr(this.dimensions,this._getDimInfo,this),this.hostModel)),Ql(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];!V(n)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return e.apply(this,[i].concat(Nf(arguments)))})},r.internalField=function(){kd=function(t){var e=t._invertedIndicesMap;T(e,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=e[i]=new BM(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),i[e]=l}}}(),r}(),GM=HM;function VM(r,t){gh(r)||(r=yh(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],i=Z(),a=[],o=UM(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&h0(o),l=n===r.dimensionsDefine,u=l?f0(r):u0(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=Z(f),c=new Sm(o),v=0;v0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function UM(r,t,e,n){var i=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return T(t,function(a){var o;G(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function YM(r,t,e){var n=t.data;if(e||n.hasOwnProperty(r)){for(var i=0;n.hasOwnProperty(r+i);)i++;r+=i}return t.set(r,!0),r}var $M=function(){function r(t){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=t}return r}();function ZM(r){var t=r.get("coordinateSystem"),e=new $M(t),n=XM[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var XM={cartesian2d:function(r,t,e,n){var i=r.getReferringComponents("xAxis",Vt).models[0],a=r.getReferringComponents("yAxis",Vt).models[0];{if(!i)throw new Error('xAxis "'+vn(r.get("xAxisIndex"),r.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+vn(r.get("xAxisIndex"),r.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],e.set("x",i),e.set("y",a),Fn(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Fn(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var i=r.getReferringComponents("singleAxis",Vt).models[0];if(!i)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],e.set("single",i),Fn(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var i=r.getReferringComponents("polar",Vt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");{if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Fn(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Fn(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();T(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Fn(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Fn(r){return r.get("type")==="category"}function qM(r,t,e){e=e||{};var n=e.byIndex,i=e.stackedCoordDimension,a,o,s;KM(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(T(a,function(m,_){z(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!i||i===m.coordDim)&&(f=m))}),f&&!n&&!u&&(n=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,g=0;T(a,function(m){m.coordDim===v&&g++});var p={name:h,coordDim:v,coordDimIndex:g,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:c,coordDim:c,coordDimIndex:g+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(p.storeDimIndex=s.ensureCalculationDimension(c,d),y.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(p),o.appendCalculationDimension(y)):(a.push(p),a.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:h}}function KM(r){return!l0(r.schema)}function fi(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function QM(r,t){return fi(r,t)?r.getCalculationInfo("stackResultDimension"):t}function JM(r,t){var e=r.get("coordinateSystem"),n=ph.get(e),i;return t&&t.coordSysDims&&(i=H(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=PM(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function jM(r,t,e){var n,i;return e&&T(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function tD(r,t,e){e=e||{};var n=t.getSourceManager(),i,a=!1;r?(a=!0,i=yh(r)):(i=n.getSource(),a=i.sourceFormat===Se);var o=ZM(t),s=JM(t,o),l=e.useEncodeDefaulter,u=V(l)?l:l?ot(Ob,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=VM(i,f),c=jM(h.dimensions,e.createInvertedIndices,o),v=a?null:n.getSharedDataStore(h),d=qM(t,{schema:h,store:v}),g=new GM(h,t);g.setCalculationInfo(d);var p=c!=null&&eD(i)?function(y,m,_,S){return S===c?_:this.defaultDimValueGetter(y,m,_,S)}:null;return g.hasItemOption=!1,g.initData(a?i:v,null,p),g}function eD(r){if(r.sourceFormat===Se){var t=rD(r.data||[]);return!B(Ma(t))}}function rD(r){for(var t=0;te[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();xs(v0);var ar=v0,nD=0,iD=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++nD}return r.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&H(n,aD);return new r({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!z(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),e==null&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},r}();function aD(r){return G(r)&&r.value!=null?r.value:r+""}var cf=iD;function oD(r){var t=Math.pow(10,_s(Math.abs(r))),e=Math.abs(r/t);return e===0||e===1||e===2||e===3||e===5}function df(r){return r.type==="interval"||r.type==="log"}function sD(r,t,e,n){var i={},a=r[1]-r[0],o=i.interval=kg(a/t,!0);e!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=c0(o),l=i.niceTickExtent=[xt(Math.ceil(r[0]/o)*o,s),xt(Math.floor(r[1]/o)*o,s)];return lD(l,r),i}function jl(r){var t=Math.pow(10,_s(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,xt(e*t)}function c0(r){return Qe(r)+2}function Od(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function lD(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Od(r,0,t),Od(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Ws(r,t){return r>=t[0]&&r<=t[1]}function Us(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Ys(r,t){return r*(t[1]-t[0])+t[0]}var d0=function(r){k(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new cf({})),B(i)&&(i=new cf({categories:H(i,function(a){return G(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:z(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Ws(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Us(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Ys(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,i=n[0];i<=n[1];)e.push({value:i}),i++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(ar);ar.registerClass(d0);var p0=d0,Qr=xt,g0=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Ws(e,this._extent)},t.prototype.normalize=function(e){return Us(e,this._extent)},t.prototype.scale=function(e){return Ys(e,this._extent)},t.prototype.setExtent=function(e,n){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(e){var n=this._extent;e[0]n[1]&&(n[1]=e[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=c0(e)},t.prototype.getTicks=function(e){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(e?s.push({value:Qr(f+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&v0&&(a=a===null?s:Math.min(a,s))}e[n]=a}}return e}function _0(r){var t=hD(r),e=[];return T(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=Tt(n.get("barWidth"),s),g=Tt(n.get("barMaxWidth"),s),p=Tt(n.get("barMinWidth")||(x0(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:p,barGap:y,barCategoryGap:m,axisKey:Ih(a),stackId:Lh(n)})}),vD(e)}function vD(r){var t={};T(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var c=n.barMinWidth;c&&(l[u].minWidth=c);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return T(t,function(n,i){e[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=pt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Tt(s,o),f=Tt(n.gap,1),h=n.remainedWidth,c=n.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),T(a,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,c--}else{var S=v;m&&mS&&(S=_),S!==v&&(y.width=S,h-=S+f*S,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var d=0,g;T(a,function(y,m){y.width||(y.width=v),g=y,d+=y.width*(1+f)}),g&&(d-=g.width*f);var p=-d/2;T(a,function(y,m){e[i][m]=e[i][m]||{bandWidth:o,offset:p,width:y.width},p+=y.width*(1+f)})}),e}function cD(r,t,e){if(r&&t){var n=r[Ih(t)];return n!=null&&e!=null?n[Lh(e)]:n}}function XP(r,t){var e=m0(r,t),n=_0(e);T(e,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Lh(i),u=n[Ih(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function qP(r){return{seriesType:r,plan:xh(),reset:function(t){if(!!S0(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(i.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),h=fi(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=dD(i,a),d=x0(t),g=t.get("barMinHeight")||0,p=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var w=_.count,x=d&&Je(w*3),b=d&&l&&Je(w*3),C=d&&Je(w),M=n.master.getRect(),D=c?M.width:M.height,A,L=S.getStore(),I=0;(A=_.next())!=null;){var P=L.get(h?p:o,A),E=L.get(s,A),R=v,U=void 0;h&&(U=+P-L.get(o,A));var F=void 0,N=void 0,$=void 0,nt=void 0;if(c){var at=n.dataToPoint([P,E]);if(h){var vt=n.dataToPoint([U,E]);R=vt[0]}F=R,N=at[1]+m,$=at[0]-R,nt=y,Math.abs($)>>1;r[i][1]i&&(this._approxInterval=i);var s=vo.length,l=Math.min(pD(vo,this._approxInterval,0,s),s-1);this._interval=vo[l][1],this._minLevelUnit=vo[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return ct(e)?e:+rr(e)},t.prototype.contain=function(e){return Ws(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Us(this.parse(e),this._extent)},t.prototype.scale=function(e){return Ys(e,this._extent)},t.type="time",t}(Ea),vo=[["second",uh],["minute",fh],["hour",ra],["quarter-day",ra*6],["half-day",ra*12],["day",pe*1.2],["half-week",pe*3.5],["week",pe*7],["month",pe*31],["quarter",pe*95],["half-year",bc/2],["year",bc]];function gD(r,t,e,n){var i=rr(t),a=rr(e),o=function(d){return Cc(i,d,n)===Cc(a,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function yD(r,t){return r/=pe,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function mD(r){var t=30*pe;return r/=t,r>6?6:r>3?3:r>2?2:1}function _D(r){return r/=ra,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Bd(r,t){return r/=t?fh:uh,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function SD(r){return kg(r,!0)}function xD(r,t,e){var n=new Date(r);switch(jn(t)){case"year":case"month":n[Zy(e)](0);case"day":n[Xy(e)](1);case"hour":n[qy(e)](0);case"minute":n[Ky(e)](0);case"second":n[Qy(e)](0),n[Jy(e)](0)}return n.getTime()}function wD(r,t,e,n){var i=1e4,a=Yy,o=0;function s(D,A,L,I,P,E,R){for(var U=new Date(A),F=A,N=U[I]();F1&&E===0&&L.unshift({value:L[0].value-F})}}for(var E=0;E=n[0]&&m<=n[1]&&h++)}var _=(n[1]-n[0])/t;if(h>_*1.5&&c>_/1.5||(u.push(p),h>_||r===a[v]))break}f=[]}}}o>=i&&Ca("Exceed safe limit.");for(var S=Mt(H(u,function(D){return Mt(D,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(D){return D.length>0}),w=[],x=S.length-1,v=0;v0;)a*=10;var s=[xt(MD(n[0]/a)*a),xt(CD(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){oa.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=se(e)/se(this.base),Ws(e,this._extent)},t.prototype.normalize=function(e){return e=se(e)/se(this.base),Us(e,this._extent)},t.prototype.scale=function(e){return e=Ys(e,this._extent),co(this.base,e)},t.type="log",t}(ar),b0=Ph.prototype;b0.getMinorTicks=oa.getMinorTicks;b0.getLabel=oa.getLabel;function po(r,t){return TD(r,Qe(t))}ar.registerClass(Ph);var DD=Ph,AD=function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){W(!this.frozen),this[ID[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=LD[t];W(!this.frozen&&this[n]==null),this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),LD={min:"_determinedMin",max:"_determinedMax"},ID={min:"_dataMin",max:"_dataMax"};function T0(r,t,e){var n=r.rawExtentInfo;return n||(n=new AD(r,t,e),r.rawExtentInfo=n,n)}function go(r,t){return t==null?null:sa(t)?NaN:r.parse(t)}function C0(r,t){var e=r.type,n=T0(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&e==="time"){var s=m0("bar",o),l=!1;if(T(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=_0(s),f=PD(i,a,t,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function PD(r,t,e,n){var i=e.axis.getExtent(),a=i[1]-i[0],o=cD(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;T(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;T(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,h=1-(s+l)/a,c=f/h-f;return t+=c*(l/u),r-=c*(s/u),{min:r,max:t}}function Fd(r,t){var e=t,n=C0(r,e),i=n.extent,a=e.get("splitNumber");r instanceof DD&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function RD(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new p0({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new bD({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(ar.getClass(t)||Ea)}}function ED(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function ka(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}}(t):z(t)?function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a!=null?a:"");return o}}(t):V(t)?function(n){return function(i,a){return e!=null&&(a=i.value-e),n(Rh(r,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return r.scale.getLabel(n)}}function Rh(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function kD(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,i,a=e.getExtent();e instanceof p0?i=e.count():(n=e.getTicks(),i=n.length);var o=r.getLabelModel(),s=ka(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;fr[1]&&(r[1]=i[1])})}var ND=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),zd=[],FD={registerPreprocessor:i0,registerProcessor:a0,registerPostInit:wM,registerPostUpdate:bM,registerUpdateLifecycle:Mh,registerAction:Ye,registerCoordinateSystem:TM,registerLayout:CM,registerVisual:bn,registerTransform:DM,registerLoading:o0,registerMap:MM,registerImpl:nM,PRIORITY:gM,ComponentModel:ut,ComponentView:me,SeriesModel:ya,ChartView:wr,registerComponentModel:function(r){ut.registerClass(r)},registerComponentView:function(r){me.registerClass(r)},registerSeriesModel:function(r){ya.registerClass(r)},registerChartView:function(r){wr.registerClass(r)},registerSubTypeDefaulter:function(r,t){ut.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){pS(r,t)}};function Ve(r){if(B(r)){T(r,function(t){Ve(t)});return}J(zd,r)>=0||(zd.push(r),V(r)&&(r={install:r}),r.install(FD))}var Sa=gt();function zD(r){return r.type==="category"?GD(r):WD(r)}function HD(r,t){return r.type==="category"?VD(r,t):{ticks:H(r.scale.getTicks(),function(e){return e.value})}}function GD(r){var t=r.getLabelModel(),e=A0(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function A0(r,t){var e=L0(r,"labels"),n=Eh(t),i=I0(e,n);if(i)return i;var a,o;return V(n)?a=E0(r,n):(o=n==="auto"?UD(r):n,a=R0(r,o)),P0(e,n,{labels:a,labelCategoryInterval:o})}function VD(r,t){var e=L0(r,"ticks"),n=Eh(t),i=I0(e,n);if(i)return i;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),V(n))a=E0(r,n,!0);else if(n==="auto"){var s=A0(r,r.getLabelModel());o=s.labelCategoryInterval,a=H(s.labels,function(l){return l.tickValue})}else o=n,a=R0(r,o,!0);return P0(e,n,{ticks:a,tickCategoryInterval:o})}function WD(r){var t=r.scale.getTicks(),e=ka(r);return{labels:H(t,function(n,i){return{level:n.level,formattedLabel:e(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function L0(r,t){return Sa(r)[t]||(Sa(r)[t]=[])}function I0(r,t){for(var e=0;e40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(n)),h=Math.abs(u*Math.sin(n)),c=0,v=0;l<=a[1];l+=s){var d=0,g=0,p=ms(e({value:l}),t.font,"center","top");d=p.width*1.3,g=p.height*1.3,c=Math.max(c,d,7),v=Math.max(v,g,7)}var y=c/f,m=v/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=Sa(r.model),w=r.getExtent(),x=S.lastAutoInterval,b=S.lastTickCount;return x!=null&&b!=null&&Math.abs(x-_)<=1&&Math.abs(b-o)<=1&&x>_&&S.axisExtent0===w[0]&&S.axisExtent1===w[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=w[0],S.axisExtent1=w[1]),_}function $D(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function R0(r,t,e){var n=ka(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=M0(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==a[0]&&g(a[0]);for(var d=u;d<=a[1];d+=l)g(d);v&&d-l!==a[1]&&g(a[1]);function g(p){var y={value:p};s.push(e?p:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:p})}return s}function E0(r,t,e){var n=r.scale,i=ka(r),a=[];return T(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var Hd=[0,1],ZD=function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.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&&t<=i},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return Rg(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),Gd(n,i.count())),Et(t,Hd,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),Gd(n,i.count()));var a=Et(t,n,Hd,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=HD(this,e),i=n.ticks,a=H(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return XD(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=H(n,function(a){return H(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return zD(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return YD(this)},r}();function Gd(r,t){var e=r[1]-r[0],n=t,i=e/n/2;r[0]+=i,r[1]-=i}function XD(r,t,e,n){var i=t.length;if(!r.onBand||e||!i)return;var a=r.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[0]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;T(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s},t.push(o)}var h=a[0]>a[1];c(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&c(a[0],t[0].coord)&&t.unshift({coord:a[0]}),c(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&c(o.coord,a[1])&&t.push({coord:a[1]});function c(v,d){return v=xt(v),d=xt(d),h?v>d:vi&&(i+=Oi);var v=Math.atan2(s,o);if(v<0&&(v+=Oi),v>=n&&v<=i||v+Oi>=n&&v+Oi<=i)return l[0]=f,l[1]=h,u-e;var d=e*Math.cos(n)+r,g=e*Math.sin(n)+t,p=e*Math.cos(i)+r,y=e*Math.sin(i)+t,m=(d-o)*(d-o)+(g-s)*(g-s),_=(p-o)*(p-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=g,Math.sqrt(m)):(l[0]=p,l[1]=y,Math.sqrt(_))}function us(r,t,e,n,i,a,o,s){var l=i-r,u=a-t,f=e-r,h=n-t,c=Math.sqrt(f*f+h*h);f/=c,h/=c;var v=l*f+u*h,d=v/c;s&&(d=Math.min(Math.max(d,0),1)),d*=c;var g=o[0]=r+d*f,p=o[1]=t+d*h;return Math.sqrt((g-i)*(g-i)+(p-a)*(p-a))}function k0(r,t,e,n,i,a,o){e<0&&(r=r+e,e=-e),n<0&&(t=t+n,n=-n);var s=r+e,l=t+n,u=o[0]=Math.min(Math.max(i,r),s),f=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-i)*(u-i)+(f-a)*(f-a))}var Te=[];function jD(r,t,e){var n=k0(t.x,t.y,t.width,t.height,r.x,r.y,Te);return e.set(Te[0],Te[1]),n}function tA(r,t,e){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,f=t.data,h=r.x,c=r.y,v=0;v0){t=t/180*Math.PI,Me.fromArray(r[0]),lt.fromArray(r[1]),_t.fromArray(r[2]),X.sub(ze,Me,lt),X.sub(Be,_t,lt);var e=ze.len(),n=Be.len();if(!(e<.001||n<.001)){ze.scale(1/e),Be.scale(1/n);var i=ze.dot(Be),a=Math.cos(t);if(a1&&X.copy(Ht,_t),Ht.toArray(r[1])}}}}function KP(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Me.fromArray(r[0]),lt.fromArray(r[1]),_t.fromArray(r[2]),X.sub(ze,lt,Me),X.sub(Be,_t,lt);var n=ze.len(),i=Be.len();if(!(n<.001||i<.001)){ze.scale(1/n),Be.scale(1/i);var a=ze.dot(t),o=Math.cos(e);if(a=l)X.copy(Ht,_t);else{Ht.scaleAndAdd(Be,s/Math.tan(Math.PI/2-f));var h=_t.x!==lt.x?(Ht.x-lt.x)/(_t.x-lt.x):(Ht.y-lt.y)/(_t.y-lt.y);if(isNaN(h))return;h<0?X.copy(Ht,lt):h>1&&X.copy(Ht,_t)}Ht.toArray(r[1])}}}}function Wd(r,t,e,n){var i=e==="normal",a=i?r:r.ensureState(e);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?r.useStyle(s):a.style=s}function rA(r,t){var e=t.smooth,n=t.points;if(!!n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var i=wu(n[0],n[1]),a=wu(n[1],n[2]);if(!i||!a){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*e,s=qs([],n[1],n[0],o/i),l=qs([],n[1],n[2],o/a),u=qs([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f0&&a&&w(-f/o,0,o);var g=r[0],p=r[o-1],y,m;_(),y<0&&x(-y,.8),m<0&&x(m,.8),_(),S(y,m,1),S(m,y,-1),_(),y<0&&b(-y),m<0&&b(m);function _(){y=g.rect[t]-n,m=i-p.rect[t]-p.rect[e]}function S(C,M,D){if(C<0){var A=Math.min(M,-C);if(A>0){w(A*D,0,o);var L=A+C;L<0&&x(-L*D,1)}else x(-C*D,1)}}function w(C,M,D){C!==0&&(u=!0);for(var A=M;A0)for(var L=0;L0;L--){var R=D[L-1]*E;w(-R,L,o)}}}function b(C){var M=C<0?-1:1;C=Math.abs(C);for(var D=Math.ceil(C/(o-1)),A=0;A0?w(D,0,A+1):w(-D,o-A-1,o),C-=D,C<=0)return}return u}function aA(r,t,e,n){return B0(r,"x","width",t,e,n)}function oA(r,t,e,n){return B0(r,"y","height",t,e,n)}function N0(r){var t=[];r.sort(function(g,p){return p.priority-g.priority});var e=new it(0,0,0,0);function n(g){if(!g.ignore){var p=g.ensureState("emphasis");p.ignore==null&&(p.ignore=!1)}g.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),J(c,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Ae(n,u,e,l)}else if(n.attr(u),!Ia(n).valueAnimation){var h=rt(n.style.opacity,1);n.style.opacity=0,Mr(n,{style:{opacity:h}},e,l)}if(a.oldLayout=u,n.states.select){var v=a.oldLayoutSelect={};yo(v,u,mo),yo(v,n.states.select,mo)}if(n.states.emphasis){var d=a.oldLayoutEmphasis={};yo(d,u,mo),yo(d,n.states.emphasis,mo)}ab(n,l,f,e,e)}if(i&&!i.ignore&&!i.invisible){var a=uA(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Ae(i,{shape:g},e)):(i.setShape(g),i.style.strokePercent=0,Mr(i,{style:{strokePercent:1}},e)),a.oldLayout=g}},r}(),hA=fA,eu=gt();function QP(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var i=eu(e).labelManager;i||(i=eu(e).labelManager=new hA),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var i=eu(e).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(e.getViewOfSeriesModel(a))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}var vA=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){{var n=e.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return tD(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var n=new wt,i=Ar("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);n.add(i),i.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=Ar(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);n.add(u),u.setStyle(e.itemStyle);var f=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(ya),cA=vA;function F0(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var i=ui(r,t,e[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}var pA=function(r){k(t,r);function t(e,n,i,a){var o=r.call(this)||this;return o.updateData(e,n,i,a),o}return t.prototype._createSymbol=function(e,n,i,a,o){this.removeAll();var s=Ar(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=gA,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){ai(this.childAt(0))},t.prototype.downplay=function(){oi(this.childAt(0))},t.prototype.setZ=function(e,n){var i=this.childAt(0);i.zlevel=e,i.z=n},t.prototype.setDraggable=function(e,n){var i=this.childAt(0);i.draggable=e,i.cursor=!n&&e?"move":i.cursor},t.prototype.updateData=function(e,n,i,a){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var h=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,h)}else{var c=this.childAt(0);c.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?c.attr(v):Ae(c,v,s,n),Vw(c)}if(this._updateCommon(e,n,l,i,a),u){var c=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Mr(c,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,i,a,o){var s=this.childAt(0),l=e.hostModel,u,f,h,c,v,d,g,p,y;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,g=a.labelStatesModels,p=a.hoverScale,y=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var m=a&&a.itemModel?a.itemModel:e.getItemModel(n),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),g=ah(m),p=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var w=Fm(e.getItemVisual(n,"symbolOffset"),i);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var x=e.getItemVisual(n,"style"),b=x.fill;if(s instanceof xn){var C=s.style;s.useStyle(O({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},x))}else s.__isEmptyBrush?s.useStyle(O({},x)):s.useStyle(x),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=e.getItemVisual(n,"liftZ"),D=this._z2;M!=null?D==null&&(this._z2=s.z2,s.z2+=M):D!=null&&(s.z2=D,this._z2=null);var A=o&&o.useNameLabel;ih(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:b,defaultOpacity:x.opacity});function L(E){return A?e.getName(E):F0(e,E)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var I=s.ensureState("emphasis");if(I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f,p){var P=Math.max(ct(p)?p:1.1,3/this._sizeY);I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P}this.setSymbolScale(1),$u(this,c,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,i){var a=this.childAt(0),o=ft(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&qo(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();qo(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return zC(e.getItemVisual(n,"symbolSize"))},t}(wt);function gA(r,t){this.parent.drift(r,t)}var kh=pA;function ru(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Yd(r){return r!=null&&!G(r)&&(r={isIgnore:r}),r||{}}function $d(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:ah(t),cursorStyle:t.get("cursor")}}var yA=function(){function r(t){this.group=new wt,this._SymbolCtor=t||kh}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Yd(e);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=$d(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var c=f(h);if(ru(t,c,h,e)){var v=new o(t,h,l,u);v.setPosition(c),t.setItemGraphicEl(h,v),n.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),d=f(h);if(!ru(t,d,h,e)){n.remove(v);return}var g=t.getItemVisual(h,"symbol")||"circle",p=v&&v.getSymbolType&&v.getSymbolType();if(!v||p&&p!==g)n.remove(v),v=new o(t,h,l,u),v.setPosition(d);else{v.updateData(t,h,l,u);var y={x:d[0],y:d[1]};s?v.attr(y):Ae(v,y,i)}n.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){n.remove(c)},i)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=$d(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=Yd(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?e=n[0]:n[1]<0&&(e=n[1]),e}function H0(r,t,e,n){var i=NaN;r.stacked&&(i=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function SA(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,i){e.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function xA(r,t,e,n,i,a,o,s){for(var l=SA(r,t),u=[],f=[],h=[],c=[],v=[],d=[],g=[],p=z0(i,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=i||g<0)break;if(un(y,m)){if(l){g+=a;continue}break}if(g===e)r[a>0?"moveTo":"lineTo"](y,m),h=y,c=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){g+=a;continue}if(o>0){for(var w=g+a,x=t[w*2],b=t[w*2+1];x===y&&b===m&&p=n||un(x,b))v=y,d=m;else{D=x-u,A=b-f;var P=y-u,E=x-y,R=m-f,U=b-m,F=void 0,N=void 0;if(s==="x"){F=Math.abs(P),N=Math.abs(E);var $=D>0?1:-1;v=y-$*F*o,d=m,L=y+$*N*o,I=m}else if(s==="y"){F=Math.abs(R),N=Math.abs(U);var nt=A>0?1:-1;v=y,d=m-nt*F*o,L=y,I=m+nt*N*o}else F=Math.sqrt(P*P+R*R),N=Math.sqrt(E*E+U*U),M=N/(N+F),v=y-D*o*(1-M),d=m-A*o*(1-M),L=y+D*o*M,I=m+A*o*M,L=hr(L,vr(x,y)),I=hr(I,vr(b,m)),L=vr(L,hr(x,y)),I=vr(I,hr(b,m)),D=L-y,A=I-m,v=y-D*F/N,d=m-A*F/N,v=hr(v,vr(u,y)),d=hr(d,vr(f,m)),v=vr(v,hr(u,y)),d=vr(d,hr(f,m)),D=y-v,A=m-d,L=y+D*N/F,I=m+A*N/F}r.bezierCurveTo(h,c,v,d,y,m),h=L,c=I}else r.lineTo(y,m)}u=y,f=m,g+=a}return p}var G0=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),wA=function(r){k(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new G0},t.prototype.buildPath=function(e,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&un(i[o*2-2],i[o*2-1]);o--);for(;a=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[e,S]:[S,e]}s=v,l=d;break;case o.C:v=a[h++],d=a[h++],g=a[h++],p=a[h++],y=a[h++],m=a[h++];var w=u?Fo(s,v,g,y,e,f):Fo(l,d,p,m,e,f);if(w>0)for(var x=0;x=0){var S=u?bt(l,d,p,m,b):bt(s,v,g,y,b);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t}(ht),bA=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(G0),TA=function(r){k(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new bA},t.prototype.buildPath=function(e,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&un(i[s*2-2],i[s*2-1]);s--);for(;ot){a?e.push(o(a,l,t)):i&&e.push(o(i,l,0),o(i,l,t));break}else i&&(e.push(o(i,l,0)),i=null),e.push(l),a=l}return e}function AA(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())){if(t.type!=="cartesian2d"){console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(i),u=H(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=DA(u,i==="x"?e.getWidth():e.getHeight()),v=c.length;if(!v&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var d=10,g=c[0].coord-d,p=c[v-1].coord+d,y=p-g;if(y<.001)return"transparent";T(c,function(_){_.offset=(_.coord-g)/y}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var m=new Ry(0,0,0,0,c,!0);return m[i]=g,m[i+"2"]=p,m}}function LA(r,t,e){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=e.getAxesByScale("ordinal")[0];if(!!a&&!(i&&IA(a,t))){var o=t.mapDimension(a.dim),s={};return T(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function IA(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function PA(r,t){return isNaN(r)||isNaN(t)}function RA(r){for(var t=r.length/2;t>0&&PA(r[t*2-2],r[t*2-1]);t--);return t-1}function Qd(r,t){return[r[t*2],r[t*2+1]]}function EA(r,t,e){for(var n=r.length/2,i=e==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function U0(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var $=g.getState("emphasis").style;$.lineWidth=+g.style.lineWidth+1}ft(g).seriesIndex=e.seriesIndex,$u(g,U,F,N);var nt=Kd(e.get("smooth")),at=e.get("smoothMonotone");if(g.setShape({smooth:nt,smoothMonotone:at,connectNulls:C}),p){var vt=l.getCalculationInfo("stackedOnSeries"),dt=0;p.useStyle(tt(f.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),vt&&(dt=Kd(vt.get("smooth"))),p.setShape({smooth:nt,stackedOnSmooth:dt,smoothMonotone:at,connectNulls:C}),sc(p,e,"areaStyle"),ft(p).seriesIndex=e.seriesIndex,$u(p,U,F,N)}var jt=function(yt){a._changePolyState(yt)};l.eachItemGraphicEl(function(yt){yt&&(yt.onHoverStateChange=jt)}),this._polyline.onHoverStateChange=jt,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=h,this._step=A,this._valueOrigin=S,e.get("triggerLineEvent")&&(this.packEventData(e,g),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,n){ft(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,i,a){var o=e.getData(),s=pn(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=e.get("zlevel"),v=e.get("z");u=new kh(o,s),u.x=f,u.y=h,u.setZ(c,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else wr.prototype.highlight.call(this,e,n,i,a)},t.prototype.downplay=function(e,n,i,a){var o=e.getData(),s=pn(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else wr.prototype.downplay.call(this,e,n,i,a)},t.prototype._changePolyState=function(e){var n=this._polygon;rc(this._polyline,e),n&&rc(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new wA({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new TA({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(e,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");V(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=V(h)?h(null):h;e.eachItemGraphicEl(function(v,d){var g=v;if(g){var p=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(i)if(o){var S=i,w=n.pointToCoord(p);a?(y=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(y=S.r0,m=S.r,_=w[0])}else{var x=i;a?(y=x.x,m=x.x+x.width,_=v.x):(y=x.y+x.height,m=x.y,_=v.y)}var b=m===y?0:(_-y)/(m-y);l&&(b=1-b);var C=V(h)?h(d):f*b+c,M=g.getSymbolPath(),D=M.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:C}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,i){var a=e.getModel("endLabel");if(U0(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Dt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=RA(l);f>=0&&(ih(s,ah(e,"endLabel"),{inheritColor:i,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?dA(o,v):F0(o,h)},enableTextSetter:!0},kA(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),c=i.hostModel,v=c.get("connectNulls"),d=s.get("precision"),g=s.get("distance")||0,p=l.getBaseAxis(),y=p.isHorizontal(),m=p.inverse,_=n.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,w=(y?g:0)*(m?-1:1),x=(y?0:-g)*(m?-1:1),b=y?"x":"y",C=EA(h,S,b),M=C.range,D=M[1]-M[0],A=void 0;if(D>=1){if(D>1&&!v){var L=Qd(h,M[0]);u.attr({x:L[0]+w,y:L[1]+x}),o&&(A=c.getRawValue(M[0]))}else{var L=f.getPointOn(S,b);L&&u.attr({x:L[0]+w,y:L[1]+x});var I=c.getRawValue(M[0]),P=c.getRawValue(M[1]);o&&(A=Vg(i,d,I,P,C.t))}a.lastFrameIndex=M[0]}else{var E=e===1||a.lastFrameIndex>0?M[0]:0,L=Qd(h,E);o&&(A=c.getRawValue(E)),u.attr({x:L[0]+w,y:L[1]+x})}o&&Ia(u).setLabelText(A)}},t.prototype._doUpdateAnimation=function(e,n,i,a,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,c=xA(this._data,e,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,g=c.next,p=c.stackedOnNext;if(o&&(v=cr(c.current,i,o,l),d=cr(c.stackedOnCurrent,i,o,l),g=cr(c.next,i,o,l),p=cr(c.stackedOnNext,i,o,l)),qd(v,g)>3e3||f&&qd(d,p)>3e3){u.stopAnimation(),u.setShape({points:g}),f&&(f.stopAnimation(),f.setShape({points:g,stackedOnPoints:p}));return}u.shape.__points=c.current,u.shape.points=v;var y={shape:{points:g}};c.current!==v&&(y.shape.__points=c.next),u.stopAnimation(),Ae(u,y,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),Ae(f,{shape:{stackedOnPoints:p}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=c.status,S=0;S<_.length;S++){var w=_[S].cmd;if(w==="="){var x=e.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var b=u.shape.__points,C=0;Ct&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"&&t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v));var d=void 0;z(a)?d=FA[a]:V(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(u.dim),1/v,d,zA))}}}}}function jP(r){r.registerChartView(BA),r.registerSeriesModel(cA),r.registerLayout(NA("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,HA("line"))}var GA=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(ut),VA=GA,gf=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Vt).models[0]},t.type="cartesian2dAxis",t}(ut);We(gf,ND);var Y0={show:!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)"]}}},WA=Q({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Y0),Oh=Q({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}}},Y0),UA=Q({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Oh),YA=tt({logBase:10},Oh),$A={category:WA,value:Oh,time:UA,log:YA},ZA={value:1,category:1,time:1,log:1};function Jd(r,t,e,n){T(ZA,function(i,a){var o=Q(Q({},$A[a],!0),n,!0),s=function(l){k(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=da(this),v=c?Ra(f):{},d=h.getTheme();Q(f,d.get(a+"Axis")),Q(f,this.getDefaultOption()),f.type=jd(f),c&&li(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=cf.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+a,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",jd)}function jd(r){return r.type||(r.data?"category":"value")}var XA=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return H(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Mt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}(),qA=XA,yf=["x","y"];function tp(r){return r.type==="interval"||r.type==="time"}var KA=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=yf,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!tp(e)||!tp(n))){var i=e.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-i[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=gs([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var i=this.dataToPoint(e),a=this.dataToPoint(n),o=this.getArea(),s=new it(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,i){i=i||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ge(i,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(e,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(e[0]),u=a.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n){var i=[];if(this._invTransform)return ge(i,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(e[0]),n),i[1]=o.coordToData(o.toLocalCoord(e[1]),n),i},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1]),a=Math.min(n[0],n[1]),o=Math.max(e[0],e[1])-i,s=Math.max(n[0],n[1])-a;return new it(i,a,o,s)},t}(qA),QA=function(r){k(t,r);function t(e,n,i,a,o){var s=r.call(this,e,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(qD),JA=QA;function mf(r,t,e){e=e||{};var n=r.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=n.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=u==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(g,d[1]),d[0])}a.position=[u==="y"?d[c[l]]:h[0],u==="x"?d[c[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=p[s],a.labelOffset=o?d[c[s]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),vn(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function ep(r){return r.get("coordinateSystem")==="cartesian2d"}function rp(r){var t={xAxisModel:null,yAxisModel:null};return T(t,function(e,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,Vt).models[0];if(!a)throw new Error(i+' "'+Xn(r.get(i+"Index"),r.get(i+"Id"),0)+'" not found');t[n]=a}),t}var iu=Math.log;function jA(r,t,e){var n=Ea.prototype,i=n.getTicks.call(e),a=n.getTicks.call(e,!0),o=i.length-1,s=n.getInterval.call(e),l=C0(r,t),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var c=iu(r.base);u=[iu(u[0])/c,iu(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=n.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var d=n.getInterval.call(r),g=u[0],p=u[1];if(f&&h)d=(p-g)/o;else if(f)for(p=u[0]+d*o;pu[0]&&isFinite(g)&&isFinite(u[0]);)d=jl(d),g=u[1]-d*o;else{var y=r.getTicks().length-1;y>o&&(d=jl(d));var m=d*o;p=Math.ceil(u[1]/d)*d,g=xt(p-m),g<0&&u[0]>=0?(g=0,p=xt(m)):p>0&&u[1]<=0&&(p=0,g=-xt(m))}var _=(i[0].value-a[0].value)/s,S=(i[o].value-a[o].value)/s;n.setExtent.call(r,g+d*_,p+d*S),n.setInterval.call(r,d),(_||S)&&n.setNiceExtent.call(r,g+d,p-d);{var w=n.getTicks.call(r);w[1]&&(!oD(d)||zu(w[1].value)>zu(d))&&Ca("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var tL=function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=yf,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=pt(o),u=l.length;if(!!u){for(var f=[],h=u-1;h>=0;h--){var c=+l[h],v=o[c],d=v.model,g=v.scale;df(g)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(Fd(g,d),df(g)&&(s=v))}f.length&&(s||(s=f.pop(),Fd(s.scale,s.model)),T(f,function(p){jA(p.scale,p.model,s.scale)}))}}i(n.x),i(n.y);var a={};T(n.x,function(o){np(n,"y",o,a)}),T(n.y,function(o){np(n,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=Dr(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(T(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=kD(u);if(f){var h=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,u.position==="top"?o.y+=f.height+c:u.position==="left"&&(o.x+=f.width+c)}}}),l()),T(this._coordsList,function(u){u.calcAffineTransform()});function l(){T(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(h[c],h[1-c]),eL(u,f?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}G(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):Uo(i-mr)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),ap={axisLine:function(r,t,e,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0];o&&(ge(s,s,o),ge(l,l,o));var u=O({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new gn({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});f.anid="line",e.add(f);var h=t.get(["axisLine","symbol"]);if(h!=null){var c=t.get(["axisLine","symbolSize"]);z(h)&&(h=[h,h]),(z(c)||ct(c))&&(c=[c,c]);var v=Fm(t.get(["axisLine","symbolOffset"])||0,c),d=c[0],g=c[1];T([{rotate:r.rotation+Math.PI/2,offset:v[0],r:0},{rotate:r.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(p,y){if(h[y]!=="none"&&h[y]!=null){var m=Ar(h[y],-d/2,-g/2,d,g,u.stroke,!0),_=p.r+p.offset;m.attr({rotation:p.rotate,x:s[0]+_*Math.cos(r.rotation),y:s[1]-_*Math.sin(r.rotation),silent:!0,z2:11}),e.add(m)}})}}},axisTickLabel:function(r,t,e,n){var i=aL(e,n,t,r),a=sL(e,n,t,r);if(iL(t,a,i),oL(e,n,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=O0(H(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));N0(o)}},axisName:function(r,t,e,n){var i=vn(r.axisName,t.get("name"));if(!!i){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,sp(a)?r.labelOffset+o*l:0],c,v=t.get("nameRotate");v!=null&&(v=v*mr/180);var d;sp(a)?c=fn.innerTextLayout(r.rotation,v!=null?v:r.rotation,o):(c=nL(r.rotation,a,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var g=s.getFont(),p=t.get("nameTruncate",!0)||{},y=p.ellipsis,m=vn(r.nameTruncateMaxWidth,p.maxWidth,d),_=new Dt({x:h[0],y:h[1],rotation:c.rotation,silent:fn.isLabelSilent(t),style:nr(s,{text:i,font:g,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(Is({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var S=fn.makeAxisEventDataBase(t);S.targetType="axisName",S.name=i,ft(_).eventData=S}n.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function nL(r,t,e,n){var i=Eg(e-r),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Uo(i-mr/2)?(o=l?"bottom":"top",a="center"):Uo(i-mr*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",imr/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function iL(r,t,e){if(!M0(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],f=e[1],h=e[e.length-1],c=e[e.length-2];n===!1?(le(a),le(u)):op(a,o)&&(n?(le(o),le(f)):(le(a),le(u))),i===!1?(le(s),le(h)):op(l,s)&&(i?(le(l),le(c)):(le(s),le(h)))}}function le(r){r&&(r.ignore=!0)}function op(r,t){var e=r&&r.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!e||!n)){var i=Hf([]);return Gf(i,i,-r.rotation),e.applyTransform(Qn([],i,r.getLocalTransform())),n.applyTransform(Qn([],i,t.getLocalTransform())),e.intersect(n)}}function sp(r){return r==="middle"||r==="center"}function $0(r,t,e,n,i){for(var a=[],o=[],s=[],l=0;l=0||r===t}function cL(r){var t=Bh(r);if(!!t){var e=t.axisPointerModel,n=t.axis.scale,i=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=_f(e);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;lu(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),c=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);lu(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!fp(this._zr,"globalPan")){var n=e.pinchScale>1?1.1:1/1.1;lu(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(_e);function lu(r,t,e,n,i){r.pointerChecker&&r.pointerChecker(n,i.originX,i.originY)&&(ni(n.event),Q0(r,t,e,n,i))}function Q0(r,t,e,n,i){i.isAvailableBehavior=Y(Eo,null,e,n),r.trigger(t,i)}function Eo(r,t,e){var n=e[r];return!r||n&&(!z(n)||t.event[n+"Key"])}var DL=ML,AL={axisPointer:1,tooltip:1,brush:1};function LL(r,t,e){var n=t.getComponentByElement(r.topTarget),i=n&&n.coordinateSystem;return n&&n!==e&&!AL.hasOwnProperty(n.mainType)&&i&&i.model!==e}function Oa(r,t,e,n,i,a){r=r||0;var o=e[1]-e[0];if(i!=null&&(i=zn(i,[0,o])),a!=null&&(a=Math.max(a,i!=null?i:0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=zn(s,[0,o]),i=a=zn(s,[i,a]),n=0}t[0]=zn(t[0],e),t[1]=zn(t[1],e);var l=uu(t,n);t[n]+=r;var u=i||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=zn(t[n],f);var h;return h=uu(t,n),i!=null&&(h.sign!==l.sign||h.spana&&(t[1-n]=t[n]+h.sign*a),t}function uu(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function zn(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var mn=!0,wa=Math.min,hi=Math.max,IL=Math.pow,PL=1e4,RL=6,EL=6,hp="globalPan",kL={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},OL={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},vp={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},BL=0,NL=function(r){k(t,r);function t(e){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},W(e),n._zr=e,n.group=new wt,n._uid="brushController_"+BL++,T(UL,function(i,a){this._handlers[a]=Y(i,this)},n),n}return t.prototype.enableBrush=function(e){return W(this._mounted),this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var n=this._zr;this._enableGlobalPan||TL(n,hp,this._uid),T(this._handlers,function(i,a){n.on(a,i)}),this._brushType=e.brushType,this._brushOption=Q(K(vp),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;CL(e,hp,this._uid),T(this._handlers,function(n,i){e.off(i,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var n=this._panels={};T(e,function(i){n[i.panelId]=K(i)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._mounted=!0,this._enableGlobalPan=e.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(e){W(this._mounted),e=H(e,function(c){return Q(K(vp),c,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Ah(i,e,u,l).add(f).update(f).remove(h).execute(),this;function l(c,v){return(c.id!=null?c.id:n+v)+"-"+c.brushType}function u(c,v){return l(c.__brushOption,v)}function f(c,v){var d=e[c];if(v!=null&&i[v]===s)a[c]=i[v];else{var g=a[c]=v!=null?(i[v].__brushOption=d,i[v]):j0(o,J0(o,d));Fh(o,g)}}function h(c){i[c]!==s&&o.group.remove(i[c])}},t.prototype.unmount=function(){if(!!this._mounted)return this.enableBrush(!1),xf(this),this._zr.remove(this.group),this._mounted=!1,this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(_e);function J0(r,t){var e=$s[t.brushType].createCover(r,t);return e.__brushOption=t,e_(e,t),r.group.add(e),e}function j0(r,t){var e=zh(t);return e.endCreating&&(e.endCreating(r,t),e_(t,t.__brushOption)),t}function t_(r,t){var e=t.__brushOption;zh(t).updateCoverShape(r,t,e.range,e)}function e_(r,t){var e=t.z;e==null&&(e=PL),r.traverse(function(n){n.z=e,n.z2=e})}function Fh(r,t){zh(t).updateCommon(r,t),t_(r,t)}function zh(r){return $s[r.__brushOption.brushType]}function Hh(r,t,e){var n=r._panels;if(!n)return mn;var i,a=r._transform;return T(n,function(o){o.isTargetByCursor(t,e,a)&&(i=o)}),i}function r_(r,t){var e=r._panels;if(!e)return mn;var n=t.__brushOption.panelId;return n!=null?e[n]:mn}function xf(r){var t=r._covers,e=t.length;return T(t,function(n){r.group.remove(n)},r),t.length=0,!!e}function _n(r,t){var e=H(r._covers,function(n){var i=n.__brushOption,a=K(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function FL(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],i=e[0]-n[0],a=e[1]-n[1],o=IL(i*i+a*a,.5);return o>RL}function n_(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function i_(r,t,e,n){var i=new wt;return i.add(new mt({name:"main",style:Gh(e),silent:!0,draggable:!0,cursor:"move",drift:ot(cp,r,t,i,["n","s","w","e"]),ondragend:ot(_n,t,{isEnd:!0})})),T(n,function(a){i.add(new mt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ot(cp,r,t,i,a),ondragend:ot(_n,t,{isEnd:!0})}))}),i}function a_(r,t,e,n){var i=n.brushStyle.lineWidth||0,a=hi(i,EL),o=e[0][0],s=e[1][0],l=o-i/2,u=s-i/2,f=e[0][1],h=e[1][1],c=f-a+i/2,v=h-a+i/2,d=f-o,g=h-s,p=d+i,y=g+i;qe(r,t,"main",o,s,d,g),n.transformable&&(qe(r,t,"w",l,u,a,y),qe(r,t,"e",c,u,a,y),qe(r,t,"n",l,u,p,a),qe(r,t,"s",l,v,p,a),qe(r,t,"nw",l,u,a,a),qe(r,t,"ne",c,u,a,a),qe(r,t,"sw",l,v,a,a),qe(r,t,"se",c,v,a,a))}function wf(r,t){var e=t.__brushOption,n=e.transformable,i=t.childAt(0);i.useStyle(Gh(e)),i.attr({silent:!n,cursor:n?"move":"default"}),T([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?bf(r,a[0]):HL(r,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?OL[s]+"-resize":null})})}function qe(r,t,e,n,i,a,o){var s=t.childOfName(e);s&&s.setShape(VL(Vh(r,t,[[n,i],[n+a,i+o]])))}function Gh(r){return tt({strokeNoScale:!0},r.brushStyle)}function o_(r,t,e,n){var i=[wa(r,e),wa(t,n)],a=[hi(r,e),hi(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function zL(r){return As(r.group)}function bf(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=rh(e[t],zL(r));return n[i]}function HL(r,t){var e=[bf(r,t[0]),bf(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function cp(r,t,e,n,i,a){var o=e.__brushOption,s=r.toRectRange(o.range),l=s_(t,i,a);T(n,function(u){var f=kL[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(o_(s[0][0],s[1][0],s[0][1],s[1][1])),Fh(t,e),_n(t,{isEnd:!1})}function GL(r,t,e,n){var i=t.__brushOption.range,a=s_(r,e,n);T(i,function(o){o[0]+=a[0],o[1]+=a[1]}),Fh(r,t),_n(r,{isEnd:!1})}function s_(r,t,e){var n=r.group,i=n.transformCoordToLocal(t,e),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function Vh(r,t,e){var n=r_(r,t);return n&&n!==mn?n.clipPath(e,r._transform):K(e)}function VL(r){var t=wa(r[0][0],r[1][0]),e=wa(r[0][1],r[1][1]),n=hi(r[0][0],r[1][0]),i=hi(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:i-e}}function WL(r,t,e){if(!(!r._brushType||YL(r,t.offsetX,t.offsetY))){var n=r._zr,i=r._covers,a=Hh(r,t,e);if(!r._dragging)for(var o=0;on.getWidth()||e<0||e>n.getHeight()}var $s={lineX:gp(0),lineY:gp(1),rect:{createCover:function(r,t){function e(n){return n}return i_({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=n_(r);return o_(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){a_(r,t,e,n)},updateCommon:wf,contain:Cf},polygon:{createCover:function(r,t){var e=new wt;return e.add(new La({name:"main",style:Gh(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Ds({name:"main",draggable:!0,drift:ot(GL,r,t),ondragend:ot(_n,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:Vh(r,t,e)})},updateCommon:wf,contain:Cf}};function gp(r){return{createCover:function(t,e){return i_({toRectRange:function(n){var i=[n,[0,100]];return r&&i.reverse(),i},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=n_(t),n=wa(e[0][r],e[1][r]),i=hi(e[0][r],e[1][r]);return[n,i]},updateCoverShape:function(t,e,n,i){var a,o=r_(t,e);if(o!==mn&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,a];r&&l.reverse(),a_(t,e,l,i)},updateCommon:wf,contain:Cf}}var $L=NL;function ZL(r){return r=Wh(r),function(t){return Fy(t,r)}}function XL(r,t){return r=Wh(r),function(e){var n=t!=null?t:e,i=n?r.width:r.height,a=n?r.x:r.y;return[a,a+(i||0)]}}function qL(r,t,e){var n=Wh(r);return function(i,a){return n.contain(a[0],a[1])&&!LL(i,t,e)}}function Wh(r){return it.create(r)}var en=gt(),yp=K,fu=Y,KL=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,i){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new wt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var c=ot(mp,e,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,e)}Sp(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,a=i.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=Bh(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,i,a){},r.prototype.createPointerEl=function(t,e,n,i){var a=e.pointer;if(a){var o=en(t).pointerEl=new eb[a.type](yp(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,i){if(e.label){var a=en(t).labelEl=new Dt(yp(e.label));t.add(a),_p(a,i)}},r.prototype.updatePointerEl=function(t,e,n){var i=en(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,i){var a=en(t).labelEl;a&&(a.setStyle(e.label.style),n(a,{x:e.label.x,y:e.label.y}),_p(a,i))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Ls(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ni(u.event)},onmousedown:fu(this._onHandleDragMove,this,0,0),drift:fu(this._onHandleDragMove,this),ondragend:fu(this._onHandleDragEnd,this)}),n.add(i)),Sp(i,e,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");B(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Gs(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){mp(this._axisPointerModel,!e&&this._moveAnimation,this._handle,hu(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(!!n){this._dragging=!0;var i=this.updateHandleTransform(hu(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(hu(i)),en(n).lastProp=null,this._doDispatchAxisPointer()}},r.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}]})}},r.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"})}},r.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),es(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r}();function mp(r,t,e,n){u_(en(e).lastProp,n)||(en(e).lastProp=n,t?Ae(e,n,r):(e.stopAnimation(),e.attr(n)))}function u_(r,t){if(G(r)&&G(t)){var e=!0;return T(t,function(n,i){e=e&&u_(r[i],n)}),!!e}else return r===t}function _p(r,t){r[t.get(["label","show"])?"show":"hide"]()}function hu(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Sp(r,t,e){var n=t.get("z"),i=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=e)})}var QL=KL;function JL(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function jL(r,t,e,n,i){var a=e.get("value"),o=f_(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Ns(s.get("padding")||0),u=s.getFont(),f=ms(o,u),h=i.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=i.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(h[1]-=v),g==="middle"&&(h[1]-=v/2),t2(h,c,v,n);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:nr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:p}),z2:10}}function t2(r,t,e,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+t,i)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function f_(r,t,e,n,i){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:Rh(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};T(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),z(o)?a=o.replace("{value}",a):V(o)&&(a=o(s))}return a}function h_(r,t,e){var n=la();return Gf(n,n,e.rotation),Fu(n,n,e.position),ha([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function e2(r,t,e,n,i,a){var o=Z0.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=i.get(["label","margin"]),jL(t,n,i,a,{position:h_(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function r2(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function n2(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var i2=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),f=xp(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var c=JL(a),v=a2[u](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var d=mf(l.model,i);e2(n,e,d,i,a,o)},t.prototype.getHandleTransform=function(e,n,i){var a=mf(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=h_(n.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=xp(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=n[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var c=(u[1]+u[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(QL);function xp(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var a2={line:function(r,t,e){var n=r2([t,e[0]],[t,e[1]],wp(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),i=e[1]-e[0];return{type:"Rect",shape:n2([t-n/2,e[0]],[n,i],wp(r))}}};function wp(r){return r.dim==="x"?0:1}var o2=i2,s2=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",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}},t}(ut),l2=s2,je=gt(),u2=T;function v_(r,t,e){if(!j.node){var n=t.getZr();je(n).records||(je(n).records={}),f2(n,t);var i=je(n).records[r]||(je(n).records[r]={});i.handler=e}}function f2(r,t){if(je(r).initialized)return;je(r).initialized=!0,e("click",ot(bp,"click")),e("mousemove",ot(bp,"mousemove")),e("globalout",v2);function e(n,i){r.on(n,function(a){var o=c2(t);u2(je(r).records,function(s){s&&i(s,a,o.dispatchAction)}),h2(o.pendings,t)})}}function h2(r,t){var e=r.showTip.length,n=r.hideTip.length,i;e?i=r.showTip[e-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function v2(r,t,e){r.handler("leave",null,e)}function bp(r,t,e,n){t.handler(r,e,n)}function c2(r){var t={showTip:[],hideTip:[]},e=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function Mf(r,t){if(!j.node){var e=t.getZr(),n=(je(e).records||{})[r];n&&(je(e).records[r]=null)}}var d2=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=n.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";v_("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,n){Mf("axisPointer",n)},t.prototype.dispose=function(e,n){Mf("axisPointer",n)},t.type="axisPointer",t}(me),p2=d2;function c_(r,t){var e=[],n=r.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=pn(a,r);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)e=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,c=u.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),g=[];g[v]=a.get(d,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(g)||[]}else e=l.dataToPoint(a.getValues(H(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var p=s.getBoundingRect().clone();p.applyTransform(s.transform),e=[p.x+p.width/2,p.y+p.height/2]}return{point:e,el:s}}var Tp=gt();function g2(r,t,e){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||Y(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(!!s){ko(i)&&(i=c_({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=ko(i),u=a.axesInfo,f=s.axesInfo,h=n==="leave"||ko(i),c={},v={},d={list:[],map:{}},g={showPointer:ot(m2,v),showTooltip:ot(_2,d)};T(s.coordSysMap,function(y,m){var _=l||y.containPoint(i);T(s.coordSysAxesInfo[m],function(S,w){var x=S.axis,b=b2(u,S);if(!h&&_&&(!u||b)){var C=b&&b.value;C==null&&!l&&(C=x.pointToData(i)),C!=null&&Cp(S,C,g,!1,c)}})});var p={};return T(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&T(_.axesInfo,function(S,w){var x=v[w];if(S!==y&&x){var b=x.value;_.mapper&&(b=y.axis.scale.parse(_.mapper(b,Mp(S),Mp(y)))),p[y.key]=b}})}),T(p,function(y,m){Cp(f[m],y,g,!0,c)}),S2(v,f,c),x2(d,i,r,o),w2(f,o,e),c}}function Cp(r,t,e,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=y2(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&O(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function y2(r,t){var e=t.axis,n=e.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return T(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);c=v.dataIndices,h=v.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],r,e.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=r-h,g=Math.abs(d);g<=o&&((g=0&&s<0)&&(o=g,s=d,i=h,a.length=0),T(c,function(p){a.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:a,snapToValue:i}}function m2(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function _2(r,t,e,n){var i=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=xa(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function S2(r,t,e){var n=e.axesInfo=[];T(t,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function x2(r,t,e,n){if(ko(t)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function w2(r,t,e){var n=e.getZr(),i="axisPointerLastHighlights",a=Tp(n)[i]||{},o=Tp(n)[i]={};T(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&T(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];T(a,function(u,f){!o[f]&&l.push(u)}),T(o,function(u,f){!a[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function b2(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function Mp(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function ko(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function d_(r){X0.registerAxisPointerClass("CartesianAxisPointer",o2),r.registerComponentModel(l2),r.registerComponentView(p2),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!B(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=lL(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},g2)}function tR(r){Ve(bL),Ve(d_)}var Dp=["x","y","radius","angle","single"],T2=["cartesian2d","polar","singleAxis"];function C2(r){var t=r.get("coordinateSystem");return J(T2,t)>=0}function _r(r){return W(r),r+"Axis"}function M2(r,t){var e=Z(),n=[],i=Z();r.eachComponent({mainType:"dataZoom",query:t},function(f){i.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!i.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){i.set(f.uid,!0),n.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var d=e.get(c);d&&d[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(e.get(h)||e.set(h,[]))[c]=!0})}return n}function p_(r){var t=r.ecModel,e={infoList:[],infoMap:Z()};return r.eachTargetAxis(function(n,i){var a=t.getComponent(_r(n),i);if(!!a){var o=a.getCoordSysModel();if(!!o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}var vu=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),D2=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,i){var a=Ap(e);this.settledOption=a,this.mergeDefaultAndTheme(e,i),this._doInit(a)},t.prototype.mergeOption=function(e){var n=Ap(e);Q(this.option,e,!0),Q(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var i=this.settledOption;T([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=Z(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return T(Dp,function(i){var a=this.getReferringComponents(_r(i),OS);if(!!a.specified){n=!0;var o=new vu;T(a.models,function(s){o.add(s.componentIndex)}),e.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var h=u[0];if(!!h){var c=new vu;if(c.add(h.componentIndex),e.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",Vt).models[0];v&&T(u,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Vt).models[0]&&c.add(d.componentIndex)})}}}a&&T(Dp,function(u){if(!!a){var f=i.findComponents({mainType:_r(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new vu;h.add(f[0].componentIndex),e.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,i=this.get("rangeMode");T([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,i){e==null&&(e=this.ecModel.getComponent(_r(n),i))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(i,a){T(i.indexList,function(o){e.call(n,a,o)})})},t.prototype.getAxisProxy=function(e,n){var i=this.getAxisModel(e,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){W(e&&n!=null);var i=this._targetAxisInfoMap.get(e);if(i&&i.indexMap[n])return this.ecModel.getComponent(_r(e),n)},t.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;T([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(n[a[0]]=i[a[0]]=e[a[0]],n[a[1]]=i[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;T(["start","startValue","end","endValue"],function(i){n[i]=e[i]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(_&&!S&&!w)return!0;_&&(p=!0),S&&(d=!0),w&&(g=!0)}return p&&d&&g})}else Wn(f,function(v){if(a==="empty")l.setData(u=u.map(v,function(g){return s(g)?g:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});Wn(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;Wn(["min","max"],function(i){var a=e.get(i+"Span"),o=e.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Et(n[0]+o,n,[0,100],!0):a!=null&&(o=Et(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(!!e){var i=Rg(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),e[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r}();function k2(r,t,e){var n=[1/0,-1/0];Wn(e,function(o){BD(n,o.getData(),t)});var i=r.getAxisModel(),a=T0(i.axis.scale,i,n).calculate();return[a.min,a.max]}var O2=E2,B2={getTargetSeries:function(r){function t(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(_r(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new O2(i,a,s,r),e.push(o.__dzAxisProxy))});var n=Z();return T(e,function(i){T(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}},N2=B2;function F2(r){r.registerAction("dataZoom",function(t,e){var n=M2(e,t);T(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Ip=!1;function Yh(r){Ip||(Ip=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,N2),F2(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function z2(r){r.registerComponentModel(L2),r.registerComponentView(R2),Yh(r)}var Ce=function(){function r(){}return r}(),g_={};function Bi(r,t){g_[r]=t}function y_(r){return g_[r]}var H2=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;T(this.option.feature,function(n,i){var a=y_(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(e)),Q(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(ut),G2=H2;function V2(r,t,e){var n=t.getBoxLayoutParams(),i=t.get("padding"),a={width:e.getWidth(),height:e.getHeight()},o=Dr(n,a,i);ei(t.get("orient"),r,t.get("itemGap"),o.width,o.height),Lb(r,n,a,i)}function m_(r,t){var e=Ns(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),r=new mt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var W2=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i,a){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),h=[];T(u,function(d,g){h.push(g)}),new Ah(this._featureNames||[],h).add(c).update(c).remove(ot(c,null)).execute(),this._featureNames=h;function c(d,g){var p=h[d],y=h[g],m=u[p],_=new It(m,e,e.ecModel),S;if(a&&a.newTitle!=null&&a.featureName===p&&(m.title=a.newTitle),p&&!y){if(U2(p))S={onclick:_.option.onclick,featureName:p};else{var w=y_(p);if(!w)return;S=new w}f[p]=S}else if(S=f[y],!S)return;S.uid=Pa("toolbox-feature"),S.model=_,S.ecModel=n,S.api=i;var x=S instanceof Ce;if(!p&&y){x&&S.dispose&&S.dispose(n,i);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(n,i);return}v(_,S,p),_.setIconStatus=function(b,C){var M=this.option,D=this.iconPaths;M.iconStatus=M.iconStatus||{},M.iconStatus[b]=C,D[b]&&(C==="emphasis"?ai:oi)(D[b])},S instanceof Ce&&S.render&&S.render(_,n,i,a)}function v(d,g,p){var y=d.getModel("iconStyle"),m=d.getModel(["emphasis","iconStyle"]),_=g instanceof Ce&&g.getIcons?g.getIcons():d.get("icon"),S=d.get("title")||{},w,x;z(_)?(w={},w[p]=_):w=_,z(S)?(x={},x[p]=S):x=S;var b=d.iconPaths={};T(w,function(C,M){var D=Ls(C,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(y.getItemStyle());var A=D.ensureState("emphasis");A.style=m.getItemStyle();var L=new Dt({style:{text:x[M],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});D.setTextContent(L),Is({el:D,componentModel:e,itemName:M,formatterParamsExtra:{title:x[M]}}),D.__title=x[M],D.on("mouseover",function(){var I=m.getItemStyle(),P=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),D.setTextConfig({position:m.get("textPosition")||P}),L.ignore=!e.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",M])!=="emphasis"&&i.leaveEmphasis(this),L.hide()}),(d.get(["iconStatus",M])==="emphasis"?ai:oi)(D),o.add(D),D.on("click",Y(g.onclick,g,n,i,M)),b[M]=D})}V2(o,e,i),o.add(m_(o.getBoundingRect(),e)),l||o.eachChild(function(d){var g=d.__title,p=d.ensureState("emphasis"),y=p.textConfig||(p.textConfig={}),m=d.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!V(_)&&g){var S=_.style||(_.style={}),w=ms(g,Dt.makeFont(S)),x=d.x+o.x,b=d.y+o.y+s,C=!1;b+w.height>i.getHeight()&&(y.position="top",C=!0);var M=C?-5-w.height:s+10;x+w.width/2>i.getWidth()?(y.position=["100%",M],S.align="right"):x-w.width/2<0&&(y.position=[0,M],S.align="left")}})},t.prototype.updateView=function(e,n,i,a){T(this._features,function(o){o instanceof Ce&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(e,n){T(this._features,function(i){i instanceof Ce&&i.remove&&i.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){T(this._features,function(i){i instanceof Ce&&i.dispose&&i.dispose(e,n)})},t.type="toolbox",t}(me);function U2(r){return r.indexOf("my")===0}var Y2=W2,$2=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var i=this.model,a=i.get("name")||e.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=j.browser;if(V(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=a+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var c=l.split(","),v=c[0].indexOf("base64")>-1,d=o?decodeURIComponent(c[1]):c[1];v&&(d=window.atob(d));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var p=d.length,y=new Uint8Array(p);p--;)y[p]=d.charCodeAt(p);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,g)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,w=S.document;w.open("image/svg+xml","replace"),w.write(d),w.close(),S.focus(),w.execCommand("SaveAs",!0,g),document.body.removeChild(_)}}else{var x=i.get("lang"),b='',C=window.open();C.document.write(b),C.document.title=a}},t.getDefaultOption=function(e){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(Ce),Z2=$2,Pp="__ec_magicType_stack__",X2=[["line","bar"],["stack"]],q2=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,n=e.get("icon"),i={};return T(e.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(e){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(e,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(!!Rp[i]){var s={series:[]},l=function(h){var c=h.subType,v=h.id,d=Rp[i](c,v,h,a);d&&(tt(d,h.option),s.series.push(d));var g=h.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var p=g.getAxesByScale("ordinal")[0];if(p){var y=p.dim,m=y+"Axis",_=h.getReferringComponents(m,Vt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var w=0;w<=S;w++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=i==="bar"}}};T(X2,function(h){J(h,i)>=0&&T(h,function(c){a.setIconStatus(c,"normal")})}),a.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=i;i==="stack"&&(u=Q({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Ce),Rp={line:function(r,t,e,n){if(r==="bar")return Q({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,t,e,n){if(r==="line")return Q({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,t,e,n){var i=e.get("stack")===Pp;if(r==="line"||r==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Q({id:t,stack:i?"":Pp},n.get(["option","stack"])||{},!0)}};Ye({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var K2=q2,Zs=new Array(60).join("-"),vi=" ";function Q2(r){var t={},e=[],n=[];return r.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else e.push(i)}else e.push(i)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function J2(r){var t=[];return T(r,function(e,n){var i=e.categoryAxis,a=e.valueAxis,o=a.dim,s=[" "].concat(H(e.series,function(v){return v.name})),l=[i.model.getCategories()];T(e.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(g){return g}))});for(var u=[s.join(vi)],f=0;f=0)return!0}var Df=new RegExp("["+vi+"]+","g");function rI(r){for(var t=r.split(/\n+/g),e=hs(t.shift()).split(Df),n=[],i=H(e,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=e[a];if(o[i])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();e[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),e.push(t)}function uI(r){var t=$h(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return __(e,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function fI(r){S_(r).snapshots=null}function hI(r){return $h(r).length}function $h(r){var t=S_(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var vI=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){fI(e),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(Ce);Ye({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var cI=vI,dI=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],pI=function(){function r(t,e,n){var i=this;this._targetInfoList=[];var a=Ep(e,t);T(gI,function(o,s){(!n||!n.include||J(n.include,s)>=0)&&o(a,i._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=cu[n.brushType](0,a,i);n.__rangeOffset={offset:Np[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){T(t,function(i){var a=this.findTargetInfo(i,e);a&&a!==!0&&T(a.coordSyses,function(o){var s=cu[i.brushType](1,o,i.range,!0);n(i,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){T(t,function(n){var i=this.findTargetInfo(n,e);if(W(!i||i===!0||n.coordRange,"coordRange must be specified when coord index specified."),W(!i||i!==!0||n.range,"range must be specified in global brush."),n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=cu[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?Np[n.brushType](a.values,o.offset,yI(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(t,e){return H(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:ZL(i),isTargetByCursor:qL(i,t,n.coordSysModel),getLinearBrushOtherExtent:XL(i)}})},r.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return i===!0||i&&J(i.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Ep(e,t),a=0;ar[1]&&r.reverse(),r}function Ep(r,t){return Ji(r,t,{includeMainTypes:dI})}var gI={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,i=r.gridModels,a=Z(),o={},s={};!e&&!n&&!i||(T(e,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),T(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),T(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,f=[];T(u.getCartesians(),function(h,c){(J(e,h.getAxis("x").model)>=0||J(n,h.getAxis("y").model)>=0)&&f.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Op.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){T(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Op.geo})})}},kp=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,i=r.gridModel;return!i&&e&&(i=e.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],Op={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(As(r)),t}},cu={lineX:ot(Bp,0),lineY:ot(Bp,1),rect:function(r,t,e,n){var i=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),a=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[Af([i[0],a[0]]),Af([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=H(e,function(o){var s=r?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function Bp(r,t,e,n){W(e.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=e.getAxis(["x","y"][r]),a=Af(H([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var Np={lineX:ot(Fp,0),lineY:ot(Fp,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return H(r,function(n,i){return[n[0]-e[0]*t[i][0],n[1]-e[1]*t[i][1]]})}};function Fp(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function yI(r,t){var e=zp(r),n=zp(t),i=[e[0]/n[0],e[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function zp(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var x_=pI,Lf=T,mI=PS("toolbox-dataZoom_"),_I=function(r){k(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i,a){this._brushController||(this._brushController=new $L(i.getZr()),this._brushController.on("brush",Y(this._onBrush,this)).mount()),wI(e,n,this,a,i),xI(e,n)},t.prototype.onclick=function(e,n,i){SI[i].call(this)},t.prototype.remove=function(e,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var n=e.areas;if(!e.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new x_(Zh(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,f,h){if(h.type==="cartesian2d"){var c=u.brushType;c==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[c],h,f)}}),lI(a,i),this._dispatchZoomAction(i);function s(u,f,h){var c=f.getAxis(u),v=c.model,d=l(u,v,a),g=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=Oa(0,h.slice(),c.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var c;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,f.componentIndex);d&&(c=v)}),c}},t.prototype._dispatchZoomAction=function(e){var n=[];Lf(e,function(i,a){n.push(K(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(e){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},t}(Ce),SI={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(uI(this.ecModel))}};function Zh(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function xI(r,t){r.setIconStatus("back",hI(t)>1?"emphasis":"normal")}function wI(r,t,e,n,i){var a=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new x_(Zh(r),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}Nb("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),i=[],a=Zh(n),o=Ji(r,a);Lf(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Lf(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:mI+u+h};c[f]=h,i.push(c)}return i});var bI=_I;function eR(r){r.registerComponentModel(G2),r.registerComponentView(Y2),Bi("saveAsImage",Z2),Bi("magicType",K2),Bi("dataView",sI),Bi("dataZoom",bI),Bi("restore",cI),Ve(z2)}var TI=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={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}},t}(ut),CI=TI;function w_(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function b_(r){if(!!j.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+i,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*i)/2+Math.SQRT2*i-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function RI(r,t){var e="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+e,i="opacity"+n+",visibility"+n;return t||(n=" "+r+"s "+e,i+=j.transformSupported?","+Xh+n:",left"+n+",top"+n),AI+":"+i}function Hp(r,t,e){var n=r.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!j.transformSupported)return e?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=j.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return e?"top:0;left:0;"+Xh+":"+o+";":[["top",0],["left",0],[T_,o]]}function EI(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont()),e&&t.push("line-height:"+Math.round(e*3/2)+"px");var i=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return i&&a&&t.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),T(["decoration","align"],function(l){var u=r.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function kI(r,t,e){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=Am(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+c),t&&i&&n.push(RI(i,e)),a&&n.push("background-color:"+a),T(["width","color","radius"],function(v){var d="border-"+v,g=tm(d),p=r.get(g);p!=null&&n.push(d+":"+p+(v==="color"?"":"px"))}),n.push(EI(f)),h!=null&&n.push("padding:"+Ns(h).join("px ")+"px"),n.join(";")+";"}function Gp(r,t,e,n,i){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&o1(r,o,document.body,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var OI=function(){function r(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,j.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;Gp(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,f=a.painter.getViewportRoot();fe(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){var e=this._container,n=DI(e,"position"),i=e.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=LI+kI(t,!this._firstShow,this._longHide)+Hp(a[0],a[1],!0)+("border-color:"+yn(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(z(a)&&n.get("trigger")==="item"&&!w_(n)&&(s=PI(n,i,a)),z(t))o.innerHTML=t+s;else if(t){o.innerHTML="",B(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,i=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(e,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,i,a){if(!(a.from===this.uid||j.node||!i.getDom())){var o=Up(a,i);this._ticket="";var s=a.dataByCoordSys,l=UI(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=zI;f.x=a.x,f.y=a.y,f.update(),ft(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,n,i,a))return;var h=c_(a,n),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,i,a){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Up(a,i))},t.prototype._manuallyAxisShowTip=function(e,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(!!u){var f=u.getData(),h=Ni([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,n){var i=e.target,a=this._tooltipModel;if(!!a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(i){this._lastDataByCoordSys=null;var s,l;qi(i,function(u){if(ft(u).dataIndex!=null)return s=u,!0;if(ft(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(e,s,n):l?this._showComponentItemTooltip(e,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var i=e.get("showDelay");n=Y(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(e,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Ni([n.tooltipOption],a),l=this._renderMode,u=[],f=ga("section",{blocks:[],noHeader:!0}),h=[],c=new Gl;T(e,function(m){T(m.dataByAxis,function(_){var S=i.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var x=f_(w,S.axis,i,_.seriesDataIndices,_.valueLabelOpt),b=ga("section",{header:x,noHeader:!Ne(x),sortBlocks:!0,blocks:[]});f.blocks.push(b),T(_.seriesDataIndices,function(C){var M=i.getSeriesByIndex(C.seriesIndex),D=C.dataIndexInside,A=M.getDataParams(D);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=Rh(S.axis,{value:w}),A.axisValueLabel=x,A.marker=c.makeTooltipMarker("item",yn(A.color),l);var L=Yc(M.formatTooltip(D,!0,null)),I=L.frag;if(I){var P=Ni([M],a).get("valueFormatter");b.blocks.push(P?O({valueFormatter:P},I):I)}L.text&&h.push(L.text),u.push(A)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,d=s.get("order"),g=Qc(f,c,l,d,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var p=l==="richText"?` `:"
",y=h.join(p);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(e,n,i){var a=this._ecModel,o=ft(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=e.positionDefault,g=Ni([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=g.get("trigger");if(!(p!=null&&p!=="item")){var y=u.getDataParams(f,h),m=new Gl;y.marker=m.makeTooltipMarker("item",yn(y.color),v);var _=Yc(u.formatTooltip(f,!1,h)),S=g.get("order"),w=g.get("valueFormatter"),x=_.frag,b=x?Qc(w?O({valueFormatter:w},x):x,m,v,S,a.get("useUTC"),g.get("textStyle")):_.text,C="item_"+u.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,b,y,C,e.offsetX,e.offsetY,e.position,e.target,m)}),i({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,i){var a=ft(n),o=a.tooltipConfig,s=o.option||{};if(z(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(a.componentMainType,a.componentIndex);f&&u.push(f),u.push({formatter:s.content});var h=e.positionDefault,c=Ni(u,this._tooltipModel,h?{position:h}:null),v=c.get("content"),d=Math.random()+"",g=new Gl;this._showOrMove(c,function(){var p=K(c.get("formatterParams")||{});this._showTooltipContent(c,v,p,d,e.offsetX,e.offsetY,e.position,n,g)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,i,a,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");l=l||e.get("position");var v=n,d=this._getNearestPoint([o,s],i,e.get("trigger"),e.get("borderColor")),g=d.color;if(c)if(z(c)){var p=e.ecModel.get("useUTC"),y=B(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=Rs(y.axisValue,v,p)),v=em(v,i,!0)}else if(V(c)){var _=Y(function(S,w){S===this._ticket&&(h.setContent(w,f,e,g,l),this._updatePosition(e,l,o,s,h,i,u))},this);this._ticket=a,v=c(i,a,_)}else v=c;h.setContent(v,f,e,g,l),h.show(e,g),this._updatePosition(e,l,o,s,h,i,u)}},t.prototype._getNearestPoint=function(e,n,i,a){if(i==="axis"||B(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!B(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),V(n)&&(n=n([i,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),B(n))i=Tt(n[0],u),a=Tt(n[1],f);else if(G(n)){var g=n;g.width=h[0],g.height=h[1];var p=Dr(g,{width:u,height:f});i=p.x,a=p.y,c=null,v=null}else if(z(n)&&l){var y=WI(n,d,h,e.get("borderWidth"));i=y[0],a=y[1]}else{var y=GI(i,a,o,u,f,c?null:20,v?null:20);i=y[0],a=y[1]}if(c&&(i-=Yp(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=Yp(v)?h[1]/2:v==="bottom"?h[1]:0),w_(e)){var y=VI(i,a,o,u,f);i=y[0],a=y[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===e.length;return o&&T(i,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&T(u,function(c,v){var d=h[v]||{},g=c.seriesDataIndices||[],p=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&g.length===p.length,o&&T(g,function(y,m){var _=p[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&T(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){j.node||!n.getDom()||(es(this,"_updatePosition"),this._tooltipContent.dispose(),Mf("itemTooltip",n))},t.type="tooltip",t}(me);function Ni(r,t,e){var n=t.ecModel,i;e?(i=new It(e,n,n),i=new It(t.option,i,n)):i=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof It&&(o=o.get("tooltip",!0)),z(o)&&(o={formatter:o}),o&&(i=new It(o,i,n)))}return i}function Up(r,t){return r.dispatchAction||Y(t.dispatchAction,t)}function GI(r,t,e,n,i,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[r,t]}function VI(r,t,e,n,i){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,i)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function WI(r,t,e,n){var i=e[0],a=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function Yp(r){return r==="center"||r==="middle"}function UI(r,t,e){var n=Yf(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Da(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(!!o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ft(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var YI=HI;function rR(r){Ve(d_),r.registerComponentModel(CI),r.registerComponentView(YI),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Wt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Wt)}var $I=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(ut),ZI=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=rt(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Dt({style:nr(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=e.get("subtext"),v=new Dt({style:nr(s,{text:c,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),g=e.get("sublink"),p=e.get("triggerEvent",!0);f.silent=!d&&!p,v.silent=!g&&!p,d&&f.on("click",function(){Dc(d,"_"+e.get("target"))}),g&&v.on("click",function(){Dc(g,"_"+e.get("subtarget"))}),ft(f).eventData=ft(v).eventData=p?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(f),c&&a.add(v);var y=a.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Dr(m,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),v.setStyle(S),y=a.getBoundingRect();var w=_.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var b=new mt({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});a.add(b)}},t.type="title",t}(me);function nR(r){r.registerComponentModel($I),r.registerComponentView(ZI)}var XI=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},qI=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,i=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),B(n)&&T(n,function(a,o){z(a)&&(a={type:a}),n[o]=Q(a,XI(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={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}},t}(ut),If=qI,Hn=ot,Pf=T,_o=wt,KI=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new _o),this.group.add(this._selectorGroup=new _o),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,n,i,l,s,u);var f=e.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=e.get("padding"),v=Dr(f,h,c),d=this.layoutInner(e,o,v,a,l,u),g=Dr(tt({width:d.width,height:d.height},f),h,c);this.group.x=g.x-d.x,this.group.y=g.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=m_(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this.getContentGroup(),f=Z(),h=n.get("selectedMode"),c=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Pf(n.getData(),function(v,d){var g=v.get("name");if(!this.newlineDisabled&&(g===""||g===` `)){var p=new _o;p.newline=!0,u.add(p);return}var y=i.getSeriesByName(g)[0];if(!f.get(g)){if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,g,d,v,n,e,_,w,S,h,a);x.on("click",Hn($p,g,null,a,c)).on("mouseover",Hn(Rf,y.name,null,a,c)).on("mouseout",Hn(Ef,y.name,null,a,c)),f.set(g,!0)}else i.eachRawSeries(function(b){if(!f.get(g)&&b.legendVisualProvider){var C=b.legendVisualProvider;if(!C.containName(g))return;var M=C.indexOfName(g),D=C.getItemVisual(M,"style"),A=C.getItemVisual(M,"legendIcon"),L=tr(D.fill);L&&L[3]===0&&(L[3]=.2,D=O(O({},D),{fill:ps(L,"rgba")}));var I=this._createItem(b,g,d,v,n,e,{},D,A,h,a);I.on("click",Hn($p,null,g,a,c)).on("mouseover",Hn(Rf,null,g,a,c)).on("mouseout",Hn(Ef,null,g,a,c)),f.set(g,!0)}},this);f.get(g)||console.warn(g+" series not exists. Legend data should be same with series name or data name.")}},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(e,n,i,a,o){var s=this.getSelectorGroup();Pf(e,function(u){var f=u.type,h=new Dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);ih(h,{normal:c,emphasis:v},{defaultText:u.title}),Zo(h)})},t.prototype._createItem=function(e,n,i,a,o,s,l,u,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),p=o.isSelected(n),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=QI(f,a,l,u,v,p,c),w=new _o,x=a.getModel("textStyle");if(V(e.getLegendIcon)&&(!_||_==="inherit"))w.add(e.getLegendIcon({itemWidth:d,itemHeight:g,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;w.add(JI({itemWidth:d,itemHeight:g,icon:f,iconRotate:b,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var C=s==="left"?d+5:-5,M=s,D=o.get("formatter"),A=n;z(D)&&D?A=D.replace("{name}",n!=null?n:""):V(D)&&(A=D(n));var L=a.get("inactiveColor");w.add(new Dt({style:nr(x,{text:A,x:C,y:g/2,fill:p?x.getTextColor():L,align:M,verticalAlign:"middle"})}));var I=new mt({shape:w.getBoundingRect(),invisible:!0}),P=a.getModel("tooltip");return P.get("show")&&Is({el:I,componentModel:o,itemName:n,itemTooltipOption:P.option}),w.add(I),w.eachChild(function(E){E.silent=!0}),I.silent=!h,this.getContentGroup().add(w),Zo(w),w.__legendDataIndex=i,w},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ei(e.get("orient"),l,e.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){ei("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),g=e.getOrient().index,p=g===0?"width":"height",y=g===0?"height":"width",m=g===0?"y":"x";s==="end"?v[g]+=f[p]+d:h[g]+=c[p]+d,v[1-g]+=f[y]/2-c[y]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[p]=f[p]+d+c[p],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-g]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(me);function QI(r,t,e,n,i,a,o){function s(p,y){p.lineWidth==="auto"&&(p.lineWidth=y.lineWidth>0?2:0),Pf(p,function(m,_){p[_]==="inherit"&&(p[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:uf(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:e).opacity),s(u,n);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var d=t.get("inactiveBorderWidth"),g=u[f];u.lineWidth=d==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function JI(r){var t=r.icon||"roundRect",e=Ar(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function $p(r,t,e,n){Ef(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r!=null?r:t}),Rf(r,t,e,n)}function M_(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,i=t.length;ni[o],p=[-v.x,-v.y];n||(p[a]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=rt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(g){var S=e.get("pageButtonPosition",!0);S==="end"?m[a]+=i[o]-d[o]:y[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,f.setPosition(p),h.setPosition(y),c.setPosition(m);var w={x:0,y:0};if(w[o]=g?i[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-a]),h.__rectSize=i[o],g){var x={x:0,y:0};x[o]=Math.max(i[o]-d[o]-_,0),x[s]=w[s],h.setClipPath(new mt({shape:x})),h.__rectSize=x[o]}else c.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Ae(f,{x:b.contentPosition[0],y:b.contentPosition[1]},g?e:null),this._updatePageInfoView(e,b),w},t.prototype._pageGo=function(e,n,i){var a=this._getPageInfo(n)[e];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var i=this._controllerGroup;T(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=n[h]!=null,v=i.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=i.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",z(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=du[o],l=pu[o],u=this._findTargetItemIndex(n),f=i.children(),h=f[u],c=f.length,v=c?1:0,d={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var g=S(h);d.contentPosition[o]=-g.s;for(var p=u+1,y=g,m=g,_=null;p<=c;++p)_=S(f[p]),(!_&&m.e>y.s+a||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var p=u-1,y=g,m=g,_=null;p>=-1;--p)_=S(f[p]),(!_||!w(m,_.s))&&y.i=b&&x.s<=b+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(n=s)}),n!=null?n:a},t.type="legend.scroll",t}(D_),iP=nP;function aP(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function oP(r){Ve(A_),r.registerComponentModel(rP),r.registerComponentView(iP),aP(r)}function iR(r){Ve(A_),Ve(oP)}var sP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=oh(ba.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(ba),lP=sP,qh=gt();function uP(r,t,e){qh(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=e)})}function fP(r,t){for(var e=qh(r).coordSysRecordMap,n=e.keys(),i=0;in[e+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function pP(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=qh(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=Z());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=p_(a);T(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,hP(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=Z());f.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){L_(i,a);return}var f=dP(l);o.enable(f.controlType,f.opt),o.setPointerChecker(a.containsPoint),Gs(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var gP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,n,i){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),uP(i,e,{pan:Y(gu.pan,this),zoom:Y(gu.zoom,this),scrollMove:Y(gu.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){fP(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Uh),gu={zoom:function(r,t,e,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(!!o){var s=yu[t](null,[n.originX,n.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Oa(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:qp(function(r,t,e,n,i,a){var o=yu[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:qp(function(r,t,e,n,i,a){var o=yu[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function qp(r){return function(t,e,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(!!s){var l=r(o,s,t,e,n,i);if(Oa(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var yu={grid:function(r,t,e,n,i){var a=e.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,n,i){var a=e.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,n,i){var a=e.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},yP=gP;function mP(r){Yh(r),r.registerComponentModel(lP),r.registerComponentView(yP),pP(r)}var _P=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=oh(ba.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(ba),SP=_P,zi=mt,Kp=7,xP=1,mu=30,wP=7,Hi="horizontal",Qp="vertical",bP=5,TP=["line","bar","candlestick","scatter"],CP={easing:"cubicOut",duration:100,delay:0},MP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,n){this.api=n,this._onBrush=Y(this._onBrush,this),this._onBrushEnd=Y(this._onBrushEnd,this)},t.prototype.render=function(e,n,i,a){if(r.prototype.render.apply(this,arguments),Gs(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){es(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new wt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,n=this.api,i=e.get("brushSelect"),a=i?wP:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Hi?{right:s.width-o.x-o.width,top:s.height-mu-Kp-a,width:o.width,height:mu}:{right:Kp,top:o.y,width:mu,height:o.height},u=Ra(e.option);T(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=Dr(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===Qp&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Hi&&!o?{scaleY:l?1:-1,scaleX:1}:i===Hi&&o?{scaleY:l?1:-1,scaleX:-1}:i===Qp&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=n.x-u.x,e.y=n.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=e.get("brushSelect");i.add(new zi({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new zi({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Y(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var n=this._size,i=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim?a.getShadowDim():e.otherDim;if(s==null)return;var l=this._shadowPolygonPts,u=this._shadowPolylinePts;if(o!==this._shadowData||s!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(s),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var c=[0,n[1]],v=[0,n[0]],d=[[n[0],0],[0,0]],g=[],p=v[1]/(o.count()-1),y=0,m=Math.round(o.count()/n[0]),_;o.each([s],function(C,M){if(m>0&&M%m){y+=p;return}var D=C==null||isNaN(C)||C==="",A=D?0:Et(C,f,c,!0);D&&!_&&M?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!D&&_&&(d.push([y,0]),g.push([y,0])),d.push([y,A]),g.push([y,A]),y+=p,_=D}),l=this._shadowPolygonPts=d,u=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=s,this._shadowSize=[n[0],n[1]];var S=this.dataZoomModel;function w(C){var M=S.getModel(C?"selectedDataBackground":"dataBackground"),D=new wt,A=new Ds({shape:{points:l},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new La({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(A),D.add(L),D}for(var x=0;x<3;x++){var b=w(x===1);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();T(l,function(u){if(!i&&!(n!==!0&&J(TP,u.get("type"))<0)){var f=a.getComponent(_r(o),s).axis,h=DP(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),i={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:c}}},this)},this),i}},t.prototype._renderHandle=function(){var e=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),c=n.filler=new zi({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new zi({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:xP,fill:"rgba(0,0,0,0)"}})),T([0,1],function(_){var S=l.get("handleIcon");!ns[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S,De("handleIcon now needs 'path://' prefix when using a path string"));var w=Ar(S,-1,0,2,2,null,!0);w.attr({cursor:Jp(this._orient),draggable:!0,drift:Y(this._onDragMove,this,_),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),b=l.get("handleSize");this._handleHeight=Tt(b,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Zo(w);var C=l.get("handleColor");C!=null&&(w.style.fill=C),o.add(i[_]=w);var M=l.getModel("textStyle");e.add(a[_]=new Dt({silent:!0,invisible:!0,style:nr(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var v=c;if(h){var d=Tt(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new mt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),p=d*.8,y=n.moveHandleIcon=Ar(l.get("moveHandleIcon"),-p/2,-p/2,p,p,"#fff",!0);y.silent=!0,y.y=s[1]+d/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=n.moveZone=new mt({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:Jp(this._orient),drift:Y(this._onDragMove,this,"all"),ondragstart:Y(this._showDataInfo,this,!0),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Et(e[0],[0,100],n,!0),Et(e[1],[0,100],n,!0)]},t.prototype._updateInterval=function(e,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Oa(n,a,o,i.get("zoomLock")?"all":e,s.minSpan!=null?Et(s.minSpan,l,o,!0):null,s.maxSpan!=null?Et(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Yi([Et(a[0],o,l,!0),Et(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var n=this._displayables,i=this._handleEnds,a=Yi(i.slice()),o=this._size;T([0,1],function(v){var d=n.handles[v],g=this._handleHeight;d.attr({scaleX:g/2,scaleY:g/2,x:i[v]+(v?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;fn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var n=e.offsetX,i=e.offsetY;this._brushStart=new X(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(!!this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Yi([Et(i.x,o,s,!0),Et(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(ni(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new zi({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,n),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?CP:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var e,n=p_(this.dataZoomModel).infoList;if(!e&&n.length){var i=n[0].model.coordinateSystem;e=i.getRect&&i.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(Uh);function DP(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function Jp(r){return r==="vertical"?"ns-resize":"ew-resize"}var AP=MP;function LP(r){r.registerComponentModel(SP),r.registerComponentView(AP),Yh(r)}function aR(r){Ve(mP),Ve(LP)}var IP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,n,i){r.prototype.init.call(this,e,n,i),this._sourceManager=new wm(this),qc(this)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),qc(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Ge},t}(ut),PP=function(r){k(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t}(me);function oR(r){r.registerComponentModel(IP),r.registerComponentView(PP)}function jp(r,t,e){var n=Sn.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",r)),n.width=i*e,n.height=a*e,n}var RP=function(r){k(t,r);function t(e,n,i){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Wo,typeof e=="string"?o=jp(e,n,i):G(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(og(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=jp("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new it(0,0,0,0);function f(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new it(0,0,0,0);_.copy(m),o.push(_)}else{for(var S=!1,w=1/0,x=0,b=0;b=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)C=p.__endIndex;else for(var D=v.dpr,A=0;A0&&t>i[0]){for(l=0;lt);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},r.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?So:0),this._needsManuallyCompositing),f.__builtin__||on("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),a=f),i.__dirty&ne&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,T(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?Q(n[t],e,!0):n[t]=e;for(var i=0;i