/*! ***************************************************************************** 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 cf=function(r,t){return cf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])},cf(r,t)};function O(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");cf(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var AS=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),IS=function(){function r(){this.browser=new AS,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}(),dn=new IS;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(dn.wxa=!0,dn.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?dn.worker=!0:typeof navigator=="undefined"?(dn.node=!0,dn.svgSupported=!0):LS(navigator.userAgent,dn);function LS(r,t){var e=t.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(e.firefox=!0,e.version=n[1]),a&&(e.ie=!0,e.version=a[1]),i&&(e.edge=!0,e.version=i[1],e.newEdge=+i[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 tt=dn,Ph=12,PS="sans-serif",An=Ph+"px "+PS,RS=20,ES=100,kS="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function OS(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",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function ob(r,t,e){for(var n=e?"invTrans":"trans",a=t[n],i=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&&i&&c===i[h]&&v===i[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(t.srcCoords=o,t[n]=e?jv(s,o):jv(o,s))}function Em(r){return r.nodeName.toUpperCase()==="CANVAS"}var sb=/([&<>"'])/g,lb={"&":"&","<":"<",">":">",'"':""","'":"'"};function ue(r){return r==null?"":(r+"").replace(sb,function(t,e){return lb[e]})}var ub=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Bl=[],fb=tt.browser.firefox&&+tt.browser.version.split(".")[0]<39;function yf(r,t,e,n){return e=e||{},n?ec(r,t,e):fb&&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):ec(r,t,e),e}function ec(r,t,e){if(tt.domSupported&&r.getBoundingClientRect){var n=t.clientX,a=t.clientY;if(Em(r)){var i=r.getBoundingClientRect();e.zrX=n-i.left,e.zrY=a-i.top;return}else if(mf(Bl,r,n,a)){e.zrX=Bl[0],e.zrY=Bl[1];return}}e.zrX=e.zrY=0}function Oh(r){return r||window.event}function ge(r,t,e){if(t=Oh(t),t.zrX!=null)return t;var n=t.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&yf(r,o,t,e)}else{yf(r,t,t,e);var i=hb(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&ub.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function hb(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var a=Math.abs(n!==0?n:e),i=n>0?-1:n<0?1:e>0?-1:1;return 3*a*i}function _f(r,t,e,n){r.addEventListener(t,e,n)}function vb(r,t,e,n){r.removeEventListener(t,e,n)}var _a=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function rc(r){return r.which===2||r.which===3}var cb=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 a=t.touches;if(!!a){for(var i={points:[],touches:[],target:e,event:t},o=0,s=a.length;o1&&n&&n.length>1){var i=nc(n)/nc(a);!isFinite(i)&&(i=1),t.pinchScale=i;var o=db(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Sa(){return[1,0,0,1,0,0]}function Bh(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function km(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function va(r,t,e){var n=t[0]*e[0]+t[2]*e[1],a=t[1]*e[0]+t[3]*e[1],i=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Sf(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Nh(r,t,e){var n=t[0],a=t[2],i=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(e),f=Math.cos(e);return r[0]=n*f+o*u,r[1]=-n*u+o*f,r[2]=a*f+s*u,r[3]=-a*u+f*s,r[4]=f*i+u*l,r[5]=f*l-u*i,r}function pb(r,t,e){var n=e[0],a=e[1];return r[0]=t[0]*n,r[1]=t[1]*a,r[2]=t[2]*n,r[3]=t[3]*a,r[4]=t[4]*n,r[5]=t[5]*a,r}function el(r,t){var e=t[0],n=t[2],a=t[4],i=t[1],o=t[3],s=t[5],l=e*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=e*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-e*s)*l,r):null}function qk(r){var t=Sa();return km(t,r),t}var gb=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(!!t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,n){t.x=e,t.y=n},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},r.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},r.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},r.scaleAndAdd=function(t,e,n,a){t.x=e.x+n.x*a,t.y=e.y+n.y*a},r.lerp=function(t,e,n,a){var i=1-a;t.x=i*e.x+a*n.x,t.y=i*e.y+a*n.y},r}(),U=gb,vo=Math.min,co=Math.max,Ur=new U,Yr=new U,$r=new U,Zr=new U,Va=new U,Ha=new U,mb=function(){function r(t,e,n,a){n<0&&(t=t+n,n=-n),a<0&&(e=e+a,a=-a),this.x=t,this.y=e,this.width=n,this.height=a}return r.prototype.union=function(t){var e=vo(t.x,this.x),n=vo(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=co(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=co(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,a=t.height/e.height,i=Sa();return Sf(i,i,[-e.x,-e.y]),pb(i,i,[n,a]),Sf(i,i,[t.x,t.y]),i},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var n=this,a=n.x,i=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,u=t.x+t.width,f=t.y,h=t.y+t.height,c=!(id&&(d=_,gd&&(d=S,m=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 a=n[0],i=n[3],o=n[4],s=n[5];t.x=e.x*a+o,t.y=e.y*i+s,t.width=e.width*a,t.height=e.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Ur.x=$r.x=e.x,Ur.y=Zr.y=e.y,Yr.x=Zr.x=e.x+e.width,Yr.y=$r.y=e.y+e.height,Ur.transform(n),Zr.transform(n),Yr.transform(n),$r.transform(n),t.x=vo(Ur.x,Yr.x,$r.x,Zr.x),t.y=vo(Ur.y,Yr.y,$r.y,Zr.y);var l=co(Ur.x,Yr.x,$r.x,Zr.x),u=co(Ur.y,Yr.y,$r.y,Zr.y);t.width=l-t.x,t.height=u-t.y},r}(),st=mb,Om="silent";function yb(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:_b}}function _b(){_a(this.event)}var Sb=function(r){O(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}(Ce),Wa=function(){function r(t,e){this.x=t,this.y=e}return r}(),bb=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Fl=new st(0,0,0,0),Bm=function(r){O(t,r);function t(e,n,a,i,o){var s=r.call(this)||this;return s._hovered=new Wa(0,0),s.storage=e,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new Sb,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new eb(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(M(bb,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,a=e.zrY,i=Nm(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Wa(n,a):this.findHover(n,a),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 Wa(0,0)},t.prototype.dispatch=function(e,n){var a=this[e];a&&a.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,a){e=e||{};var i=e.target;if(!(i&&i.silent)){for(var o="on"+n,s=yb(n,e,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(n,s),i=i.__hostTarget?i.__hostTarget:i.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,a){var i=this.storage.getDisplayList(),o=new Wa(e,n);if(ac(i,o,e,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new st(e-u,n-u,l,l),h=i.length-1;h>=0;h--){var c=i[h];c!==a&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(Fl.copy(c.getBoundingRect()),c.transform&&Fl.applyTransform(c.transform),Fl.intersect(f)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,g=Math.PI*2,p=0;p4)return;this._downPoint=null}this.dispatchToElement(i,r,t)}});function xb(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1;n.silent&&(a=!0)}var s=n.__hostTarget;n=s||n.parent}return a?Om:!0}return!1}function ac(r,t,e,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=xb(o,e,n))&&(!t.topTarget&&(t.topTarget=o),s!==Om)){t.target=o;break}}}function Nm(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var wb=Bm,Fm=32,Ua=7;function Tb(r){for(var t=0;r>=Fm;)t|=r&1,r>>=1;return r+t}function ic(r,t,e,n){var a=t+1;if(a===e)return 1;if(n(r[a++],r[t])<0){for(;a=0;)a++;return a-t}function Cb(r,t,e){for(e--;t>>1,a(i,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]=i}}function zl(r,t,e,n,a,i){var o=0,s=0,l=1;if(i(r,t[e+a])>0){for(s=n-a;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o>>1);i(r,t[e+f])>0?o=f+1:l=f}return l}function Gl(r,t,e,n,a,i){var o=0,s=0,l=1;if(i(r,t[e+a])<0){for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o>>1);i(r,t[e+f])<0?l=f:o=f+1}return l}function Mb(r,t){var e=Ua,n,a,i=0;r.length;var o=[];n=[],a=[];function s(v,d){n[i]=v,a[i]=d,i+=1}function l(){for(;i>1;){var v=i-2;if(v>=1&&a[v-1]<=a[v]+a[v+1]||v>=2&&a[v-2]<=a[v]+a[v-1])a[v-1]a[v+1])break;f(v)}}function u(){for(;i>1;){var v=i-2;v>0&&a[v-1]=Ua||w>=Ua);if(T)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),d===1){for(m=0;m=0;m--)r[b+m]=r[x+m];r[S]=o[_];return}for(var w=e;;){var T=0,C=0,A=!1;do if(t(o[_],r[y])<0){if(r[S--]=r[y--],T++,C=0,--d===0){A=!0;break}}else if(r[S--]=o[_--],C++,T=0,--p===1){A=!0;break}while((T|C)=0;m--)r[b+m]=r[x+m];if(d===0){A=!0;break}}if(r[S--]=o[_--],--p===1){A=!0;break}if(C=p-zl(r[y],o,0,p,p-1,t),C!==0){for(S-=C,_-=C,p-=C,b=S+1,x=_+1,m=0;m=Ua||C>=Ua);if(A)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),p===1){for(S-=d,y-=d,b=S+1,x=y+1,m=d-1;m>=0;m--)r[b+m]=r[x+m];r[S]=o[_]}else{if(p===0)throw new Error;for(x=S-(p-1),m=0;ms&&(l=s),oc(r,e,e+l,e+i,t),i=l}o.pushRun(e,i),o.mergeRuns(),a-=i,e+=i}while(a!==0);o.forceMergeRuns()}}var fe=1,hi=2,na=4,sc=!1;function Vl(){sc||(sc=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function lc(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var Db=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=lc}return r.prototype.traverse=function(t,e){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(Vl(),f.z=0),isNaN(f.z2)&&(Vl(),f.z2=0),isNaN(f.zlevel)&&(Vl(),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(a,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}(),Ab=Db,zm;zm=tt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var bf=zm,rs={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-rs.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?rs.bounceIn(r*2)*.5:rs.bounceOut(r*2-1)*.5+.5}},Gm=rs,po=Math.pow,Nr=Math.sqrt,ys=1e-8,Vm=1e-4,uc=Nr(3),go=1/3,Ye=Ra(),_e=Ra(),ca=Ra();function Er(r){return r>-ys&&rys||r<-ys}function Lt(r,t,e,n,a){var i=1-a;return i*i*(i*r+3*a*t)+a*a*(a*n+3*i*e)}function fc(r,t,e,n,a){var i=1-a;return 3*(((t-r)*i+2*(e-t)*a)*i+(n-e)*a*a)}function _s(r,t,e,n,a,i){var o=n+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-a,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Er(f)&&Er(h))if(Er(s))i[0]=0;else{var d=-l/s;d>=0&&d<=1&&(i[v++]=d)}else{var g=h*h-4*f*c;if(Er(g)){var p=h/f,d=-s/o+p,m=-p/2;d>=0&&d<=1&&(i[v++]=d),m>=0&&m<=1&&(i[v++]=m)}else if(g>0){var y=Nr(g),_=f*s+1.5*o*(-h+y),S=f*s+1.5*o*(-h-y);_<0?_=-po(-_,go):_=po(_,go),S<0?S=-po(-S,go):S=po(S,go);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(i[v++]=d)}else{var x=(2*f*s-3*o*h)/(2*Nr(f*f*f)),b=Math.acos(x)/3,w=Nr(f),T=Math.cos(b),d=(-s-2*w*T)/(3*o),m=(-s+w*(T+uc*Math.sin(b)))/(3*o),C=(-s+w*(T-uc*Math.sin(b)))/(3*o);d>=0&&d<=1&&(i[v++]=d),m>=0&&m<=1&&(i[v++]=m),C>=0&&C<=1&&(i[v++]=C)}}return v}function Wm(r,t,e,n,a){var i=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,l=0;if(Er(o)){if(Hm(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var f=i*i-4*o*s;if(Er(f))a[0]=-i/(2*o);else if(f>0){var h=Nr(f),u=(-i+h)/(2*o),c=(-i-h)/(2*o);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function zr(r,t,e,n,a,i){var o=(t-r)*a+r,s=(e-t)*a+t,l=(n-e)*a+e,u=(s-o)*a+o,f=(l-s)*a+s,h=(f-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=h,i[4]=h,i[5]=f,i[6]=l,i[7]=n}function Um(r,t,e,n,a,i,o,s,l,u,f){var h,c=.005,v=1/0,d,g,p,m;Ye[0]=l,Ye[1]=u;for(var y=0;y<1;y+=.05)_e[0]=Lt(r,e,a,o,y),_e[1]=Lt(t,n,i,s,y),p=ha(Ye,_e),p=0&&p=0&&u<=1&&(a[l++]=u)}}else{var f=o*o-4*i*s;if(Er(f)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(f>0){var h=Nr(f),u=(-o+h)/(2*i),c=(-o-h)/(2*i);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function Ym(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function Ss(r,t,e,n,a){var i=(t-r)*n+r,o=(e-t)*n+t,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=e}function $m(r,t,e,n,a,i,o,s,l){var u,f=.005,h=1/0;Ye[0]=o,Ye[1]=s;for(var c=0;c<1;c+=.05){_e[0]=Wt(r,e,a,c),_e[1]=Wt(t,n,i,c);var v=ha(Ye,_e);v=0&&v=1?1:_s(0,n,i,1,l,s)&&Lt(0,a,o,1,s[0])}}}var Eb=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||Jt,this.ondestroy=t.ondestroy||Jt,this.onrestart=t.onrestart||Jt,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,a=t-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%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=$(t)?t:Gm[t]||Zm(t)},r}(),kb=Eb,Xm=function(){function r(t){this.value=t}return r}(),Ob=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new Xm(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}(),Bb=function(){function r(t){this._list=new Ob,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var n=this._list,a=this._map,i=null;if(a[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new Xm(e),s.key=t,n.insertEntry(s),a[t]=s}return i},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}(),Ji=Bb,vc={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 Oe(r){return r=Math.round(r),r<0?0:r>255?255:r}function Nb(r){return r=Math.round(r),r<0?0:r>360?360:r}function ki(r){return r<0?0:r>1?1:r}function Hl(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Oe(parseFloat(t)/100*255):Oe(parseInt(t,10))}function wn(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ki(parseFloat(t)/100):ki(parseFloat(t))}function Wl(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 kr(r,t,e){return r+(t-r)*e}function pe(r,t,e,n,a){return r[0]=t,r[1]=e,r[2]=n,r[3]=a,r}function xf(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var qm=new Ji(20),mo=null;function Gn(r,t){mo&&xf(mo,t),mo=qm.put(r,mo||t.slice())}function xe(r,t){if(!!r){t=t||[];var e=qm.get(r);if(e)return xf(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in vc)return xf(t,vc[n]),Gn(r,t),t;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){pe(t,0,0,0,1);return}return pe(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),Gn(r,t),t}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){pe(t,0,0,0,1);return}return pe(t,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),Gn(r,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){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?pe(t,+u[0],+u[1],+u[2],1):pe(t,0,0,0,1);f=wn(u.pop());case"rgb":if(u.length>=3)return pe(t,Hl(u[0]),Hl(u[1]),Hl(u[2]),u.length===3?f:wn(u[3])),Gn(r,t),t;pe(t,0,0,0,1);return;case"hsla":if(u.length!==4){pe(t,0,0,0,1);return}return u[3]=wn(u[3]),wf(u,t),Gn(r,t),t;case"hsl":if(u.length!==3){pe(t,0,0,0,1);return}return wf(u,t),Gn(r,t),t;default:return}}pe(t,0,0,0,1)}}function wf(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=wn(r[1]),a=wn(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return t=t||[],pe(t,Oe(Wl(o,i,e+1/3)*255),Oe(Wl(o,i,e)*255),Oe(Wl(o,i,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function Fb(r){if(!!r){var t=r[0]/255,e=r[1]/255,n=r[2]/255,a=Math.min(t,e,n),i=Math.max(t,e,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var f=((i-t)/6+o/2)/o,h=((i-e)/6+o/2)/o,c=((i-n)/6+o/2)/o;t===i?l=c-h:e===i?l=1/3+f-c:n===i&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function cc(r,t){var e=xe(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 Ea(e,e.length===4?"rgba":"rgb")}}function Kk(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var n=r*(t.length-1),a=Math.floor(n),i=Math.ceil(n),o=t[a],s=t[i],l=n-a;return e[0]=Oe(kr(o[0],s[0],l)),e[1]=Oe(kr(o[1],s[1],l)),e[2]=Oe(kr(o[2],s[2],l)),e[3]=ki(kr(o[3],s[3],l)),e}}function zb(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),a=Math.floor(n),i=Math.ceil(n),o=xe(t[a]),s=xe(t[i]),l=n-a,u=Ea([Oe(kr(o[0],s[0],l)),Oe(kr(o[1],s[1],l)),Oe(kr(o[2],s[2],l)),ki(kr(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}function Qk(r,t,e,n){var a=xe(r);if(r)return a=Fb(a),t!=null&&(a[0]=Nb(t)),e!=null&&(a[1]=wn(e)),n!=null&&(a[2]=wn(n)),Ea(wf(a),"rgba")}function Jk(r,t){var e=xe(r);if(e&&t!=null)return e[3]=ki(t),Ea(e,"rgba")}function Ea(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 bs(r,t){var e=xe(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var xs=Math.round;function jk(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=xe(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t==null?1:t}}var dc=1e-4;function tO(r){return r-dc}function yo(r){return xs(r*1e3)/1e3}function pc(r){return xs(r*1e4)/1e4}function eO(r){return"matrix("+yo(r[0])+","+yo(r[1])+","+yo(r[2])+","+yo(r[3])+","+pc(r[4])+","+pc(r[5])+")"}var rO={left:"start",right:"end",center:"middle",middle:"middle"};function nO(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function aO(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function iO(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function Gb(r){return r&&!!r.image}function Vb(r){return r&&!!r.svgElement}function oO(r){return Gb(r)||Vb(r)}function Hb(r){return r.type==="linear"}function Wb(r){return r.type==="radial"}function sO(r){return r&&(r.type==="linear"||r.type==="radial")}function lO(r){return"url(#"+r+")"}function uO(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function fO(r){var t=r.x||0,e=r.y||0,n=(r.rotation||0)*jo,a=nt(r.scaleX,1),i=nt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+xs(o*jo)+"deg, "+xs(s*jo)+"deg)"),l.join(" ")}var hO=function(){return tt.hasGlobalWindow&&$(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return bn("Base64 isn't natively supported in the current environment."),null}}(),Tf=Array.prototype.slice;function or(r,t,e){return(t-r)*e+r}function Ul(r,t,e,n){for(var a=t.length,i=0;in?t:r,i=Math.min(e,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)n.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=mc,l=e;if(jt(e)){var u=Zb(e);s=u,(u===1&&!dt(e[0])||u===2&&!dt(e[0][0]))&&(o=!0)}else if(dt(e)&&!Ei(e))s=So;else if(V(e))if(!isNaN(+e))s=So;else{var f=xe(e);f&&(l=f,s=vi)}else if(js(e)){var h=B({},l);h.colorStops=z(e.colorStops,function(v){return{offset:v.offset,color:xe(v.color)}}),Hb(e)?s=Cf:Wb(e)&&(s=Mf),l=h}i===0?this.valType=s:(s!==this.valType||s===mc)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:l,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=$(n)?n:Gm[n]||Zm(n)),a.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 a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=bo(a),u=yc(a),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,m=p===0?1:c((e-v.percent)/p,1);d.easingFunc&&(m=d.easingFunc(m));var y=n?this._additiveValue:u?Ya:t[l];if((bo(i)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=m<1?v.rawValue:d.rawValue;else if(bo(i))i===is?Ul(y,v[a],d[a],m):Ub(y,v[a],d[a],m);else if(yc(i)){var _=v[a],S=d[a],x=i===Cf;t[l]={type:x?"linear":"radial",x:or(_.x,S.x,m),y:or(_.y,S.y,m),colorStops:z(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:or(w.offset,C.offset,m),color:as(Ul([],w.color,C.color,m))}}),global:S.global},x?(t[l].x2=or(_.x2,S.x2,m),t[l].y2=or(_.y2,S.y2,m)):t[l].r=or(_.r,S.r,m)}else if(u)Ul(y,v[a],d[a],m),n||(t[l]=as(y));else{var b=or(v[a],d[a],m);n?this._additiveValue=b:t[l]=b}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,a=this._additiveValue;e===So?t[n]=t[n]+a:e===vi?(xe(t[n],Ya),_o(Ya,Ya,a,1),t[n]=as(Ya)):e===is?_o(t[n],t[n],a,1):e===Km&&gc(t[n],t[n],a,1)},r}(),qb=function(){function r(t,e,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&a){bn("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,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,yt(e),n)},r.prototype.whenWithKeys=function(t,e,n,a){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,ns(u),a),this._trackKeys.push(s)}l.addKeyframe(t,ns(e[s]),a)}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=[],a=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,t[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}(),Fh=qb;function la(){return new Date().getTime()}var Kb=function(r){O(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,a=e.next;n?n.next=a:this._head=a,a?a.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=la()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,e||(this.trigger("frame",a),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(bf(n),!e._paused&&e.update())}bf(n)},t.prototype.start=function(){this._running||(this._time=la(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=la(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=la()-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 a=new Fh(e,n.loop);return this.addAnimator(a),a},t}(Ce),Qb=Kb,Jb=300,Yl=tt.domSupported,$l=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=z(r,function(a){var i=a.replace("mouse","pointer");return e.hasOwnProperty(i)?i:a});return{mouse:r,touch:t,pointer:n}}(),_c={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Sc=!1;function Df(r){var t=r.pointerType;return t==="pen"||t==="touch"}function jb(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 Zl(r){r&&(r.zrByTouch=!0)}function tx(r,t){return ge(r.dom,new ex(r,t),!0)}function Qm(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 ex=function(){function r(t,e){this.stopPropagation=Jt,this.stopImmediatePropagation=Jt,this.preventDefault=Jt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),Le={mousedown:function(r){r=ge(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=ge(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=ge(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=ge(this.dom,r);var t=r.toElement||r.relatedTarget;Qm(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Sc=!0,r=ge(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Sc||(r=ge(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=ge(this.dom,r),Zl(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Le.mousemove.call(this,r),Le.mousedown.call(this,r)},touchmove:function(r){r=ge(this.dom,r),Zl(r),this.handler.processGesture(r,"change"),Le.mousemove.call(this,r)},touchend:function(r){r=ge(this.dom,r),Zl(r),this.handler.processGesture(r,"end"),Le.mouseup.call(this,r),+new Date-+this.__lastTouchMomentwc||r<-wc}var qr=[],Vn=[],ql=Sa(),Kl=Math.abs,ji=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 Xr(this.rotation)||Xr(this.x)||Xr(this.y)||Xr(this.scaleX-1)||Xr(this.scaleY-1)||Xr(this.skewX)||Xr(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(xc(n),this.invTransform=null);return}n=n||Sa(),e?this.getLocalTransform(n):xc(n),t&&(e?va(n,t,n):km(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(qr);var n=qr[0]<0?-1:1,a=qr[1]<0?-1:1,i=((qr[0]-n)*e+n)/qr[0]||0,o=((qr[1]-a)*e+a)/qr[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Sa(),el(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],a=Math.atan2(t[1],t[0]),i=Math.PI/2+a-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-a,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&&(va(Vn,t.invTransform,e),e=Vn);var n=this.originX,a=this.originY;(n||a)&&(ql[4]=n,ql[5]=a,va(Vn,e,ql),Vn[4]-=n,Vn[5]-=a,e=Vn),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],a=this.invTransform;return a&&be(n,n,a),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],a=this.transform;return a&&be(n,n,a),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&Kl(t[0]-1)>1e-10&&Kl(t[3]-1)>1e-10?Math.sqrt(Kl(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){sx(this,t)},r.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,a=t.originY||0,i=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||a||s||l){var d=n+s,g=a+l;e[4]=-d*i-c*g*o,e[5]=-g*o-v*d*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=v*i,e[2]=c*o,u&&Nh(e,e,u),e[4]+=n+f,e[5]+=a+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}(),Oi=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function sx(r,t){for(var e=0;e=0?parseFloat(r)/100*t:parseFloat(r):r}function Ts(r,t,e){var n=t.position||"inside",a=t.distance!=null?t.distance:5,i=e.height,o=e.width,s=i/2,l=e.x,u=e.y,f="left",h="top";if(n instanceof Array)l+=Gr(n[0],e.width),u+=Gr(n[1],e.height),f=null,h=null;else switch(n){case"left":l-=a,u+=s,f="right",h="middle";break;case"right":l+=a+o,u+=s,h="middle";break;case"top":l+=o/2,u-=a,f="center",h="bottom";break;case"bottom":l+=o/2,u+=i+a,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=a,u+=s,h="middle";break;case"insideRight":l+=o-a,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=a,f="center";break;case"insideBottom":l+=o/2,u+=i-a,f="center",h="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,f="right";break;case"insideBottomLeft":l+=a,u+=i-a,h="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var Ql="__zr_normal__",Jl=Oi.concat(["ignore"]),lx=Fr(Oi,function(r,t){return r[t]=!0,r},{ignore:!1}),Hn={},ux=new st(0,0,0,0),Gh=function(){function r(t){this.id=Dm(),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 a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[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,a=n.local,i=e.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;if(i.copyTransform(e),n.position!=null){var f=ux;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),a||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Hn,n,f):Ts(Hn,n,f),i.x=Hn.x,i.y=Hn.y,o=Hn.align,s=Hn.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=Gr(h[0],f.width),v=Gr(h[1],f.height)),u=!0,i.originX=-i.x+c+(a?0:f.x),i.originY=-i.y+v+(a?0:f.y)}}n.rotation!=null&&(i.rotation=n.rotation);var d=n.offset;d&&(i.x+=d[0],i.y+=d[1],u||(i.originX=-d[0],i.originY=-d[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;g&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==p.fill||y!==p.stroke||_!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(l=!0,p.fill=m,p.stroke=y,p.autoStroke=_,p.align=o,p.verticalAlign=s,e.setDefaultTextStyle(p)),e.__dirty|=fe,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()?Pf:Lf},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&xe(e);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,Ea(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||{},B(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(W(t))for(var n=t,a=yt(n),i=0;i0},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(Ql,!1,t)},r.prototype.useState=function(t,e,n,a){var i=t===Ql,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(it(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){bn("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||a);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),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~fe),u}}},r.prototype.useStates=function(t,e,n){if(!t.length)this.clearStates();else{var a=[],i=this.currentStates,o=t.length,s=o===i.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&=~fe)}},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 a=this.currentStates.slice(),i=it(a,t),o=it(a,e)>=0;i>=0?o?a.splice(i,1):a[i]=e:n&&!o&&a.push(e),this.useStates(a)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,a=0;a=0&&i.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,a=n.length,i=[],o=0;o0&&e.during&&i[0].during(function(d,g){e.during(g)});for(var c=0;c0||a.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},c&&(T={});for(var S=0;S<_;S++){var m=g[S];C[m]=e[m],c?T[m]=n[m]:e[m]=n[m]}}else if(c){A={};for(var S=0;S<_;S++){var m=g[S];A[m]=ns(e[m]),hx(e,n,m)}}var x=new Fh(e,!1,!1,h?Mt(d,function(I){return I.targetName===t}):null);x.targetName=t,a.scope&&(x.scope=a.scope),c&&T&&x.whenWithKeys(0,T,g),A&&x.whenWithKeys(0,A,g),x.whenWithKeys(u==null?500:u,s?C:n,g).delay(f||0),r.addAnimator(x,t),o.push(x)}}var ty=Gh,ey=function(r){O(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,a=0;a=0&&(a.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var a=it(this._children,e);return a>=0&&this.replaceAt(n,a),this},t.prototype.replaceAt=function(e,n){var a=this._children,i=a[n];if(e&&e!==this&&e.parent!==this&&e!==i){a[n]=e,i.parent=null;var o=this.__zr;o&&i.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,a=this._children,i=it(a,e);return i<0?this:(a.splice(i,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,a=0;a0&&(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<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}function vt(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 V(r)?yx(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function It(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),ny),r=(+r).toFixed(t),e?r:+r}function pi(r){return r.sort(function(t,e){return t-e}),r}function sr(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 Rf(r)}function Rf(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,a=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function ay(r,t){var e=Math.log,n=Math.LN10,a=Math.floor(e(r[1]-r[0])/n),i=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function _x(r,t){var e=Fr(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(e===0)return[];for(var n=Math.pow(10,t),a=z(r,function(v){return(isNaN(v)?0:v)/e*n*100}),i=n*100,o=z(a,function(v){return Math.floor(v)}),s=Fr(o,function(v,d){return v+d},0),l=z(a,function(v,d){return v-o[d]});su&&(u=l[h],f=h);++o[f],l[f]=0,++s}return z(o,function(v){return v/n})}function Sx(r,t){var e=Math.max(sr(r),sr(t)),n=r+t;return e>ny?n:It(n,e)}var vO=9007199254740991;function iy(r){var t=Math.PI*2;return(r%t+t)%t}function Cs(r){return r>-Dc&&r=10&&t++,t}function oy(r,t){var e=nl(r),n=Math.pow(10,e),a=r/n,i;return t?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,r=i*n,e>=-20?+r.toFixed(e<0?-e:0):r}function cO(r,t){var e=(r.length-1)*t+1,n=Math.floor(e),a=+r[n-1],i=e-n;return i?a+i*(r[n]-a):a}function dO(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,n=0;n=0||i&&it(i,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var Kx=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Qx=Bi(Kx),Jx=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Qx(this,t,e)},r}(),kf=new Ji(50);function jx(r){if(typeof r=="string"){var t=kf.get(r);return t&&t.image}else return r}function my(r,t,e,n,a){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var i=kf.get(r),o={hostEl:e,cb:n,cbPayload:a};return i?(t=i.image,!ol(t)&&i.pending.push(o)):(t=La.loadImage(r,kc,kc),t.__zrImageSrc=r,kf.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function kc(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=he(e,t);return u>s&&(e="",u=0),s=r-u,a.ellipsis=e,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=r,a}function _y(r,t){var e=t.containerWidth,n=t.font,a=t.contentWidth;if(!e)return"";var i=he(r,n);if(i<=e)return r;for(var o=0;;o++){if(i<=a||o>=t.maxIterations){r+=t.ellipsis;break}var s=o===0?ew(r,a,t.ascCharWidth,t.cnCharWidth):i>0?Math.floor(r.length*a/i):0;r=r.substr(0,s),i=he(r,n)}return r===""&&(r=t.placeholder),r}function ew(r,t,e,n){for(var a=0,i=0,o=r.length;iv&&u){var d=Math.floor(v/s);h=h.slice(0,d)}if(r&&i&&f!=null)for(var g=yy(f,a,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),p=0;ps&&ru(e,r.substring(s,u),t,o),ru(e,l[2],t,o,l[1]),s=eu.lastIndex}sa){x>0?(y.tokens=y.tokens.slice(0,x),p(y,S,_),e.lines=e.lines.slice(0,m+1)):e.lines=e.lines.slice(0,m);break t}var I=w.width,L=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")b.percentWidth=I,f.push(b),b.contentWidth=he(b.text,A);else{if(L){var P=w.backgroundColor,R=P&&P.image;R&&(R=jx(R),ol(R)&&(b.width=Math.max(b.width,R.width*D/R.height)))}var E=d&&n!=null?n-S:null;E!=null&&E0&&d+n.accumWidth>n.width&&(f=t.split(` `),u=!0),n.accumWidth=d}else{var g=Sy(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=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var sw=Fr(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function lw(r){return ow(r)?!!sw[r]:!0}function Sy(r,t,e,n,a){for(var i=[],o=[],s="",l="",u=0,f=0,h=0;he:a+f+v>e){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=c,f=v)):d?(i.push(l),o.push(u),l=c,u=v):(i.push(c),o.push(v));continue}f+=v,d?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!i.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=a),{accumWidth:f,lines:i,linesWidths:o}}var Of="__zr_style_"+Math.round(Math.random()*10),Tn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},sl={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Tn[Of]=!0;var Bc=["z","z2","invisible"],uw=["invisible"],fw=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=yt(e),a=0;a1e-4){s[0]=r-e,s[1]=t-n,l[0]=r+e,l[1]=t+n;return}if(xo[0]=ou(a)*e+r,xo[1]=iu(a)*n+t,wo[0]=ou(i)*e+r,wo[1]=iu(i)*n+t,u(s,xo,wo),f(l,xo,wo),a=a%Qr,a<0&&(a=a+Qr),i=i%Qr,i<0&&(i=i+Qr),a>i&&!o?i+=Qr:aa&&(To[0]=ou(v)*e+r,To[1]=iu(v)*n+t,u(s,To,s),f(l,To,l))}var ct={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Jr=[],jr=[],Ge=[],br=[],Ve=[],He=[],su=Math.min,lu=Math.max,tn=Math.cos,en=Math.sin,nr=Math.abs,Bf=Math.PI,Lr=Bf*2,uu=typeof Float32Array!="undefined",$a=[];function fu(r){var t=Math.round(r/Bf*1e8)/1e8;return t%2*Bf}function pw(r,t){var e=fu(r[0]);e<0&&(e+=Lr);var n=e-r[0],a=r[1];a+=n,!t&&a-e>=Lr?a=e+Lr:t&&e-a>=Lr?a=e-Lr:!t&&e>a?a=e+(Lr-fu(e-a)):t&&e0&&(this._ux=nr(n/ws/t)||0,this._uy=nr(n/ws/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(ct.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=nr(t-this._xi),a=nr(e-this._yi),i=n>this._ux||a>this._uy;if(this.addData(ct.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,n,a,i,o){return this._drawPendingPt(),this.addData(ct.C,t,e,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,a){return this._drawPendingPt(),this.addData(ct.Q,t,e,n,a),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(t,e,n,a,i,o){this._drawPendingPt(),$a[0]=a,$a[1]=i,pw($a,o),a=$a[0],i=$a[1];var s=i-a;return this.addData(ct.A,t,e,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,a,i,o),this._xi=tn(i)*n+t,this._yi=en(i)*n+e,this},r.prototype.arcTo=function(t,e,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,a,i),this},r.prototype.rect=function(t,e,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,a),this.addData(ct.R,t,e,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(ct.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)&&uu&&(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(){Ge[0]=Ge[1]=Ve[0]=Ve[1]=Number.MAX_VALUE,br[0]=br[1]=He[0]=He[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,a=0,i=0,o;for(o=0;on||nr(_)>a||c===e-1)&&(g=Math.sqrt(y*y+_*_),i=p,o=m);break}case ct.C:{var S=t[c++],x=t[c++],p=t[c++],m=t[c++],b=t[c++],w=t[c++];g=Ib(i,o,S,x,p,m,b,w,10),i=b,o=w;break}case ct.Q:{var S=t[c++],x=t[c++],p=t[c++],m=t[c++];g=Pb(i,o,S,x,p,m,10),i=p,o=m;break}case ct.A:var T=t[c++],C=t[c++],A=t[c++],D=t[c++],I=t[c++],L=t[c++],P=L+I;c+=1,t[c++],d&&(s=tn(I)*A+T,l=en(I)*D+C),g=lu(A,D)*su(Lr,Math.abs(L)),i=tn(P)*A+T,o=en(P)*D+C;break;case ct.R:{s=i=t[c++],l=o=t[c++];var R=t[c++],E=t[c++];g=R*2+E*2;break}case ct.Z:{var y=s-i,_=l-o;g=Math.sqrt(y*y+_*_),i=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,a=this._ux,i=this._uy,o=this._len,s,l,u,f,h,c,v=e<1,d,g,p=0,m=0,y,_=0,S,x;if(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,g=this._pathLen,y=e*g,!y))return;t:for(var b=0;b0&&(t.lineTo(S,x),_=0),w){case ct.M:s=u=n[b++],l=f=n[b++],t.moveTo(u,f);break;case ct.L:{h=n[b++],c=n[b++];var C=nr(h-u),A=nr(c-f);if(C>a||A>i){if(v){var D=d[m++];if(p+D>y){var I=(y-p)/D;t.lineTo(u*(1-I)+h*I,f*(1-I)+c*I);break t}p+=D}t.lineTo(h,c),u=h,f=c,_=0}else{var L=C*C+A*A;L>_&&(S=h,x=c,_=L)}break}case ct.C:{var P=n[b++],R=n[b++],E=n[b++],G=n[b++],k=n[b++],N=n[b++];if(v){var D=d[m++];if(p+D>y){var I=(y-p)/D;zr(u,P,E,k,I,Jr),zr(f,R,G,N,I,jr),t.bezierCurveTo(Jr[1],jr[1],Jr[2],jr[2],Jr[3],jr[3]);break t}p+=D}t.bezierCurveTo(P,R,E,G,k,N),u=k,f=N;break}case ct.Q:{var P=n[b++],R=n[b++],E=n[b++],G=n[b++];if(v){var D=d[m++];if(p+D>y){var I=(y-p)/D;Ss(u,P,E,I,Jr),Ss(f,R,G,I,jr),t.quadraticCurveTo(Jr[1],jr[1],Jr[2],jr[2]);break t}p+=D}t.quadraticCurveTo(P,R,E,G),u=E,f=G;break}case ct.A:var H=n[b++],X=n[b++],Q=n[b++],rt=n[b++],ft=n[b++],Tt=n[b++],mt=n[b++],zt=!n[b++],Gt=Q>rt?Q:rt,At=nr(Q-rt)>.001,bt=ft+Tt,K=!1;if(v){var D=d[m++];p+D>y&&(bt=ft+Tt*(y-p)/D,K=!0),p+=D}if(At&&t.ellipse?t.ellipse(H,X,Q,rt,mt,ft,bt,zt):t.arc(H,X,Gt,ft,bt,zt),K)break t;T&&(s=tn(ft)*Q+H,l=en(ft)*rt+X),u=tn(bt)*Q+H,f=en(bt)*rt+X;break;case ct.R:s=u=n[b],l=f=n[b+1],h=n[b++],c=n[b++];var at=n[b++],ze=n[b++];if(v){var D=d[m++];if(p+D>y){var kt=y-p;t.moveTo(h,c),t.lineTo(h+su(kt,at),c),kt-=at,kt>0&&t.lineTo(h+at,c+su(kt,ze)),kt-=ze,kt>0&&t.lineTo(h+lu(at-kt,0),c+ze),kt-=at,kt>0&&t.lineTo(h,c+lu(ze-kt,0));break t}p+=D}t.rect(h,c,at,ze);break;case ct.Z:if(v){var D=d[m++];if(p+D>y){var I=(y-p)/D;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}p+=D}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=ct,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}(),dr=gw;function Wn(r,t,e,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>t+s&&o>n+s||or+s&&i>e+s||it+h&&f>n+h&&f>i+h&&f>s+h||fr+h&&u>e+h&&u>a+h&&u>o+h||ut+u&&l>n+u&&l>i+u||lr+u&&s>e+u&&s>a+u||se||f+ua&&(a+=Za);var c=Math.atan2(l,s);return c<0&&(c+=Za),c>=n&&c<=a||c+Za>=n&&c+Za<=a}function rn(r,t,e,n,a,i){if(i>t&&i>n||ia?s:0}var xr=dr.CMD,nn=Math.PI*2,Sw=1e-4;function bw(r,t){return Math.abs(r-t)t&&u>n&&u>i&&u>s||u1&&xw(),v=Lt(t,n,i,s,ye[0]),c>1&&(d=Lt(t,n,i,s,ye[1]))),c===2?pt&&s>n&&s>i||s=0&&u<=1){for(var f=0,h=Wt(t,n,i,u),c=0;ce||s<-e)return 0;var l=Math.sqrt(e*e-s*s);qt[0]=-l,qt[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=nn-1e-4){n=0,a=nn;var f=i?1:-1;return o>=qt[0]+r&&o<=qt[1]+r?f:0}if(n>a){var h=n;n=a,a=h}n<0&&(n+=nn,a+=nn);for(var c=0,v=0;v<2;v++){var d=qt[v];if(d+r>o){var g=Math.atan2(s,d),f=i?1:-1;g<0&&(g=nn+g),(g>=n&&g<=a||g+nn>=n&&g+nn<=a)&&(g>Math.PI/2&&g1&&(e||(s+=rn(l,u,f,h,n,a))),p&&(l=i[d],u=i[d+1],f=l,h=u),g){case xr.M:f=i[d++],h=i[d++],l=f,u=h;break;case xr.L:if(e){if(Wn(l,u,i[d],i[d+1],t,n,a))return!0}else s+=rn(l,u,i[d],i[d+1],n,a)||0;l=i[d++],u=i[d++];break;case xr.C:if(e){if(mw(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],t,n,a))return!0}else s+=ww(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],n,a)||0;l=i[d++],u=i[d++];break;case xr.Q:if(e){if(yw(l,u,i[d++],i[d++],i[d],i[d+1],t,n,a))return!0}else s+=Tw(l,u,i[d++],i[d++],i[d],i[d+1],n,a)||0;l=i[d++],u=i[d++];break;case xr.A:var m=i[d++],y=i[d++],_=i[d++],S=i[d++],x=i[d++],b=i[d++];d+=1;var w=!!(1-i[d++]);c=Math.cos(x)*_+m,v=Math.sin(x)*S+y,p?(f=c,h=v):s+=rn(l,u,c,v,n,a);var T=(n-m)*S/_+m;if(e){if(_w(m,y,S,x,x+b,w,t,T,a))return!0}else s+=Cw(m,y,S,x,x+b,w,T,a);l=Math.cos(x+b)*_+m,u=Math.sin(x+b)*S+y;break;case xr.R:f=l=i[d++],h=u=i[d++];var C=i[d++],A=i[d++];if(c=f+C,v=h+A,e){if(Wn(f,h,c,h,t,n,a)||Wn(c,h,c,v,t,n,a)||Wn(c,v,f,v,t,n,a)||Wn(f,v,f,h,t,n,a))return!0}else s+=rn(c,h,c,v,n,a),s+=rn(f,v,f,h,n,a);break;case xr.Z:if(e){if(Wn(l,u,f,h,t,n,a))return!0}else s+=rn(l,u,f,h,n,a);l=f,u=h;break}}return!e&&!bw(u,h)&&(s+=rn(l,u,f,h,n,a)||0),s!==0}function Mw(r,t,e){return xy(r,0,!1,t,e)}function Dw(r,t,e,n){return xy(r,t,!0,e,n)}var wy=J({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Tn),Aw={style:J({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},sl.style)},hu=Oi.concat(["invisible","culling","z","z2","zlevel","parent"]),Iw=function(r){O(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 a=this._decalEl=this._decalEl||new t;a.buildPath===t.prototype.buildPath&&(a.buildPath=function(l){e.buildPath(l,e.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s.5?Lf:n>.2?ox:Pf}else if(e)return Pf}return Lf},t.prototype.getInsideTextStroke=function(e){var n=this.style.fill;if(V(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=bs(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,a=!e;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&na)&&(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||a){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 a=this.transformCoordToLocal(e,n),i=this.getBoundingRect(),o=this.style;if(e=a[0],n=a[1],i.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)),Dw(s,l/u,e,n)))return!0}if(this.hasFill())return Mw(s,e,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=na,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 a=this.shape;return a||(a=this.shape={}),typeof e=="string"?a[e]=n:B(a,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&na)},t.prototype.createStyle=function(e){return tl(wy,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=B({},this.shape))},t.prototype._applyStateObj=function(e,n,a,i,o,s){r.prototype._applyStateObj.call(this,e,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=B({},a.shape),B(u,n.shape)):(u=B({},i?this.shape:a.shape),B(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=B({},this.shape);for(var f={},h=yt(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 tl(Lw,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 a=rl(n,e.font,e.textAlign,e.textBaseline);if(a.x+=e.x||0,a.y+=e.y||0,this.hasStroke()){var i=e.lineWidth;a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i}this._rect=a}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(ka);Ty.prototype.type="tspan";var Nf=Ty,Pw=J({x:0,y:0},Tn),Rw={style:J({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},sl.style)};function Ew(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Cy=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return tl(Pw,e)},t.prototype._getSize=function(e){var n=this.style,a=n[e];if(a!=null)return a;var i=Ew(n.image)?n.image:this.__image;if(!i)return 0;var o=e==="width"?"height":"width",s=n[o];return s==null?i[e]:i[e]/i[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Rw},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new st(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(ka);Cy.prototype.type="image";var On=Cy;function kw(r,t){var e=t.x,n=t.y,a=t.width,i=t.height,o=t.r,s,l,u,f;a<0&&(e=e+a,a=-a),i<0&&(n=n+i,i=-i),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>a&&(h=s+l,s*=a/h,l*=a/h),u+f>a&&(h=u+f,u*=a/h,f*=a/h),l+u>i&&(h=l+u,l*=i/h,u*=i/h),s+f>i&&(h=s+f,s*=i/h,f*=i/h),r.moveTo(e+s,n),r.lineTo(e+a-l,n),l!==0&&r.arc(e+a-l,n+l,l,-Math.PI/2,0),r.lineTo(e+a,n+i-u),u!==0&&r.arc(e+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(e+f,n+i),f!==0&&r.arc(e+f,n+i-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 ua=Math.round;function My(r,t,e){if(!!t){var n=t.x1,a=t.x2,i=t.y1,o=t.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=e&&e.lineWidth;return s&&(ua(n*2)===ua(a*2)&&(r.x1=r.x2=mn(n,s,!0)),ua(i*2)===ua(o*2)&&(r.y1=r.y2=mn(i,s,!0))),r}}function Dy(r,t,e){if(!!t){var n=t.x,a=t.y,i=t.width,o=t.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=mn(n,s,!0),r.y=mn(a,s,!0),r.width=Math.max(mn(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(mn(a+o,s,!1)-r.y,o===0?0:1)),r}}function mn(r,t,e){if(!t)return r;var n=ua(r*2);return(n+ua(t))%2===0?n/2:(n+(e?1:-1))/2}var Ow=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),Bw={},Ay=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new Ow},t.prototype.buildPath=function(e,n){var a,i,o,s;if(this.subPixelOptimize){var l=Dy(Bw,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?kw(e,n):e.rect(a,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(ot);Ay.prototype.type="rect";var _t=Ay,Vc={fill:"#000"},Hc=2,Nw={style:J({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},sl.style)},Iy=function(r){O(t,r);function t(e){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Vc,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,I=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),L=o.calculatedLineHeight,P=0;P=0&&(P=b[L],P.align==="right");)this._placeToken(P,e,T,m,I,"right",_),C-=P.width,I-=P.width,L--;for(D+=(i-(D-p)-(y-I)-C)/2;A<=L;)P=b[A],this._placeToken(P,e,T,m,D+P.width/2,"center",_),D+=P.width,A++;m+=T}},t.prototype._placeToken=function(e,n,a,i,o,s,l){var u=n.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=i+a/2;f==="top"?h=i+e.height/2:f==="bottom"&&(h=i+a-e.height/2);var c=!e.isLineHolder&&vu(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=Xc(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var g=this._getOrCreateChild(Nf),p=g.createStyle();g.useStyle(p);var m=this._defaultStyle,y=!1,_=0,S=Zc("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),x=$c("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!m.autoStroke||y)?(_=Hc,m.stroke):null),b=u.textShadowBlur>0||n.textShadowBlur>0;p.text=e.text,p.x=o,p.y=h,b&&(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||An,p.opacity=xn(u.opacity,n.opacity,1),Uc(p,u),x&&(p.lineWidth=xn(u.lineWidth,n.lineWidth,_),p.lineDash=nt(u.lineDash,n.lineDash),p.lineDashOffset=n.lineDashOffset||0,p.stroke=x),S&&(p.fill=S);var w=e.contentWidth,T=e.contentHeight;g.setBoundingRect(new st(ci(p.x,w,p.textAlign),aa(p.y,T,p.textBaseline),w,T))},t.prototype._renderBackground=function(e,n,a,i,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(_t),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=a,m.y=i,m.width=o,m.height=s,m.r=v,g.dirtyShape()}if(c){var y=g.style;y.fill=l||null,y.fillOpacity=nt(e.fillOpacity,1)}else if(h){p=this._getOrCreateChild(On),p.onload=function(){d.dirtyStyle()};var _=p.style;_.image=l.image,_.x=a,_.y=i,_.width=o,_.height=s}if(u&&f){var y=g.style;y.lineWidth=u,y.stroke=f,y.strokeOpacity=nt(e.strokeOpacity,1),y.lineDash=e.borderDash,y.lineDashOffset=e.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.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 Vw(e)&&(n=[e.fontStyle,e.fontWeight,Gw(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),n&&Ze(n)||e.textFont||e.font},t}(ka),Fw={left:!0,right:1,center:1},zw={top:1,bottom:1,middle:1},Wc=["fontStyle","fontWeight","fontSize","fontFamily"];function Gw(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Ph+"px":r+"px"}function Uc(r,t){for(var e=0;e=0,i=!1;if(r instanceof ot){var o=Ly(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Un(s)||Un(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=B({},n),u=B({},u),u.fill=s):!Un(u.fill)&&Un(s)?(i=!0,n=B({},n),u=B({},u),u.fill=jc(s)):!Un(u.stroke)&&Un(l)&&(i||(n=B({},n),u=B({},u)),u.stroke=jc(l)),n.style=u}}if(n&&n.z2==null){i||(n=B({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f!=null?f:Uw)}return n}function Kw(r,t,e){if(e&&e.z2==null){e=B({},e);var n=r.z2SelectLift;e.z2=r.z2+(n!=null?n:Yw)}return e}function Qw(r,t,e){var n=it(r.currentStates,t)>=0,a=r.style.opacity,i=n?null:Xw(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:n?a:i.opacity*.1},o),e.style=o),e}function cu(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return qw(this,r,t,e);if(r==="blur")return Qw(this,r,e);if(r==="select")return Kw(this,r,e)}return e}function Jw(r){r.stateProxy=cu;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=cu),e&&(e.stateProxy=cu)}function rd(r,t){!Ny(r,t)&&!r.__highByOuter&&yr(r,Py)}function nd(r,t){!Ny(r,t)&&!r.__highByOuter&&yr(r,Ry)}function xa(r,t){r.__highByOuter|=1<<(t||0),yr(r,Py)}function wa(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&yr(r,Ry)}function jw(r){yr(r,$h)}function ky(r){yr(r,Ey)}function Oy(r){yr(r,$w)}function By(r){yr(r,Zw)}function Ny(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Fy(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(a,i){var o=Uh(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Ey(u)}),s&&e.push(i)),o.isBlured=!1}),M(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(e,!1,t)})}function Ff(r,t,e,n){var a=n.getModel();e=e||"coordinateSystem";function i(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Ds(r,t,e){zy(r,!0),yr(r,Jw),oT(r,t,e)}function iT(r){zy(r,!1)}function Ni(r,t,e,n){n?iT(r):Ds(r,t,e)}function oT(r,t,e){var n=ht(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var id=["emphasis","blur","select"],sT={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function As(r,t,e,n){e=e||"itemStyle";for(var a=0;a1&&(o*=du(d),s*=du(d));var g=(a===i?-1:1)*du((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,m=g*-s*c/o,y=(r+e)/2+Mo(h)*p-Co(h)*m,_=(t+n)/2+Co(h)*p+Mo(h)*m,S=ud([1,0],[(c-p)/o,(v-m)/s]),x=[(c-p)/o,(v-m)/s],b=[(-1*c-p)/o,(-1*v-m)/s],w=ud(x,b);if(Vf(x,b)<=-1&&(w=Xa),Vf(x,b)>=1&&(w=0),w<0){var T=Math.round(w/Xa*1e6)/1e6;w=Xa*2+T%2*Xa}f.addData(u,y,_,o,s,S,w,h,i)}var vT=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,cT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function dT(r){var t=new dr;if(!r)return t;var e=0,n=0,a=e,i=n,o,s=dr.CMD,l=r.match(vT);if(!l)return t;for(var u=0;uP*P+R*R&&(T=A,C=D),{cx:T,cy:C,x0:-f,y0:-h,x1:T*(a/x-1),y1:C*(a/x-1)}}function xT(r){var t;if(F(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 wT(r,t){var e,n=gi(t.r,0),a=gi(t.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=hd(u-l),d=v>pu&&v%pu;if(d>Ie&&(v=d),!(n>Ie))r.moveTo(f,h);else if(v>pu-Ie)r.moveTo(f+n*$n(l),h+n*an(l)),r.arc(f,h,n,l,u,!c),a>Ie&&(r.moveTo(f+a*$n(u),h+a*an(u)),r.arc(f,h,a,u,l,c));else{var g=void 0,p=void 0,m=void 0,y=void 0,_=void 0,S=void 0,x=void 0,b=void 0,w=void 0,T=void 0,C=void 0,A=void 0,D=void 0,I=void 0,L=void 0,P=void 0,R=n*$n(l),E=n*an(l),G=a*$n(u),k=a*an(u),N=v>Ie;if(N){var H=t.cornerRadius;H&&(e=xT(H),g=e[0],p=e[1],m=e[2],y=e[3]);var X=hd(n-a)/2;if(_=We(X,m),S=We(X,y),x=We(X,g),b=We(X,p),C=w=gi(_,S),A=T=gi(x,b),(w>Ie||T>Ie)&&(D=n*$n(u),I=n*an(u),L=a*$n(l),P=a*an(l),vIe){var At=We(m,C),bt=We(y,C),K=Do(L,P,R,E,n,At,c),at=Do(D,I,G,k,n,bt,c);r.moveTo(f+K.cx+K.x0,h+K.cy+K.y0),C0&&r.arc(f+K.cx,h+K.cy,At,Vt(K.y0,K.x0),Vt(K.y1,K.x1),!c),r.arc(f,h,n,Vt(K.cy+K.y1,K.cx+K.x1),Vt(at.cy+at.y1,at.cx+at.x1),!c),bt>0&&r.arc(f+at.cx,h+at.cy,bt,Vt(at.y1,at.x1),Vt(at.y0,at.x0),!c))}else r.moveTo(f+R,h+E),r.arc(f,h,n,l,u,!c);if(!(a>Ie)||!N)r.lineTo(f+G,h+k);else if(A>Ie){var At=We(g,A),bt=We(p,A),K=Do(G,k,D,I,a,-bt,c),at=Do(R,E,L,P,a,-At,c);r.lineTo(f+K.cx+K.x0,h+K.cy+K.y0),A0&&r.arc(f+K.cx,h+K.cy,bt,Vt(K.y0,K.x0),Vt(K.y1,K.x1),!c),r.arc(f,h,a,Vt(K.cy+K.y1,K.cx+K.x1),Vt(at.cy+at.y1,at.cx+at.x1),c),At>0&&r.arc(f+at.cx,h+at.cy,At,Vt(at.y1,at.x1),Vt(at.y0,at.x0),!c))}else r.lineTo(f+G,h+k),r.arc(f,h,a,u,l,c)}r.closePath()}}}var TT=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){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new TT},t.prototype.buildPath=function(e,n){wT(e,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(ot);Xy.prototype.type="sector";var pr=Xy,CT=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),qy=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new CT},t.prototype.buildPath=function(e,n){var a=n.cx,i=n.cy,o=Math.PI*2;e.moveTo(a+n.r,i),e.arc(a,i,n.r,0,o,!1),e.moveTo(a+n.r0,i),e.arc(a,i,n.r0,0,o,!0)},t}(ot);qy.prototype.type="ring";var Ky=qy;function MT(r,t,e,n){var a=[],i=[],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 i=MT(a,n,e,t.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(e?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,h=a.length;ssn[1]){if(s=!1,i)return s;var f=Math.abs(sn[0]-on[1]),h=Math.abs(on[0]-sn[1]);Math.min(f,h)>a.len()&&(f0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:i,force:!!i||!!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),i&&i()}function Ot(r,t,e,n,a,i){Qh("update",r,t,e,n,a,i)}function Yt(r,t,e,n,a,i){Qh("enter",r,t,e,n,a,i)}function da(r){if(!r.__zr)return!0;for(var t=0;tMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function dd(r){return!r.isGroup}function QT(r){return r.shape!=null}function f0(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){dd(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return QT(o)&&(s.shape=B({},o.shape)),s}var i=n(r);t.traverse(function(o){if(dd(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Ot(o,l,e,ht(o).dataIndex)}}})}function h0(r,t){return z(r,function(e){var n=e[0];n=Rs(n,t.x),n=Es(n,t.x+t.width);var a=e[1];return a=Rs(a,t.y),a=Es(a,t.y+t.height),[n,a]})}function JT(r,t){var e=Rs(r.x,t.x),n=Es(r.x+r.width,t.x+t.width),a=Rs(r.y,t.y),i=Es(r.y+r.height,t.y+t.height);if(n>=e&&i>=a)return{x:e,y:a,width:n-e,height:i-a}}function cl(r,t,e){var n=B({rectHover:!0},t),a=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),J(a,e),new On(n)):jh(r.replace("path://",""),n,e,"center")}function jT(r,t,e,n,a){for(var i=0,o=a[a.length-1];i1)return!1;var p=gu(v,d,f,h)/c;return!(p<0||p>1)}function gu(r,t,e,n){return r*n-e*t}function tC(r){return r<=1e-6&&r>=-1e-6}function dl(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,a=V(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&M(yt(l),function(f){vr(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ht(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:J({content:n,formatterParams:s},a)}}function pd(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function pl(r,t){if(r)if(F(r))for(var e=0;e=0&&s.push(l)}),s}}function ml(r,t){return et(et({},r,!0),t,!0)}var mC={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:". "}}}},yC={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:""}}}},ks="ZH",ev="EN",Gi=ev,us={},rv={},g0=tt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return r.indexOf(ks)>-1?ks:Gi}():Gi;function m0(r,t){r=r.toUpperCase(),rv[r]=new Ft(t),us[r]=t}function _C(r){if(V(r)){var t=us[r.toUpperCase()]||{};return r===ks||r===ev?j(t):et(j(t),j(us[Gi]),!1)}else return et(j(r),j(us[Gi]),!1)}function SC(r){return rv[r]}function bC(){return rv[Gi]}m0(ev,mC);m0(ks,yC);var nv=1e3,av=nv*60,Di=av*60,Se=Di*24,bd=Se*365,mi={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}"},Lo="{yyyy}-{MM}-{dd}",xd={year:"{yyyy}",month:"{yyyy}-{MM}",day:Lo,hour:Lo+" "+mi.hour,minute:Lo+" "+mi.minute,second:Lo+" "+mi.second,millisecond:mi.none},_u=["year","month","day","hour","minute","second","millisecond"],y0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function wr(r,t){return r+="","0000".substr(0,t-r.length)+r}function pa(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 xC(r){return r===pa(r)}function wC(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function yl(r,t,e,n){var a=cr(r),i=a[iv(e)](),o=a[ga(e)]()+1,s=Math.floor((o-1)/3)+1,l=a[_l(e)](),u=a["get"+(e?"UTC":"")+"Day"](),f=a[Vi(e)](),h=(f-1)%12+1,c=a[Sl(e)](),v=a[bl(e)](),d=a[xl(e)](),g=n instanceof Ft?n:SC(n||g0)||bC(),p=g.getModel("time"),m=p.get("month"),y=p.get("monthAbbr"),_=p.get("dayOfWeek"),S=p.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,wr(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,wr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,wr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,wr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,wr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,wr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,wr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,wr(d,3)).replace(/{S}/g,d+"")}function TC(r,t,e,n,a){var i=null;if(V(e))i=e;else if($(e))i=e(r.value,t,{level:r.level});else{var o=B({},mi);if(r.level>0)for(var s=0;s<_u.length;++s)o[_u[s]]="{primary|"+o[_u[s]]+"}";var l=e?e.inherit===!1?e:J(e,o):o,u=_0(r.value,a);if(l[u])i=l[u];else if(l.inherit){for(var f=y0.indexOf(u),s=f-1;s>=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(F(i)){var h=r.level==null?0:r.level>=0?r.level:i.length+r.level;h=Math.min(h,i.length-1),i=i[h]}}return yl(new Date(r.value),i,a,n)}function _0(r,t){var e=cr(r),n=e[ga(t)]()+1,a=e[_l(t)](),i=e[Vi(t)](),o=e[Sl(t)](),s=e[bl(t)](),l=e[xl(t)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&i===0,v=c&&a===1,d=v&&n===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function wd(r,t,e){var n=dt(r)?cr(r):r;switch(t=t||_0(r,e),t){case"year":return n[iv(e)]();case"half-year":return n[ga(e)]()>=6?1:0;case"quarter":return Math.floor((n[ga(e)]()+1)/4);case"month":return n[ga(e)]();case"day":return n[_l(e)]();case"half-day":return n[Vi(e)]()/24;case"hour":return n[Vi(e)]();case"minute":return n[Sl(e)]();case"second":return n[bl(e)]();case"millisecond":return n[xl(e)]()}}function iv(r){return r?"getUTCFullYear":"getFullYear"}function ga(r){return r?"getUTCMonth":"getMonth"}function _l(r){return r?"getUTCDate":"getDate"}function Vi(r){return r?"getUTCHours":"getHours"}function Sl(r){return r?"getUTCMinutes":"getMinutes"}function bl(r){return r?"getUTCSeconds":"getSeconds"}function xl(r){return r?"getUTCMilliseconds":"getMilliseconds"}function CC(r){return r?"setUTCFullYear":"setFullYear"}function S0(r){return r?"setUTCMonth":"setMonth"}function b0(r){return r?"setUTCDate":"setDate"}function x0(r){return r?"setUTCHours":"setHours"}function w0(r){return r?"setUTCMinutes":"setMinutes"}function T0(r){return r?"setUTCSeconds":"setSeconds"}function C0(r){return r?"setUTCMilliseconds":"setMilliseconds"}function M0(r){if(!sy(r))return V(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function D0(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 oo=Im;function Uf(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&Ze(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?cr(r):r;if(isNaN(+l)){if(s)return"-"}else return yl(l,n,e)}if(t==="ordinal")return gs(r)?a(r):dt(r)&&i(r)?r+"":"-";var u=Vr(r);return i(u)?M0(u):gs(r)?a(r):typeof r=="boolean"?r+"":"-"}var Td=["a","b","c","d","e","f","g"],Su=function(r,t){return"{"+r+(t==null?"":t)+"}"};function A0(r,t,e){F(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],i=0;i':'';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Rn(r,t){return t=t||"transparent",V(r)?r:W(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Cd(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var fs=M,DC=["left","right","top","bottom","width","height"],yn=[["width","left","right"],["height","top","bottom"]];function ov(r,t,e,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=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=i+g,v>n||l.newline?(i=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>a||l.newline?(i+=s+e,o=0,d=p,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+e:o=d+e)})}var ma=ov;ut(ov,"vertical");ut(ov,"horizontal");function _O(r,t,e){var n=t.width,a=t.height,i=vt(r.left,n),o=vt(r.top,a),s=vt(r.right,n),l=vt(r.bottom,a);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=a),e=oo(e||0),{width:Math.max(s-i-e[1]-e[3],0),height:Math.max(l-o-e[0]-e[2],0)}}function mr(r,t,e){e=oo(e||0);var n=t.width,a=t.height,i=vt(r.left,n),o=vt(r.top,a),s=vt(r.right,n),l=vt(r.bottom,a),u=vt(r.width,n),f=vt(r.height,a),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-c-i),isNaN(f)&&(f=a-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/a?u=n*.8:f=a*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(i)&&(i=n-s-u-c),isNaN(o)&&(o=a-l-f-h),r.left||r.right){case"center":i=n/2-u/2-e[3];break;case"right":i=n-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-f/2-e[0];break;case"bottom":o=a-f-h;break}i=i||0,o=o||0,isNaN(u)&&(u=n-c-i-(s||0)),isNaN(f)&&(f=a-h-o-(l||0));var d=new st(i+e[3],o+e[0],u,f);return d.margin=e,d}function AC(r,t,e,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new st(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=mr(J({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"?(i.x=c,i.y=v):(i.x+=c,i.y+=v),i===r&&r.markRedraw(),!0}function SO(r,t){return r[yn[t][0]]!=null||r[yn[t][1]]!=null&&r[yn[t][2]]!=null}function Hi(r){var t=r.layoutMode||r.constructor.layoutMode;return W(t)?t:t?{type:t}:null}function Ca(r,t,e){var n=e&&e.ignoreSize;!F(n)&&(n=[n,n]);var a=o(yn[0],0),i=o(yn[1],1);u(yn[0],r,a),u(yn[1],r,i);function o(f,h){var c={},v=0,d={},g=0,p=2;if(fs(f,function(_){d[_]=r[_]}),fs(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 m=0;m=0;l--)s=et(s,a[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var a=e+"Index",i=e+"Id";return eo(this.ecModel,e,{index:this.get(a,!0),id:this.get(i,!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}(Ft);gy(Na,Ft);il(Na);pC(Na);gC(Na,PC);function PC(r){var t=[];return M(Na.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=z(t,function(e){return Xe(e).main}),r!=="dataset"&&it(t,"dataset")<=0&&t.unshift("dataset"),t}var gt=Na,I0="";typeof navigator!="undefined"&&(I0=navigator.platform||"");var Zn="rgba(0, 0, 0, 0.2)",RC={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Zn,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Zn,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Zn,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Zn,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Zn,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Zn,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:I0.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},Yf=Y(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Me="original",te="arrayRows",De="objectRows",tr="keyedColumns",hr="typedArray",L0="unknown",Ke="column",Fa="row",Bt={Must:1,Might:2,Not:3},P0=St();function EC(r){P0(r).datasetMap=Y()}function kC(r,t,e){var n={},a=sv(t);if(!a||!r)return n;var i=[],o=[],s=t.ecModel,l=P0(s).datasetMap,u=a.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),M(r,function(g,p){var m=W(g)?g:r[p]={name:g};m.type==="ordinal"&&f==null&&(f=p,h=d(m)),n[m.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});M(r,function(g,p){var m=g.name,y=d(g);if(f==null){var _=c.valueWayDim;v(n[m],_,y),v(o,_,y),c.valueWayDim+=y}else if(f===p)v(n[m],0,y),v(i,0,y);else{var _=c.categoryWayDim;v(n[m],_,y),v(o,_,y),c.categoryWayDim+=y}});function v(g,p,m){for(var y=0;yt)return r[n];return r[e-1]}function k0(r,t,e,n,a,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!n?e:GC(n,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return a&&(u[a]=h),s.paletteIdx=(l+1)%f.length,h}}function VC(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Po,qa,Dd,bu="\0_ec_inner",Ad=1,HC={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"},WC={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"},Os={};function UC(r){M(r,function(t,e){if(!gt.hasClass(e)){var n=HC[e];n&&!Os[n]&&($t("Component "+e+` is used but not imported. import { `+n+` } from 'echarts/components'; echarts.use([`+n+"]);"),Os[n]=!0)}})}var O0=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,a,i,o,s){i=i||{},this.option=null,this._theme=new Ft(i),this._locale=new Ft(o),this._optionManager=s},t.prototype.setOption=function(e,n,a){Z(e!=null,"option is null/undefined"),Z(e[bu]!==Ad,"please use chart.getOption()");var i=Pd(n);this._optionManager.setOption(e,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,n){return this._resetOption(e,Pd(n))},t.prototype._resetOption=function(e,n){var a=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");UC(o),!this.option||e==="recreate"?Dd(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&M(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=Y(),u=n&&n.replaceMergeMainTypeMap;EC(this),M(e,function(h,c){h!=null&&(gt.hasClass(c)?c&&(s.push(c),l.set(c,!0)):a[c]=a[c]==null?j(h):et(a[c],h,!0))}),u&&u.each(function(h,c){gt.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),gt.topologicalTravel(s,gt.getAllClassMainTypes(),f,this);function f(h){var c=FC(this,h,xt(e[h])),v=i.get(h),d=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=Ax(v,c,d);Bx(g,h,gt),a[h]=null,i.set(h,null),o.set(h,0);var p=[],m=[],y=0,_,S;M(g,function(x,b){var w=x.existing,T=x.newOption;if(!T)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var C=h==="series",A=gt.getClass(h,x.keyInfo.subType,!C);if(!A){{var D=x.keyInfo.subType,I=WC[D];Os[D]||(Os[D]=!0,$t(I?"Series "+D+` is used but not imported. import { `+I+` } from 'echarts/charts'; echarts.use([`+I+"]);":"Unknown series "+D))}return}if(h==="tooltip"){if(_){S||(Pt("Currently only one tooltip component is allowed."),S=!0);return}_=!0}if(w&&w.constructor===A)w.name=x.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var L=B({componentIndex:b},x.keyInfo);w=new A(T,this,this,L),B(w,L),x.brandNew&&(w.__requireNewView=!0),w.init(T,this,this),w.optionUpdated(null,!0)}}w?(p.push(w.option),m.push(w),y++):(p.push(void 0),m.push(void 0))},this),a[h]=p,i.set(h,m),o.set(h,y),h==="series"&&Po(this)}this._seriesIndices||Po(this)},t.prototype.getOption=function(){var e=j(this.option);return M(e,function(n,a){if(gt.hasClass(a)){for(var i=xt(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!ba(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[a]=i}}),delete e[bu],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 a=this._componentsMap.get(e);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function eM(r,t){return r.join(",")===t.join(",")}var rM=QC,ve=M,Wi=W,Rd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function wu(r){var t=r&&r.itemStyle;if(!!t)for(var e=0,n=Rd.length;e=0;p--){var m=r[p];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&c>=0&&y>0||l==="samesign"&&c<=0&&y<0){c=Sx(c,y),g=y;break}}}return n[0]=c,n[1]=g,n})})}var wl=function(){function r(t){this.data=t.data||(t.sourceFormat===tr?{}:[]),this.sourceFormat=t.sourceFormat||L0,this.seriesLayoutBy=t.seriesLayoutBy||Ke,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}},a=function(){return this._data?this._data.length/this._dimSize:0};zd=(t={},t[te+"_"+Ke]={pure:!0,appendData:i},t[te+"_"+Fa]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[De]={pure:!0,appendData:i},t[tr]={pure:!0,appendData:function(o){var s=this._data;M(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[Me]={appendData:i},t[hr]={persistent:!1,pure:!0,appendData:function(o){Z(oe(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 i(o){for(var s=0;s=0&&(g=o.interpolatedValue[p])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(t,e){return Ma(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r}();function Wd(r){var t,e;return W(r)?r.type?e=r:console.warn("The return type of `formatTooltip` is not supported: "+se(r)):t=r,{text:t,frag:e}}function Ai(r){return new SM(r)}var SM=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 a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=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)&&(i="reset");function f(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(e?(Z(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(Z(!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=m}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,a,i){Ud.reset(e,n,a,i),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:Ud.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),F(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex1&&n>0?s:o}};return i;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},xM=function(){function r(t,e){if(!dt(e)){var n="";n='rvalue of "<", ">", "<=", ">=" can only be number in filter.',lt(n)}this._opFn=Z0[t],this._rvalFloat=Vr(e)}return r.prototype.evaluate=function(t){return dt(t)?this._opFn(t,this._rvalFloat):this._opFn(Vr(t),this._rvalFloat)},r}(),X0=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=dt(t)?t:Vr(t),a=dt(e)?e:Vr(e),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=V(t),l=V(e);s&&(n=l?t:0),l&&(a=s?e:0)}return na?-this._resultLT:0},r}(),wM=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Vr(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=Vr(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function TM(r,t){return r==="eq"||r==="ne"?new wM(r==="eq",t):vr(Z0,r)?new xM(r,t):null}var CM=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 hs(t,e)},r}();function MM(r,t){var e=new CM,n=r.data,a=e.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Ke&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.',lt(o));var s=[],l={},u=r.dimensionsDefine;if(u)M(u,function(g,p){var m=g.name,y={index:p,name:m,displayName:g.displayName};if(s.push(y),m!=null){var _="";vr(l,m)&&(_='dimension name "'+m+'" duplicated.',lt(_)),l[m]=y}});else for(var f=0;f65535?kM:OM}function Xn(){return[1/0,-1/0]}function BM(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function $d(r,t,e,n,a){var i=Q0[e||"float"];if(a){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new i(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 a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=z(o,function(y){return y.property}),f=0;fm[1]&&(m[1]=p)}}!a.persistent&&a.clean&&a.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)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,n){var a=this._chunks,i=a[t],o=[];if(!i)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,a=this._count;if(n===Array){t=new n(a);for(var i=0;i=h&&y<=c||isNaN(y))&&(l[u++]=g),g++}d=!0}else if(i===2){for(var p=v[a[0]],_=v[a[1]],S=t[a[1]][0],x=t[a[1]][1],m=0;m=h&&y<=c||isNaN(y))&&(b>=S&&b<=x||isNaN(b))&&(l[u++]=g),g++}d=!0}}if(!d)if(i===1)for(var m=0;m=h&&y<=c||isNaN(y))&&(l[u++]=w)}else for(var m=0;mt[A][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(m))}return um[1]&&(m[1]=p)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),a=n._chunks,i=a[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,c,v=new(Qa(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;df&&(f=h,c=S)}D>0&&Df-d&&(l=f-d,s.length=l);for(var g=0;gh[1]&&(h[1]=m),c[v++]=y}return i._count=v,i._indices=c,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(!!this._count)for(var n=t.length,a=this._chunks,i=0,o=this.count();il&&(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=[],a=this._chunks,i=0;i=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,n,a,i){return hs(e[i],this._dimensions[i])}Mu={arrayRows:t,objectRows:function(e,n,a,i){return hs(e[n],this._dimensions[i])},keyedColumns:t,original:function(e,n,a,i){var o=e&&(e.value==null?e:e.value);return hs(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,n,a,i){return e[i]}}}(),r}(),J0=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,a,i;if(Ja(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,i=[f._getVersionSign()]}else s=o.get("data",!0),l=oe(s)?hr:Me,i=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=nt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=nt(h.sourceHeader,c.sourceHeader),g=nt(h.dimensions,c.dimensions),p=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||g;a=p?[Zf(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:g},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(e);a=y.sourceList,i=y.upstreamSignList}else{var _=m.get("source",!0);a=[Zf(_,this._getSourceMetaRawOption(),null)],i=[]}}Z(a&&i),this._setLocalSource(a,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),a=e.get("fromTransformResult",!0);if(Z(a!=null||n!=null),a!=null){var i="";t.length!==1&&(i="When using `fromTransformResult`, there should be only one upstream dataset",Xd(i))}var o,s=[],l=[];return M(t,function(u){u.prepareSource();var f=u.getSource(a||0),h="";a!=null&&!f&&(h="Can not retrieve result by `fromTransformResult`: "+a,Xd(h)),s.push(f),l.push(u._getVersionSign())}),n?o=RM(n,s,{datasetIndex:e.componentIndex}):a!=null&&(o=[vM(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 M(r.blocks,function(a){var i=r_(a);i>=t&&(t=i+ +(n&&(!i||qf(a)&&!a.noHeader)))}),t}return 0}function zM(r,t,e,n){var a=t.noHeader,i=VM(r_(t)),o=[],s=t.blocks||[];Z(!s||F(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(vr(u,l)){var f=new X0(u[l],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}M(s,function(d,g){var p=t.valueFormatter,m=e_(d)(p?B(B({},r),{valueFormatter:p}):r,d,g>0?i.html:0,n);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(i.richText):Kf(o.join(""),a?e:i.html);if(a)return h;var c=Uf(t.header,"ordinal",r.useUTC),v=t_(n,r.renderMode).nameStyle;return r.renderMode==="richText"?n_(r,c,v)+i.richText+h:Kf('
'+ue(c)+"
"+h,e)}function GM(r,t,e,n){var a=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=F(S)?S:[S],z(S,function(x,b){return Uf(x,F(v)?v[b]:v,u)})};if(!(i&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),c=i?"":Uf(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value),g=!s||!i,p=!s&&i,m=t_(n,a),y=m.nameStyle,_=m.valueStyle;return a==="richText"?(s?"":h)+(i?"":n_(r,c,y))+(o?"":UM(r,d,g,p,_)):Kf((s?"":h)+(i?"":HM(c,!s,y))+(o?"":WM(d,g,p,_)),e)}}function qd(r,t,e,n,a,i){if(!!r){var o=e_(r),s={useUTC:a,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function VM(r){return{html:NM[r],richText:FM[r]}}function Kf(r,t){var e='
',n="margin: "+t+"px 0 0";return'
'+r+e+"
"}function HM(r,t,e){var n=t?"margin-left:2px":"";return''+ue(r)+""}function WM(r,t,e,n){var a=e?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return r=F(r)?r:[r],''+z(r,function(o){return ue(o)}).join("  ")+""}function n_(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function UM(r,t,e,n,a){var i=[a],o=n?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(F(t)?t.join(" "):t,i)}function YM(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return Rn(n)}function a_(r,t){var e=r.get("padding");return e!=null?e:t==="richText"?[8,10]:10}var Du=function(){function r(){this.richTextStyles={},this._nextStyleNameId=ly()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var a=n==="richText"?this._generateStyleName():null,i=MC({color:e,type:t,renderMode:n,markerId:a});return V(i)?i:(Z(a),this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};F(e)?M(e,function(i){return B(n,i)}):B(n,e);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+t+"}"},r}();function $M(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=F(s),u=YM(t,e),f,h,c,v;if(o>1||l&&!o){var d=ZM(s,t,e,i,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var g=a.getDimensionInfo(i[0]);v=f=Ma(a,e,i[0]),h=g.type}else v=f=l?s[0]:s;var p=Vh(t),m=p&&t.name||"",y=a.getName(e),_=n?m:y;return Ui("section",{header:m,noHeader:n||!p,sortParam:v,blocks:[Ui("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Ze(_),value:f,valueType:h})].concat(c||[])})}function ZM(r,t,e,n,a){var i=t.getData(),o=Fr(r,function(h,c,v){var d=i.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?M(n,function(h){f(Ma(i,e,h),h)}):M(r,f);function f(h,c){var v=i.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(Ui("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Tr=St();function Ro(r,t){return r.getName(t)||r.getId(t)}var vs="__universalTransitionEnabled",Cl=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Ai({count:qM,reset:KM}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,a);var i=Tr(this).sourceManager=new J0(this);i.prepareSource();var o=this.getInitialData(e,a);Qd(o,this),this.dataTask.context.data=o,Z(o,"getInitialData returned invalid data."),Tr(this).dataBeforeProcessed=o,Kd(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var a=Hi(this),i=a?so(e):{},o=this.subType;gt.hasClass(o)&&(o+="Series"),et(e,n.getTheme().get(this.subType)),et(e,this.getDefaultOption()),Ef(e,"label",["show"]),this.fillDataTextStyle(e.data),a&&Ca(e,i,a)},t.prototype.mergeOption=function(e,n){e=et(this.option,e,!0),this.fillDataTextStyle(e.data);var a=Hi(this);a&&Ca(this.option,e,a);var i=Tr(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,n);Qd(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Tr(this).dataBeforeProcessed=o,Kd(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!oe(e))for(var n=["show"],a=0;athis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,a){var i=this.ecModel,o=lv.prototype.getColorFromPalette.call(this,e,n,a);return o||(o=i.getColorFromPalette(e,n,a)),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 a=this.option.selectedMap;if(!!a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},t.prototype.isSelected=function(e,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Ro(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[vs])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){W(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,n)}},t.registerClass=function(e){return gt.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}(gt);je(Cl,_M);je(Cl,lv);gy(Cl,gt);function Kd(r){var t=r.name;Vh(r)||(r.name=XM(r)||t)}function XM(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return M(e,function(a){var i=t.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function qM(r){return r.model.getRawData().count()}function KM(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),QM}function QM(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Qd(r,t){M(ZS(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,ut(JM,t))})}function JM(r,t){var e=Qf(r);return e&&e.setOutputEnd((t||this).count()),t}function Qf(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var Hr=Cl,dv=function(){function r(){this.group=new Dt,this.uid=io("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){},r.prototype.updateLayout=function(t,e,n,a){},r.prototype.updateVisual=function(t,e,n,a){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();Wh(dv);il(dv);var Te=dv;function pv(){var r=St();return function(t){var e=r(t),n=t.pipelineContext,a=!!e.large,i=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var i_=St(),jM=pv(),gv=function(){function r(){this.group=new Dt,this.uid=io("viewChart"),this.renderTask=Ai({plan:tD,reset:eD}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){throw new Error("render method must been implemented")},r.prototype.highlight=function(t,e,n,a){var i=t.getData(a&&a.dataType);if(!i){$t("Unknown dataType "+a.dataType);return}jd(i,a,"emphasis")},r.prototype.downplay=function(t,e,n,a){var i=t.getData(a&&a.dataType);if(!i){$t("Unknown dataType "+a.dataType);return}jd(i,a,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.updateLayout=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.updateVisual=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.eachRendered=function(t){pl(this.group,t)},r.markUpdateMethod=function(t,e){i_(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function Jd(r,t,e){r&&Ta(r)&&(t==="emphasis"?xa:wa)(r,e)}function jd(r,t,e){var n=Ln(r,t),a=t&&t.highlightKey!=null?lT(t.highlightKey):null;n!=null?M(xt(n),function(i){Jd(r.getItemGraphicEl(i),e,a)}):r.eachItemGraphicEl(function(i){Jd(i,e,a)})}Wh(gv,["dispose"]);il(gv);function tD(r){return jM(r.model)}function eD(r){var t=r.model,e=r.ecModel,n=r.api,a=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=a&&i_(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,a),rD[l]}var rD={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)}}},Qe=gv,Bs="\0__throttleOriginMethod",tp="\0__throttleRate",ep="\0__throttleType";function mv(r,t,e){var n,a=0,i=0,o=null,s,l,u,f;t=t||0;function h(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],d=0;d=0?h():o=setTimeout(h,-s),a=n};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function Ml(r,t,e,n){var a=r[t];if(!!a){var i=a[Bs]||a,o=a[ep],s=a[tp];if(s!==e||o!==n){if(e==null||!n)return r[t]=i;a=r[t]=mv(i,e,n==="debounce"),a[Bs]=i,a[ep]=n,a[tp]=e}return a}}function Ns(r,t){var e=r[t];e&&e[Bs]&&(e.clear&&e.clear(),r[t]=e[Bs])}var rp=St(),np={itemStyle:Bi(p0,!0),lineStyle:Bi(d0,!0)},nD={lineStyle:"stroke",itemStyle:"fill"};function o_(r,t){var e=r.visualStyleMapper||np[t];return e||(console.warn("Unknown style type '"+t+"'."),np.itemStyle)}function s_(r,t){var e=r.visualDrawType||nD[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var aD={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=o_(r,n),o=i(a),s=a.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=s_(r,n),u=o[l],f=$(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"||$(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||$(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=B({},o);p[l]=f(g),v.setItemVisual(d,"style",p)}}}},ja=new Ft,iD={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=o_(r,n),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){ja.option=l[n];var u=a(ja),f=o.ensureUniqueItemVisual(s,"style");B(f,u),ja.option.decal&&(o.setItemVisual(s,"decal",ja.option.decal),ja.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},oD={performRawSeries:!0,overallReset:function(r){var t=Y();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var a=e.type+"-"+n,i=t.get(a);i||(i={},t.set(a,i)),rp(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),a={},i=e.getData(),o=rp(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=s_(e,s);i.each(function(u){var f=i.getRawIndex(u);a[f]=u}),n.each(function(u){var f=a[u],h=i.getItemVisual(f,"colorFromPalette");if(h){var c=i.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",d=n.count();c[l]=e.getColorFromPalette(v,o,d)}})}})}},Eo=Math.PI;function sD(r,t){t=t||{},J(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 Dt,n=new _t({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var a=new Et({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new _t({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new Kh({shape:{startAngle:-Eo/2,endAngle:-Eo/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:Eo*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Eo*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=a.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}),i.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 lD=function(){function r(t,e,n,a){this._stageTaskMap=Y(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(t,e){if(!!t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),a=n.context,i=!e&&n.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.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),a=t.getData(),i=a.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Y();t.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;M(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),o="";o='"reset" and "overallReset" must not be both specified.',Z(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,e,n),a.overallReset&&this._createOverallStageTask(a,i,e,n)},this)},r.prototype.prepareView=function(t,e,n,a){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=n,o.api=a,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},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,a){a=a||{};var i=!1,o=this;M(t,function(l,u){if(!(a.visualType&&a.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(a,p)&&(p.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,n);var g=o.getPerformArgs(c,a.block);d.each(function(p){p.perform(g)}),c.perform(g)&&(i=!0)}else h&&h.each(function(p,m){s(a,p)&&p.dirty();var y=o.getPerformArgs(p,a.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(p.context.model),o.updatePayload(p,n),p.perform(y)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||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,a){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Y(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,a).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||Ai({plan:cD,reset:dD,count:gD}));v.context={model:h,ecModel:n,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,n,a){var i=this,o=e.overallTask=e.overallTask||Ai({reset:uD});o.context={ecModel:n,api:a,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=Y(),u=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";v='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.',Z(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):f?f(n,a).each(d):(h=!1,M(n.getSeries(),d));function d(g){var p=g.uid,m=l.set(p,s&&s.get(p)||(c=!0,Ai({reset:fD,onDirty:vD})));m.context={model:g,overallProgress:h},m.agent=o,m.__block=h,i._pipe(g,m)}c&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=e),a.tail&&a.tail.pipe(e),a.tail=e,e.__idxInPipeline=a.count++,e.__pipeline=a},r.wrapStageHandler=function(t,e){return $(t)&&(t={overallReset:t,seriesType:mD(t)}),t.uid=io("stageHandler"),e&&(t.visualType=e),t},r}();function uD(r){r.overallReset(r.ecModel,r.api,r.payload)}function fD(r){return r.overallProgress&&hD}function hD(){this.agent.dirty(),this.getDownstream().dirty()}function vD(){this.agent&&this.agent.dirty()}function cD(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function dD(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=xt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?z(t,function(e,n){return l_(n)}):pD}var pD=l_(0);function l_(r){return function(t,e){var n=e.data,a=e.resetDefines[r];if(a&&a.dataEach)for(var i=t.start;i0&&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||(a[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:a}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=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,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,i));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Jf=["symbol","symbolSize","symbolRotate","symbolOffset"],sp=Jf.concat(["symbolKeepAspect"]),bD={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={},a={},i=!1,o=0;o=0&&_n(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function jf(r,t,e){for(var n=t.type==="radial"?VD(r,t,e):GD(r,t,e),a=t.colorStops,i=0;i0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:dt(r)?[r]:F(r)?r:null}function d_(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&WD(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var a=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(e=z(e,function(i){return i/a}),n/=a)}return[e,n]}var UD=new dr(!0);function Gs(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function lp(r){return typeof r=="string"&&r!=="none"}function Vs(r){var t=r.fill;return t!=null&&t!=="none"}function up(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 fp(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 th(r,t,e){var n=my(t.image,t.__image,e);if(ol(n)){var a=r.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*jo),i.scaleSelf(t.scaleX||1,t.scaleY||1),a.setTransform(i)}return a}}function YD(r,t,e,n){var a,i=Gs(e),o=Vs(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||UD,h=t.__dirty;if(!n){var c=e.fill,v=e.stroke,d=o&&!!c.colorStops,g=i&&!!v.colorStops,p=o&&!!c.image,m=i&&!!v.image,y=void 0,_=void 0,S=void 0,x=void 0,b=void 0;(d||g)&&(b=t.getBoundingRect()),d&&(y=h?jf(r,c,b):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(_=h?jf(r,v,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),p&&(S=h||!t.__canvasFillPattern?th(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=S),m&&(x=h||!t.__canvasStrokePattern?th(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),d?r.fillStyle=y:p&&(S?r.fillStyle=S:o=!1),g?r.strokeStyle=_:m&&(x?r.strokeStyle=x:i=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,C;r.setLineDash&&e.lineDash&&(a=d_(t),T=a[0],C=a[1]);var A=!0;(u||h&na)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),n||(e.strokeFirst?(i&&fp(r,e),o&&up(r,e)):(o&&up(r,e),i&&fp(r,e))),T&&r.setLineDash([])}function $D(r,t,e){var n=t.__image=my(e.image,t.__image,t,t.onload);if(!(!n||!ol(n))){var a=e.x||0,i=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,a,i,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,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function ZD(r,t,e){var n,a=e.text;if(a!=null&&(a+=""),a){r.font=e.font||An,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var i=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=d_(t),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),e.strokeFirst?(Gs(e)&&r.strokeText(a,e.x,e.y),Vs(e)&&r.fillText(a,e.x,e.y)):(Vs(e)&&r.fillText(a,e.x,e.y),Gs(e)&&r.strokeText(a,e.x,e.y)),i&&r.setLineDash([])}}var hp=["shadowBlur","shadowOffsetX","shadowOffsetY"],vp=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function p_(r,t,e,n,a){var i=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){ie(r,a),i=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Tn.opacity:o}(n||t.blend!==e.blend)&&(i||(ie(r,a),i=!0),r.globalCompositeOperation=t.blend||Tn.blend);for(var s=0;so.maxTileWidth&&E("maxTileWidth"),R>o.maxTileHeight&&E("maxTileHeight")}return{width:Math.max(1,Math.min(D,o.maxTileWidth)),height:Math.max(1,Math.min(R,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,x.width,x.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,x.width,x.height)));for(var D=0,I=0;I0&&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,a){if(this[Ht]){$t("`setOption` should not be called during main process.");return}if(this._disposed){le(this.id);return}var i,o,s;if(W(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Ht]=!0,!this._model||n){var l=new rM(this._api),u=this._theme,f=this._model=new B0;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},nh);var h={seriesTransition:s,optionChanged:!0};if(a)this[re]={silent:i,updateParams:h},this[Ht]=!1,this.getZr().wakeUp();else{try{Kn(this),Cr.update.call(this,null,h)}catch(c){throw this[re]=null,this[Ht]=!1,c}this._ssr||this._zr.flush(),this[re]=null,this[Ht]=!1,ti.call(this,i),ei.call(this,i)}},t.prototype.setTheme=function(){Ne("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||tt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return Rt("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(!!tt.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return M(n,function(a){a.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){le(this.id);return}e=e||{};var n=e.excludeComponents,a=this._model,i=[],o=this;M(n,function(l){a.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.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 M(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){le(this.id);return}var n=e.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(Dp[a]){var l=s,u=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();M(Li,function(_,S){if(_.group===a){var x=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(j(e)),b=_.getDom().getBoundingClientRect();l=i(b.left,l),u=i(b.top,u),f=o(b.right,f),h=o(b.bottom,h),c.push({dom:x,left:b.left,top:b.top})}}),l*=v,u*=v,f*=v,h*=v;var d=f-l,g=h-u,p=La.createCanvas(),m=Mc(p,{renderer:n?"svg":"canvas"});if(m.resize({width:d,height:g}),n){var y="";return M(c,function(_){var S=_.left-l,x=_.top-u;y+=''+_.dom+""}),m.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return e.connectedBackgroundColor&&m.add(new _t({shape:{x:0,y:0,width:d,height:g},style:{fill:e.connectedBackgroundColor}})),M(c,function(_){var S=new On({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});m.add(S)}),m.refreshImmediately(),p.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return Ru(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return Ru(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){le(this.id);return}var a=this._model,i,o=wi(a,e);return M(o,function(s,l){l.indexOf("Models")>=0&&M(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint?i=i||h.containPoint(n,u):Pt(l+": "+(h?"The found component do not support containPoint.":"No view mapping to the found component."))}else Pt(l+": containPoint is not supported")},this)},this),!!i},t.prototype.getVisual=function(e,n){var a=this._model,i=wi(a,e,{defaultMainType:"series"}),o=i.seriesModel;o||Pt("There is no specified series model");var s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?wD(s,l,n):TD(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;M(_A,function(n){var a=function(i){var o=e.getModel(),s=i.target,l,u=n==="globalout";if(u?l={}:s&&_i(s,function(d){var g=ht(d);if(g&&g.dataIndex!=null){var p=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=p&&p.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=B({},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)&&Pt("model or view can not be found by params"),l.event=i,l.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},e.trigger(n,l)}};a.zrEventfulCallAtLast=!0,e._zr.on(n,a,e)}),M(Ii,function(n,a){e._messageCenter.on(a,function(i){this.trigger(a,i)},e)}),M(["selectchanged"],function(n){e._messageCenter.on(n,function(a){this.trigger(n,a)},e)}),MD(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){le(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){le(this.id);return}this._disposed=!0;var e=this.getDom();e&&cy(this.getDom(),Sv,"");var n=this,a=n._api,i=n._model;M(n._componentsViews,function(o){o.dispose(i,a)}),M(n._chartsViews,function(o){o.dispose(i,a)}),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 Li[n.id]},t.prototype.resize=function(e){if(this[Ht]){$t("`resize` should not be called during main process.");return}if(this._disposed){le(this.id);return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=e&&e.silent;this[re]&&(i==null&&(i=this[re].silent),a=!0,this[re]=null),this[Ht]=!0;try{a&&Kn(this),Cr.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[Ht]=!1,o}this[Ht]=!1,ti.call(this,i),ei.call(this,i)}},t.prototype.showLoading=function(e,n){if(this._disposed){le(this.id);return}if(W(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!ah[e]){Pt("Loading effects "+e+" not exists.");return}var a=ah[e](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)},t.prototype.hideLoading=function(){if(this._disposed){le(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=B({},e);return n.type=Ii[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){le(this.id);return}if(W(n)||(n={silent:!!n}),!!Ws[e.type]&&!!this._model){if(this[Ht]){this._pendingActions.push(e);return}var a=n.silent;ku.call(this,e,a);var i=n.flush;i?this._zr.flush():i!==!1&&tt.browser.weChat&&this._throttledZrFlush(),ti.call(this,a),ei.call(this,a)}},t.prototype.updateLabelLayout=function(){Pe.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){le(this.id);return}var n=e.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);Z(e.data&&i),i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Kn=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Pu(h,!0),Pu(h,!1),c.plan()},Pu=function(h,c){for(var v=h._model,d=h._scheduler,g=c?h._componentsViews:h._chartsViews,p=c?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_c.get("hoverLayerThreshold")&&!tt.node&&!tt.worker&&c.eachSeries(function(p){if(!p.preventUsingHoverLayer){var m=h._chartsMap[p.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.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(),m=h.isGroup;if(m)for(var y=h.childrenRef(),_=0;_0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(m){if(m.states&&m.states.emphasis){if(da(m))return;if(m instanceof ot&&uT(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=p;var _=m.getTextContent(),S=m.getTextGuideLine();_&&(_.stateTransition=p),S&&(S.stateTransition=p)}m.__dirty&&a(m)}})}Cp=function(h){return new(function(c){O(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){xa(d,g),ce(h)},v.prototype.leaveEmphasis=function(d,g){wa(d,g),ce(h)},v.prototype.enterBlur=function(d){jw(d),ce(h)},v.prototype.leaveBlur=function(d){ky(d),ce(h)},v.prototype.enterSelect=function(d){Oy(d),ce(h)},v.prototype.leaveSelect=function(d){By(d),ce(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}(N0))(h)},I_=function(h){function c(v,d){for(var g=0;g=0)){Ap.push(e);var i=h_.wrapStageHandler(e,a);i.__prio=t,i.__raw=e,r.push(i)}}function O_(r,t){ah[r]=t}function MA(r,t,e){var n=aA("registerMap");n&&n(r,t,e)}var DA=PM;Nn(yv,aD);Nn(Dl,iD);Nn(Dl,oD);Nn(yv,bD);Nn(Dl,xD);Nn(w_,eA);E_(z0);k_(sA,fM);O_("default",sD);er({type:Cn,event:Cn,update:Cn},Jt);er({type:ss,event:ss,update:ss},Jt);er({type:Ti,event:Ti,update:Ti},Jt);er({type:ls,event:ls,update:ls},Jt);er({type:Ci,event:Ci,update:Ci},Jt);R_("light",yD);R_("dark",_D);var Ip=[],AA={registerPreprocessor:E_,registerProcessor:k_,registerPostInit:xA,registerPostUpdate:wA,registerUpdateLifecycle:bv,registerAction:er,registerCoordinateSystem:TA,registerLayout:CA,registerVisual:Nn,registerTransform:DA,registerLoading:O_,registerMap:MA,registerImpl:nA,PRIORITY:gA,ComponentModel:gt,ComponentView:Te,SeriesModel:Hr,ChartView:Qe,registerComponentModel:function(r){gt.registerClass(r)},registerComponentView:function(r){Te.registerClass(r)},registerSeriesModel:function(r){Hr.registerClass(r)},registerChartView:function(r){Qe.registerClass(r)},registerSubTypeDefaulter:function(r,t){gt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){mx(r,t)}};function Je(r){if(F(r)){M(r,function(t){Je(t)});return}it(Ip,r)>=0||(Ip.push(r),$(r)&&(r={install:r}),r.install(AA))}function ri(r){return r==null?0:r.length||1}function Lp(r){return r}var IA=function(){function r(t,e,n,a,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Lp,this._newKeyGetter=a||Lp,this.context=i,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={},a=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(e,n,i,"_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(i,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},a={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(e,a,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),a[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),a[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),a[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),a[l]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var ni=W,Mr=z,NA=typeof Int32Array=="undefined"?Array:Int32Array,FA="e\0\0",Pp=-1,zA=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],GA=["_approximateExtent"],Rp,zo,ai,Qn,Nu,Go,Fu,VA=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,a=!1;N_(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,n=t),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=0),a&&(c.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Y();M(o,function(p){g.set(i[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 a=this._schema.getSourceDimension(e);if(a)return a.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(dt(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("Unknown 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 a=n.encode[t];return a?a[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 a=this,i;if(t instanceof Xf&&(i=t),!i){var o=this.dimensions,s=fv(t)||jt(t)?new H0(t,o.length):t;i=new Xf;var l=Mr(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=PA(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),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=a;s=e)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===Me;if(l&&!a.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,a=n[t];a||(a=n[t]={});var i=a[e];return i==null&&(i=this.getVisual(e),F(i)?i=i.slice():ni(i)&&(i=B({},i)),a[e]=i),i},r.prototype.setItemVisual=function(t,e,n){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,ni(e)?B(a,e):a[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){ni(t)?B(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?B(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;Ww(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(n,a){n&&t&&t.call(e,n,a)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Mr(this.dimensions,this._getDimInfo,this),this.hostModel)),Nu(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];!$(n)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=n.apply(this,arguments);return e.apply(this,[a].concat(kh(arguments)))})},r.internalField=function(){Rp=function(t){var e=t._invertedIndicesMap;M(e,function(n,a){var i=t._dimInfos[a],o=i.ordinalMeta,s=t._store;if(o){n=e[a]=new NA(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),a[e]=l}}}(),r}(),V_=VA;function H_(r,t){fv(r)||(r=hv(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],a=Y(),i=[],o=WA(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&G_(o),l=n===r.dimensionsDefine,u=l?z_(r):F_(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=Y(f),c=new K0(o),v=0;v0&&(n.name=a+(i-1)),i++,t.set(a,i)}}function WA(r,t,e,n){var a=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return M(t,function(i){var o;W(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function UA(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var YA=function(){function r(t){this.coordSysDims=[],this.axisMap=Y(),this.categoryAxisMap=Y(),this.coordSysName=t}return r}();function $A(r){var t=r.get("coordinateSystem"),e=new YA(t),n=ZA[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var ZA={cartesian2d:function(r,t,e,n){var a=r.getReferringComponents("xAxis",Qt).models[0],i=r.getReferringComponents("yAxis",Qt).models[0];{if(!a)throw new Error('xAxis "'+In(r.get("xAxisIndex"),r.get("xAxisId"),0)+'" not found');if(!i)throw new Error('yAxis "'+In(r.get("xAxisIndex"),r.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],e.set("x",a),e.set("y",i),Jn(a)&&(n.set("x",a),t.firstCategoryDimIndex=0),Jn(i)&&(n.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var a=r.getReferringComponents("singleAxis",Qt).models[0];if(!a)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],e.set("single",a),Jn(a)&&(n.set("single",a),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var a=r.getReferringComponents("polar",Qt).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");{if(!o)throw new Error("angleAxis option not found");if(!i)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),Jn(i)&&(n.set("radius",i),t.firstCategoryDimIndex=0),Jn(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 a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();M(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Jn(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Jn(r){return r.get("type")==="category"}function XA(r,t,e){e=e||{};var n=e.byIndex,a=e.stackedCoordDimension,i,o,s;qA(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(M(i,function(y,_){V(y)&&(i[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!a||a===y.coordDim)&&(f=y))}),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;M(i,function(y){y.coordDim===v&&g++});var p={name:h,coordDim:v,coordDimIndex:g,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},m={name:c,coordDim:c,coordDimIndex:g+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(p.storeDimIndex=s.ensureCalculationDimension(c,d),m.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(p),o.appendCalculationDimension(m)):(i.push(p),i.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:h}}function qA(r){return!N_(r.schema)}function Da(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function KA(r,t){return Da(r,t)?r.getCalculationInfo("stackResultDimension"):t}function QA(r,t){var e=r.get("coordinateSystem"),n=uv.get(e),a;return t&&t.coordSysDims&&(a=z(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=RA(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function JA(r,t,e){var n,a;return e&&M(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function wv(r,t,e){e=e||{};var n=t.getSourceManager(),a,i=!1;r?(i=!0,a=hv(r)):(a=n.getSource(),i=a.sourceFormat===Me);var o=$A(t),s=QA(t,o),l=e.useEncodeDefaulter,u=$(l)?l:l?ut(kC,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},h=H_(a,f),c=JA(h.dimensions,e.createInvertedIndices,o),v=i?null:n.getSharedDataStore(h),d=XA(t,{schema:h,store:v}),g=new V_(h,t);g.setCalculationInfo(d);var p=c!=null&&jA(a)?function(m,y,_,S){return S===c?_:this.defaultDimValueGetter(m,y,_,S)}:null;return g.hasItemOption=!1,g.initData(i?a:v,null,p),g}function jA(r){if(r.sourceFormat===Me){var t=t2(r.data||[]);return!F(to(t))}}function t2(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}();il(W_);var _r=W_,e2=0,r2=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++e2}return r.createByAxisModel=function(t){var e=t.option,n=e.data,a=n&&z(n,n2);return new r({categories:a,needCollect:!a,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(!V(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var a=this._getOrCreateMap();return e=a.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,a.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Y(this.categories))},r}();function n2(r){return W(r)&&r.value!=null?r.value:r+""}var ih=r2;function a2(r){var t=Math.pow(10,nl(Math.abs(r))),e=Math.abs(r/t);return e===0||e===1||e===2||e===3||e===5}function oh(r){return r.type==="interval"||r.type==="log"}function i2(r,t,e,n){var a={},i=r[1]-r[0],o=a.interval=oy(i/t,!0);e!=null&&on&&(o=a.interval=n);var s=a.intervalPrecision=U_(o),l=a.niceTickExtent=[It(Math.ceil(r[0]/o)*o,s),It(Math.floor(r[1]/o)*o,s)];return o2(l,r),a}function zu(r){var t=Math.pow(10,nl(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,It(e*t)}function U_(r){return sr(r)+2}function Ep(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function o2(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Ep(r,0,t),Ep(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Al(r,t){return r>=t[0]&&r<=t[1]}function Il(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Ll(r,t){return r*(t[1]-t[0])+t[0]}var Y_=function(r){O(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new ih({})),F(a)&&(a=new ih({categories:z(a,function(i){return W(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:V(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Al(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Il(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Ll(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,a=n[0];a<=n[1];)e.push({value:a}),a++;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,a=this._ordinalNumbersByTick=[],i=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}(_r);_r.registerClass(Y_);var $_=Y_,hn=It,Z_=function(r){O(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 Al(e,this._extent)},t.prototype.normalize=function(e){return Il(e,this._extent)},t.prototype.scale=function(e){return Ll(e,this._extent)},t.prototype.setExtent=function(e,n){var a=this._extent;isNaN(e)||(a[0]=parseFloat(e)),isNaN(n)||(a[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=U_(e)},t.prototype.getTicks=function(e){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;a[0]l)return[];var f=s.length?s[s.length-1].value:i[1];return a[1]>f&&(e?s.push({value:hn(f+n,o)}):s.push({value:a[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;oi[0]&&v0&&(i=i===null?s:Math.min(i,s))}e[n]=i}}return e}function K_(r){var t=l2(r),e=[];return M(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],f=Math.abs(o[1]-o[0]),h=i.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=vt(n.get("barWidth"),s),g=vt(n.get("barMaxWidth"),s),p=vt(n.get("barMinWidth")||(j_(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:p,barGap:m,barCategoryGap:y,axisKey:Cv(i),stackId:Tv(n)})}),Q_(e)}function Q_(r){var t={};M(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[i]=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 M(t,function(n,a){e[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=yt(i).length;s=Math.max(35-l*4,15)+"%"}var u=vt(s,o),f=vt(n.gap,1),h=n.remainedWidth,c=n.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),M(i,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var S=m.width;y&&(S=Math.min(S,y)),_&&(S=Math.max(S,_)),m.width=S,h-=S+f*S,c--}else{var S=v;y&&yS&&(S=_),S!==v&&(m.width=S,h-=S+f*S,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var d=0,g;M(i,function(m,y){m.width||(m.width=v),g=m,d+=m.width*(1+f)}),g&&(d-=g.width*f);var p=-d/2;M(i,function(m,y){e[a][y]=e[a][y]||{bandWidth:o,offset:p,width:m.width},p+=m.width*(1+f)})}),e}function u2(r,t,e){if(r&&t){var n=r[Cv(t)];return n!=null&&e!=null?n[Tv(e)]:n}}function f2(r,t){var e=q_(r,t),n=K_(e);M(e,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=Tv(a),u=n[Cv(s)][l],f=u.offset,h=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function h2(r){return{seriesType:r,plan:pv(),reset:function(t){if(!!J_(t)){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(a.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),f=e.getCalculationInfo("stackResultDimension"),h=Da(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),c=i.isHorizontal(),v=v2(a,i),d=j_(t),g=t.get("barMinHeight")||0,p=f&&e.getDimensionIndex(f),m=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,S){for(var x=_.count,b=d&&ur(x*3),w=d&&l&&ur(x*3),T=d&&ur(x),C=n.master.getRect(),A=c?C.width:C.height,D,I=S.getStore(),L=0;(D=_.next())!=null;){var P=I.get(h?p:o,D),R=I.get(s,D),E=v,G=void 0;h&&(G=+P-I.get(o,D));var k=void 0,N=void 0,H=void 0,X=void 0;if(c){var Q=n.dataToPoint([P,R]);if(h){var rt=n.dataToPoint([G,R]);E=rt[0]}k=E,N=Q[1]+y,H=Q[0]-E,X=m,Math.abs(H)>>1;r[a][1]a&&(this._approxInterval=a);var s=Vo.length,l=Math.min(c2(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 dt(e)?e:+cr(e)},t.prototype.contain=function(e){return Al(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Il(this.parse(e),this._extent)},t.prototype.scale=function(e){return Ll(e,this._extent)},t.type="time",t}(lo),Vo=[["second",nv],["minute",av],["hour",Di],["quarter-day",Di*6],["half-day",Di*12],["day",Se*1.2],["half-week",Se*3.5],["week",Se*7],["month",Se*31],["quarter",Se*95],["half-year",bd/2],["year",bd]];function d2(r,t,e,n){var a=cr(t),i=cr(e),o=function(d){return wd(a,d,n)===wd(i,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 p2(r,t){return r/=Se,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function g2(r){var t=30*Se;return r/=t,r>6?6:r>3?3:r>2?2:1}function m2(r){return r/=Di,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function kp(r,t){return r/=t?av:nv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function y2(r){return oy(r,!0)}function _2(r,t,e){var n=new Date(r);switch(pa(t)){case"year":case"month":n[S0(e)](0);case"day":n[b0(e)](1);case"hour":n[x0(e)](0);case"minute":n[w0(e)](0);case"second":n[T0(e)](0),n[C0(e)](0)}return n.getTime()}function S2(r,t,e,n){var a=1e4,i=y0,o=0;function s(A,D,I,L,P,R,E){for(var G=new Date(D),k=D,N=G[L]();k1&&R===0&&I.unshift({value:I[0].value-k})}}for(var R=0;R=n[0]&&y<=n[1]&&h++)}var _=(n[1]-n[0])/t;if(h>_*1.5&&c>_/1.5||(u.push(p),h>_||r===i[v]))break}f=[]}}}o>=a&&Pt("Exceed safe limit.");for(var S=Mt(z(u,function(A){return Mt(A,function(D){return D.value>=n[0]&&D.value<=n[1]&&!D.notAdd})}),function(A){return A.length>0}),x=[],b=S.length-1,v=0;v0;)i*=10;var s=[It(T2(n[0]/i)*i),It(w2(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){Pi.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=Ae(e)/Ae(this.base),Al(e,this._extent)},t.prototype.normalize=function(e){return e=Ae(e)/Ae(this.base),Il(e,this._extent)},t.prototype.scale=function(e){return e=Ll(e,this._extent),Ho(this.base,e)},t.type="log",t}(_r),e1=Mv.prototype;e1.getMinorTicks=Pi.getMinorTicks;e1.getLabel=Pi.getLabel;function Wo(r,t){return x2(r,sr(t))}_r.registerClass(Mv);var C2=Mv,M2=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){Z(!this.frozen),this[A2[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=D2[t];Z(!this.frozen&&this[n]==null),this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),D2={min:"_determinedMin",max:"_determinedMax"},A2={min:"_dataMin",max:"_dataMax"};function r1(r,t,e){var n=r.rawExtentInfo;return n||(n=new M2(r,t,e),r.rawExtentInfo=n,n)}function Uo(r,t){return t==null?null:Ei(t)?NaN:r.parse(t)}function n1(r,t){var e=r.type,n=r1(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=t.ecModel;if(o&&e==="time"){var s=q_("bar",o),l=!1;if(M(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=K_(s),f=I2(a,i,t,u);a=f.min,i=f.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function I2(r,t,e,n){var a=e.axis.getExtent(),i=a[1]-a[0],o=u2(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;M(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)/i,c=f/h-f;return t+=c*(l/u),r-=c*(s/u),{min:r,max:t}}function Bp(r,t){var e=t,n=n1(r,e),a=n.extent,i=e.get("splitNumber");r instanceof C2&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,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 L2(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new $_({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new b2({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(_r.getClass(t)||lo)}}function P2(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function uo(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(a,i){return r.scale.getFormattedLabel(a,i,n)}}(t):V(t)?function(n){return function(a){var i=r.scale.getLabel(a),o=n.replace("{value}",i!=null?i:"");return o}}(t):$(t)?function(n){return function(a,i){return e!=null&&(i=a.value-e),n(Dv(r,a),i,a.level!=null?{level:a.level}:null)}}(t):function(n){return r.scale.getLabel(n)}}function Dv(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function R2(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,a,i=e.getExtent();e instanceof $_?a=e.count():(n=e.getTicks(),a=n.length);var o=r.getLabelModel(),s=uo(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;fr[1]&&(r[1]=a[1])})}var O2=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),Xi=St();function B2(r){return r.type==="category"?F2(r):G2(r)}function N2(r,t){return r.type==="category"?z2(r,t):{ticks:z(r.scale.getTicks(),function(e){return e.value})}}function F2(r){var t=r.getLabelModel(),e=o1(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function o1(r,t){var e=s1(r,"labels"),n=Av(t),a=l1(e,n);if(a)return a;var i,o;return $(n)?i=h1(r,n):(o=n==="auto"?V2(r):n,i=f1(r,o)),u1(e,n,{labels:i,labelCategoryInterval:o})}function z2(r,t){var e=s1(r,"ticks"),n=Av(t),a=l1(e,n);if(a)return a;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),$(n))i=h1(r,n,!0);else if(n==="auto"){var s=o1(r,r.getLabelModel());o=s.labelCategoryInterval,i=z(s.labels,function(l){return l.tickValue})}else o=n,i=f1(r,o,!0);return u1(e,n,{ticks:i,tickCategoryInterval:o})}function G2(r){var t=r.scale.getTicks(),e=uo(r);return{labels:z(t,function(n,a){return{level:n.level,formattedLabel:e(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function s1(r,t){return Xi(r)[t]||(Xi(r)[t]=[])}function l1(r,t){for(var e=0;e40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[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<=i[1];l+=s){var d=0,g=0,p=rl(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 m=c/f,y=v/h;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),S=Xi(r.model),x=r.getExtent(),b=S.lastAutoInterval,w=S.lastTickCount;return b!=null&&w!=null&&Math.abs(b-_)<=1&&Math.abs(w-o)<=1&&b>_&&S.axisExtent0===x[0]&&S.axisExtent1===x[1]?_=b:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=x[0],S.axisExtent1=x[1]),_}function W2(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 f1(r,t,e){var n=uo(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=a1(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==i[0]&&g(i[0]);for(var d=u;d<=i[1];d+=l)g(d);v&&d-l!==i[1]&&g(i[1]);function g(p){var m={value:p};s.push(e?p:{formattedLabel:n(m),rawLabel:a.getLabel(m),tickValue:p})}return s}function h1(r,t,e){var n=r.scale,a=uo(r),i=[];return M(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),i}var Np=[0,1],U2=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]),a=Math.max(e[0],e[1]);return t>=n&&t<=a},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return ay(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,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(n=n.slice(),Fp(n,a.count())),Nt(t,Np,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),Fp(n,a.count()));var i=Nt(t,n,Np,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=N2(this,e),a=n.ticks,i=z(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return Y2(this,i,o,t.clamp),i},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),a=z(n,function(i){return z(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return B2(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 a=Math.abs(t[1]-t[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(){return H2(this)},r}();function Fp(r,t){var e=r[1]-r[0],n=t,a=e/n/2;r[0]+=a,r[1]-=a}function Y2(r,t,e,n){var a=t.length;if(!r.onBand||e||!a)return;var i=r.getExtent(),o,s;if(a===1)t[0].coord=i[0],o=t[1]={coord:i[1]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;M(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[a-1].tickValue,o={coord:t[a-1].coord+u*s},t.push(o)}var h=i[0]>i[1];c(t[0].coord,i[0])&&(n?t[0].coord=i[0]:t.shift()),n&&c(i[0],t[0].coord)&&t.unshift({coord:i[0]}),c(i[1],o.coord)&&(n?o.coord=i[1]:t.pop()),n&&c(o.coord,i[1])&&t.push({coord:i[1]});function c(v,d){return v=It(v),d=It(d),h?v>d:va&&(a+=ii);var v=Math.atan2(s,o);if(v<0&&(v+=ii),v>=n&&v<=a||v+ii>=n&&v+ii<=a)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(a)+r,m=e*Math.sin(a)+t,y=(d-o)*(d-o)+(g-s)*(g-s),_=(p-o)*(p-o)+(m-s)*(m-s);return y<_?(l[0]=d,l[1]=g,Math.sqrt(y)):(l[0]=p,l[1]=m,Math.sqrt(_))}function Ys(r,t,e,n,a,i,o,s){var l=a-r,u=i-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-a)*(g-a)+(p-i)*(p-i))}function v1(r,t,e,n,a,i,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(a,r),s),f=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-a)*(u-a)+(f-i)*(f-i))}var Re=[];function K2(r,t,e){var n=v1(t.x,t.y,t.width,t.height,r.x,r.y,Re);return e.set(Re[0],Re[1]),n}function Q2(r,t,e){for(var n=0,a=0,i=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,ke.fromArray(r[0]),pt.fromArray(r[1]),wt.fromArray(r[2]),U.sub(qe,ke,pt),U.sub($e,wt,pt);var e=qe.len(),n=$e.len();if(!(e<.001||n<.001)){qe.scale(1/e),$e.scale(1/n);var a=qe.dot($e),i=Math.cos(t);if(i1&&U.copy(Kt,wt),Kt.toArray(r[1])}}}}function J2(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,ke.fromArray(r[0]),pt.fromArray(r[1]),wt.fromArray(r[2]),U.sub(qe,pt,ke),U.sub($e,wt,pt);var n=qe.len(),a=$e.len();if(!(n<.001||a<.001)){qe.scale(1/n),$e.scale(1/a);var i=qe.dot(t),o=Math.cos(e);if(i=l)U.copy(Kt,wt);else{Kt.scaleAndAdd($e,s/Math.tan(Math.PI/2-f));var h=wt.x!==pt.x?(Kt.x-pt.x)/(wt.x-pt.x):(Kt.y-pt.y)/(wt.y-pt.y);if(isNaN(h))return;h<0?U.copy(Kt,pt):h>1&&U.copy(Kt,wt)}Kt.toArray(r[1])}}}}function Gp(r,t,e,n){var a=e==="normal",i=a?r:r.ensureState(e);i.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function j2(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 a=pf(n[0],n[1]),i=pf(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*e,s=ts([],n[1],n[0],o/a),l=ts([],n[1],n[2],o/i),u=ts([],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&&i&&x(-f/o,0,o);var g=r[0],p=r[o-1],m,y;_(),m<0&&b(-m,.8),y<0&&b(y,.8),_(),S(m,y,1),S(y,m,-1),_(),m<0&&w(-m),y<0&&w(y);function _(){m=g.rect[t]-n,y=a-p.rect[t]-p.rect[e]}function S(T,C,A){if(T<0){var D=Math.min(C,-T);if(D>0){x(D*A,0,o);var I=D+T;I<0&&b(-I*A,1)}else b(-T*A,1)}}function x(T,C,A){T!==0&&(u=!0);for(var D=C;D0)for(var I=0;I0;I--){var E=A[I-1]*R;x(-E,I,o)}}}function w(T){var C=T<0?-1:1;T=Math.abs(T);for(var A=Math.ceil(T/(o-1)),D=0;D0?x(A,0,D+1):x(-A,o-D-1,o),T-=A,T<=0)return}return u}function tI(r,t,e,n){return m1(r,"x","width",t,e,n)}function y1(r,t,e,n){return m1(r,"y","height",t,e,n)}function _1(r){var t=[];r.sort(function(g,p){return p.priority-g.priority});var e=new st(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 a=0;a=0&&n.attr(i.oldLayoutSelect),it(c,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),Ot(n,u,e,l)}else if(n.attr(u),!Ba(n).valueAnimation){var h=nt(n.style.opacity,1);n.style.opacity=0,Yt(n,{style:{opacity:h}},e,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};Yo(v,u,$o),Yo(v,n.states.select,$o)}if(n.states.emphasis){var d=i.oldLayoutEmphasis={};Yo(d,u,$o),Yo(d,n.states.emphasis,$o)}oC(n,l,f,e,e)}if(a&&!a.ignore&&!a.invisible){var i=nI(a),o=i.oldLayout,g={points:a.shape.points};o?(a.attr({shape:o}),Ot(a,{shape:g},e)):(a.setShape(g),a.style.strokePercent=0,Yt(a,{style:{strokePercent:1}},e)),i.oldLayout=g}},r}(),iI=aI,Vu=St();function CO(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var a=Vu(e).labelManager;a||(a=Vu(e).labelManager=new iI),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var a=Vu(e).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),a.updateLayoutConfig(e),a.layout(e),a.processLabelsOverall()})}function Hp(r,t,e){var n=La.createCanvas(),a=t.getWidth(),i=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",n.setAttribute("data-zr-dom-id",r)),n.width=a*e,n.height=i*e,n}var oI=function(r){O(t,r);function t(e,n,a){var i=r.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;a=a||ws,typeof e=="string"?o=Hp(e,n,a):W(e)&&(o=e,e=o.id),i.id=e,i.dom=o;var s=o.style;return s&&(Rm(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=n,i.dpr=a,i}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=Hp("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,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new st(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new st(0,0,0,0);_.copy(y),o.push(_)}else{for(var S=!1,x=1/0,b=0,w=0;w=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&m.restore()};if(y)if(y.length===0)T=p.__endIndex;else for(var A=v.dpr,D=0;D0&&t>a[0]){for(l=0;lt);l++);s=n[a[l]]}if(a.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,a=0;a0?Zo:0),this._needsManuallyCompositing),f.__builtin__||bn("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),i=f),a.__dirty&fe&&!a.__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,M(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?et(n[t],e,!0):n[t]=e;for(var a=0;a-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}(Hr),cI=vI;function Iv(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var a=Ma(r,t,e[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(t[i])}return n.join(" ")}var dI=function(r){O(t,r);function t(e,n,a,i){var o=r.call(this)||this;return o.updateData(e,n,a,i),o}return t.prototype._createSymbol=function(e,n,a,i,o){this.removeAll();var s=Wr(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=pI,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(){xa(this.childAt(0))},t.prototype.downplay=function(){wa(this.childAt(0))},t.prototype.setZ=function(e,n){var a=this.childAt(0);a.zlevel=e,a.z=n},t.prototype.setDraggable=function(e,n){var a=this.childAt(0);a.draggable=e,a.cursor=!n&&e?"move":a.cursor},t.prototype.updateData=function(e,n,a,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=o!==this._symbolType,f=i&&i.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):Ot(c,v,s,n),Jh(c)}if(this._updateCommon(e,n,l,a,i),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,Yt(c,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,a,i,o){var s=this.childAt(0),l=e.hostModel,u,f,h,c,v,d,g,p,m;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,h=i.selectItemStyle,c=i.focus,v=i.blurScope,g=i.labelStatesModels,p=i.hoverScale,m=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var y=i&&i.itemModel?i.itemModel:e.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),g=ao(y),p=_.getShallow("scale"),m=y.getShallow("cursor")}var S=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var x=c_(e.getItemVisual(n,"symbolOffset"),a);x&&(s.x=x[0],s.y=x[1]),m&&s.attr("cursor",m);var b=e.getItemVisual(n,"style"),w=b.fill;if(s instanceof On){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},b))}else s.__isEmptyBrush?s.useStyle(B({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=e.getItemVisual(n,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var D=o&&o.useNameLabel;no(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:w,defaultOpacity:b.opacity});function I(R){return D?e.getName(R):Iv(e,R)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=p==null||p===!0?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),Ni(this,c,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,a){var i=this.childAt(0),o=ht(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&Ls(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Ls(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return zD(e.getItemVisual(n,"symbolSize"))},t}(Dt);function pI(r,t){this.parent.drift(r,t)}var Lv=dI;function Wu(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 Up(r){return r!=null&&!W(r)&&(r={isIgnore:r}),r||{}}function Yp(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:ao(t),cursorStyle:t.get("cursor")}}var gI=function(){function r(t){this.group=new Dt,this._SymbolCtor=t||Lv}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Up(e);var n=this.group,a=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Yp(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};i||n.removeAll(),t.diff(i).add(function(h){var c=f(h);if(Wu(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=i.getItemGraphicEl(c),d=f(h);if(!Wu(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 m={x:d[0],y:d[1]};s?v.attr(m):Ot(v,m,a)}n.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=i.getItemGraphicEl(h);c&&c.fadeOut(function(){n.remove(c)},a)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,a){var i=t._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Yp(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=Up(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?e=n[0]:n[1]<0&&(e=n[1]),e}function x1(r,t,e,n){var a=NaN;r.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,n),o[1-i]=a,t.dataToPoint(o)}function _I(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,a){e.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function SI(r,t,e,n,a,i,o,s){for(var l=_I(r,t),u=[],f=[],h=[],c=[],v=[],d=[],g=[],p=b1(a,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_=a||g<0)break;if(Mn(m,y)){if(l){g+=i;continue}break}if(g===e)r[i>0?"moveTo":"lineTo"](m,y),h=m,c=y;else{var _=m-u,S=y-f;if(_*_+S*S<.5){g+=i;continue}if(o>0){for(var x=g+i,b=t[x*2],w=t[x*2+1];b===m&&w===y&&p=n||Mn(b,w))v=m,d=y;else{A=b-u,D=w-f;var P=m-u,R=b-m,E=y-f,G=w-y,k=void 0,N=void 0;if(s==="x"){k=Math.abs(P),N=Math.abs(R);var H=A>0?1:-1;v=m-H*k*o,d=y,I=m+H*N*o,L=y}else if(s==="y"){k=Math.abs(E),N=Math.abs(G);var X=D>0?1:-1;v=m,d=y-X*k*o,I=m,L=y+X*N*o}else k=Math.sqrt(P*P+E*E),N=Math.sqrt(R*R+G*G),C=N/(N+k),v=m-A*o*(1-C),d=y-D*o*(1-C),I=m+A*o*C,L=y+D*o*C,I=Dr(I,Ar(b,m)),L=Dr(L,Ar(w,y)),I=Ar(I,Dr(b,m)),L=Ar(L,Dr(w,y)),A=I-m,D=L-y,v=m-A*k/N,d=y-D*k/N,v=Dr(v,Ar(u,m)),d=Dr(d,Ar(f,y)),v=Ar(v,Dr(u,m)),d=Ar(d,Dr(f,y)),A=m-v,D=y-d,I=m+A*N/k,L=y+D*N/k}r.bezierCurveTo(h,c,v,d,m,y),h=I,c=L}else r.lineTo(m,y)}u=m,f=y,g+=i}return p}var w1=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),bI=function(r){O(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 w1},t.prototype.buildPath=function(e,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&Mn(a[o*2-2],a[o*2-1]);o--);for(;i=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=i[h++],d=i[h++],g=i[h++],p=i[h++],m=i[h++],y=i[h++];var x=u?_s(s,v,g,m,e,f):_s(l,d,p,y,e,f);if(x>0)for(var b=0;b=0){var S=u?Lt(l,d,p,y,w):Lt(s,v,g,m,w);return u?[e,S]:[S,e]}}s=m,l=y;break}}},t}(ot),xI=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(w1),wI=function(r){O(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 xI},t.prototype.buildPath=function(e,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Mn(a[s*2-2],a[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):a&&e.push(o(a,l,0),o(a,l,t));break}else a&&(e.push(o(a,l,0)),a=null),e.push(l),i=l}return e}function DI(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 a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(!i){console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(a),u=z(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=MI(u,a==="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,m=p-g;if(m<.001)return"transparent";M(c,function(_){_.offset=(_.coord-g)/m}),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 y=new i0(0,0,0,0,c,!0);return y[a]=g,y[a+"2"]=p,y}}function AI(r,t,e){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=e.getAxesByScale("ordinal")[0];if(!!i&&!(a&&II(i,t))){var o=t.mapDimension(i.dim),s={};return M(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function II(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),o=0;on)return!1;return!0}function LI(r,t){return isNaN(r)||isNaN(t)}function PI(r){for(var t=r.length/2;t>0&&LI(r[t*2-2],r[t*2-1]);t--);return t-1}function Kp(r,t){return[r[t*2],r[t*2+1]]}function RI(r,t,e){for(var n=r.length/2,a=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function M1(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var H=g.getState("emphasis").style;H.lineWidth=+g.style.lineWidth+1}ht(g).seriesIndex=e.seriesIndex,Ni(g,G,k,N);var X=qp(e.get("smooth")),Q=e.get("smoothMonotone");if(g.setShape({smooth:X,smoothMonotone:Q,connectNulls:T}),p){var rt=l.getCalculationInfo("stackedOnSeries"),ft=0;p.useStyle(J(f.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),rt&&(ft=qp(rt.get("smooth"))),p.setShape({smooth:X,stackedOnSmooth:ft,smoothMonotone:Q,connectNulls:T}),As(p,e,"areaStyle"),ht(p).seriesIndex=e.seriesIndex,Ni(p,G,k,N)}var Tt=function(mt){i._changePolyState(mt)};l.eachItemGraphicEl(function(mt){mt&&(mt.onHoverStateChange=Tt)}),this._polyline.onHoverStateChange=Tt,this._data=l,this._coordSys=o,this._stackedOnPoints=b,this._points=h,this._step=D,this._valueOrigin=S,e.get("triggerLineEvent")&&(this.packEventData(e,g),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,n){ht(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,a,i){var o=e.getData(),s=Ln(o,i);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")||0,v=e.get("z")||0;u=new Lv(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 Qe.prototype.highlight.call(this,e,n,a,i)},t.prototype.downplay=function(e,n,a,i){var o=e.getData(),s=Ln(o,i);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 Qe.prototype.downplay.call(this,e,n,a,i)},t.prototype._changePolyState=function(e){var n=this._polygon;ed(this._polyline,e),n&&ed(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new bI({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new wI({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(e,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");$(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=$(h)?h(null):h;e.eachItemGraphicEl(function(v,d){var g=v;if(g){var p=[v.x,v.y],m=void 0,y=void 0,_=void 0;if(a)if(o){var S=a,x=n.pointToCoord(p);i?(m=S.startAngle,y=S.endAngle,_=-x[1]/180*Math.PI):(m=S.r0,y=S.r,_=x[0])}else{var b=a;i?(m=b.x,y=b.x+b.width,_=v.x):(m=b.y+b.height,y=b.y,_=v.y)}var w=y===m?0:(_-m)/(y-m);l&&(w=1-w);var T=$(h)?h(d):f*w+c,C=g.getSymbolPath(),A=C.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,a){var i=e.getModel("endLabel");if(M1(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 Et({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=PI(l);f>=0&&(no(s,ao(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?S1(o,v):Iv(o,h)},enableTextSetter:!0},EI(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,a,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var h=a.getLayout("points"),c=a.hostModel,v=c.get("connectNulls"),d=s.get("precision"),g=s.get("distance")||0,p=l.getBaseAxis(),m=p.isHorizontal(),y=p.inverse,_=n.shape,S=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,x=(m?g:0)*(y?-1:1),b=(m?0:-g)*(y?-1:1),w=m?"x":"y",T=RI(h,S,w),C=T.range,A=C[1]-C[0],D=void 0;if(A>=1){if(A>1&&!v){var I=Kp(h,C[0]);u.attr({x:I[0]+x,y:I[1]+b}),o&&(D=c.getRawValue(C[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+x,y:I[1]+b});var L=c.getRawValue(C[0]),P=c.getRawValue(C[1]);o&&(D=dy(a,d,L,P,T.t))}i.lastFrameIndex=C[0]}else{var R=e===1||i.lastFrameIndex>0?C[0]:0,I=Kp(h,R);o&&(D=c.getRawValue(R)),u.attr({x:I[0]+x,y:I[1]+b})}if(o){var E=Ba(u);typeof E.setLabelText=="function"&&E.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,n,a,i,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,c=SI(this._data,e,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,g=c.next,p=c.stackedOnNext;if(o&&(v=Ir(c.current,a,o,l),d=Ir(c.stackedOnCurrent,a,o,l),g=Ir(c.next,a,o,l),p=Ir(c.stackedOnNext,a,o,l)),Xp(v,g)>3e3||f&&Xp(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 m={shape:{points:g}};c.current!==v&&(m.shape.__points=c.next),u.stopAnimation(),Ot(u,m,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),Ot(f,{shape:{stackedOnPoints:p}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],_=c.status,S=0;S<_.length;S++){var x=_[S].cmd;if(x==="="){var b=e.getItemGraphicEl(_[S].idx1);b&&y.push({el:b,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){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){i==="lttb"&&t.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v));var d=void 0;V(i)?d=NI[i]:$(i)&&(d=i),d&&t.setData(a.downSample(a.mapDimension(u.dim),1/v,d,FI))}}}}}function DO(r){r.registerChartView(OI),r.registerSeriesModel(cI),r.registerLayout(BI("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,D1("line"))}var A1=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return wv(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(a)M(i.getAxes(),function(c,v){if(c.type==="category"&&n!=null){var d=c.getTicksCoords(),g=o[v],p=n[v]==="x1"||n[v]==="y1";if(p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[p?1:0]);return}for(var m=void 0,y=void 0,_=1,S=0;Sg){y=(x+m)/2;break}S===1&&(_=b-d[0].tickValue)}y==null&&(m?m&&(y=d[d.length-1].coord):y=d[0].coord),s[v]=c.toGlobalCoord(y)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(Hr);Hr.registerClass(A1);var Qp=A1,zI=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return wv(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,a){return a.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ml(Qp.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(Qp),GI=zI,VI=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}return r}(),HI=function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new VI},t.prototype.buildPath=function(e,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,h=n.endAngle,c=n.clockwise,v=Math.PI*2,d=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,a,i){if(!!this._isOrderChangedWithinSameData(e,n,a)){var o=this._dataSort(e,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,a){var i=n.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){Ps(i,e,ht(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Qe),jp={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=r.x+r.width,i=r.y+r.height,o=Yu(t.x,r.x),s=$u(t.x+t.width,a),l=Yu(t.y,r.y),u=$u(t.y+t.height,i),f=sa?s:o,t.y=h&&l>i?u:l,t.width=f?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var a=$u(t.r,r.r),i=Yu(t.r0,r.r0);t.r=a,t.r0=i;var o=a-i<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},tg={cartesian2d:function(r,t,e,n,a,i,o,s,l){var u=new _t({shape:B({},n),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,h=a?"height":"width";f[h]=0}return u},polar:function(r,t,e,n,a,i,o,s,l){var u=!a&&l?Jp:pr,f=new u({shape:n,z2:1});f.name="item";var h=I1(a);if(f.calculateTextPosition=WI(h,{isRoundCap:u===Jp}),i){var c=f.shape,v=a?"r":"endAngle",d={};c[v]=a?n.r0:n.startAngle,d[v]=n[v],(s?Ot:Yt)(f,{shape:d},i)}return f}};function ZI(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&(n.type!=="category"&&Pt("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&Pt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function eg(r,t,e,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Ot:Yt)(e,{shape:l},t,a,null);var f=t?r.baseAxis.model:null;(o?Ot:Yt)(e,{shape:u},f,a)}function rg(r,t){for(var e=0;e0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function KI(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function I1(r){return function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}}(r)}function ag(r,t,e,n,a,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,h=Si(n.getModel("itemStyle"),f,!0);B(f,h),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=n.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",d=ao(n);no(r,d,{labelFetcher:i,labelDataIndex:e,defaultText:Iv(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var g=r.getTextContent();if(s&&g){var p=n.get(["label","position"]);r.textConfig.inside=p==="middle"?!0:null,UI(r,p==="outside"?v:p,I1(o),n.get(["label","rotate"]))}iC(g,d,i.getRawValue(e),function(y){return S1(t,y)});var m=n.getModel(["emphasis"]);Ni(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),As(r,n),KI(a)&&(r.style.fill="none",r.style.stroke="none",M(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function QI(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,a,i)}var JI=function(){function r(){}return r}(),ig=function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new JI},t.prototype.buildPath=function(e,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function jI(r,t,e){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=i.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function L1(r,t,e){if(Pv(e,"cartesian2d")){var n=t,a=e.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=e.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function tL(r,t,e){var n=r.type==="polar"?pr:_t;return new n({shape:L1(t,e,r),silent:!0,z2:0})}var eL=$I;function AO(r){r.registerChartView(eL),r.registerSeriesModel(GI),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(f2,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,h2("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,D1("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var Qo=Math.PI*2,lg=Math.PI/180;function P1(r,t){return mr(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function R1(r,t){var e=P1(r,t),n=r.get("center"),a=r.get("radius");F(a)||(a=[0,a]);var i=vt(e.width,t.getWidth()),o=vt(e.height,t.getHeight()),s=Math.min(i,o),l=vt(a[0],s/2),u=vt(a[1],s/2),f,h,c=r.coordinateSystem;if(c){var v=c.dataToPoint(n);f=v[0]||0,h=v[1]||0}else F(n)||(n=[n,n]),f=vt(n[0],i)+e.x,h=vt(n[1],o)+e.y;return{cx:f,cy:h,r0:l,r:u}}function rL(r,t,e){t.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=P1(n,e),s=R1(n,e),l=s.cx,u=s.cy,f=s.r,h=s.r0,c=-n.get("startAngle")*lg,v=n.get("minAngle")*lg,d=0;a.each(i,function(A){!isNaN(A)&&d++});var g=a.getSum(i),p=Math.PI/(g||d)*2,m=n.get("clockwise"),y=n.get("roseType"),_=n.get("stillShowZeroSum"),S=a.getDataExtent(i);S[0]=0;var x=Qo,b=0,w=c,T=m?1:-1;if(a.setLayout({viewRect:o,r:f}),a.each(i,function(A,D){var I;if(isNaN(A)){a.setItemLayout(D,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:l,cy:u,r0:h,r:y?NaN:f});return}y!=="area"?I=g===0&&_?p:A*p:I=Qo/d,Ie?m:p,x=Math.abs(_.label.y-e);if(x>=S.maxY){var b=_.label.x-t-_.len2*a,w=n+_.len,T=Math.abs(b)r.unconstrainedWidth?null:v:null;n.setStyle("width",d)}var g=n.getBoundingRect();i.width=g.width;var p=(n.style.margin||0)+2.1;i.height=g.height+p,i.y-=(i.height-h)/2}}}function Zu(r){return r.position==="center"}function oL(r){var t=r.getData(),e=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*aL,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,h=s.y,c=s.height;function v(b){b.ignore=!0}function d(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}t.each(function(b){var w=t.getItemGraphicEl(b),T=w.shape,C=w.getTextContent(),A=w.getTextGuideLine(),D=t.getItemModel(b),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),R=I.get("alignTo"),E=vt(I.get("edgeDistance"),u),G=I.get("bleedMargin"),k=D.getModel("labelLine"),N=k.get("length");N=vt(N,u);var H=k.get("length2");if(H=vt(H,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":Q>0?"left":"right"}var Sr=Math.PI,rr=0,za=I.get("rotate");if(dt(za))rr=za*(Sr/180);else if(L==="center")rr=0;else if(za==="radial"||za===!0){var MS=Q<0?-X+Sr:-X;rr=MS}else if(za==="tangential"&&L!=="outside"&&L!=="outer"){var Fn=Math.atan2(Q,rt);Fn<0&&(Fn=Sr*2+Fn);var DS=rt>0;DS&&(Fn=Sr+Fn),rr=Fn-Sr}if(i=!!rr,C.x=ft,C.y=Tt,C.rotation=rr,C.setStyle({verticalAlign:"middle"}),Gt){C.setStyle({align:zt});var El=C.states.select;El&&(El.x+=C.x,El.y+=C.y)}else{var Ga=C.getBoundingRect().clone();Ga.applyTransform(C.getComputedTransform());var qv=(C.style.margin||0)+2.1;Ga.y-=qv/2,Ga.height+=qv,e.push({label:C,labelLine:A,position:L,len:N,len2:H,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new U(Q,rt),linePoints:mt,textAlign:zt,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:G,rect:Ga,unconstrainedWidth:Ga.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:Gt})}}),!i&&r.get("avoidLabelOverlap")&&iL(e,n,a,l,u,c,f,h);for(var g=0;g0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=i.r0}},t.type="pie",t}(Qe),uL=lL;function fL(r,t,e){t=F(t)&&{coordDimensions:t}||B({encodeDefine:r.getEncode()},t);var n=r.getSource(),a=H_(n,t).dimensions,i=new V_(a,r);return i.initData(n,e),i}var hL=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r}(),vL=hL,cL=St(),dL=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new vL(q(this.getData,this),q(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return fL(this,{coordDimensions:["value"],encodeDefaulter:ut(OC,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),a=cL(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=_x(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Ef(e,"labelLine",["show"]);var n=e.labelLine,a=e.emphasis.labelLine;n.show=n.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(Hr),pL=dL;function gL(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(dt(o)&&!isNaN(o)&&o<0)})}}}function IO(r){r.registerChartView(uL),r.registerSeriesModel(pL),CD("pie",r.registerAction),r.registerLayout(ut(rL,"pie")),r.registerProcessor(nL("pie")),r.registerProcessor(gL("pie"))}var mL=function(r){O(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}(gt),yL=mL,uh=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Qt).models[0]},t.type="cartesian2dAxis",t}(gt);je(uh,O2);var k1={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)"]}}},_L=et({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},k1),Rv=et({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}}},k1),SL=et({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Rv),bL=J({logBase:10},Rv),xL={category:_L,value:Rv,time:SL,log:bL},wL={value:1,category:1,time:1,log:1};function fg(r,t,e,n){M(wL,function(a,i){var o=et(et({},xL[i],!0),n,!0),s=function(l){O(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=Hi(this),v=c?so(f):{},d=h.getTheme();et(f,d.get(i+"Axis")),et(f,this.getDefaultOption()),f.type=hg(f),c&&Ca(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=ih.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."+i,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",hg)}function hg(r){return r.type||(r.data?"category":"value")}var TL=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 z(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}(),CL=TL,fh=["x","y"];function vg(r){return r.type==="interval"||r.type==="time"}var ML=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=fh,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!vg(e)||!vg(n))){var a=e.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-a[0]*f,v=o[1]-i[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=el([],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"),a=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&a.contain(a.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 a=this.dataToPoint(e),i=this.dataToPoint(n),o=this.getArea(),s=new st(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,a){a=a||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return be(a,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},t.prototype.clampData=function(e,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(e[0]),u=i.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 a=[];if(this._invTransform)return be(a,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(e[0]),n),a[1]=o.coordToData(o.toLocalCoord(e[1]),n),a},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(),a=Math.min(e[0],e[1]),i=Math.min(n[0],n[1]),o=Math.max(e[0],e[1])-a,s=Math.max(n[0],n[1])-i;return new st(a,i,o,s)},t}(CL),DL=function(r){O(t,r);function t(e,n,a,i,o){var s=r.call(this,e,n,a)||this;return s.index=0,s.type=i||"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}($2),AL=DL;function hh(r,t,e){e=e||{};var n=r.coordinateSystem,a=t.axis,i={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.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])}i.position=[u==="y"?d[c[l]]:h[0],u==="x"?d[c[l]]:h[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=p[s],i.labelOffset=o?d[c[s]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),In(e.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=t.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-m:m,i.z2=1,i}function cg(r){return r.get("coordinateSystem")==="cartesian2d"}function dg(r){var t={xAxisModel:null,yAxisModel:null};return M(t,function(e,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,Qt).models[0];if(!i)throw new Error(a+' "'+xn(r.get(a+"Index"),r.get(a+"Id"),0)+'" not found');t[n]=i}),t}var Xu=Math.log;function IL(r,t,e){var n=lo.prototype,a=n.getTicks.call(e),i=n.getTicks.call(e,!0),o=a.length-1,s=n.getInterval.call(e),l=n1(r,t),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var c=Xu(r.base);u=[Xu(u[0])/c,Xu(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=zu(d),g=u[1]-d*o;else{var m=r.getTicks().length-1;m>o&&(d=zu(d));var y=d*o;p=Math.ceil(u[1]/d)*d,g=It(p-y),g<0&&u[0]>=0?(g=0,p=It(y)):p>0&&u[1]<=0&&(p=0,g=-It(y))}var _=(a[0].value-i[0].value)/s,S=(a[o].value-i[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 x=n.getTicks.call(r);x[1]&&(!a2(d)||Rf(x[1].value)>Rf(d))&&Pt("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var LL=function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=fh,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 a(o){var s,l=yt(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;oh(g)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(Bp(g,d),oh(g)&&(s=v))}f.length&&(s||(s=f.pop(),Bp(s.scale,s.model)),M(f,function(p){IL(p.scale,p.model,s.scale)}))}}a(n.x),a(n.y);var i={};M(n.x,function(o){pg(n,"y",o,i)}),M(n.y,function(o){pg(n,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var a=t.getBoxLayoutParams(),i=!n&&t.get("containLabel"),o=mr(a,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(M(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=R2(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()),M(this._coordsList,function(u){u.calcAffineTransform()});function l(){M(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]),PL(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]}W(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a0?"top":"bottom",i="center"):Cs(a-Or)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,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}(),mg={axisLine:function(r,t,e,n){var a=t.get(["axisLine","show"]);if(a==="auto"&&r.handleAutoShown&&(a=r.handleAutoShown("axisLine")),!!a){var i=t.axis.getExtent(),o=n.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(be(s,s,o),be(l,l,o));var f=B({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Pn({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Fi(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var c=t.get(["axisLine","symbol"]);if(c!=null){var v=t.get(["axisLine","symbolSize"]);V(c)&&(c=[c,c]),(V(v)||dt(v))&&(v=[v,v]);var d=c_(t.get(["axisLine","symbolOffset"])||0,v),g=v[0],p=v[1];M([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(c[y]!=="none"&&c[y]!=null){var _=Wr(c[y],-g/2,-p/2,g,p,f.stroke,!0),S=m.r+m.offset,x=u?l:s;_.attr({rotation:m.rotate,x:x[0]+S*Math.cos(r.rotation),y:x[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,n){var a=OL(e,n,t,r),i=NL(e,n,t,r);if(kL(t,i,a),BL(e,n,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=g1(z(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));_1(o)}},axisName:function(r,t,e,n){var a=In(r.axisName,t.get("name"));if(!!a){var i=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=[i==="start"?u[0]-f*l:i==="end"?u[1]+f*l:(u[0]+u[1])/2,_g(i)?r.labelOffset+o*l:0],c,v=t.get("nameRotate");v!=null&&(v=v*Or/180);var d;_g(i)?c=Dn.innerTextLayout(r.rotation,v!=null?v:r.rotation,o):(c=EL(r.rotation,i,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)||{},m=p.ellipsis,y=In(r.nameTruncateMaxWidth,p.maxWidth,d),_=new Et({x:h[0],y:h[1],rotation:c.rotation,silent:Dn.isLabelSilent(t),style:gr(s,{text:a,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(dl({el:_,componentModel:t,itemName:a}),_.__fullText=a,_.anid="name",t.get("triggerEvent")){var S=Dn.makeAxisEventDataBase(t);S.targetType="axisName",S.name=a,ht(_).eventData=S}n.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function EL(r,t,e,n){var a=iy(e-r),i,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Cs(a-Or/2)?(o=l?"bottom":"top",i="center"):Cs(a-Or*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",aOr/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function kL(r,t,e){if(!a1(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var i=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?(de(i),de(u)):yg(i,o)&&(n?(de(o),de(f)):(de(i),de(u))),a===!1?(de(s),de(h)):yg(l,s)&&(a?(de(l),de(c)):(de(s),de(h)))}}function de(r){r&&(r.ignore=!0)}function yg(r,t){var e=r&&r.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!e||!n)){var a=Bh([]);return Nh(a,a,-r.rotation),e.applyTransform(va([],a,r.getLocalTransform())),n.applyTransform(va([],a,t.getLocalTransform())),e.intersect(n)}}function _g(r){return r==="middle"||r==="center"}function O1(r,t,e,n,a){for(var i=[],o=[],s=[],l=0;l=0||r===t}function WL(r){var t=Ev(r);if(!!t){var e=t.axisPointerModel,n=t.axis.scale,a=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=vh(e);i==null&&(a.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=i>0?u:1/u;Ju(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(a){var h=Math.abs(i),c=(i>0?1:-1)*(h>3?.4:h>1?.15:.05);Ju(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!xg(this._zr,"globalPan")){var n=e.pinchScale>1?1.1:1/1.1;Ju(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(Ce);function Ju(r,t,e,n,a){r.pointerChecker&&r.pointerChecker(n,a.originX,a.originY)&&(_a(n.event),G1(r,t,e,n,a))}function G1(r,t,e,n,a){a.isAvailableBehavior=q(ds,null,e,n),r.trigger(t,a)}function ds(r,t,e){var n=e[r];return!r||n&&(!V(n)||t.event[n+"Key"])}var nP=rP,aP={axisPointer:1,tooltip:1,brush:1};function iP(r,t,e){var n=t.getComponentByElement(r.topTarget),a=n&&n.coordinateSystem;return n&&n!==e&&!aP.hasOwnProperty(n.mainType)&&a&&a.model!==e}function fo(r,t,e,n,a,i){r=r||0;var o=e[1]-e[0];if(a!=null&&(a=jn(a,[0,o])),i!=null&&(i=Math.max(i,a!=null?a:0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=jn(s,[0,o]),a=i=jn(s,[a,i]),n=0}t[0]=jn(t[0],e),t[1]=jn(t[1],e);var l=ju(t,n);t[n]+=r;var u=a||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=jn(t[n],f);var h;return h=ju(t,n),a!=null&&(h.sign!==l.sign||h.spani&&(t[1-n]=t[n]+h.sign*i),t}function ju(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 jn(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var En=!0,Ki=Math.min,Aa=Math.max,oP=Math.pow,sP=1e4,lP=6,uP=6,wg="globalPan",fP={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},hP={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Tg={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},vP=0,cP=function(r){O(t,r);function t(e){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},Z(e),n._zr=e,n.group=new Dt,n._uid="brushController_"+vP++,M(SP,function(a,i){this._handlers[i]=q(a,this)},n),n}return t.prototype.enableBrush=function(e){return Z(this._mounted),this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var n=this._zr;this._enableGlobalPan||tP(n,wg,this._uid),M(this._handlers,function(a,i){n.on(i,a)}),this._brushType=e.brushType,this._brushOption=et(j(Tg),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;eP(e,wg,this._uid),M(this._handlers,function(n,a){e.off(a,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var n=this._panels={};M(e,function(a){n[a.panelId]=j(a)})}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){Z(this._mounted),e=z(e,function(c){return et(j(Tg),c,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Zi(a,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&&a[v]===s)i[c]=a[v];else{var g=i[c]=v!=null?(a[v].__brushOption=d,a[v]):H1(o,V1(o,d));Ov(o,g)}}function h(c){a[c]!==s&&o.group.remove(a[c])}},t.prototype.unmount=function(){if(!!this._mounted)return this.enableBrush(!1),dh(this),this._zr.remove(this.group),this._mounted=!1,this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Ce);function V1(r,t){var e=Pl[t.brushType].createCover(r,t);return e.__brushOption=t,U1(e,t),r.group.add(e),e}function H1(r,t){var e=Bv(t);return e.endCreating&&(e.endCreating(r,t),U1(t,t.__brushOption)),t}function W1(r,t){var e=t.__brushOption;Bv(t).updateCoverShape(r,t,e.range,e)}function U1(r,t){var e=t.z;e==null&&(e=sP),r.traverse(function(n){n.z=e,n.z2=e})}function Ov(r,t){Bv(t).updateCommon(r,t),W1(r,t)}function Bv(r){return Pl[r.__brushOption.brushType]}function Nv(r,t,e){var n=r._panels;if(!n)return En;var a,i=r._transform;return M(n,function(o){o.isTargetByCursor(t,e,i)&&(a=o)}),a}function Y1(r,t){var e=r._panels;if(!e)return En;var n=t.__brushOption.panelId;return n!=null?e[n]:En}function dh(r){var t=r._covers,e=t.length;return M(t,function(n){r.group.remove(n)},r),t.length=0,!!e}function kn(r,t){var e=z(r._covers,function(n){var a=n.__brushOption,i=j(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function dP(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],a=e[0]-n[0],i=e[1]-n[1],o=oP(a*a+i*i,.5);return o>lP}function $1(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function Z1(r,t,e,n){var a=new Dt;return a.add(new _t({name:"main",style:Fv(e),silent:!0,draggable:!0,cursor:"move",drift:ut(Cg,r,t,a,["n","s","w","e"]),ondragend:ut(kn,t,{isEnd:!0})})),M(n,function(i){a.add(new _t({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ut(Cg,r,t,a,i),ondragend:ut(kn,t,{isEnd:!0})}))}),a}function X1(r,t,e,n){var a=n.brushStyle.lineWidth||0,i=Aa(a,uP),o=e[0][0],s=e[1][0],l=o-a/2,u=s-a/2,f=e[0][1],h=e[1][1],c=f-i+a/2,v=h-i+a/2,d=f-o,g=h-s,p=d+a,m=g+a;ir(r,t,"main",o,s,d,g),n.transformable&&(ir(r,t,"w",l,u,i,m),ir(r,t,"e",c,u,i,m),ir(r,t,"n",l,u,p,i),ir(r,t,"s",l,v,p,i),ir(r,t,"nw",l,u,i,i),ir(r,t,"ne",c,u,i,i),ir(r,t,"sw",l,v,i,i),ir(r,t,"se",c,v,i,i))}function ph(r,t){var e=t.__brushOption,n=e.transformable,a=t.childAt(0);a.useStyle(Fv(e)),a.attr({silent:!n,cursor:n?"move":"default"}),M([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?gh(r,i[0]):gP(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?hP[s]+"-resize":null})})}function ir(r,t,e,n,a,i,o){var s=t.childOfName(e);s&&s.setShape(yP(zv(r,t,[[n,a],[n+i,a+o]])))}function Fv(r){return J({strokeNoScale:!0},r.brushStyle)}function q1(r,t,e,n){var a=[Ki(r,e),Ki(t,n)],i=[Aa(r,e),Aa(t,n)];return[[a[0],i[0]],[a[1],i[1]]]}function pP(r){return vl(r.group)}function gh(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=tv(e[t],pP(r));return n[a]}function gP(r,t){var e=[gh(r,t[0]),gh(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function Cg(r,t,e,n,a,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=K1(t,a,i);M(n,function(u){var f=fP[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(q1(s[0][0],s[1][0],s[0][1],s[1][1])),Ov(t,e),kn(t,{isEnd:!1})}function mP(r,t,e,n){var a=t.__brushOption.range,i=K1(r,e,n);M(a,function(o){o[0]+=i[0],o[1]+=i[1]}),Ov(r,t),kn(r,{isEnd:!1})}function K1(r,t,e){var n=r.group,a=n.transformCoordToLocal(t,e),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function zv(r,t,e){var n=Y1(r,t);return n&&n!==En?n.clipPath(e,r._transform):j(e)}function yP(r){var t=Ki(r[0][0],r[1][0]),e=Ki(r[0][1],r[1][1]),n=Aa(r[0][0],r[1][0]),a=Aa(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:a-e}}function _P(r,t,e){if(!(!r._brushType||bP(r,t.offsetX,t.offsetY))){var n=r._zr,a=r._covers,i=Nv(r,t,e);if(!r._dragging)for(var o=0;on.getWidth()||e<0||e>n.getHeight()}var Pl={lineX:Ag(0),lineY:Ag(1),rect:{createCover:function(r,t){function e(n){return n}return Z1({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=$1(r);return q1(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){X1(r,t,e,n)},updateCommon:ph,contain:yh},polygon:{createCover:function(r,t){var e=new Dt;return e.add(new Oa({name:"main",style:Fv(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new ro({name:"main",draggable:!0,drift:ut(mP,r,t),ondragend:ut(kn,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:zv(r,t,e)})},updateCommon:ph,contain:yh}};function Ag(r){return{createCover:function(t,e){return Z1({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=$1(t),n=Ki(e[0][r],e[1][r]),a=Aa(e[0][r],e[1][r]);return[n,a]},updateCoverShape:function(t,e,n,a){var i,o=Y1(t,e);if(o!==En&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),X1(t,e,l,a)},updateCommon:ph,contain:yh}}var xP=cP;function wP(r){return r=Gv(r),function(t){return h0(t,r)}}function TP(r,t){return r=Gv(r),function(e){var n=t!=null?t:e,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function CP(r,t,e){var n=Gv(r);return function(a,i){return n.contain(i[0],i[1])&&!iP(a,t,e)}}function Gv(r){return st.create(r)}var gn=St(),Ig=j,tf=q,MP=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,a){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,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,i,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 Dt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var c=ut(Lg,e,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,e)}Rg(s,e,!0),this._renderHandle(i)}},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"),a=t.axis,i=a.type==="category",o=e.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=Ev(t).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,a,i){},r.prototype.createPointerEl=function(t,e,n,a){var i=e.pointer;if(i){var o=gn(t).pointerEl=new eC[i.type](Ig(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,a){if(e.label){var i=gn(t).labelEl=new Et(Ig(e.label));t.add(i),Pg(i,a)}},r.prototype.updatePointerEl=function(t,e,n){var a=gn(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),n(a,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,a){var i=gn(t).labelEl;i&&(i.setStyle(e.label.style),n(i,{x:e.label.x,y:e.label.y}),Pg(i,a))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=cl(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){_a(u.event)},onmousedown:tf(this._onHandleDragMove,this,0,0),drift:tf(this._onHandleDragMove,this),ondragend:tf(this._onHandleDragEnd,this)}),n.add(a)),Rg(a,e,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");F(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Ml(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){Lg(this._axisPointerModel,!e&&this._moveAnimation,this._handle,ef(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(!!n){this._dragging=!0;var a=this.updateHandleTransform(ef(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(ef(a)),gn(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,a=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),Ns(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 Lg(r,t,e,n){J1(gn(e).lastProp,n)||(gn(e).lastProp=n,t?Ot(e,n,r):(e.stopAnimation(),e.attr(n)))}function J1(r,t){if(W(r)&&W(t)){var e=!0;return M(t,function(n,a){e=e&&J1(r[a],n)}),!!e}else return r===t}function Pg(r,t){r[t.get(["label","show"])?"show":"hide"]()}function ef(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Rg(r,t,e){var n=t.get("z"),a=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=e)})}var DP=MP;function AP(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 IP(r,t,e,n,a){var i=e.get("value"),o=j1(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=oo(s.get("padding")||0),u=s.getFont(),f=rl(o,u),h=a.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=a.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var g=a.verticalAlign;g==="bottom"&&(h[1]-=v),g==="middle"&&(h[1]-=v/2),LP(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:gr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:p}),z2:10}}function LP(r,t,e,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+t,a)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function j1(r,t,e,n,a){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Dv(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};M(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),V(o)?i=o.replace("{value}",i):$(o)&&(i=o(s))}return i}function tS(r,t,e){var n=Sa();return Nh(n,n,e.rotation),Sf(n,n,e.position),zi([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function PP(r,t,e,n,a,i){var o=B1.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=a.get(["label","margin"]),IP(t,n,a,i,{position:tS(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function RP(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function EP(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function LO(r,t,e,n,a,i){return{cx:r,cy:t,r0:e,r:n,startAngle:a,endAngle:i,clockwise:!0}}var kP=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),f=Eg(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var c=AP(i),v=OP[u](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var d=hh(l.model,a);PP(n,e,d,a,i,o)},t.prototype.getHandleTransform=function(e,n,a){var i=hh(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=tS(n.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Eg(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}(DP);function Eg(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var OP={line:function(r,t,e){var n=RP([t,e[0]],[t,e[1]],kg(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),a=e[1]-e[0];return{type:"Rect",shape:EP([t-n/2,e[0]],[n,a],kg(r))}}};function kg(r){return r.dim==="x"?0:1}var BP=kP,NP=function(r){O(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,triggerEmphasis:!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}(gt),FP=NP,fr=St(),zP=M;function eS(r,t,e){if(!tt.node){var n=t.getZr();fr(n).records||(fr(n).records={}),GP(n,t);var a=fr(n).records[r]||(fr(n).records[r]={});a.handler=e}}function GP(r,t){if(fr(r).initialized)return;fr(r).initialized=!0,e("click",ut(Og,"click")),e("mousemove",ut(Og,"mousemove")),e("globalout",HP);function e(n,a){r.on(n,function(i){var o=WP(t);zP(fr(r).records,function(s){s&&a(s,i,o.dispatchAction)}),VP(o.pendings,t)})}}function VP(r,t){var e=r.showTip.length,n=r.hideTip.length,a;e?a=r.showTip[e-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function HP(r,t,e){r.handler("leave",null,e)}function Og(r,t,e,n){t.handler(r,e,n)}function WP(r){var t={showTip:[],hideTip:[]},e=function(n){var a=t[n.type];a?a.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function _h(r,t){if(!tt.node){var e=t.getZr(),n=(fr(e).records||{})[r];n&&(fr(e).records[r]=null)}}var UP=function(r){O(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,a){var i=n.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";eS("axisPointer",a,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){_h("axisPointer",n)},t.prototype.dispose=function(e,n){_h("axisPointer",n)},t.type="axisPointer",t}(Te),YP=UP;function rS(r,t){var e=[],n=r.seriesIndex,a;if(n==null||!(a=t.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=Ln(i,r);if(o==null||o<0||F(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)e=a.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=i.mapDimension(c),g=[];g[v]=i.get(d,o),g[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(g)||[]}else e=l.dataToPoint(i.getValues(z(l.dimensions,function(m){return i.mapDimension(m)}),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 Bg=St();function $P(r,t,e){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||q(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(!!s){ps(a)&&(a=rS({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=ps(a),u=i.axesInfo,f=s.axesInfo,h=n==="leave"||ps(a),c={},v={},d={list:[],map:{}},g={showPointer:ut(XP,v),showTooltip:ut(qP,d)};M(s.coordSysMap,function(m,y){var _=l||m.containPoint(a);M(s.coordSysAxesInfo[y],function(S,x){var b=S.axis,w=jP(u,S);if(!h&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=b.pointToData(a)),T!=null&&Ng(S,T,g,!1,c)}})});var p={};return M(f,function(m,y){var _=m.linkGroup;_&&!v[y]&&M(_.axesInfo,function(S,x){var b=v[x];if(S!==m&&b){var w=b.value;_.mapper&&(w=m.axis.scale.parse(_.mapper(w,Fg(S),Fg(m)))),p[m.key]=w}})}),M(p,function(m,y){Ng(f[y],m,g,!0,c)}),KP(v,f,c),QP(d,a,r,o),JP(f,o,e),c}}function Ng(r,t,e,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=ZP(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&B(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function ZP(r,t){var e=t.axis,n=e.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return M(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,a=h,i.length=0),M(c,function(p){i.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:i,snapToValue:a}}function XP(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function qP(r,t,e,n){var a=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var l=t.coordSys.model,u=qi(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:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function KP(r,t,e){var n=e.axesInfo=[];M(t,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function QP(r,t,e,n){if(ps(t)||!r.list.length){n({type:"hideTip"});return}var a=((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:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function JP(r,t,e){var n=e.getZr(),a="axisPointerLastHighlights",i=Bg(n)[a]||{},o=Bg(n)[a]={};M(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&M(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];M(i,function(u,f){!o[f]&&l.push(u)}),M(o,function(u,f){!i[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 jP(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 Fg(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 ps(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function nS(r){N1.registerAxisPointerClass("CartesianAxisPointer",BP),r.registerComponentModel(FP),r.registerComponentView(YP),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!F(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=FL(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},$P)}function PO(r){Je(jL),Je(nS)}var zg=["x","y","radius","angle","single"],tR=["cartesian2d","polar","singleAxis"];function eR(r){var t=r.get("coordinateSystem");return it(tR,t)>=0}function Br(r){return Z(r),r+"Axis"}function rR(r,t){var e=Y(),n=[],a=Y();r.eachComponent({mainType:"dataZoom",query:t},function(f){a.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!a.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){a.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 aS(r){var t=r.ecModel,e={infoList:[],infoMap:Y()};return r.eachTargetAxis(function(n,a){var i=t.getComponent(Br(n),a);if(!!i){var o=i.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(i)}}}),e}var rf=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}(),nR=function(r){O(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,a){var i=Gg(e);this.settledOption=i,this.mergeDefaultAndTheme(e,a),this._doInit(i)},t.prototype.mergeOption=function(e){var n=Gg(e);et(this.option,e,!0),et(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var a=this.settledOption;M([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=Y(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return M(zg,function(a){var i=this.getReferringComponents(Br(a),zx);if(!!i.specified){n=!0;var o=new rf;M(i.models,function(s){o.add(s.componentIndex)}),e.set(a,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.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 rf;if(c.add(h.componentIndex),e.set(f,c),i=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",Qt).models[0];v&&M(u,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Qt).models[0]&&c.add(d.componentIndex)})}}}i&&M(zg,function(u){if(!!i){var f=a.findComponents({mainType:Br(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new rf;h.add(f[0].componentIndex),e.set(u,h),i=!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,a=this.get("rangeMode");M([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,a){e==null&&(e=this.ecModel.getComponent(Br(n),a))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(a,i){M(a.indexList,function(o){e.call(n,i,o)})})},t.prototype.getAxisProxy=function(e,n){var a=this.getAxisModel(e,n);if(a)return a.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){Z(e&&n!=null);var a=this._targetAxisInfoMap.get(e);if(a&&a.indexMap[n])return this.ecModel.getComponent(Br(e),n)},t.prototype.setRawRange=function(e){var n=this.option,a=this.settledOption;M([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(n[i[0]]=a[i[0]]=e[i[0]],n[i[1]]=a[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;M(["start","startValue","end","endValue"],function(a){n[a]=e[a]})},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 a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!x)return!0;_&&(p=!0),S&&(d=!0),x&&(g=!0)}return p&&d&&g})}else ia(f,function(v){if(i==="empty")l.setData(u=u.map(v,function(g){return s(g)?g:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});ia(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;ia(["min","max"],function(a){var i=e.get(a+"Span"),o=e.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Nt(n[0]+o,n,[0,100],!0):i!=null&&(o=Nt(i,[0,100],n,!0)-n[0]),t[a+"Span"]=i,t[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(!!e){var a=ay(n,[0,500]);a=Math.min(a,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),e[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r}();function fR(r,t,e){var n=[1/0,-1/0];ia(e,function(o){k2(n,o.getData(),t)});var a=r.getAxisModel(),i=r1(a.axis.scale,a,n).calculate();return[i.min,i.max]}var hR=uR,vR={getTargetSeries:function(r){function t(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Br(o),s);a(o,s,l,i)})})}t(function(a,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new hR(a,i,s,r),e.push(o.__dzAxisProxy))});var n=Y();return M(e,function(a){M(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).reset(e)}),e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();e.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}},cR=vR;function dR(r){r.registerAction("dataZoom",function(t,e){var n=rR(e,t);M(n,function(a){a.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Hg=!1;function Hv(r){Hg||(Hg=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,cR),dR(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function pR(r){r.registerComponentModel(iR),r.registerComponentView(lR),Hv(r)}var Ee=function(){function r(){}return r}(),iS={};function oi(r,t){iS[r]=t}function oS(r){return iS[r]}var gR=function(r){O(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;M(this.option.feature,function(n,a){var i=oS(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),et(n,i.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}(gt),mR=gR;function yR(r,t,e){var n=t.getBoxLayoutParams(),a=t.get("padding"),i={width:e.getWidth(),height:e.getHeight()},o=mr(n,i,a);ma(t.get("orient"),r,t.get("itemGap"),o.width,o.height),AC(r,n,i,a)}function sS(r,t){var e=oo(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),r=new _t({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 _R=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){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=[];M(u,function(d,g){h.push(g)}),new Zi(this._featureNames||[],h).add(c).update(c).remove(ut(c,null)).execute(),this._featureNames=h;function c(d,g){var p=h[d],m=h[g],y=u[p],_=new Ft(y,e,e.ecModel),S;if(i&&i.newTitle!=null&&i.featureName===p&&(y.title=i.newTitle),p&&!m){if(SR(p))S={onclick:_.option.onclick,featureName:p};else{var x=oS(p);if(!x)return;S=new x}f[p]=S}else if(S=f[m],!S)return;S.uid=io("toolbox-feature"),S.model=_,S.ecModel=n,S.api=a;var b=S instanceof Ee;if(!p&&m){b&&S.dispose&&S.dispose(n,a);return}if(!_.get("show")||b&&S.unusable){b&&S.remove&&S.remove(n,a);return}v(_,S,p),_.setIconStatus=function(w,T){var C=this.option,A=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[w]=T,A[w]&&(T==="emphasis"?xa:wa)(A[w])},S instanceof Ee&&S.render&&S.render(_,n,a,i)}function v(d,g,p){var m=d.getModel("iconStyle"),y=d.getModel(["emphasis","iconStyle"]),_=g instanceof Ee&&g.getIcons?g.getIcons():d.get("icon"),S=d.get("title")||{},x,b;V(_)?(x={},x[p]=_):x=_,V(S)?(b={},b[p]=S):b=S;var w=d.iconPaths={};M(x,function(T,C){var A=cl(T,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(m.getItemStyle());var D=A.ensureState("emphasis");D.style=y.getItemStyle();var I=new Et({style:{text:b[C],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null},ignore:!0});A.setTextContent(I),dl({el:A,componentModel:e,itemName:C,formatterParamsExtra:{title:b[C]}}),A.__title=b[C],A.on("mouseover",function(){var L=y.getItemStyle(),P=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:y.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),A.setTextConfig({position:y.get("textPosition")||P}),I.ignore=!e.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",C])!=="emphasis"&&a.leaveEmphasis(this),I.hide()}),(d.get(["iconStatus",C])==="emphasis"?xa:wa)(A),o.add(A),A.on("click",q(g.onclick,g,n,a,C)),w[C]=A})}yR(o,e,a),o.add(sS(o.getBoundingRect(),e)),l||o.eachChild(function(d){var g=d.__title,p=d.ensureState("emphasis"),m=p.textConfig||(p.textConfig={}),y=d.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!$(_)&&g){var S=_.style||(_.style={}),x=rl(g,Et.makeFont(S)),b=d.x+o.x,w=d.y+o.y+s,T=!1;w+x.height>a.getHeight()&&(m.position="top",T=!0);var C=T?-5-x.height:s+10;b+x.width/2>a.getWidth()?(m.position=["100%",C],S.align="right"):b-x.width/2<0&&(m.position=[0,C],S.align="left")}})},t.prototype.updateView=function(e,n,a,i){M(this._features,function(o){o instanceof Ee&&o.updateView&&o.updateView(o.model,n,a,i)})},t.prototype.remove=function(e,n){M(this._features,function(a){a instanceof Ee&&a.remove&&a.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){M(this._features,function(a){a instanceof Ee&&a.dispose&&a.dispose(e,n)})},t.type="toolbox",t}(Te);function SR(r){return r.indexOf("my")===0}var bR=_R,xR=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var a=this.model,i=a.get("name")||e.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=tt.browser;if($(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+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=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var p=d.length,m=new Uint8Array(p);p--;)m[p]=d.charCodeAt(p);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,g)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,x=S.document;x.open("image/svg+xml","replace"),x.write(d),x.close(),S.focus(),x.execCommand("SaveAs",!0,g),document.body.removeChild(_)}}else{var b=a.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},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}(Ee),wR=xR,Wg="__ec_magicType_stack__",TR=[["line","bar"],["stack"]],CR=function(r){O(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"),a={};return M(e.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},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,a){var i=this.model,o=i.get(["seriesIndex",a]);if(!!Ug[a]){var s={series:[]},l=function(h){var c=h.subType,v=h.id,d=Ug[a](c,v,h,i);d&&(J(d,h.option),s.series.push(d));var g=h.coordinateSystem;if(g&&g.type==="cartesian2d"&&(a==="line"||a==="bar")){var p=g.getAxesByScale("ordinal")[0];if(p){var m=p.dim,y=m+"Axis",_=h.getReferringComponents(y,Qt).models[0],S=_.componentIndex;s[y]=s[y]||[];for(var x=0;x<=S;x++)s[y][S]=s[y][S]||{};s[y][S].boundaryGap=a==="bar"}}};M(TR,function(h){it(h,a)>=0&&M(h,function(c){i.setIconStatus(c,"normal")})}),i.setIconStatus(a,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=a;a==="stack"&&(u=et({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Ee),Ug={line:function(r,t,e,n){if(r==="bar")return et({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 et({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 a=e.get("stack")===Wg;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),et({id:t,stack:a?"":Wg},n.get(["option","stack"])||{},!0)}};er({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var MR=CR,Rl=new Array(60).join("-"),Ia=" ";function DR(r){var t={},e=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(a)}else e.push(a)}else e.push(a)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function AR(r){var t=[];return M(r,function(e,n){var a=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(z(e.series,function(v){return v.name})),l=[a.model.getCategories()];M(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(Ia)],f=0;f=0)return!0}var Sh=new RegExp("["+Ia+"]+","g");function RR(r){for(var t=r.split(/\n+/g),e=Zs(t.shift()).split(Sh),n=[],a=z(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();e[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),e.push(t)}function zR(r){var t=Wv(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return lS(e,function(a,i){for(var o=t.length-1;o>=0;o--)if(a=t[o][i],a){n[i]=a;break}}),n}function GR(r){uS(r).snapshots=null}function VR(r){return Wv(r).length}function Wv(r){var t=uS(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var HR=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){GR(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}(Ee);er({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var WR=HR,UR=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],YR=function(){function r(t,e,n){var a=this;this._targetInfoList=[];var i=Yg(e,t);M($R,function(o,s){(!n||!n.include||it(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=nf[n.brushType](0,i,a);n.__rangeOffset={offset:qg[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){M(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&M(i.coordSyses,function(o){var s=nf[a.brushType](1,o,a.range,!0);n(a,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){M(t,function(n){var a=this.findTargetInfo(n,e);if(Z(!a||a===!0||n.coordRange,"coordRange must be specified when coord index specified."),Z(!a||a!==!0||n.range,"range must be specified in global brush."),n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=nf[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?qg[n.brushType](i.values,o.offset,ZR(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return z(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:wP(a),isTargetByCursor:CP(a,t,n.coordSysModel),getLinearBrushOtherExtent:TP(a)}})},r.prototype.controlSeries=function(t,e,n){var a=this.findTargetInfo(t,n);return a===!0||a&&it(a.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,a=Yg(e,t),i=0;ir[1]&&r.reverse(),r}function Yg(r,t){return wi(r,t,{includeMainTypes:UR})}var $R={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=Y(),o={},s={};!e&&!n&&!a||(M(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),M(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),M(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];M(u.getCartesians(),function(h,c){(it(e,h.getAxis("x").model)>=0||it(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:Zg.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){M(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Zg.geo})})}},$g=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&e&&(a=e.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],Zg={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(vl(r)),t}},nf={lineX:ut(Xg,0),lineY:ut(Xg,1),rect:function(r,t,e,n){var a=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),i=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[bh([a[0],i[0]]),bh([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=z(e,function(o){var s=r?t.pointToData(o,n):t.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function Xg(r,t,e,n){Z(e.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var a=e.getAxis(["x","y"][r]),i=bh(z([0,1],function(s){return t?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var qg={lineX:ut(Kg,0),lineY:ut(Kg,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 z(r,function(n,a){return[n[0]-e[0]*t[a][0],n[1]-e[1]*t[a][1]]})}};function Kg(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function ZR(r,t){var e=Qg(r),n=Qg(t),a=[e[0]/n[0],e[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function Qg(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var fS=YR,xh=M,XR=Ox("toolbox-dataZoom_"),qR=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){this._brushController||(this._brushController=new xP(a.getZr()),this._brushController.on("brush",q(this._onBrush,this)).mount()),JR(e,n,this,i,a),QR(e,n)},t.prototype.onclick=function(e,n,a){KR[a].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 a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new fS(Uv(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,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)}}),FR(i,a),this._dispatchZoomAction(a);function s(u,f,h){var c=f.getAxis(u),v=c.model,d=l(u,v,i),g=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=fo(0,h.slice(),c.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),d&&(a[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=[];xh(e,function(a,i){n.push(j(a))}),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}(Ee),KR={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(zR(this.ecModel))}};function Uv(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 QR(r,t){r.setIconStatus("back",VR(t)>1?"emphasis":"normal")}function JR(r,t,e,n,a){var i=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new fS(Uv(r),t,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}NC("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),a=[],i=Uv(n),o=wi(r,i);xh(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),xh(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:XR+u+h};c[f]=h,a.push(c)}return a});var jR=qR;function RO(r){r.registerComponentModel(mR),r.registerComponentView(bR),oi("saveAsImage",wR),oi("magicType",MR),oi("dataView",NR),oi("dataZoom",jR),oi("restore",WR),Je(pR)}var tE=function(r){O(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}(gt),eE=tE;function hS(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function vS(r){if(!!tt.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+a,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*a)/2+Math.SQRT2*a-(c-h)/2)*100)/100;s+=";"+i+":-"+v+"px";var d=t+" solid "+a+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function lE(r,t){var e="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+e,a="opacity"+n+",visibility"+n;return t||(n=" "+r+"s "+e,a+=tt.transformSupported?","+Yv+n:",left"+n+",top"+n),aE+":"+a}function Jg(r,t,e){var n=r.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!tt.transformSupported)return e?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=tt.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return e?"top:0;left:0;"+Yv+":"+o+";":[["top",0],["left",0],[cS,o]]}function uE(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 a=r.get("textShadowColor"),i=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return a&&i&&t.push("text-shadow:"+o+"px "+s+"px "+i+"px "+a),M(["decoration","align"],function(l){var u=r.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function fE(r,t,e){var n=[],a=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=a_(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+c),t&&a&&n.push(lE(a,e)),i&&n.push("background-color:"+i),M(["width","color","radius"],function(v){var d="border-"+v,g=D0(d),p=r.get(g);p!=null&&n.push(d+":"+p+(v==="color"?"":"px"))}),n.push(uE(f)),h!=null&&n.push("padding:"+oo(h).join("px ")+"px"),n.join(";")+";"}function jg(r,t,e,n,a){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&ab(r,o,document.body,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var hE=function(){function r(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,tt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;jg(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(a):t.appendChild(a),this._container=t;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,f=i.painter.getViewportRoot();ge(f,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){var e=this._container,n=nE(e,"position"),a=e.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative");var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=iE+fE(t,!this._firstShow,this._longHide)+Jg(i[0],i[1],!0)+("border-color:"+Rn(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,a,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(V(i)&&n.get("trigger")==="item"&&!hS(n)&&(s=sE(n,a,i)),V(t))o.innerHTML=t+s;else if(t){o.innerHTML="",F(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,a=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(e,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,a,i){if(!(i.from===this.uid||tt.node||!a.getDom())){var o=rm(i,a);this._ticket="";var s=i.dataByCoordSys,l=SE(i,n,a);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:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=pE;f.x=i.x,f.y=i.y,f.update(),ht(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,n,a,i))return;var h=rS(i,n),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(rm(i,a))},t.prototype._manuallyAxisShowTip=function(e,n,a,i){var o=i.seriesIndex,s=i.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=si([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,n){var a=e.target,i=this._tooltipModel;if(!!i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(a){this._lastDataByCoordSys=null;var s,l;_i(a,function(u){if(ht(u).dataIndex!=null)return s=u,!0;if(ht(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 a=e.get("showDelay");n=q(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},t.prototype._showAxisTooltip=function(e,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=si([n.tooltipOption],i),l=this._renderMode,u=[],f=Ui("section",{blocks:[],noHeader:!0}),h=[],c=new Du;M(e,function(y){M(y.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!S||x==null)){var b=j1(x,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),w=Ui("section",{header:b,noHeader:!Ze(b),sortBlocks:!0,blocks:[]});f.blocks.push(w),M(_.seriesDataIndices,function(T){var C=a.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,D=C.getDataParams(A);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Dv(S.axis,{value:x}),D.axisValueLabel=b,D.marker=c.makeTooltipMarker("item",Rn(D.color),l);var I=Wd(C.formatTooltip(A,!0,null)),L=I.frag;if(L){var P=si([C],i).get("valueFormatter");w.blocks.push(P?B({valueFormatter:P},L):L)}I.text&&h.push(I.text),u.push(D)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,d=s.get("order"),g=qd(f,c,l,d,a.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var p=l==="richText"?` `:"
",m=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,m,u,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(e,n,a){var i=this._ecModel,o=ht(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=e.positionDefault,g=si([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=g.get("trigger");if(!(p!=null&&p!=="item")){var m=u.getDataParams(f,h),y=new Du;m.marker=y.makeTooltipMarker("item",Rn(m.color),v);var _=Wd(u.formatTooltip(f,!1,h)),S=g.get("order"),x=g.get("valueFormatter"),b=_.frag,w=b?qd(x?B({valueFormatter:x},b):b,y,v,S,i.get("useUTC"),g.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,w,m,T,e.offsetX,e.offsetY,e.position,e.target,y)}),a({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,a){var i=ht(n),o=i.tooltipConfig,s=o.option||{};if(V(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(i.componentMainType,i.componentIndex);f&&u.push(f),u.push({formatter:s.content});var h=e.positionDefault,c=si(u,this._tooltipModel,h?{position:h}:null),v=c.get("content"),d=Math.random()+"",g=new Du;this._showOrMove(c,function(){var p=j(c.get("formatterParams")||{});this._showTooltipContent(c,v,p,d,e.offsetX,e.offsetY,e.position,n,g)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,a,i,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],a,e.get("trigger"),e.get("borderColor")),g=d.color;if(c)if(V(c)){var p=e.ecModel.get("useUTC"),m=F(a)?a[0]:a,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;v=c,y&&(v=yl(m.axisValue,v,p)),v=A0(v,a,!0)}else if($(c)){var _=q(function(S,x){S===this._ticket&&(h.setContent(x,f,e,g,l),this._updatePosition(e,l,o,s,h,a,u))},this);this._ticket=i,v=c(a,i,_)}else v=c;h.setContent(v,f,e,g,l),h.show(e,g),this._updatePosition(e,l,o,s,h,a,u)}},t.prototype._getNearestPoint=function(e,n,a,i){if(a==="axis"||F(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!F(n))return{color:i||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,a,i,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),$(n)&&(n=n([a,i],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),F(n))a=vt(n[0],u),i=vt(n[1],f);else if(W(n)){var g=n;g.width=h[0],g.height=h[1];var p=mr(g,{width:u,height:f});a=p.x,i=p.y,c=null,v=null}else if(V(n)&&l){var m=_E(n,d,h,e.get("borderWidth"));a=m[0],i=m[1]}else{var m=mE(a,i,o,u,f,c?null:20,v?null:20);a=m[0],i=m[1]}if(c&&(a-=nm(c)?h[0]/2:c==="right"?h[0]:0),v&&(i-=nm(v)?h[1]/2:v==="bottom"?h[1]:0),hS(e)){var m=yE(a,i,o,u,f);a=m[0],i=m[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===e.length;return o&&M(a,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&M(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&&M(g,function(m,y){var _=p[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),i&&M(c.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],S=i[y];_&&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){tt.node||!n.getDom()||(Ns(this,"_updatePosition"),this._tooltipContent.dispose(),_h("itemTooltip",n))},t.type="tooltip",t}(Te);function si(r,t,e){var n=t.ecModel,a;e?(a=new Ft(e,n,n),a=new Ft(t.option,a,n)):a=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Ft&&(o=o.get("tooltip",!0)),V(o)&&(o={formatter:o}),o&&(a=new Ft(o,a,n)))}return a}function rm(r,t){return r.dispatchAction||q(t.dispatchAction,t)}function mE(r,t,e,n,a,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(t+u+o>a?t-=u+o:t+=o),[r,t]}function yE(r,t,e,n,a){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,a)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function _E(r,t,e,n){var a=e[0],i=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-a/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-a/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-a/2,l=t.y+f+o;break;case"left":s=t.x-a-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function nm(r){return r==="center"||r==="middle"}function SE(r,t,e){var n=Hh(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=eo(t,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(!!o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ht(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}var bE=gE;function EO(r){Je(nS),r.registerComponentModel(eE),r.registerComponentView(bE),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Jt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Jt)}var xE=function(r){O(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}(gt),wE=function(r){O(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,a){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=nt(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Et({style:gr(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=e.get("subtext"),v=new Et({style:gr(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(){Cd(d,"_"+e.get("target"))}),g&&v.on("click",function(){Cd(g,"_"+e.get("subtarget"))}),ht(f).eventData=ht(v).eventData=p?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),c&&i.add(v);var m=i.getBoundingRect(),y=e.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=mr(y,{width:a.getWidth(),height:a.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"),i.x=_.x,i.y=_.y,i.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),v.setStyle(S),m=i.getBoundingRect();var x=_.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var w=new _t({shape:{x:m.x-x[3],y:m.y-x[0],width:m.width+x[1]+x[3],height:m.height+x[0]+x[2],r:e.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(w)}},t.type="title",t}(Te);function kO(r){r.registerComponentModel(xE),r.registerComponentView(wE)}var TE=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"])}},CE=function(r){O(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,a){this.mergeDefaultAndTheme(e,a),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,a=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),F(n)&&M(n,function(i,o){V(i)&&(i={type:i}),n[o]=et(i,TE(a,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a=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}(gt),wh=CE,ta=ut,Th=M,Jo=Dt,ME=function(r){O(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 Jo),this.group.add(this._selectorGroup=new Jo),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,a){var i=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,a,l,s,u);var f=e.getBoxLayoutParams(),h={width:a.getWidth(),height:a.getHeight()},c=e.get("padding"),v=mr(f,h,c),d=this.layoutInner(e,o,v,i,l,u),g=mr(J({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=sS(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,a,i,o,s,l){var u=this.getContentGroup(),f=Y(),h=n.get("selectedMode"),c=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Th(n.getData(),function(v,d){var g=v.get("name");if(!this.newlineDisabled&&(g===""||g===` `)){var p=new Jo;p.newline=!0,u.add(p);return}var m=a.getSeriesByName(g)[0];if(!f.get(g)){if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},S=y.getVisual("legendIcon"),x=y.getVisual("style"),b=this._createItem(m,g,d,v,n,e,_,x,S,h,i);b.on("click",ta(am,g,null,i,c)).on("mouseover",ta(Ch,m.name,null,i,c)).on("mouseout",ta(Mh,m.name,null,i,c)),f.set(g,!0)}else a.eachRawSeries(function(w){if(!f.get(g)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(g))return;var C=T.indexOfName(g),A=T.getItemVisual(C,"style"),D=T.getItemVisual(C,"legendIcon"),I=xe(A.fill);I&&I[3]===0&&(I[3]=.2,A=B(B({},A),{fill:Ea(I,"rgba")}));var L=this._createItem(w,g,d,v,n,e,{},A,D,h,i);L.on("click",ta(am,null,g,i,c)).on("mouseover",ta(Ch,null,g,i,c)).on("mouseout",ta(Mh,null,g,i,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,i,s,l)},t.prototype._createSelector=function(e,n,a,i,o){var s=this.getSelectorGroup();Th(e,function(u){var f=u.type,h=new Et({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);no(h,{normal:c,emphasis:v},{defaultText:u.title}),Ds(h)})},t.prototype._createItem=function(e,n,a,i,o,s,l,u,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),p=o.isSelected(n),m=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=DE(f,i,l,u,v,p,c),x=new Jo,b=i.getModel("textStyle");if($(e.getLegendIcon)&&(!_||_==="inherit"))x.add(e.getLegendIcon({itemWidth:d,itemHeight:g,icon:f,iconRotate:m,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?m==="inherit"?e.getData().getVisual("symbolRotate"):m:0;x.add(AE({itemWidth:d,itemHeight:g,icon:f,iconRotate:w,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,C=s,A=o.get("formatter"),D=n;V(A)&&A?D=A.replace("{name}",n!=null?n:""):$(A)&&(D=A(n));var I=p?b.getTextColor():i.get("inactiveColor");x.add(new Et({style:gr(b,{text:D,x:T,y:g/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new _t({shape:x.getBoundingRect(),invisible:!0}),P=i.getModel("tooltip");return P.get("show")&&dl({el:L,componentModel:o,itemName:n,itemTooltipOption:P.option}),x.add(L),x.eachChild(function(R){R.silent=!0}),L.silent=!h,this.getContentGroup().add(x),Ds(x),x.__legendDataIndex=a,x},t.prototype.layoutInner=function(e,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ma(e.get("orient"),l,e.get("itemGap"),a.width,a.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){ma("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",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?v[g]+=f[p]+d:h[g]+=c[p]+d,v[1-g]+=f[m]/2-c[m]/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],_[m]=Math.max(f[m],c[m]),_[y]=Math.min(0,c[y]+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}(Te);function DE(r,t,e,n,a,i,o){function s(p,m){p.lineWidth==="auto"&&(p.lineWidth=m.lineWidth>0?2:0),Th(p,function(y,_){p[_]==="inherit"&&(p[_]=m[_])})}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:eh(h,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(a==="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),!i){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 AE(r){var t=r.icon||"roundRect",e=Wr(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 am(r,t,e,n){Mh(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r!=null?r:t}),Ch(r,t,e,n)}function pS(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,a=t.length;na[o],p=[-v.x,-v.y];n||(p[i]=f[u]);var m=[0,0],y=[-d.x,-d.y],_=nt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(g){var S=e.get("pageButtonPosition",!0);S==="end"?y[i]+=a[o]-d[o]:m[i]+=d[o]+_}y[1-i]+=v[s]/2-d[s]/2,f.setPosition(p),h.setPosition(m),c.setPosition(y);var x={x:0,y:0};if(x[o]=g?a[o]:v[o],x[s]=Math.max(v[s],d[s]),x[l]=Math.min(0,d[l]+y[1-i]),h.__rectSize=a[o],g){var b={x:0,y:0};b[o]=Math.max(a[o]-d[o]-_,0),b[s]=x[s],h.setClipPath(new _t({shape:b})),h.__rectSize=b[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&Ot(f,{x:w.contentPosition[0],y:w.contentPosition[1]},g?e:null),this._updatePageInfoView(e,w),x},t.prototype._pageGo=function(e,n,a){var i=this._getPageInfo(n)[e];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var a=this._controllerGroup;M(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=n[h]!=null,v=a.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var i=a.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",V(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),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=af[o],l=of[o],u=this._findTargetItemIndex(n),f=a.children(),h=f[u],c=f.length,v=c?1:0,d={contentPosition:[a.x,a.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,m=g,y=g,_=null;p<=c;++p)_=S(f[p]),(!_&&y.e>m.s+i||_&&!x(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),y=_;for(var p=u-1,m=g,y=g,_=null;p>=-1;--p)_=S(f[p]),(!_||!x(y,_.s))&&m.i=w&&b.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(n=s)}),n!=null?n:i},t.type="legend.scroll",t}(gS),kE=EE;function OE(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(n)})})}function BE(r){Je(mS),r.registerComponentModel(RE),r.registerComponentView(kE),OE(r)}function OO(r){Je(mS),Je(BE)}var NE=function(r){O(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=ml(Qi.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Qi),FE=NE,$v=St();function zE(r,t,e){$v(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(t.uid);a&&(a.getRange=e)})}function GE(r,t){for(var e=$v(r).coordSysRecordMap,n=e.keys(),a=0;an[e+t]&&(t=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function YE(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=$v(e),a=n.coordSysRecordMap||(n.coordSysRecordMap=Y());a.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=aS(i);M(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,VE(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=Y());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){yS(a,i);return}var f=UE(l);o.enable(f.controlType,f.opt),o.setPointerChecker(i.containsPoint),Ml(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var $E=function(r){O(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,a){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),zE(a,e,{pan:q(sf.pan,this),zoom:q(sf.zoom,this),scrollMove:q(sf.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){GE(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Vv),sf={zoom:function(r,t,e,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(!!o){var s=lf[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*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(fo(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:sm(function(r,t,e,n,a,i){var o=lf[n]([i.oldX,i.oldY],[i.newX,i.newY],t,a,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:sm(function(r,t,e,n,a,i){var o=lf[n]([0,0],[i.scrollDelta,i.scrollDelta],t,a,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function sm(r){return function(t,e,n,a){var i=this.range,o=i.slice(),s=t.axisModels[0];if(!!s){var l=r(o,s,t,e,n,a);if(fo(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var lf={grid:function(r,t,e,n,a){var i=e.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,n,a){var i=e.axis,o={},s=a.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=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,n,a){var i=e.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}},ZE=$E;function XE(r){Hv(r),r.registerComponentModel(FE),r.registerComponentView(ZE),YE(r)}var qE=function(r){O(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=ml(Qi.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}(Qi),KE=qE,ui=_t,lm=7,QE=1,uf=30,JE=7,fi="horizontal",um="vertical",jE=5,tk=["line","bar","candlestick","scatter"],ek={easing:"cubicOut",duration:100,delay:0},rk=function(r){O(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=q(this._onBrush,this),this._onBrushEnd=q(this._onBrushEnd,this)},t.prototype.render=function(e,n,a,i){if(r.prototype.render.apply(this,arguments),Ml(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}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Ns(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 Dt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,n=this.api,a=e.get("brushSelect"),i=a?JE:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===fi?{right:s.width-o.x-o.width,top:s.height-uf-lm-i,width:o.width,height:uf}:{right:lm,top:o.y,width:uf,height:o.height},u=so(e.option);M(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=mr(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===um&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===fi&&!o?{scaleY:l?1:-1,scaleX:1}:a===fi&&o?{scaleY:l?1:-1,scaleX:-1}:a===um&&!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,a=this._displayables.sliderGroup,i=e.get("brushSelect");a.add(new ui({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new ui({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:q(this._onClickPanel,this)}),s=this.api.getZr();i?(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)),a.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var n=this._size,a=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var v=[0,n[1]],d=[0,n[0]],g=[[n[0],0],[0,0]],p=[],m=d[1]/(o.count()-1),y=0,_=Math.round(o.count()/n[0]),S;o.each([l],function(C,A){if(_>0&&A%_){y+=m;return}var D=C==null||isNaN(C)||C==="",I=D?0:Nt(C,h,v,!0);D&&!S&&A?(g.push([g[g.length-1][0],0]),p.push([p[p.length-1][0],0])):!D&&S&&(g.push([y,0]),p.push([y,0])),g.push([y,I]),p.push([y,I]),y+=m,S=D}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=p}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var x=this.dataZoomModel;function b(C){var A=x.getModel(C?"selectedDataBackground":"dataBackground"),D=new Dt,I=new ro({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new Oa({shape:{points:f},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(I),D.add(L),D}for(var w=0;w<3;w++){var T=b(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();M(l,function(u){if(!a&&!(n!==!0&&it(tk,u.get("type"))<0)){var f=i.getComponent(Br(o),s).axis,h=nk(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),a={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:c}}},this)},this),a}},t.prototype._renderHandle=function(){var e=this.group,n=this._displayables,a=n.handles=[null,null],i=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 ui({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new ui({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:QE,fill:"rgba(0,0,0,0)"}})),M([0,1],function(_){var S=l.get("handleIcon");!zs[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S,Ne("handleIcon now needs 'path://' prefix when using a path string"));var x=Wr(S,-1,0,2,2,null,!0);x.attr({cursor:fm(this._orient),draggable:!0,drift:q(this._onDragMove,this,_),ondragend:q(this._onDragEnd,this),onmouseover:q(this._showDataInfo,this,!0),onmouseout:q(this._showDataInfo,this,!1),z2:5});var b=x.getBoundingRect(),w=l.get("handleSize");this._handleHeight=vt(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ds(x);var T=l.get("handleColor");T!=null&&(x.style.fill=T),o.add(a[_]=x);var C=l.getModel("textStyle");e.add(i[_]=new Et({silent:!0,invisible:!0,style:gr(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var v=c;if(h){var d=vt(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new _t({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),p=d*.8,m=n.moveHandleIcon=Wr(l.get("moveHandleIcon"),-p/2,-p/2,p,p,"#fff",!0);m.silent=!0,m.y=s[1]+d/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));v=n.moveZone=new _t({invisible:!0,shape:{y:s[1]-y,height:d+y}}),v.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(m),o.add(v)}v.attr({draggable:!0,cursor:fm(this._orient),drift:q(this._onDragMove,this,"all"),ondragstart:q(this._showDataInfo,this,!0),ondragend:q(this._onDragEnd,this),onmouseover:q(this._showDataInfo,this,!0),onmouseout:q(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Nt(e[0],[0,100],n,!0),Nt(e[1],[0,100],n,!0)]},t.prototype._updateInterval=function(e,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];fo(n,i,o,a.get("zoomLock")?"all":e,s.minSpan!=null?Nt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Nt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=pi([Nt(i[0],o,l,!0),Nt(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var n=this._displayables,a=this._handleEnds,i=pi(a.slice()),o=this._size;M([0,1],function(v){var d=n.handles[v],g=this._handleHeight;d.attr({scaleX:g/2,scaleY:g/2,x:a[v]+(v?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[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,i[0],i[1],o[0]],f=0;fn[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var n=e.offsetX,a=e.offsetY;this._brushStart=new U(n,a),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 a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=pi([Nt(a.x,o,s,!0),Nt(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(_a(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new ui({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.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?ek:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var e,n=aS(this.dataZoomModel).infoList;if(!e&&n.length){var a=n[0].model.coordinateSystem;e=a.getRect&&a.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(Vv);function nk(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function fm(r){return r==="vertical"?"ns-resize":"ew-resize"}var ak=rk;function ik(r){r.registerComponentModel(KE),r.registerComponentView(ak),Hv(r)}function BO(r){Je(XE),Je(ik)}var hm={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},ok=function(){function r(t){var e=this._condVal=V(t)?new RegExp(t):Am(t)?t:null;if(e==null){var n="";n=se("Illegal regexp",t,"in"),lt(n)}}return r.prototype.evaluate=function(t){var e=typeof t;return V(e)?this._condVal.test(t):dt(e)?this._condVal.test(t+""):!1},r}(),sk=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),lk=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&n.push(a),a=[L,P]}function f(L,P,R,E){fa(L,R)&&fa(P,E)||a.push(L,P,R,E,R,E)}function h(L,P,R,E,G,k){var N=Math.abs(P-L),H=Math.tan(N/4)*4/3,X=PT:D2&&n.push(a),n}function Ih(r,t,e,n,a,i,o,s,l,u){if(fa(r,e)&&fa(t,n)&&fa(a,o)&&fa(i,s)){l.push(o,s);return}var f=2/u,h=f*f,c=o-r,v=s-t,d=Math.sqrt(c*c+v*v);c/=d,v/=d;var g=e-r,p=n-t,m=a-o,y=i-s,_=g*g+p*p,S=m*m+y*y;if(_=0&&T=0){l.push(o,s);return}var C=[],A=[];zr(r,e,a,o,.5,C),zr(t,n,i,s,.5,A),Ih(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],l,u),Ih(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],l,u)}function Sk(r,t){var e=Ah(r),n=[];t=t||1;for(var a=0;a0)for(var u=0;uMath.abs(u),h=SS([l,u],f?0:1,t),c=(f?s:u)/h.length,v=0;va,o=SS([n,a],i?0:1,t),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",h=r[s]/o.length,c=0;c1?null:new U(g*l+r,g*u+t)}function wk(r,t,e){var n=new U;U.sub(n,e,t),n.normalize();var a=new U;U.sub(a,r,t);var i=a.dot(n);return i}function ea(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function Tk(r,t,e){for(var n=r.length,a=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),Tk(t,u,f)}function Xs(r,t,e,n){if(e===1)n.push(t);else{var a=Math.floor(e/2),i=r(t);Xs(r,i[0],a,n),Xs(r,i[1],e-a,n)}return n}function Ck(r,t){for(var e=[],n=0;n0)for(var x=n/e,b=-n/2;b<=n/2;b+=x){for(var w=Math.sin(b),T=Math.cos(b),C=0,_=0;_0;u/=2){var f=0,h=0;(r&u)>0&&(f=1),(t&u)>0&&(h=1),s+=u*u*(3*f^h),h===0&&(f===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function Qs(r){var t=1/0,e=1/0,n=-1/0,a=-1/0,i=z(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return t=Math.min(f,t),e=Math.min(h,e),n=Math.max(f,n),a=Math.max(h,a),[f,h]}),o=z(i,function(s,l){return{cp:s,z:kk(s[0],s[1],t,e,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function wS(r){return Ak(r.path,r.count)}function Lh(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Ok(r,t,e){var n=[];function a(x){for(var b=0;b=0;a--)if(!e[a].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[a].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var Nk={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;_m(r)&&(u=r,f=t),_m(t)&&(u=t,f=r);function h(m,y,_,S,x){var b=m.many,w=m.one;if(b.length===1&&!x){var T=y?b[0]:w,C=y?w:b[0];if(qs(T))h({many:[T],one:C},!0,_,S,!0);else{var A=s?J({delay:s(_,S)},l):l;Xv(T,C,A),i(T,C,T,C,A)}}else for(var D=J({dividePath:Nk[e],individualDelay:s&&function(G,k,N,H){return s(G+_,S)}},l),I=y?Ok(b,w,D):Bk(w,b,D),L=I.fromIndividuals,P=I.toIndividuals,R=L.length,E=0;Et.length,v=u?Sm(f,u):Sm(c?t:r,[c?r:t]),d=0,g=0;gTS){Pt("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),i=zk(n),o=0;o0&&S.group.traverse(function(b){b instanceof ot&&!b.animators.length&&b.animateFrom({style:{opacity:0}},x)})})}function xm(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function wm(r){return F(r)?r.sort().join(","):r}function Rr(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Hk(r,t){var e=Y(),n=Y(),a=Y();M(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],f=xm(o),h=wm(f);n.set(h,{dataGroupId:l,data:u}),F(f)&&M(f,function(c){a.set(c,{key:h,dataGroupId:l,data:u})})});function i(o){e.get(o)&&Pt("Duplicated seriesKey in universalTransition "+o)}return M(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=xm(o),f=wm(u),h=n.get(f);if(h)i(f),e.set(f,{oldSeries:[{dataGroupId:h.dataGroupId,divide:Rr(h.data),data:h.data}],newSeries:[{dataGroupId:s,divide:Rr(l),data:l}]});else if(F(u)){i(f);var c=[];M(u,function(g){var p=n.get(g);p.data&&c.push({dataGroupId:p.dataGroupId,divide:Rr(p.data),data:p.data})}),c.length&&e.set(f,{oldSeries:c,newSeries:[{dataGroupId:s,data:l,divide:Rr(l)}]})}else{var v=a.get(u);if(v){var d=e.get(v.key);d||(d={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:Rr(v.data)}],newSeries:[]},e.set(v.key,d)),d.newSeries.push({dataGroupId:s,data:l,divide:Rr(l)})}}}}),e}function Tm(r,t){for(var e=0;e=0&&a.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Rr(t.oldData[s]),dim:o.dimension})}),M(xt(r.to),function(o){var s=Tm(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Rr(l),dim:o.dimension})}}),a.length>0&&i.length>0&&CS(a,i,n)}function zO(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){M(xt(n.seriesTransition),function(a){M(xt(a.to),function(i){for(var o=n.updatedSeries,s=0;s