/*! ***************************************************************************** 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 sl=function(e,t){return sl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},sl(e,t)};function N(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");sl(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var S_=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),x_=function(){function e(){this.browser=new S_,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<"u"}return e}(),jr=new x_;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(jr.wxa=!0,jr.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?jr.worker=!0:typeof navigator>"u"?(jr.node=!0,jr.svgSupported=!0):w_(navigator.userAgent,jr);function w_(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),a=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),a&&(r.ie=!0,r.version=a[1]),i&&(r.edge=!0,r.version=i[1],r.newEdge=+i[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}const j=jr;var wf=12,b_="sans-serif",pn=wf+"px "+b_,T_=20,C_=100,M_="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function D_(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r=0)s=o*r.length;else for(var u=0;u>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[u]+":0",a[l]+":0",n[1-u]+":auto",a[1-l]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function j_(e,t,r){for(var n=r?"invTrans":"trans",a=t[n],i=t.srcCoords,o=[],s=[],u=!0,l=0;l<4;l++){var f=e[l].getBoundingClientRect(),h=2*l,c=f.left,v=f.top;o.push(c,v),u=u&&i&&c===i[h]&&v===i[h+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return u&&a?a:(t.srcCoords=o,t[n]=r?kh(s,o):kh(o,s))}function Gp(e){return e.nodeName.toUpperCase()==="CANVAS"}var t1=/([&<>"'])/g,e1={"&":"&","<":"<",">":">",'"':""","'":"'"};function re(e){return e==null?"":(e+"").replace(t1,function(t,r){return e1[r]})}var r1=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Fs=[],n1=j.browser.firefox&&+j.browser.version.split(".")[0]<39;function vl(e,t,r,n){return r=r||{},n?Nh(e,t,r):n1&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):Nh(e,t,r),r}function Nh(e,t,r){if(j.domSupported&&e.getBoundingClientRect){var n=t.clientX,a=t.clientY;if(Gp(e)){var i=e.getBoundingClientRect();r.zrX=n-i.left,r.zrY=a-i.top;return}else if(hl(Fs,e,n,a)){r.zrX=Fs[0],r.zrY=Fs[1];return}}r.zrX=r.zrY=0}function If(e){return e||window.event}function le(e,t,r){if(t=If(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&&vl(e,o,t,r)}else{vl(e,t,t,r);var i=a1(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&r1.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function a1(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var a=Math.abs(n!==0?n:r),i=n>0?-1:n<0?1:r>0?-1:1;return 3*a*i}function i1(e,t,r,n){e.addEventListener(t,r,n)}function o1(e,t,r,n){e.removeEventListener(t,r,n)}var Hp=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function WI(e){return e.which===2||e.which===3}var s1=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var a=t.touches;if(!!a){for(var i={points:[],touches:[],target:r,event:t},o=0,s=a.length;o1&&n&&n.length>1){var i=Fh(n)/Fh(a);!isFinite(i)&&(i=1),t.pinchScale=i;var o=u1(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function gn(){return[1,0,0,1,0,0]}function gi(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Pf(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function xr(e,t,r){var n=t[0]*r[0]+t[2]*r[1],a=t[1]*r[0]+t[3]*r[1],i=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],u=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=u,e}function ko(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function hs(e,t,r){var n=t[0],a=t[2],i=t[4],o=t[1],s=t[3],u=t[5],l=Math.sin(r),f=Math.cos(r);return e[0]=n*f+o*l,e[1]=-n*l+o*f,e[2]=a*f+s*l,e[3]=-a*l+f*s,e[4]=f*i+l*u,e[5]=f*u-l*i,e}function Vp(e,t,r){var n=r[0],a=r[1];return e[0]=t[0]*n,e[1]=t[1]*a,e[2]=t[2]*n,e[3]=t[3]*a,e[4]=t[4]*n,e[5]=t[5]*a,e}function ra(e,t){var r=t[0],n=t[2],a=t[4],i=t[1],o=t[3],s=t[5],u=r*o-i*n;return u?(u=1/u,e[0]=o*u,e[1]=-i*u,e[2]=-n*u,e[3]=r*u,e[4]=(n*s-o*a)*u,e[5]=(i*a-r*s)*u,e):null}function l1(e){var t=gn();return Pf(t,e),t}const UI=Object.freeze(Object.defineProperty({__proto__:null,create:gn,identity:gi,copy:Pf,mul:xr,translate:ko,rotate:hs,scale:Vp,invert:ra,clone:l1},Symbol.toStringTag,{value:"Module"}));var f1=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(!!t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,a){t.x=r.x+n.x*a,t.y=r.y+n.y*a},e.lerp=function(t,r,n,a){var i=1-a;t.x=i*r.x+a*n.x,t.y=i*r.y+a*n.y},e}();const V=f1;var Di=Math.min,Ai=Math.max,Pr=new V,Rr=new V,Er=new V,Or=new V,fa=new V,ha=new V,h1=function(){function e(t,r,n,a){n<0&&(t=t+n,n=-n),a<0&&(r=r+a,a=-a),this.x=t,this.y=r,this.width=n,this.height=a}return e.prototype.union=function(t){var r=Di(t.x,this.x),n=Di(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Ai(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Ai(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,a=t.height/r.height,i=gn();return ko(i,i,[-r.x,-r.y]),Vp(i,i,[n,a]),ko(i,i,[t.x,t.y]),i},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var n=this,a=n.x,i=n.x+n.width,o=n.y,s=n.y+n.height,u=t.x,l=t.x+t.width,f=t.y,h=t.y+t.height,c=!(id&&(d=_,gd&&(d=S,y=n.x&&t<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(t,r);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=r.x*a+o,t.y=r.y*i+s,t.width=r.width*a,t.height=r.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}Pr.x=Er.x=r.x,Pr.y=Or.y=r.y,Rr.x=Or.x=r.x+r.width,Rr.y=Er.y=r.y+r.height,Pr.transform(n),Or.transform(n),Rr.transform(n),Er.transform(n),t.x=Di(Pr.x,Rr.x,Er.x,Or.x),t.y=Di(Pr.y,Rr.y,Er.y,Or.y);var u=Ai(Pr.x,Rr.x,Er.x,Or.x),l=Ai(Pr.y,Rr.y,Er.y,Or.y);t.width=u-t.x,t.height=l-t.y},e}();const tt=h1;var Wp="silent";function v1(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:c1}}function c1(){Hp(this.event)}var d1=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}($e),va=function(){function e(t,r){this.x=t,this.y=r}return e}(),p1=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Gs=new tt(0,0,0,0),Up=function(e){N(t,e);function t(r,n,a,i,o){var s=e.call(this)||this;return s._hovered=new va(0,0),s.storage=r,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new d1,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new q_(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(M(p1,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,a=r.zrY,i=Yp(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var u=this._hovered=i?new va(n,a):this.findHover(n,a),l=u.target,f=this.proxy;f.setCursor&&f.setCursor(l?l.cursor:"default"),s&&l!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(u,"mousemove",r),l&&l!==s&&this.dispatchToElement(u,"mouseover",r)},t.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new va(0,0)},t.prototype.dispatch=function(r,n){var a=this[r];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(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,a){r=r||{};var i=r.target;if(!(i&&i.silent)){for(var o="on"+n,s=v1(n,r,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(u){typeof u[o]=="function"&&u[o].call(u,s),u.trigger&&u.trigger(n,s)}))}},t.prototype.findHover=function(r,n,a){var i=this.storage.getDisplayList(),o=new va(r,n);if(zh(i,o,r,n,a),this._pointerSize&&!o.target){for(var s=[],u=this._pointerSize,l=u/2,f=new tt(r-l,n-l,u,u),h=i.length-1;h>=0;h--){var c=i[h];c!==a&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(Gs.copy(c.getBoundingRect()),c.transform&&Gs.applyTransform(c.transform),Gs.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,e,t)}});function g1(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1;n.silent&&(a=!0)}var s=n.__hostTarget;n=s||n.parent}return a?Wp:!0}return!1}function zh(e,t,r,n,a){for(var i=e.length-1;i>=0;i--){var o=e[i],s=void 0;if(o!==a&&!o.ignore&&(s=g1(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==Wp)){t.target=o;break}}}function Yp(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}const y1=Up;var $p=32,ca=7;function m1(e){for(var t=0;e>=$p;)t|=e&1,e>>=1;return e+t}function Gh(e,t,r,n){var a=t+1;if(a===r)return 1;if(n(e[a++],e[t])<0){for(;a=0;)a++;return a-t}function _1(e,t,r){for(r--;t>>1,a(i,e[u])<0?s=u:o=u+1;var l=n-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=i}}function Hs(e,t,r,n,a,i){var o=0,s=0,u=1;if(i(e,t[r+a])>0){for(s=n-a;u0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=a,u+=a}else{for(s=a+1;us&&(u=s);var l=o;o=a-u,u=a-l}for(o++;o>>1);i(e,t[r+f])>0?o=f+1:u=f}return u}function Vs(e,t,r,n,a,i){var o=0,s=0,u=1;if(i(e,t[r+a])<0){for(s=a+1;us&&(u=s);var l=o;o=a-u,u=a-l}else{for(s=n-a;u=0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=a,u+=a}for(o++;o>>1);i(e,t[r+f])<0?u=f:o=f+1}return u}function S1(e,t){var r=ca,n,a,i=0;e.length;var o=[];n=[],a=[];function s(v,d){n[i]=v,a[i]=d,i+=1}function u(){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 l(){for(;i>1;){var v=i-2;v>0&&a[v-1]=ca||b>=ca);if(T)break;w<0&&(w=0),w+=2}if(r=w,r<1&&(r=1),d===1){for(y=0;y=0;y--)e[x+y]=e[w+y];e[S]=o[_];return}for(var b=r;;){var T=0,C=0,A=!1;do if(t(o[_],e[m])<0){if(e[S--]=e[m--],T++,C=0,--d===0){A=!0;break}}else if(e[S--]=o[_--],C++,T=0,--p===1){A=!0;break}while((T|C)=0;y--)e[x+y]=e[w+y];if(d===0){A=!0;break}}if(e[S--]=o[_--],--p===1){A=!0;break}if(C=p-Hs(e[m],o,0,p,p-1,t),C!==0){for(S-=C,_-=C,p-=C,x=S+1,w=_+1,y=0;y=ca||C>=ca);if(A)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),p===1){for(S-=d,m-=d,x=S+1,w=m+1,y=d-1;y>=0;y--)e[x+y]=e[w+y];e[S]=o[_]}else{if(p===0)throw new Error;for(w=S-(p-1),y=0;ys&&(u=s),Hh(e,r,r+u,r+i,t),i=u}o.pushRun(r,i),o.mergeRuns(),a-=i,r+=i}while(a!==0);o.forceMergeRuns()}}var ne=1,Pa=2,Gn=4,Vh=!1;function Ws(){Vh||(Vh=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Wh(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var x1=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Wh}return e.prototype.traverse=function(t,r){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(Ws(),f.z=0),isNaN(f.z2)&&(Ws(),f.z2=0),isNaN(f.zlevel)&&(Ws(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,r,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,r,n);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,r,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r=0&&this._roots.splice(a,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();const w1=x1;var Xp;Xp=j.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};const cl=Xp;var mo={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-mo.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?mo.bounceIn(e*2)*.5:mo.bounceOut(e*2-1)*.5+.5}};const qp=mo;var Li=Math.pow,wr=Math.sqrt,Bo=1e-8,Zp=1e-4,Uh=wr(3),Ii=1/3,Ne=Sn(),ve=Sn(),Xn=Sn();function yr(e){return e>-Bo&&eBo||e<-Bo}function At(e,t,r,n,a){var i=1-a;return i*i*(i*e+3*a*t)+a*a*(a*n+3*i*r)}function Yh(e,t,r,n,a){var i=1-a;return 3*(((t-e)*i+2*(r-t)*a)*i+(n-r)*a*a)}function Qp(e,t,r,n,a,i){var o=n+3*(t-r)-e,s=3*(r-t*2+e),u=3*(t-e),l=e-a,f=s*s-3*o*u,h=s*u-9*o*l,c=u*u-3*s*l,v=0;if(yr(f)&&yr(h))if(yr(s))i[0]=0;else{var d=-u/s;d>=0&&d<=1&&(i[v++]=d)}else{var g=h*h-4*f*c;if(yr(g)){var p=h/f,d=-s/o+p,y=-p/2;d>=0&&d<=1&&(i[v++]=d),y>=0&&y<=1&&(i[v++]=y)}else if(g>0){var m=wr(g),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Li(-_,Ii):_=Li(_,Ii),S<0?S=-Li(-S,Ii):S=Li(S,Ii);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(i[v++]=d)}else{var w=(2*f*s-3*o*h)/(2*wr(f*f*f)),x=Math.acos(w)/3,b=wr(f),T=Math.cos(x),d=(-s-2*b*T)/(3*o),y=(-s+b*(T+Uh*Math.sin(x)))/(3*o),C=(-s+b*(T-Uh*Math.sin(x)))/(3*o);d>=0&&d<=1&&(i[v++]=d),y>=0&&y<=1&&(i[v++]=y),C>=0&&C<=1&&(i[v++]=C)}}return v}function Jp(e,t,r,n,a){var i=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,u=0;if(yr(o)){if(Kp(i)){var l=-s/i;l>=0&&l<=1&&(a[u++]=l)}}else{var f=i*i-4*o*s;if(yr(f))a[0]=-i/(2*o);else if(f>0){var h=wr(f),l=(-i+h)/(2*o),c=(-i-h)/(2*o);l>=0&&l<=1&&(a[u++]=l),c>=0&&c<=1&&(a[u++]=c)}}return u}function Tr(e,t,r,n,a,i){var o=(t-e)*a+e,s=(r-t)*a+t,u=(n-r)*a+r,l=(s-o)*a+o,f=(u-s)*a+s,h=(f-l)*a+l;i[0]=e,i[1]=o,i[2]=l,i[3]=h,i[4]=h,i[5]=f,i[6]=u,i[7]=n}function jp(e,t,r,n,a,i,o,s,u,l,f){var h,c=.005,v=1/0,d,g,p,y;Ne[0]=u,Ne[1]=l;for(var m=0;m<1;m+=.05)ve[0]=At(e,r,a,o,m),ve[1]=At(t,n,i,s,m),p=un(Ne,ve),p=0&&p=0&&l<=1&&(a[u++]=l)}}else{var f=o*o-4*i*s;if(yr(f)){var l=-o/(2*i);l>=0&&l<=1&&(a[u++]=l)}else if(f>0){var h=wr(f),l=(-o+h)/(2*i),c=(-o-h)/(2*i);l>=0&&l<=1&&(a[u++]=l),c>=0&&c<=1&&(a[u++]=c)}}return u}function tg(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function No(e,t,r,n,a){var i=(t-e)*n+e,o=(r-t)*n+t,s=(o-i)*n+i;a[0]=e,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=r}function eg(e,t,r,n,a,i,o,s,u){var l,f=.005,h=1/0;Ne[0]=o,Ne[1]=s;for(var c=0;c<1;c+=.05){ve[0]=Et(e,r,a,c),ve[1]=Et(t,n,i,c);var v=un(Ne,ve);v=0&&v=1?1:Qp(0,n,i,1,u,s)&&At(0,a,o,1,s[0])}}}var D1=function(){function e(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||Gt,this.ondestroy=t.ondestroy||Gt,this.onrestart=t.onrestart||Gt,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;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 u=a%n;this._startTime=t-u,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=q(t)?t:qp[t]||rg(t)},e}();const A1=D1;var ng=function(){function e(t){this.value=t}return e}(),L1=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new ng(t);return this.insertEntry(r),r},e.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++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),I1=function(){function e(t){this._list=new L1,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){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 u=n.head;n.remove(u),delete a[u.key],i=u.value,this._lastRemovedEntry=u}s?s.value=r:s=new ng(r),s.key=t,n.insertEntry(s),a[t]=s}return i},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();const yi=I1;var Xh={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 Me(e){return e=Math.round(e),e<0?0:e>255?255:e}function P1(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ja(e){return e<0?0:e>1?1:e}function Us(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Me(parseFloat(t)/100*255):Me(parseInt(t,10))}function ln(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Ja(parseFloat(t)/100):Ja(parseFloat(t))}function Ys(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function mr(e,t,r){return e+(t-e)*r}function ue(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e}function dl(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var ag=new yi(20),Pi=null;function Cn(e,t){Pi&&dl(Pi,t),Pi=ag.put(e,Pi||t.slice())}function Qt(e,t){if(!!e){t=t||[];var r=ag.get(e);if(r)return dl(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in Xh)return dl(t,Xh[n]),Cn(e,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)){ue(t,0,0,0,1);return}return ue(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),Cn(e,t),t}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){ue(t,0,0,0,1);return}return ue(t,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),Cn(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){var u=n.substr(0,o),l=n.substr(o+1,s-(o+1)).split(","),f=1;switch(u){case"rgba":if(l.length!==4)return l.length===3?ue(t,+l[0],+l[1],+l[2],1):ue(t,0,0,0,1);f=ln(l.pop());case"rgb":if(l.length>=3)return ue(t,Us(l[0]),Us(l[1]),Us(l[2]),l.length===3?f:ln(l[3])),Cn(e,t),t;ue(t,0,0,0,1);return;case"hsla":if(l.length!==4){ue(t,0,0,0,1);return}return l[3]=ln(l[3]),pl(l,t),Cn(e,t),t;case"hsl":if(l.length!==3){ue(t,0,0,0,1);return}return pl(l,t),Cn(e,t),t;default:return}}ue(t,0,0,0,1)}}function pl(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=ln(e[1]),a=ln(e[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return t=t||[],ue(t,Me(Ys(o,i,r+1/3)*255),Me(Ys(o,i,r)*255),Me(Ys(o,i,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function R1(e){if(!!e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=i-a,s=(i+a)/2,u,l;if(o===0)u=0,l=0;else{s<.5?l=o/(i+a):l=o/(2-i-a);var f=((i-t)/6+o/2)/o,h=((i-r)/6+o/2)/o,c=((i-n)/6+o/2)/o;t===i?u=c-h:r===i?u=1/3+f-c:n===i&&(u=2/3+h-f),u<0&&(u+=1),u>1&&(u-=1)}var v=[u*360,l,s];return e[3]!=null&&v.push(e[3]),v}}function gl(e,t){var r=Qt(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Ir(r,r.length===4?"rgba":"rgb")}}function E1(e){var t=Qt(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function ig(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),a=Math.floor(n),i=Math.ceil(n),o=t[a],s=t[i],u=n-a;return r[0]=Me(mr(o[0],s[0],u)),r[1]=Me(mr(o[1],s[1],u)),r[2]=Me(mr(o[2],s[2],u)),r[3]=Ja(mr(o[3],s[3],u)),r}}var O1=ig;function og(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),a=Math.floor(n),i=Math.ceil(n),o=Qt(t[a]),s=Qt(t[i]),u=n-a,l=Ir([Me(mr(o[0],s[0],u)),Me(mr(o[1],s[1],u)),Me(mr(o[2],s[2],u)),Ja(mr(o[3],s[3],u))],"rgba");return r?{color:l,leftIndex:a,rightIndex:i,value:n}:l}}var k1=og;function B1(e,t,r,n){var a=Qt(e);if(e)return a=R1(a),t!=null&&(a[0]=P1(t)),r!=null&&(a[1]=ln(r)),n!=null&&(a[2]=ln(n)),Ir(pl(a),"rgba")}function N1(e,t){var r=Qt(e);if(r&&t!=null)return r[3]=Ja(t),Ir(r,"rgba")}function Ir(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function ja(e,t){var r=Qt(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function F1(){return Ir([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}const YI=Object.freeze(Object.defineProperty({__proto__:null,parse:Qt,lift:gl,toHex:E1,fastLerp:ig,fastMapToColor:O1,lerp:og,mapToColor:k1,modifyHSL:B1,modifyAlpha:N1,stringify:Ir,lum:ja,random:F1},Symbol.toStringTag,{value:"Module"}));var Fo=Math.round;function $I(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=Qt(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t==null?1:t}}var qh=1e-4;function XI(e){return e-qh}function Ri(e){return Fo(e*1e3)/1e3}function Zh(e){return Fo(e*1e4)/1e4}function qI(e){return"matrix("+Ri(e[0])+","+Ri(e[1])+","+Ri(e[2])+","+Ri(e[3])+","+Zh(e[4])+","+Zh(e[5])+")"}var ZI={left:"start",right:"end",center:"middle",middle:"middle"};function KI(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function QI(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function JI(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function z1(e){return e&&!!e.image}function G1(e){return e&&!!e.svgElement}function jI(e){return z1(e)||G1(e)}function H1(e){return e.type==="linear"}function V1(e){return e.type==="radial"}function tP(e){return e&&(e.type==="linear"||e.type==="radial")}function eP(e){return"url(#"+e+")"}function rP(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function nP(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*Fa,a=K(e.scaleX,1),i=K(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,u=[];return(t||r)&&u.push("translate("+t+"px,"+r+"px)"),n&&u.push("rotate("+n+")"),(a!==1||i!==1)&&u.push("scale("+a+","+i+")"),(o||s)&&u.push("skew("+Fo(o*Fa)+"deg, "+Fo(s*Fa)+"deg)"),u.join(" ")}var aP=function(){return j.hasGlobalWindow&&q(window.btoa)?function(e){return window.btoa(unescape(e))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}}(),yl=Array.prototype.slice;function Qe(e,t,r){return(t-e)*r+e}function $s(e,t,r,n){for(var a=t.length,i=0;in?t:e,i=Math.min(r,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)n.length=o;else for(var u=i;u=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=Qh,u=r;if(Bt(r)){var l=$1(r);s=l,(l===1&&!ft(r[0])||l===2&&!ft(r[0][0]))&&(o=!0)}else if(ft(r)&&!Ka(r))s=Oi;else if(z(r))if(!isNaN(+r))s=Oi;else{var f=Qt(r);f&&(u=f,s=Ra)}else if(di(r)){var h=O({},u);h.colorStops=G(r.colorStops,function(v){return{offset:v.offset,color:Qt(v.color)}}),H1(r)?s=ml:V1(r)&&(s=_l),u=h}i===0?this.valType=s:(s!==this.valType||s===Qh)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:u,rawValue:r,percent:0};return n&&(c.easing=n,c.easingFunc=q(n)?n:qp[n]||rg(n)),a.push(c),c},e.prototype.prepare=function(t,r){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,u=ki(a),l=Jh(a),f=0;f=0&&!(o[f].percent<=r);f--);f=c(f,s-2)}else{for(f=h;fr);f++);f=c(f-1,s-2)}d=o[f+1],v=o[f]}if(!!(v&&d)){this._lastFr=f,this._lastFrP=r;var p=d.percent-v.percent,y=p===0?1:c((r-v.percent)/p,1);d.easingFunc&&(y=d.easingFunc(y));var m=n?this._additiveValue:l?da:t[u];if((ki(i)||l)&&!m&&(m=this._additiveValue=[]),this.discrete)t[u]=y<1?v.rawValue:d.rawValue;else if(ki(i))i===xo?$s(m,v[a],d[a],y):W1(m,v[a],d[a],y);else if(Jh(i)){var _=v[a],S=d[a],w=i===ml;t[u]={type:w?"linear":"radial",x:Qe(_.x,S.x,y),y:Qe(_.y,S.y,y),colorStops:G(_.colorStops,function(b,T){var C=S.colorStops[T];return{offset:Qe(b.offset,C.offset,y),color:So($s([],b.color,C.color,y))}}),global:S.global},w?(t[u].x2=Qe(_.x2,S.x2,y),t[u].y2=Qe(_.y2,S.y2,y)):t[u].r=Qe(_.r,S.r,y)}else if(l)$s(m,v[a],d[a],y),n||(t[u]=So(m));else{var x=Qe(v[a],d[a],y);n?this._additiveValue=x:t[u]=x}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,a=this._additiveValue;r===Oi?t[n]=t[n]+a:r===Ra?(Qt(t[n],da),Ei(da,da,a,1),t[n]=So(da)):r===xo?Ei(t[n],t[n],a,1):r===sg&&Kh(t[n],t[n],a,1)},e}(),q1=function(){function e(t,r,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&a){ls("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,ct(r),n)},e.prototype.whenWithKeys=function(t,r,n,a){for(var i=this._tracks,o=0;o0&&u.addKeyframe(0,_o(l),a),this._trackKeys.push(s)}u.addKeyframe(t,_o(r[s]),a)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n0)){this._started=1;for(var r=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())}}}},e}();const Rf=q1;function Vn(){return new Date().getTime()}var Z1=function(e){N(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(!!r.animation){var n=r.prev,a=r.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=Vn()-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,r||(this.trigger("frame",a),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(cl(n),!r._paused&&r.update())}cl(n)},t.prototype.start=function(){this._running||(this._time=Vn(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Vn(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Vn()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var a=new Rf(r,n.loop);return this.addAnimator(a),a},t}($e);const K1=Z1;var Q1=300,Xs=j.domSupported,qs=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=G(e,function(a){var i=a.replace("mouse","pointer");return r.hasOwnProperty(i)?i:a});return{mouse:e,touch:t,pointer:n}}(),jh={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},tv=!1;function Sl(e){var t=e.pointerType;return t==="pen"||t==="touch"}function J1(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Zs(e){e&&(e.zrByTouch=!0)}function j1(e,t){return le(e.dom,new tS(e,t),!0)}function ug(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var tS=function(){function e(t,r){this.stopPropagation=Gt,this.stopImmediatePropagation=Gt,this.preventDefault=Gt,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),Se={mousedown:function(e){e=le(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=le(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=le(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=le(this.dom,e);var t=e.toElement||e.relatedTarget;ug(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){tv=!0,e=le(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){tv||(e=le(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=le(this.dom,e),Zs(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Se.mousemove.call(this,e),Se.mousedown.call(this,e)},touchmove:function(e){e=le(this.dom,e),Zs(e),this.handler.processGesture(e,"change"),Se.mousemove.call(this,e)},touchend:function(e){e=le(this.dom,e),Zs(e),this.handler.processGesture(e,"end"),Se.mouseup.call(this,e),+new Date-+this.__lastTouchMomentnv||e<-nv}var Br=[],Mn=[],Qs=gn(),Js=Math.abs,oS=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return kr(this.rotation)||kr(this.x)||kr(this.y)||kr(this.scaleX-1)||kr(this.scaleY-1)||kr(this.skewX)||kr(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&rv(n);return}n=n||gn(),r?this.getLocalTransform(n):rv(n),t&&(r?xr(n,t,n):Pf(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Br);var n=Br[0]<0?-1:1,a=Br[1]<0?-1:1,i=((Br[0]-n)*r+n)/Br[0]||0,o=((Br[1]-a)*r+a)/Br[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||gn(),ra(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(!!t){var r=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),r=Math.sqrt(r),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(!!this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(xr(Mn,t.invTransform,r),r=Mn);var n=this.originX,a=this.originY;(n||a)&&(Qs[4]=n,Qs[5]=a,xr(Mn,r,Qs),Mn[4]-=n,Mn[5]-=a,r=Mn),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],a=this.invTransform;return a&&Ht(n,n,a),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],a=this.transform;return a&&Ht(n,n,a),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&Js(t[0]-1)>1e-10&&Js(t[3]-1)>1e-10?Math.sqrt(Js(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){sS(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,a=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,u=t.anchorY,l=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||u){var d=n+s,g=a+u;r[4]=-d*i-c*g*o,r[5]=-g*o-v*d*i}else r[4]=r[5]=0;return r[0]=i,r[3]=o,r[1]=v*i,r[2]=c*o,l&&hs(r,r,l),r[4]+=n+f,r[5]+=a+h,r},e.initDefaultProps=function(){var t=e.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}(),e}(),ti=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function sS(e,t){for(var r=0;r=0?parseFloat(e)/100*t:parseFloat(e):e}function Go(e,t,r){var n=t.position||"inside",a=t.distance!=null?t.distance:5,i=r.height,o=r.width,s=i/2,u=r.x,l=r.y,f="left",h="top";if(n instanceof Array)u+=Cr(n[0],r.width),l+=Cr(n[1],r.height),f=null,h=null;else switch(n){case"left":u-=a,l+=s,f="right",h="middle";break;case"right":u+=a+o,l+=s,h="middle";break;case"top":u+=o/2,l-=a,f="center",h="bottom";break;case"bottom":u+=o/2,l+=i+a,f="center";break;case"inside":u+=o/2,l+=s,f="center",h="middle";break;case"insideLeft":u+=a,l+=s,h="middle";break;case"insideRight":u+=o-a,l+=s,f="right",h="middle";break;case"insideTop":u+=o/2,l+=a,f="center";break;case"insideBottom":u+=o/2,l+=i-a,f="center",h="bottom";break;case"insideTopLeft":u+=a,l+=a;break;case"insideTopRight":u+=o-a,l+=a,f="right";break;case"insideBottomLeft":u+=a,l+=i-a,h="bottom";break;case"insideBottomRight":u+=o-a,l+=i-a,f="right",h="bottom";break}return e=e||{},e.x=u,e.y=l,e.align=f,e.verticalAlign=h,e}var js="__zr_normal__",tu=ti.concat(["ignore"]),uS=rr(ti,function(e,t){return e[t]=!0,e},{ignore:!1}),Dn={},lS=new tt(0,0,0,0),kf=function(){function e(t){this.id=Cf(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=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]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=r.innerTransformable,o=void 0,s=void 0,u=!1;i.parent=a?this:null;var l=!1;if(i.copyTransform(r),n.position!=null){var f=lS;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),a||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Dn,n,f):Go(Dn,n,f),i.x=Dn.x,i.y=Dn.y,o=Dn.align,s=Dn.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=Cr(h[0],f.width),v=Cr(h[1],f.height)),l=!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],l||(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={}),y=void 0,m=void 0,_=void 0;g&&this.canBeInsideText()?(y=n.insideFill,m=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=n.outsideFill,m=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==p.fill||m!==p.stroke||_!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(u=!0,p.fill=y,p.stroke=m,p.autoStroke=_,p.align=o,p.verticalAlign=s,r.setDefaultTextStyle(p)),r.__dirty|=ne,u&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Tl:bl},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Qt(r);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,Ir(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},O(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(W(t))for(var n=t,a=ct(n),i=0;i0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(js,!1,t)},e.prototype.useState=function(t,r,n,a){var i=t===js,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,u=this.stateTransition;if(!(it(s,t)>=0&&(r||s.length===1))){var l;if(this.stateProxy&&!i&&(l=this.stateProxy(t)),l||(l=this.states&&this.states[t]),!l&&!i){ls("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(l);var f=!!(l&&l.hoverLayer||a);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,l,this._normalState,r,!n&&!this.__inHover&&u&&u.duration>0,u);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,r,n,f),c&&c.useState(t,r,n,f),i?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ne),l}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var a=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var u=0;u0,d);var g=this._textContent,p=this._textGuide;g&&g.useStates(t,r,c),p&&p.useStates(t,r,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ne)}},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var a=this.currentStates.slice(),i=it(a,t),o=it(a,r)>=0;i>=0?o?a.splice(i,1):a[i]=r:n&&!o&&a.push(r),this.useStates(a)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,a=0;a=0&&i.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,a=n.length,i=[],o=0;o0&&r.during&&i[0].during(function(d,g){r.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 y=g[S];C[y]=r[y],c?T[y]=n[y]:r[y]=n[y]}}else if(c){A={};for(var S=0;S<_;S++){var y=g[S];A[y]=_o(r[y]),hS(r,n,y)}}var w=new Rf(r,!1,!1,h?wt(d,function(L){return L.targetName===t}):null);w.targetName=t,a.scope&&(w.scope=a.scope),c&&T&&w.whenWithKeys(0,T,g),A&&w.whenWithKeys(0,A,g),w.whenWithKeys(l==null?500:l,s?C:n,g).delay(f||0),e.addAnimator(w,t),o.push(w)}}const hg=kf;var vg=function(e){N(t,e);function t(r){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(r){return this._children[r]},t.prototype.childOfName=function(r){for(var n=this._children,a=0;a=0&&(a.splice(i,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var a=it(this._children,r);return a>=0&&this.replaceAt(n,a),this},t.prototype.replaceAt=function(r,n){var a=this._children,i=a[n];if(r&&r!==this&&r.parent!==this&&r!==i){a[n]=r,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(r){var n=this.__zr,a=this._children,i=it(a,r);return i<0?this:(a.splice(i,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,a=0;a0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},e.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this.handler.off(t,r)},e.prototype.trigger=function(t,r){this.handler.trigger(t,r)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),r=0;r0){if(e<=a)return o;if(e>=i)return s}else{if(e>=a)return o;if(e<=i)return s}else{if(e===a)return o;if(e===i)return s}return(e-a)/u*l+o}function st(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return z(e)?xS(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function Tt(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),dg),e=(+e).toFixed(t),r?e:+e}function oP(e){return e.sort(function(t,r){return t-r}),e}function je(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return wS(e)}function wS(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,a=r>0?r:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function bS(e,t){var r=Math.log,n=Math.LN10,a=Math.floor(r(e[1]-e[0])/n),i=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function sP(e,t,r){if(!e[t])return 0;var n=pg(e,r);return n[t]||0}function pg(e,t){var r=rr(e,function(v,d){return v+(isNaN(d)?0:d)},0);if(r===0)return[];for(var n=Math.pow(10,t),a=G(e,function(v){return(isNaN(v)?0:v)/r*n*100}),i=n*100,o=G(a,function(v){return Math.floor(v)}),s=rr(o,function(v,d){return v+d},0),u=G(a,function(v,d){return v-o[d]});sl&&(l=u[h],f=h);++o[f],u[f]=0,++s}return G(o,function(v){return v/n})}function TS(e,t){var r=Math.max(je(e),je(t)),n=e+t;return r>dg?n:Tt(n,r)}var uP=9007199254740991;function gg(e){var t=Math.PI*2;return(e%t+t)%t}function Ho(e){return e>-ov&&e=10&&t++,t}function yg(e,t){var r=Bf(e),n=Math.pow(10,r),a=e/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,e=i*n,r>=-20?+e.toFixed(r<0?-r:0):e}function lP(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),a=+e[n-1],i=r-n;return i?a+i*(e[n]-a):a}function fP(e){e.sort(function(u,l){return s(u,l,0)?-1:1});for(var t=-1/0,r=1,n=0;n=0||i&&it(i,u)<0)){var l=n.getShallow(u,t);l!=null&&(o[e[s][0]]=l)}}return o}}var jS=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],tx=ri(jS),ex=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return tx(this,t,r)},e}(),Al=new yi(50);function rx(e){if(typeof e=="string"){var t=Al.get(e);return t&&t.image}else return e}function Mg(e,t,r,n,a){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var i=Al.get(e),o={hostEl:r,cb:n,cbPayload:a};return i?(t=i.image,!cs(t)&&i.pending.push(o)):(t=er.loadImage(e,hv,hv),t.__zrImageSrc=e,Al.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function hv(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;u++)s-=o;var l=ae(r,t);return l>s&&(r="",l=0),s=e-l,a.ellipsis=r,a.ellipsisWidth=l,a.contentWidth=s,a.containerWidth=e,a}function Ag(e,t){var r=t.containerWidth,n=t.font,a=t.contentWidth;if(!r)return"";var i=ae(e,n);if(i<=r)return e;for(var o=0;;o++){if(i<=a||o>=t.maxIterations){e+=t.ellipsis;break}var s=o===0?ax(e,a,t.ascCharWidth,t.cnCharWidth):i>0?Math.floor(e.length*a/i):0;e=e.substr(0,s),i=ae(e,n)}return e===""&&(e=t.placeholder),e}function ax(e,t,r,n){for(var a=0,i=0,o=e.length;iv&&l){var d=Math.floor(v/s);h=h.slice(0,d)}if(e&&i&&f!=null)for(var g=Dg(f,a,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),p=0;ps&&iu(r,e.substring(s,l),t,o),iu(r,u[2],t,o,u[1]),s=au.lastIndex}sa){w>0?(m.tokens=m.tokens.slice(0,w),p(m,S,_),r.lines=r.lines.slice(0,y+1)):r.lines=r.lines.slice(0,y);break t}var L=b.width,I=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")x.percentWidth=L,f.push(x),x.contentWidth=ae(x.text,A);else{if(I){var P=b.backgroundColor,R=P&&P.image;R&&(R=rx(R),cs(R)&&(x.width=Math.max(x.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(` `),l=!0),n.accumWidth=d}else{var g=Lg(t,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+v,h=g.linesWidths,f=g.lines}}else f=t.split(` `);for(var p=0;p=33&&t<=383}var fx=rr(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function hx(e){return lx(e)?!!fx[e]:!0}function Lg(e,t,r,n,a){for(var i=[],o=[],s="",u="",l=0,f=0,h=0;hr:a+f+v>r){f?(s||u)&&(d?(s||(s=u,u="",l=0,f=l),i.push(s),o.push(f-l),u+=c,l+=v,s="",f=l):(u&&(s+=u,u="",l=0),i.push(s),o.push(f),s=c,f=v)):d?(i.push(u),o.push(l),u=c,l=v):(i.push(c),o.push(v));continue}f+=v,d?(u+=c,l+=v):(u&&(s+=u,u="",l=0),s+=c)}return!i.length&&!s&&(s=e,u="",l=0),u&&(s+=u),s&&(i.push(s),o.push(f)),i.length===1&&(f+=a),{accumWidth:f,lines:i,linesWidths:o}}var Ll="__zr_style_"+Math.round(Math.random()*10),fn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ds={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fn[Ll]=!0;var cv=["z","z2","invisible"],vx=["invisible"],cx=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=ct(r),a=0;a1e-4){s[0]=e-r,s[1]=t-n,u[0]=e+r,u[1]=t+n;return}if(Bi[0]=lu(a)*r+e,Bi[1]=uu(a)*n+t,Ni[0]=lu(i)*r+e,Ni[1]=uu(i)*n+t,l(s,Bi,Ni),f(u,Bi,Ni),a=a%Fr,a<0&&(a=a+Fr),i=i%Fr,i<0&&(i=i+Fr),a>i&&!o?i+=Fr:aa&&(Fi[0]=lu(v)*r+e,Fi[1]=uu(v)*n+t,l(s,Fi,s),f(u,Fi,u))}var ot={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},zr=[],Gr=[],Re=[],sr=[],Ee=[],Oe=[],fu=Math.min,hu=Math.max,Hr=Math.cos,Vr=Math.sin,Ze=Math.abs,Il=Math.PI,vr=Il*2,vu=typeof Float32Array<"u",pa=[];function cu(e){var t=Math.round(e/Il*1e8)/1e8;return t%2*Il}function mx(e,t){var r=cu(e[0]);r<0&&(r+=vr);var n=r-e[0],a=e[1];a+=n,!t&&a-r>=vr?a=r+vr:t&&r-a>=vr?a=r-vr:!t&&r>a?a=r+(vr-cu(r-a)):t&&r0&&(this._ux=Ze(n/zo/t)||0,this._uy=Ze(n/zo/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(ot.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=Ze(t-this._xi),a=Ze(r-this._yi),i=n>this._ux||a>this._uy;if(this.addData(ot.L,t,r),this._ctx&&i&&this._ctx.lineTo(t,r),i)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,a,i,o){return this._drawPendingPt(),this.addData(ot.C,t,r,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,a,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,a){return this._drawPendingPt(),this.addData(ot.Q,t,r,n,a),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,a),this._xi=n,this._yi=a,this},e.prototype.arc=function(t,r,n,a,i,o){this._drawPendingPt(),pa[0]=a,pa[1]=i,mx(pa,o),a=pa[0],i=pa[1];var s=i-a;return this.addData(ot.A,t,r,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,a,i,o),this._xi=Hr(i)*n+t,this._yi=Vr(i)*n+r,this},e.prototype.arcTo=function(t,r,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,a,i),this},e.prototype.rect=function(t,r,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,a),this.addData(ot.R,t,r,n,a),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(ot.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var r=t.length;!(this.data&&this.data.length===r)&&vu&&(this.data=new Float32Array(r));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)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Re[0]=Re[1]=Ee[0]=Ee[1]=Number.MAX_VALUE,sr[0]=sr[1]=Oe[0]=Oe[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,a=0,i=0,o;for(o=0;on||Ze(_)>a||c===r-1)&&(g=Math.sqrt(m*m+_*_),i=p,o=y);break}case ot.C:{var S=t[c++],w=t[c++],p=t[c++],y=t[c++],x=t[c++],b=t[c++];g=b1(i,o,S,w,p,y,x,b,10),i=x,o=b;break}case ot.Q:{var S=t[c++],w=t[c++],p=t[c++],y=t[c++];g=C1(i,o,S,w,p,y,10),i=p,o=y;break}case ot.A:var T=t[c++],C=t[c++],A=t[c++],D=t[c++],L=t[c++],I=t[c++],P=I+L;c+=1,t[c++],d&&(s=Hr(L)*A+T,u=Vr(L)*D+C),g=hu(A,D)*fu(vr,Math.abs(I)),i=Hr(P)*A+T,o=Vr(P)*D+C;break;case ot.R:{s=i=t[c++],u=o=t[c++];var R=t[c++],E=t[c++];g=R*2+E*2;break}case ot.Z:{var m=s-i,_=u-o;g=Math.sqrt(m*m+_*_),i=s,o=u;break}}g>=0&&(l[h++]=g,f+=g)}return this._pathLen=f,f},e.prototype.rebuildPath=function(t,r){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,u,l,f,h,c,v=r<1,d,g,p=0,y=0,m,_=0,S,w;if(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,g=this._pathLen,m=r*g,!m))return;t:for(var x=0;x0&&(t.lineTo(S,w),_=0),b){case ot.M:s=l=n[x++],u=f=n[x++],t.moveTo(l,f);break;case ot.L:{h=n[x++],c=n[x++];var C=Ze(h-l),A=Ze(c-f);if(C>a||A>i){if(v){var D=d[y++];if(p+D>m){var L=(m-p)/D;t.lineTo(l*(1-L)+h*L,f*(1-L)+c*L);break t}p+=D}t.lineTo(h,c),l=h,f=c,_=0}else{var I=C*C+A*A;I>_&&(S=h,w=c,_=I)}break}case ot.C:{var P=n[x++],R=n[x++],E=n[x++],U=n[x++],k=n[x++],F=n[x++];if(v){var D=d[y++];if(p+D>m){var L=(m-p)/D;Tr(l,P,E,k,L,zr),Tr(f,R,U,F,L,Gr),t.bezierCurveTo(zr[1],Gr[1],zr[2],Gr[2],zr[3],Gr[3]);break t}p+=D}t.bezierCurveTo(P,R,E,U,k,F),l=k,f=F;break}case ot.Q:{var P=n[x++],R=n[x++],E=n[x++],U=n[x++];if(v){var D=d[y++];if(p+D>m){var L=(m-p)/D;No(l,P,E,L,zr),No(f,R,U,L,Gr),t.quadraticCurveTo(zr[1],Gr[1],zr[2],Gr[2]);break t}p+=D}t.quadraticCurveTo(P,R,E,U),l=E,f=U;break}case ot.A:var H=n[x++],Z=n[x++],X=n[x++],ht=n[x++],St=n[x++],Lt=n[x++],ie=n[x++],Ut=!n[x++],It=X>ht?X:ht,bt=Ze(X-ht)>.001,pt=St+Lt,Y=!1;if(v){var D=d[y++];p+D>m&&(pt=St+Lt*(m-p)/D,Y=!0),p+=D}if(bt&&t.ellipse?t.ellipse(H,Z,X,ht,ie,St,pt,Ut):t.arc(H,Z,It,St,pt,Ut),Y)break t;T&&(s=Hr(St)*X+H,u=Vr(St)*ht+Z),l=Hr(pt)*X+H,f=Vr(pt)*ht+Z;break;case ot.R:s=l=n[x],u=f=n[x+1],h=n[x++],c=n[x++];var J=n[x++],Pe=n[x++];if(v){var D=d[y++];if(p+D>m){var Mt=m-p;t.moveTo(h,c),t.lineTo(h+fu(Mt,J),c),Mt-=J,Mt>0&&t.lineTo(h+J,c+fu(Mt,Pe)),Mt-=Pe,Mt>0&&t.lineTo(h+hu(J-Mt,0),c+Pe),Mt-=J,Mt>0&&t.lineTo(h,c+hu(Pe-Mt,0));break t}p+=D}t.rect(h,c,J,Pe);break;case ot.Z:if(v){var D=d[y++];if(p+D>m){var L=(m-p)/D;t.lineTo(l*(1-L)+s*L,f*(1-L)+u*L);break t}p+=D}t.closePath(),l=s,f=u}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.CMD=ot,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();const Dr=_x;function An(e,t,r,n,a,i,o){if(a===0)return!1;var s=a,u=0,l=e;if(o>t+s&&o>n+s||oe+s&&i>r+s||it+h&&f>n+h&&f>i+h&&f>s+h||fe+h&&l>r+h&&l>a+h&&l>o+h||lt+l&&u>n+l&&u>i+l||ue+l&&s>r+l&&s>a+l||sr||f+la&&(a+=ga);var c=Math.atan2(u,s);return c<0&&(c+=ga),c>=n&&c<=a||c+ga>=n&&c+ga<=a}function Je(e,t,r,n,a,i){if(i>t&&i>n||ia?s:0}var ur=Dr.CMD,Wr=Math.PI*2,Tx=1e-4;function Cx(e,t){return Math.abs(e-t)t&&l>n&&l>i&&l>s||l1&&Mx(),v=At(t,n,i,s,he[0]),c>1&&(d=At(t,n,i,s,he[1]))),c===2?pt&&s>n&&s>i||s=0&&l<=1){for(var f=0,h=Et(t,n,i,l),c=0;cr||s<-r)return 0;var u=Math.sqrt(r*r-s*s);Ft[0]=-u,Ft[1]=u;var l=Math.abs(n-a);if(l<1e-4)return 0;if(l>=Wr-1e-4){n=0,a=Wr;var f=i?1:-1;return o>=Ft[0]+e&&o<=Ft[1]+e?f:0}if(n>a){var h=n;n=a,a=h}n<0&&(n+=Wr,a+=Wr);for(var c=0,v=0;v<2;v++){var d=Ft[v];if(d+e>o){var g=Math.atan2(s,d),f=i?1:-1;g<0&&(g=Wr+g),(g>=n&&g<=a||g+Wr>=n&&g+Wr<=a)&&(g>Math.PI/2&&g1&&(r||(s+=Je(u,l,f,h,n,a))),p&&(u=i[d],l=i[d+1],f=u,h=l),g){case ur.M:f=i[d++],h=i[d++],u=f,l=h;break;case ur.L:if(r){if(An(u,l,i[d],i[d+1],t,n,a))return!0}else s+=Je(u,l,i[d],i[d+1],n,a)||0;u=i[d++],l=i[d++];break;case ur.C:if(r){if(Sx(u,l,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],t,n,a))return!0}else s+=Dx(u,l,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],n,a)||0;u=i[d++],l=i[d++];break;case ur.Q:if(r){if(xx(u,l,i[d++],i[d++],i[d],i[d+1],t,n,a))return!0}else s+=Ax(u,l,i[d++],i[d++],i[d],i[d+1],n,a)||0;u=i[d++],l=i[d++];break;case ur.A:var y=i[d++],m=i[d++],_=i[d++],S=i[d++],w=i[d++],x=i[d++];d+=1;var b=!!(1-i[d++]);c=Math.cos(w)*_+y,v=Math.sin(w)*S+m,p?(f=c,h=v):s+=Je(u,l,c,v,n,a);var T=(n-y)*S/_+y;if(r){if(bx(y,m,S,w,w+x,b,t,T,a))return!0}else s+=Lx(y,m,S,w,w+x,b,T,a);u=Math.cos(w+x)*_+y,l=Math.sin(w+x)*S+m;break;case ur.R:f=u=i[d++],h=l=i[d++];var C=i[d++],A=i[d++];if(c=f+C,v=h+A,r){if(An(f,h,c,h,t,n,a)||An(c,h,c,v,t,n,a)||An(c,v,f,v,t,n,a)||An(f,v,f,h,t,n,a))return!0}else s+=Je(c,h,c,v,n,a),s+=Je(f,v,f,h,n,a);break;case ur.Z:if(r){if(An(u,l,f,h,t,n,a))return!0}else s+=Je(u,l,f,h,n,a);u=f,l=h;break}}return!r&&!Cx(l,h)&&(s+=Je(u,l,f,h,n,a)||0),s!==0}function Ix(e,t,r){return Pg(e,0,!1,t,r)}function Px(e,t,r,n){return Pg(e,t,!0,r,n)}var Rg=Q({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},fn),Rx={style:Q({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ds.style)},du=ti.concat(["invisible","culling","z","z2","zlevel","parent"]),Ex=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.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(u){r.buildPath(u,r.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?bl:n>.2?iS:Tl}else if(r)return Tl}return bl},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(z(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=ja(r,0)0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,a=!r;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Gn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||a){s.copy(r);var u=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;l=Math.max(l,f==null?4:f)}u>1e-10&&(s.width+=l/u,s.height+=l/u,s.x-=l/u/2,s.y-=l/u/2)}return s}return r},t.prototype.contain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect(),o=this.style;if(r=a[0],n=a[1],i.contain(r,n)){var s=this.path;if(this.hasStroke()){var u=o.lineWidth,l=o.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(this.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),Px(s,u/l,r,n)))return!0}if(this.hasFill())return Ix(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Gn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var a=this.shape;return a||(a=this.shape={}),typeof r=="string"?a[r]=n:O(a,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Gn)},t.prototype.createStyle=function(r){return pi(Rg,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=O({},this.shape))},t.prototype._applyStateObj=function(r,n,a,i,o,s){e.prototype._applyStateObj.call(this,r,n,a,i,o,s);var u=!(n&&i),l;if(n&&n.shape?o?i?l=n.shape:(l=O({},a.shape),O(l,n.shape)):(l=O({},i?this.shape:a.shape),O(l,n.shape)):u&&(l=a.shape),l)if(o){this.shape=O({},this.shape);for(var f={},h=ct(l),c=0;c0},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return pi(Ox,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var a=Ef(n,r.font,r.textAlign,r.textBaseline);if(a.x+=r.x||0,a.y+=r.y||0,this.hasStroke()){var i=r.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 r=t.prototype;r.dirtyRectTolerance=10}(),t}(na);Eg.prototype.type="tspan";const Pl=Eg;var kx=Q({x:0,y:0},fn),Bx={style:Q({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ds.style)};function Nx(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Og=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return pi(kx,r)},t.prototype._getSize=function(r){var n=this.style,a=n[r];if(a!=null)return a;var i=Nx(n.image)?n.image:this.__image;if(!i)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?i[r]:i[r]/i[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Bx},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new tt(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(na);Og.prototype.type="image";const aa=Og;function Fx(e,t){var r=t.x,n=t.y,a=t.width,i=t.height,o=t.r,s,u,l,f;a<0&&(r=r+a,a=-a),i<0&&(n=n+i,i=-i),typeof o=="number"?s=u=l=f=o:o instanceof Array?o.length===1?s=u=l=f=o[0]:o.length===2?(s=l=o[0],u=f=o[1]):o.length===3?(s=o[0],u=f=o[1],l=o[2]):(s=o[0],u=o[1],l=o[2],f=o[3]):s=u=l=f=0;var h;s+u>a&&(h=s+u,s*=a/h,u*=a/h),l+f>a&&(h=l+f,l*=a/h,f*=a/h),u+l>i&&(h=u+l,u*=i/h,l*=i/h),s+f>i&&(h=s+f,s*=i/h,f*=i/h),e.moveTo(r+s,n),e.lineTo(r+a-u,n),u!==0&&e.arc(r+a-u,n+u,u,-Math.PI/2,0),e.lineTo(r+a,n+i-l),l!==0&&e.arc(r+a-l,n+i-l,l,0,Math.PI/2),e.lineTo(r+f,n+i),f!==0&&e.arc(r+f,n+i-f,f,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Wn=Math.round;function kg(e,t,r){if(!!t){var n=t.x1,a=t.x2,i=t.y1,o=t.y2;e.x1=n,e.x2=a,e.y1=i,e.y2=o;var s=r&&r.lineWidth;return s&&(Wn(n*2)===Wn(a*2)&&(e.x1=e.x2=nn(n,s,!0)),Wn(i*2)===Wn(o*2)&&(e.y1=e.y2=nn(i,s,!0))),e}}function Bg(e,t,r){if(!!t){var n=t.x,a=t.y,i=t.width,o=t.height;e.x=n,e.y=a,e.width=i,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=nn(n,s,!0),e.y=nn(a,s,!0),e.width=Math.max(nn(n+i,s,!1)-e.x,i===0?0:1),e.height=Math.max(nn(a+o,s,!1)-e.y,o===0?0:1)),e}}function nn(e,t,r){if(!t)return e;var n=Wn(e*2);return(n+Wn(t))%2===0?n/2:(n+(r?1:-1))/2}var zx=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Gx={},Ng=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new zx},t.prototype.buildPath=function(r,n){var a,i,o,s;if(this.subPixelOptimize){var u=Bg(Gx,n,this.style);a=u.x,i=u.y,o=u.width,s=u.height,u.r=n.r,n=u}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?Fx(r,n):r.rect(a,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(nt);Ng.prototype.type="rect";const Ct=Ng;var mv={fill:"#000"},_v=2,Hx={style:Q({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},ds.style)},Fg=function(e){N(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=mv,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,L=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P=0&&(P=x[I],P.align==="right");)this._placeToken(P,r,T,y,L,"right",_),C-=P.width,L-=P.width,I--;for(D+=(i-(D-p)-(m-L)-C)/2;A<=I;)P=x[A],this._placeToken(P,r,T,y,D+P.width/2,"center",_),D+=P.width,A++;y+=T}},t.prototype._placeToken=function(r,n,a,i,o,s,u){var l=n.rich[r.styleName]||{};l.text=r.text;var f=r.verticalAlign,h=i+a/2;f==="top"?h=i+r.height/2:f==="bottom"&&(h=i+a-r.height/2);var c=!r.isLineHolder&&pu(l);c&&this._renderBackground(l,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var v=!!l.backgroundColor,d=r.textPadding;d&&(o=Cv(o,s,d),h-=r.height/2-d[0]-r.innerHeight/2);var g=this._getOrCreateChild(Pl),p=g.createStyle();g.useStyle(p);var y=this._defaultStyle,m=!1,_=0,S=Tv("fill"in l?l.fill:"fill"in n?n.fill:(m=!0,y.fill)),w=bv("stroke"in l?l.stroke:"stroke"in n?n.stroke:!v&&!u&&(!y.autoStroke||m)?(_=_v,y.stroke):null),x=l.textShadowBlur>0||n.textShadowBlur>0;p.text=r.text,p.x=o,p.y=h,x&&(p.shadowBlur=l.textShadowBlur||n.textShadowBlur||0,p.shadowColor=l.textShadowColor||n.textShadowColor||"transparent",p.shadowOffsetX=l.textShadowOffsetX||n.textShadowOffsetX||0,p.shadowOffsetY=l.textShadowOffsetY||n.textShadowOffsetY||0),p.textAlign=s,p.textBaseline="middle",p.font=r.font||pn,p.opacity=Yn(l.opacity,n.opacity,1),xv(p,l),w&&(p.lineWidth=Yn(l.lineWidth,n.lineWidth,_),p.lineDash=K(l.lineDash,n.lineDash),p.lineDashOffset=n.lineDashOffset||0,p.stroke=w),S&&(p.fill=S);var b=r.contentWidth,T=r.contentHeight;g.setBoundingRect(new tt(Ea(p.x,b,p.textAlign),Hn(p.y,T,p.textBaseline),b,T))},t.prototype._renderBackground=function(r,n,a,i,o,s){var u=r.backgroundColor,l=r.borderWidth,f=r.borderColor,h=u&&u.image,c=u&&!h,v=r.borderRadius,d=this,g,p;if(c||r.lineHeight||l&&f){g=this._getOrCreateChild(Ct),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=a,y.y=i,y.width=o,y.height=s,y.r=v,g.dirtyShape()}if(c){var m=g.style;m.fill=u||null,m.fillOpacity=K(r.fillOpacity,1)}else if(h){p=this._getOrCreateChild(aa),p.onload=function(){d.dirtyStyle()};var _=p.style;_.image=u.image,_.x=a,_.y=i,_.width=o,_.height=s}if(l&&f){var m=g.style;m.lineWidth=l,m.stroke=f,m.strokeOpacity=K(r.strokeOpacity,1),m.lineDash=r.borderDash,m.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(g||p).style;S.shadowBlur=r.shadowBlur||0,S.shadowColor=r.shadowColor||"transparent",S.shadowOffsetX=r.shadowOffsetX||0,S.shadowOffsetY=r.shadowOffsetY||0,S.opacity=Yn(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return Yx(r)&&(n=[r.fontStyle,r.fontWeight,Ux(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&be(n)||r.textFont||r.font},t}(na),Vx={left:!0,right:1,center:1},Wx={top:1,bottom:1,middle:1},Sv=["fontStyle","fontWeight","fontSize","fontFamily"];function Ux(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?wf+"px":e+"px"}function xv(e,t){for(var r=0;r=0,i=!1;if(e instanceof nt){var o=zg(e),s=a&&o.selectFill||o.normalFill,u=a&&o.selectStroke||o.normalStroke;if(Ln(s)||Ln(u)){n=n||{};var l=n.style||{};l.fill==="inherit"?(i=!0,n=O({},n),l=O({},l),l.fill=s):!Ln(l.fill)&&Ln(s)?(i=!0,n=O({},n),l=O({},l),l.fill=Iv(s)):!Ln(l.stroke)&&Ln(u)&&(i||(n=O({},n),l=O({},l)),l.stroke=Iv(u)),n.style=l}}if(n&&n.z2==null){i||(n=O({},n));var f=e.z2EmphasisLift;n.z2=e.z2+(f!=null?f:qx)}return n}function tw(e,t,r){if(r&&r.z2==null){r=O({},r);var n=e.z2SelectLift;r.z2=e.z2+(n!=null?n:Zx)}return r}function ew(e,t,r){var n=it(e.currentStates,t)>=0,a=e.style.opacity,i=n?null:Jx(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=O({},r),o=O({opacity:n?a:i.opacity*.1},o),r.style=o),r}function gu(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return jx(this,e,t,r);if(e==="blur")return ew(this,e,r);if(e==="select")return tw(this,e,r)}return r}function rw(e){e.stateProxy=gu;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=gu),r&&(r.stateProxy=gu)}function Rv(e,t){!$g(e,t)&&!e.__highByOuter&&ar(e,Gg)}function Ev(e,t){!$g(e,t)&&!e.__highByOuter&&ar(e,Hg)}function Rl(e,t){e.__highByOuter|=1<<(t||0),ar(e,Gg)}function El(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&ar(e,Hg)}function nw(e){ar(e,Vf)}function Wg(e){ar(e,Vg)}function Ug(e){ar(e,Kx)}function Yg(e){ar(e,Qx)}function $g(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Xg(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(a,i){var o=Gf(i),s=a==="series",u=s?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!s&&n.push(u),o.isBlured&&(u.group.traverse(function(l){Vg(l)}),s&&r.push(i)),o.isBlured=!1}),M(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(r,!1,t)})}function Ol(e,t,r,n){var a=n.getModel();r=r||"coordinateSystem";function i(l,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:r.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Bl(e,t,r){Kg(e,!0),ar(e,rw),fw(e,t,r)}function lw(e){Kg(e,!1)}function qg(e,t,r,n){n?lw(e):Bl(e,t,r)}function fw(e,t,r){var n=lt(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var kv=["emphasis","blur","select"],hw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Zg(e,t,r,n){r=r||"itemStyle";for(var a=0;a1&&(o*=yu(d),s*=yu(d));var g=(a===i?-1:1)*yu((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,p=g*o*v/s,y=g*-s*c/o,m=(e+r)/2+Gi(h)*p-zi(h)*y,_=(t+n)/2+zi(h)*p+Gi(h)*y,S=zv([1,0],[(c-p)/o,(v-y)/s]),w=[(c-p)/o,(v-y)/s],x=[(-1*c-p)/o,(-1*v-y)/s],b=zv(w,x);if(zl(w,x)<=-1&&(b=ya),zl(w,x)>=1&&(b=0),b<0){var T=Math.round(b/ya*1e6)/1e6;b=ya*2+T%2*ya}f.addData(l,m,_,o,s,S,b,h,i)}var gw=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,yw=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function mw(e){var t=new Dr;if(!e)return t;var r=0,n=0,a=r,i=n,o,s=Dr.CMD,u=e.match(gw);if(!u)return t;for(var l=0;lP*P+R*R&&(T=A,C=D),{cx:T,cy:C,x0:-f,y0:-h,x1:T*(a/w-1),y1:C*(a/w-1)}}function Mw(e){var t;if(B(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function Dw(e,t){var r,n=Oa(t.r,0),a=Oa(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 u=t.startAngle,l=t.endAngle;if(!(isNaN(u)||isNaN(l))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=Hv(l-u),d=v>mu&&v%mu;if(d>_e&&(v=d),!(n>_e))e.moveTo(f,h);else if(v>mu-_e)e.moveTo(f+n*Pn(u),h+n*Ur(u)),e.arc(f,h,n,u,l,!c),a>_e&&(e.moveTo(f+a*Pn(l),h+a*Ur(l)),e.arc(f,h,a,l,u,c));else{var g=void 0,p=void 0,y=void 0,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0,b=void 0,T=void 0,C=void 0,A=void 0,D=void 0,L=void 0,I=void 0,P=void 0,R=n*Pn(u),E=n*Ur(u),U=a*Pn(l),k=a*Ur(l),F=v>_e;if(F){var H=t.cornerRadius;H&&(r=Mw(H),g=r[0],p=r[1],y=r[2],m=r[3]);var Z=Hv(n-a)/2;if(_=ke(Z,y),S=ke(Z,m),w=ke(Z,g),x=ke(Z,p),C=b=Oa(_,S),A=T=Oa(w,x),(b>_e||T>_e)&&(D=n*Pn(l),L=n*Ur(l),I=a*Pn(u),P=a*Ur(u),v_e){var bt=ke(y,C),pt=ke(m,C),Y=Hi(I,P,R,E,n,bt,c),J=Hi(D,L,U,k,n,pt,c);e.moveTo(f+Y.cx+Y.x0,h+Y.cy+Y.y0),C0&&e.arc(f+Y.cx,h+Y.cy,bt,Pt(Y.y0,Y.x0),Pt(Y.y1,Y.x1),!c),e.arc(f,h,n,Pt(Y.cy+Y.y1,Y.cx+Y.x1),Pt(J.cy+J.y1,J.cx+J.x1),!c),pt>0&&e.arc(f+J.cx,h+J.cy,pt,Pt(J.y1,J.x1),Pt(J.y0,J.x0),!c))}else e.moveTo(f+R,h+E),e.arc(f,h,n,u,l,!c);if(!(a>_e)||!F)e.lineTo(f+U,h+k);else if(A>_e){var bt=ke(g,A),pt=ke(p,A),Y=Hi(U,k,D,L,a,-pt,c),J=Hi(R,E,I,P,a,-bt,c);e.lineTo(f+Y.cx+Y.x0,h+Y.cy+Y.y0),A0&&e.arc(f+Y.cx,h+Y.cy,pt,Pt(Y.y0,Y.x0),Pt(Y.y1,Y.x1),!c),e.arc(f,h,a,Pt(Y.cy+Y.y1,Y.cx+Y.x1),Pt(J.cy+J.y1,J.cx+J.x1),c),bt>0&&e.arc(f+J.cx,h+J.cy,bt,Pt(J.y1,J.x1),Pt(J.y0,J.x0),!c))}else e.lineTo(f+U,h+k),e.arc(f,h,a,l,u,c)}e.closePath()}}}var Aw=function(){function e(){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 e}(),iy=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Aw},t.prototype.buildPath=function(r,n){Dw(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(nt);iy.prototype.type="sector";const nr=iy;var Lw=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),oy=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Lw},t.prototype.buildPath=function(r,n){var a=n.cx,i=n.cy,o=Math.PI*2;r.moveTo(a+n.r,i),r.arc(a,i,n.r,0,o,!1),r.moveTo(a+n.r0,i),r.arc(a,i,n.r0,0,o,!0)},t}(nt);oy.prototype.type="ring";const sy=oy;function Iw(e,t,r,n){var a=[],i=[],o=[],s=[],u,l,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=e.length;c=2){if(n){var i=Iw(a,n,r,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(r?o:o-1);s++){var u=i[s*2],l=i[s*2+1],f=a[(s+1)%o];e.bezierCurveTo(u[0],u[1],l[0],l[1],f[0],f[1])}}else{e.moveTo(a[0][0],a[0][1]);for(var s=1,h=a.length;s$r[1]){if(s=!1,i)return s;var f=Math.abs($r[0]-Yr[1]),h=Math.abs(Yr[0]-$r[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:!l,scope:e,during:o};s?t.animateFrom(r,d):t.animateTo(r,d)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),i&&i()}function te(e,t,r,n,a,i){qf("update",e,t,r,n,a,i)}function Jt(e,t,r,n,a,i){qf("enter",e,t,r,n,a,i)}function qn(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function Uv(e){return!e.isGroup}function ab(e){return e.shape!=null}function wy(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(u){Uv(u)&&u.anid&&(s[u.anid]=u)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return ab(o)&&(s.shape=O({},o.shape)),s}var i=n(e);t.traverse(function(o){if(Uv(o)&&o.anid){var s=i[o.anid];if(s){var u=a(o);o.attr(a(s)),te(o,u,r,lt(o).dataIndex)}}})}function ib(e,t){return G(e,function(r){var n=r[0];n=Yo(n,t.x),n=$o(n,t.x+t.width);var a=r[1];return a=Yo(a,t.y),a=$o(a,t.y+t.height),[n,a]})}function ob(e,t){var r=Yo(e.x,t.x),n=$o(e.x+e.width,t.x+t.width),a=Yo(e.y,t.y),i=$o(e.y+e.height,t.y+t.height);if(n>=r&&i>=a)return{x:r,y:a,width:n-r,height:i-a}}function Qf(e,t,r){var n=O({rectHover:!0},t),a=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(a.image=e.slice(8),Q(a,r),new aa(n)):Zf(e.replace("path://",""),n,r,"center")}function sb(e,t,r,n,a){for(var i=0,o=a[a.length-1];i1)return!1;var p=_u(v,d,f,h)/c;return!(p<0||p>1)}function _u(e,t,r,n){return e*n-r*t}function ub(e){return e<=1e-6&&e>=-1e-6}function Jf(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,a=z(t)?{formatter:t}:t,i=r.mainType,o=r.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var u=e.formatterParamsExtra;u&&M(ct(u),function(f){Ve(s,f)||(s[f]=u[f],s.$vars.push(f))});var l=lt(e.el);l.componentMainType=i,l.componentIndex=o,l.tooltipConfig={name:n,option:Q({content:n,formatterParams:s},a)}}function Yv(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function jf(e,t){if(e)if(B(e))for(var r=0;r=0&&s.push(u)}),s}}function Ay(e,t){return at(at({},e,!0),t,!0)}const Cb={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:". "}}}},Mb={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:""}}}};var Xo="ZH",eh="EN",ai=eh,Mo={},rh={},Ly=j.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return e.indexOf(Xo)>-1?Xo:ai}():ai;function Iy(e,t){e=e.toUpperCase(),rh[e]=new kt(t),Mo[e]=t}function Db(e){if(z(e)){var t=Mo[e.toUpperCase()]||{};return e===Xo||e===eh?rt(t):at(rt(t),rt(Mo[ai]),!1)}else return at(rt(e),rt(Mo[ai]),!1)}function Ab(e){return rh[e]}function Lb(){return rh[ai]}Iy(eh,Cb);Iy(Xo,Mb);var nh=1e3,ah=nh*60,Ua=ah*60,ce=Ua*24,Qv=ce*365,ka={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}"},Ui="{yyyy}-{MM}-{dd}",Jv={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ui,hour:Ui+" "+ka.hour,minute:Ui+" "+ka.minute,second:Ui+" "+ka.second,millisecond:ka.none},wu=["year","month","day","hour","minute","second","millisecond"],Py=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Xt(e,t){return e+="","0000".substr(0,t-e.length)+e}function Zn(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Ib(e){return e===Zn(e)}function Pb(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function ws(e,t,r,n){var a=We(e),i=a[ih(r)](),o=a[Kn(r)]()+1,s=Math.floor((o-1)/3)+1,u=a[bs(r)](),l=a["get"+(r?"UTC":"")+"Day"](),f=a[ii(r)](),h=(f-1)%12+1,c=a[Ts(r)](),v=a[Cs(r)](),d=a[Ms(r)](),g=n instanceof kt?n:Ab(n||Ly)||Lb(),p=g.getModel("time"),y=p.get("month"),m=p.get("monthAbbr"),_=p.get("dayOfWeek"),S=p.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,i%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,m[o-1]).replace(/{MM}/g,Xt(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Xt(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,_[l]).replace(/{ee}/g,S[l]).replace(/{e}/g,l+"").replace(/{HH}/g,Xt(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Xt(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Xt(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,Xt(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Xt(d,3)).replace(/{S}/g,d+"")}function Rb(e,t,r,n,a){var i=null;if(z(r))i=r;else if(q(r))i=r(e.value,t,{level:e.level});else{var o=O({},ka);if(e.level>0)for(var s=0;s=0;--s)if(u[l]){i=u[l];break}i=i||o.none}if(B(i)){var h=e.level==null?0:e.level>=0?e.level:i.length+e.level;h=Math.min(h,i.length-1),i=i[h]}}return ws(new Date(e.value),i,a,n)}function Ry(e,t){var r=We(e),n=r[Kn(t)]()+1,a=r[bs(t)](),i=r[ii(t)](),o=r[Ts(t)](),s=r[Cs(t)](),u=r[Ms(t)](),l=u===0,f=l&&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":l?"second":"millisecond"}function jv(e,t,r){var n=ft(e)?We(e):e;switch(t=t||Ry(e,r),t){case"year":return n[ih(r)]();case"half-year":return n[Kn(r)]()>=6?1:0;case"quarter":return Math.floor((n[Kn(r)]()+1)/4);case"month":return n[Kn(r)]();case"day":return n[bs(r)]();case"half-day":return n[ii(r)]()/24;case"hour":return n[ii(r)]();case"minute":return n[Ts(r)]();case"second":return n[Cs(r)]();case"millisecond":return n[Ms(r)]()}}function ih(e){return e?"getUTCFullYear":"getFullYear"}function Kn(e){return e?"getUTCMonth":"getMonth"}function bs(e){return e?"getUTCDate":"getDate"}function ii(e){return e?"getUTCHours":"getHours"}function Ts(e){return e?"getUTCMinutes":"getMinutes"}function Cs(e){return e?"getUTCSeconds":"getSeconds"}function Ms(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Eb(e){return e?"setUTCFullYear":"setFullYear"}function Ey(e){return e?"setUTCMonth":"setMonth"}function Oy(e){return e?"setUTCDate":"setDate"}function ky(e){return e?"setUTCHours":"setHours"}function By(e){return e?"setUTCMinutes":"setMinutes"}function Ny(e){return e?"setUTCSeconds":"setSeconds"}function Fy(e){return e?"setUTCMilliseconds":"setMilliseconds"}function zy(e){if(!DS(e))return z(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Gy(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var bi=Mf;function Vl(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&be(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=e instanceof Date;if(o||s){var u=o?We(e):e;if(isNaN(+u)){if(s)return"-"}else return ws(u,n,r)}if(t==="ordinal")return Ro(e)?a(e):ft(e)&&i(e)?e+"":"-";var l=Mr(e);return i(l)?zy(l):Ro(e)?a(e):typeof e=="boolean"?e+"":"-"}var tc=["a","b","c","d","e","f","g"],bu=function(e,t){return"{"+e+(t==null?"":t)+"}"};function Hy(e,t,r){B(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],i=0;i':'';var o=r.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 _P(e,t,r){(e==="week"||e==="month"||e==="quarter"||e==="half-year"||e==="year")&&(e=`MM-dd yyyy`);var n=We(t),a=r?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n[a+"Date"](),u=n[a+"Hours"](),l=n[a+"Minutes"](),f=n[a+"Seconds"](),h=n[a+"Milliseconds"]();return e=e.replace("MM",Xt(o,2)).replace("M",o).replace("yyyy",i).replace("yy",Xt(i%100+"",2)).replace("dd",Xt(s,2)).replace("d",s).replace("hh",Xt(u,2)).replace("h",u).replace("mm",Xt(l,2)).replace("m",l).replace("ss",Xt(f,2)).replace("s",f).replace("SSS",Xt(h,3)),e}function SP(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function oi(e,t){return t=t||"transparent",z(e)?e:W(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function ec(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var Do=M,kb=["left","right","top","bottom","width","height"],an=[["width","left","right"],["height","top","bottom"]];function oh(e,t,r,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(u,l){var f=u.getBoundingRect(),h=t.childAt(l+1),c=h&&h.getBoundingRect(),v,d;if(e==="horizontal"){var g=f.width+(c?-c.x+f.x:0);v=i+g,v>n||u.newline?(i=0,v=g,o+=s+r,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||u.newline?(i+=s+r,o=0,d=p,s=f.width):s=Math.max(s,f.width)}u.newline||(u.x=i,u.y=o,u.markRedraw(),e==="horizontal"?i=v+r:o=d+r)})}var Qn=oh;_t(oh,"vertical");_t(oh,"horizontal");function xP(e,t,r){var n=t.width,a=t.height,i=st(e.left,n),o=st(e.top,a),s=st(e.right,n),u=st(e.bottom,a);return(isNaN(i)||isNaN(parseFloat(e.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(e.top)))&&(o=0),(isNaN(u)||isNaN(parseFloat(e.bottom)))&&(u=a),r=bi(r||0),{width:Math.max(s-i-r[1]-r[3],0),height:Math.max(u-o-r[0]-r[2],0)}}function Lr(e,t,r){r=bi(r||0);var n=t.width,a=t.height,i=st(e.left,n),o=st(e.top,a),s=st(e.right,n),u=st(e.bottom,a),l=st(e.width,n),f=st(e.height,a),h=r[2]+r[0],c=r[1]+r[3],v=e.aspect;switch(isNaN(l)&&(l=n-s-c-i),isNaN(f)&&(f=a-u-h-o),v!=null&&(isNaN(l)&&isNaN(f)&&(v>n/a?l=n*.8:f=a*.8),isNaN(l)&&(l=v*f),isNaN(f)&&(f=l/v)),isNaN(i)&&(i=n-s-l-c),isNaN(o)&&(o=a-u-f-h),e.left||e.right){case"center":i=n/2-l/2-r[3];break;case"right":i=n-l-c;break}switch(e.top||e.bottom){case"middle":case"center":o=a/2-f/2-r[0];break;case"bottom":o=a-f-h;break}i=i||0,o=o||0,isNaN(l)&&(l=n-c-i-(s||0)),isNaN(f)&&(f=a-h-o-(u||0));var d=new tt(i+r[3],o+r[0],l,f);return d.margin=r,d}function Bb(e,t,r,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],u=a&&a.boundingMode||"all";if(i=i||e,i.x=e.x,i.y=e.y,!o&&!s)return!1;var l;if(u==="raw")l=e.type==="group"?new tt(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var f=e.getLocalTransform();l=l.clone(),l.applyTransform(f)}var h=Lr(Q({width:l.width,height:l.height},t),r,n),c=o?h.x-l.x:0,v=s?h.y-l.y:0;return u==="raw"?(i.x=c,i.y=v):(i.x+=c,i.y+=v),i===e&&e.markRedraw(),!0}function wP(e,t){return e[an[t][0]]!=null||e[an[t][1]]!=null&&e[an[t][2]]!=null}function si(e){var t=e.layoutMode||e.constructor.layoutMode;return W(t)?t:t?{type:t}:null}function jn(e,t,r){var n=r&&r.ignoreSize;!B(n)&&(n=[n,n]);var a=o(an[0],0),i=o(an[1],1);l(an[0],e,a),l(an[1],e,i);function o(f,h){var c={},v=0,d={},g=0,p=2;if(Do(f,function(_){d[_]=e[_]}),Do(f,function(_){s(t,_)&&(c[_]=d[_]=t[_]),u(c,_)&&v++,u(d,_)&&g++}),n[h])return u(t,f[1])?d[f[2]]=null:u(t,f[2])&&(d[f[1]]=null),d;if(g===p||!v)return d;if(v>=p)return c;for(var y=0;y=0;u--)s=at(s,a[u],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var a=r+"Index",i=r+"Id";return xi(this.ecModel,r,{index:this.get(a,!0),id:this.get(i,!0)},n)},t.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),t}(kt);Cg(ia,kt);vs(ia);bb(ia);Tb(ia,zb);function zb(e){var t=[];return M(ia.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=G(t,function(r){return ze(r).main}),e!=="dataset"&&it(t,"dataset")<=0&&t.unshift("dataset"),t}const dt=ia;var Vy="";typeof navigator<"u"&&(Vy=navigator.platform||"");var Rn="rgba(0, 0, 0, 0.2)";const Gb={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Rn,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Rn,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Rn,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Rn,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Rn,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Rn,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Vy.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};var Wy=$(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),pe="original",Wt="arrayRows",ge="objectRows",Xe="keyedColumns",br="typedArray",Uy="unknown",He="column",oa="row",Dt={Must:1,Might:2,Not:3},Yy=yt();function Hb(e){Yy(e).datasetMap=$()}function Vb(e,t,r){var n={},a=sh(t);if(!a||!e)return n;var i=[],o=[],s=t.ecModel,u=Yy(s).datasetMap,l=a.uid+"_"+r.seriesLayoutBy,f,h;e=e.slice(),M(e,function(g,p){var y=W(g)?g:e[p]={name:g};y.type==="ordinal"&&f==null&&(f=p,h=d(y)),n[y.name]=[]});var c=u.get(l)||u.set(l,{categoryWayDim:h,valueWayDim:0});M(e,function(g,p){var y=g.name,m=d(g);if(f==null){var _=c.valueWayDim;v(n[y],_,m),v(o,_,m),c.valueWayDim+=m}else if(f===p)v(n[y],0,m),v(i,0,m);else{var _=c.categoryWayDim;v(n[y],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(g,p,y){for(var m=0;mt)return e[n];return e[r-1]}function qy(e,t,r,n,a,i,o){i=i||e;var s=t(i),u=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(a))return l[a];var f=o==null||!n?r:Xb(n,o);if(f=f||r,!(!f||!f.length)){var h=f[u];return a&&(l[a]=h),s.paletteIdx=(u+1)%f.length,h}}function qb(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Yi,ma,nc,ac="\0_ec_inner",Zb=1,Zy=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,a,i,o,s){i=i||{},this.option=null,this._theme=new kt(i),this._locale=new kt(o),this._optionManager=s},t.prototype.setOption=function(r,n,a){var i=sc(n);this._optionManager.setOption(r,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(r,n){return this._resetOption(r,sc(n))},t.prototype._resetOption=function(r,n){var a=!1,i=this._optionManager;if(!r||r==="recreate"){var o=i.mountOption(r==="recreate");!this.option||r==="recreate"?nc(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var u=i.getMediaOption(this);u.length&&M(u,function(l){a=!0,this._mergeOption(l,n)},this)}return a},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],u=$(),l=n&&n.replaceMergeMainTypeMap;Hb(this),M(r,function(h,c){h!=null&&(dt.hasClass(c)?c&&(s.push(c),u.set(c,!0)):a[c]=a[c]==null?rt(h):at(a[c],h,!0))}),l&&l.each(function(h,c){dt.hasClass(c)&&!u.get(c)&&(s.push(c),u.set(c,!0))}),dt.topologicalTravel(s,dt.getAllClassMainTypes(),f,this);function f(h){var c=Yb(this,h,gt(r[h])),v=i.get(h),d=v?l&&l.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=RS(v,c,d);zS(g,h,dt),a[h]=null,i.set(h,null),o.set(h,0);var p=[],y=[],m=0,_;M(g,function(S,w){var x=S.existing,b=S.newOption;if(!b)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=h==="series",C=dt.getClass(h,S.keyInfo.subType,!T);if(!C)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===C)x.name=S.keyInfo.name,x.mergeOption(b,this),x.optionUpdated(b,!1);else{var A=O({componentIndex:w},S.keyInfo);x=new C(b,this,this,A),O(x,A),S.brandNew&&(x.__requireNewView=!0),x.init(b,this,this),x.optionUpdated(null,!0)}}x?(p.push(x.option),y.push(x),m++):(p.push(void 0),y.push(void 0))},this),a[h]=p,i.set(h,y),o.set(h,m),h==="series"&&Yi(this)}this._seriesIndices||Yi(this)},t.prototype.getOption=function(){var r=rt(this.option);return M(r,function(n,a){if(dt.hasClass(a)){for(var i=gt(n),o=i.length,s=!1,u=o-1;u>=0;u--)i[u]&&!ei(i[u])?s=!0:(i[u]=null,!s&&o--);i.length=o,r[a]=i}}),delete r[ac],r},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var a=this._componentsMap.get(r);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o=t:r==="max"?e<=t:e===t}function oT(e,t){return e.join(",")===t.join(",")}const sT=rT;var ye=M,ui=W,uc=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Cu(e){var t=e&&e.itemStyle;if(!!t)for(var r=0,n=uc.length;r=0;p--){var y=e[p];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,v)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(u==="all"||u==="positive"&&m>0||u==="negative"&&m<0||u==="samesign"&&c>=0&&m>0||u==="samesign"&&c<=0&&m<0){c=TS(c,m),g=m;break}}}return n[0]=c,n[1]=g,n})})}var Ls=function(){function e(t){this.data=t.data||(t.sourceFormat===Xe?{}:[]),this.sourceFormat=t.sourceFormat||Uy,this.seriesLayoutBy=t.seriesLayoutBy||He,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;ng&&(g=_)}v[0]=d,v[1]=g}},a=function(){return this._data?this._data.length/this._dimSize:0};pc=(t={},t[Wt+"_"+He]={pure:!0,appendData:i},t[Wt+"_"+oa]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[ge]={pure:!0,appendData:i},t[Xe]={pure:!0,appendData:function(o){var s=this._data;M(o,function(u,l){for(var f=s[l]||(s[l]=[]),h=0;h<(u||[]).length;h++)f.push(u[h])})}},t[pe]={appendData:i},t[br]={persistent:!1,pure:!0,appendData:function(o){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+"":""})}},e.prototype.getRawValue=function(t,r){return ta(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function _c(e){var t,r;return W(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function Ya(e){return new CT(e)}var CT=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var a=this.context;a.data=a.outputData=r.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,u=f(t&&t.modBy),l=t&&t.modDataCount||0;(o!==u||s!==l)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=u,this._modDataCount=l;var c=t&&t.step;if(r?this._dueEnd=r._outputDueEnd: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||v1&&n>0?s:o}};return i;function o(){return t=e?null:ut},gte:function(e,t){return e>=t}},DT=function(){function e(t,r){if(!ft(r)){var n="";et(n)}this._opFn=s0[t],this._rvalFloat=Mr(r)}return e.prototype.evaluate=function(t){return ft(t)?this._opFn(t,this._rvalFloat):this._opFn(Mr(t),this._rvalFloat)},e}(),u0=function(){function e(t,r){var n=t==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,r){var n=ft(t)?t:Mr(t),a=ft(r)?r:Mr(r),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=z(t),u=z(r);s&&(n=u?t:0),u&&(a=s?r:0)}return na?-this._resultLT:0},e}(),AT=function(){function e(t,r){this._rval=r,this._isEQ=t,this._rvalTypeof=typeof r,this._rvalFloat=Mr(r)}return e.prototype.evaluate=function(t){var r=t===this._rval;if(!r){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Mr(t)===this._rvalFloat)}return this._isEQ?r:!r},e}();function LT(e,t){return e==="eq"||e==="ne"?new AT(e==="eq",t):Ve(s0,e)?new DT(e,t):null}var IT=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return Ao(t,r)},e}();function PT(e,t){var r=new IT,n=e.data,a=r.sourceFormat=e.sourceFormat,i=e.startIndex,o="";e.seriesLayoutBy!==He&&et(o);var s=[],u={},l=e.dimensionsDefine;if(l)M(l,function(g,p){var y=g.name,m={index:p,name:y,displayName:g.displayName};if(s.push(m),y!=null){var _="";Ve(u,y)&&et(_),u[y]=m}});else for(var f=0;f65535?zT:GT}function En(){return[1/0,-1/0]}function HT(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function wc(e,t,r,n,a){var i=h0[r||"float"];if(a){var o=e[t],s=o&&o.length;if(s!==n){for(var u=new i(n),l=0;lp[1]&&(p[1]=g)}return this._rawCount=this._count=u,{start:s,end:u}},e.prototype._initDataFromProvider=function(t,r,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,u=this._rawExtent,l=G(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=p)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r=0&&r=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&nt)i=o-1;else return o}return-1},e.prototype.indicesOfNearest=function(t,r,n){var a=this._chunks,i=a[t],o=[];if(!i)return o;n==null&&(n=1/0);for(var s=1/0,u=-1,l=0,f=0,h=this.count();f=0&&u<0)&&(s=d,u=v,l=0),v===u&&(o[l++]=f))}return o.length=l,o},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,a=this._count;if(n===Array){t=new n(a);for(var i=0;i=h&&m<=c||isNaN(m))&&(u[l++]=g),g++}d=!0}else if(i===2){for(var p=v[a[0]],_=v[a[1]],S=t[a[1]][0],w=t[a[1]][1],y=0;y=h&&m<=c||isNaN(m))&&(x>=S&&x<=w||isNaN(x))&&(u[l++]=g),g++}d=!0}}if(!d)if(i===1)for(var y=0;y=h&&m<=c||isNaN(m))&&(u[l++]=b)}else for(var y=0;yt[A][1])&&(T=!1)}T&&(u[l++]=r.getRawIndex(y))}return ly[1]&&(y[1]=p)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),a=n._chunks,i=a[t],o=this.count(),s=0,u=Math.floor(1/r),l=this.getRawIndex(0),f,h,c,v=new(Sa(this._rawCount))(Math.min((Math.ceil(o/u)+2)*2,o));v[s++]=l;for(var d=1;df&&(f=h,c=S)}D>0&&Df-d&&(u=f-d,s.length=u);for(var g=0;gh[1]&&(h[1]=y),c[v++]=m}return i._count=v,i._indices=c,i._updateGetRawIdx(),i},e.prototype.each=function(t,r){if(!!this._count)for(var n=t.length,a=this._chunks,i=0,o=this.count();iu&&(u=h)}return o=[s,u],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],a=this._chunks,i=0;i=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,a,i){return Ao(r[i],this._dimensions[i])}Au={arrayRows:t,objectRows:function(r,n,a,i){return Ao(r[n],this._dimensions[i])},keyedColumns:t,original:function(r,n,a,i){var o=r&&(r.value==null?r:r.value);return Ao(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(r,n,a,i){return r[i]}}}(),e}();const Yl=VT;var v0=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,a,i;if($i(t)){var o=t,s=void 0,u=void 0,l=void 0;if(n){var f=r[0];f.prepareSource(),l=f.getSource(),s=l.data,u=l.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),u=jt(s)?br:pe,i=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},v=K(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=K(h.sourceHeader,c.sourceHeader),g=K(h.dimensions,c.dimensions),p=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||g;a=p?[Ul(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:g},u)]:[]}else{var y=t;if(n){var m=this._applyTransform(r);a=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);a=[Ul(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),a=r.get("fromTransformResult",!0);if(a!=null){var i="";t.length!==1&&Tc(i)}var o,s=[],u=[];return M(t,function(l){l.prepareSource();var f=l.getSource(a||0),h="";a!=null&&!f&&Tc(h),s.push(f),u.push(l._getVersionSign())}),n?o=NT(n,s,{datasetIndex:r.componentIndex}):a!=null&&(o=[yT(s[0])]),{sourceList:o,upstreamSignList:u}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!e.noHeader;return M(e.blocks,function(a){var i=g0(a);i>=t&&(t=i+ +(n&&(!i||$l(a)&&!a.noHeader)))}),t}return 0}function YT(e,t,r,n){var a=t.noHeader,i=XT(g0(t)),o=[],s=t.blocks||[];Ae(!s||B(s)),s=s||[];var u=e.orderMode;if(t.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(Ve(l,u)){var f=new u0(l[u],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else u==="seriesDesc"&&s.reverse()}M(s,function(d,g){var p=t.valueFormatter,y=p0(d)(p?O(O({},e),{valueFormatter:p}):e,d,g>0?i.html:0,n);y!=null&&o.push(y)});var h=e.renderMode==="richText"?o.join(i.richText):Xl(o.join(""),a?r:i.html);if(a)return h;var c=Vl(t.header,"ordinal",e.useUTC),v=d0(n,e.renderMode).nameStyle;return e.renderMode==="richText"?y0(e,c,v)+i.richText+h:Xl('
'+re(c)+"
"+h,r)}function $T(e,t,r,n){var a=e.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,u=t.name,l=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(S){return S=B(S)?S:[S],G(S,function(w,x){return Vl(w,B(v)?v[x]:v,l)})};if(!(i&&o)){var h=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),c=i?"":Vl(u,"ordinal",l),v=t.valueType,d=o?[]:f(t.value),g=!s||!i,p=!s&&i,y=d0(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":h)+(i?"":y0(e,c,m))+(o?"":KT(e,d,g,p,_)):Xl((s?"":h)+(i?"":qT(c,!s,m))+(o?"":ZT(d,g,p,_)),r)}}function Cc(e,t,r,n,a,i){if(!!e){var o=p0(e),s={useUTC:a,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,i)}}function XT(e){return{html:WT[e],richText:UT[e]}}function Xl(e,t){var r='
',n="margin: "+t+"px 0 0";return'
'+e+r+"
"}function qT(e,t,r){var n=t?"margin-left:2px":"";return''+re(e)+""}function ZT(e,t,r,n){var a=r?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return e=B(e)?e:[e],''+G(e,function(o){return re(o)}).join("  ")+""}function y0(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function KT(e,t,r,n,a){var i=[a],o=n?10:20;return r&&i.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(" "):t,i)}function QT(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return oi(n)}function m0(e,t){var r=e.get("padding");return r!=null?r:t==="richText"?[8,10]:10}var Lu=function(){function e(){this.richTextStyles={},this._nextStyleNameId=mg()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var a=n==="richText"?this._generateStyleName():null,i=Ob({color:r,type:t,renderMode:n,markerId:a});return z(i)?i:(this.richTextStyles[a]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};B(r)?M(r,function(i){return O(n,i)}):O(n,r);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+t+"}"},e}();function JT(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(r),u=B(s),l=QT(t,r),f,h,c,v;if(o>1||u&&!o){var d=jT(s,t,r,i,l);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var g=a.getDimensionInfo(i[0]);v=f=ta(a,r,i[0]),h=g.type}else v=f=u?s[0]:s;var p=Nf(t),y=p&&t.name||"",m=a.getName(r),_=n?y:m;return li("section",{header:y,noHeader:n||!p,sortParam:v,blocks:[li("nameValue",{markerType:"item",markerColor:l,name:_,noName:!be(_),value:f,valueType:h})].concat(c||[])})}function jT(e,t,r,n,a){var i=t.getData(),o=rr(e,function(h,c,v){var d=i.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],u=[],l=[];n.length?M(n,function(h){f(ta(i,r,h),h)}):M(e,f);function f(h,c){var v=i.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?l.push(li("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:h,valueType:v.type})):(s.push(h),u.push(v.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:l}}var lr=yt();function Xi(e,t){return e.getName(t)||e.getId(t)}var Lo="__universalTransitionEnabled",Ps=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Ya({count:eC,reset:rC}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,a);var i=lr(this).sourceManager=new v0(this);i.prepareSource();var o=this.getInitialData(r,a);Dc(o,this),this.dataTask.context.data=o,lr(this).dataBeforeProcessed=o,Mc(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var a=si(this),i=a?Ds(r):{},o=this.subType;dt.hasClass(o)&&(o+="Series"),at(r,n.getTheme().get(this.subType)),at(r,this.getDefaultOption()),Dl(r,"label",["show"]),this.fillDataTextStyle(r.data),a&&jn(r,i,a)},t.prototype.mergeOption=function(r,n){r=at(this.option,r,!0),this.fillDataTextStyle(r.data);var a=si(this);a&&jn(this.option,r,a);var i=lr(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(r,n);Dc(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,lr(this).dataBeforeProcessed=o,Mc(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!jt(r))for(var n=["show"],a=0;athis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,a){var i=this.ecModel,o=uh.prototype.getColorFromPalette.call(this,r,n,a);return o||(o=i.getColorFromPalette(r,n,a)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,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(r,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Xi(i,r)])&&!i.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Lo])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var a,i,o=this.option,s=o.selectedMode,u=n.length;if(!(!s||!u)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){W(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,f=0;f0&&this._innerSelect(r,n)}},t.registerClass=function(r){return dt.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(dt);Le(Ps,TT);Le(Ps,uh);Cg(Ps,dt);function Mc(e){var t=e.name;Nf(e)||(e.name=tC(e)||t)}function tC(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return M(r,function(a){var i=t.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function eC(e){return e.model.getRawData().count()}function rC(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),nC}function nC(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Dc(e,t){M(kp(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,_t(aC,t))})}function aC(e,t){var r=ql(e);return r&&r.setOutputEnd((t||this).count()),t}function ql(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(e.uid))}return n}}const mn=Ps;var ch=function(){function e(){this.group=new de,this.uid=xs("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,a){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,a){},e.prototype.updateLayout=function(t,r,n,a){},e.prototype.updateVisual=function(t,r,n,a){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();zf(ch);vs(ch);const Ye=ch;function _0(){var e=yt();return function(t){var r=e(t),n=t.pipelineContext,a=!!r.large,i=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var S0=yt(),iC=_0(),dh=function(){function e(){this.group=new de,this.uid=xs("viewChart"),this.renderTask=Ya({plan:oC,reset:sC}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,a){},e.prototype.highlight=function(t,r,n,a){var i=t.getData(a&&a.dataType);!i||Lc(i,a,"emphasis")},e.prototype.downplay=function(t,r,n,a){var i=t.getData(a&&a.dataType);!i||Lc(i,a,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,a){this.render(t,r,n,a)},e.prototype.updateLayout=function(t,r,n,a){this.render(t,r,n,a)},e.prototype.updateVisual=function(t,r,n,a){this.render(t,r,n,a)},e.prototype.eachRendered=function(t){jf(this.group,t)},e.markUpdateMethod=function(t,r){S0(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function Ac(e,t,r){e&&Nl(e)&&(t==="emphasis"?Rl:El)(e,r)}function Lc(e,t,r){var n=Si(e,t),a=t&&t.highlightKey!=null?vw(t.highlightKey):null;n!=null?M(gt(n),function(i){Ac(e.getItemGraphicEl(i),r,a)}):e.eachItemGraphicEl(function(i){Ac(i,r,a)})}zf(dh);vs(dh);function oC(e){return iC(e.model)}function sC(e){var t=e.model,r=e.ecModel,n=e.api,a=e.payload,i=t.pipelineContext.progressiveRender,o=e.view,s=a&&S0(a).updateMethod,u=i?"incrementalPrepareRender":s&&o[s]?s:"render";return u!=="render"&&o[u](t,r,n,a),uC[u]}var uC={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};const vn=dh;var qo="\0__throttleOriginMethod",Ic="\0__throttleRate",Pc="\0__throttleType";function ph(e,t,r){var n,a=0,i=0,o=null,s,u,l,f;t=t||0;function h(){i=new Date().getTime(),o=null,e.apply(u,l||[])}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 x0(e,t,r,n){var a=e[t];if(!!a){var i=a[qo]||a,o=a[Pc],s=a[Ic];if(s!==r||o!==n){if(r==null||!n)return e[t]=i;a=e[t]=ph(i,r,n==="debounce"),a[qo]=i,a[Pc]=n,a[Ic]=r}return a}}function Zl(e,t){var r=e[t];r&&r[qo]&&(r.clear&&r.clear(),e[t]=r[qo])}var Rc=yt(),Ec={itemStyle:ri(Dy,!0),lineStyle:ri(My,!0)},lC={lineStyle:"stroke",itemStyle:"fill"};function w0(e,t){var r=e.visualStyleMapper||Ec[t];return r||(console.warn("Unkown style type '"+t+"'."),Ec.itemStyle)}function b0(e,t){var r=e.visualDrawType||lC[t];return r||(console.warn("Unkown style type '"+t+"'."),"fill")}var fC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",a=e.getModel(n),i=w0(e,n),o=i(a),s=a.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var u=b0(e,n),l=o[u],f=q(l)?l:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[u]||f||h){var c=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[u]||(o[u]=c,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||q(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||q(o.stroke)?c:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",u),!t.isSeriesFiltered(e)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var g=e.getDataParams(d),p=O({},o);p[u]=f(g),v.setItemVisual(d,"style",p)}}}},xa=new kt,hC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",a=w0(e,n),i=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var u=o.getRawDataItem(s);if(u&&u[n]){xa.option=u[n];var l=a(xa),f=o.ensureUniqueItemVisual(s,"style");O(f,l),xa.option.decal&&(o.setItemVisual(s,"decal",xa.option.decal),xa.option.decal.dirty=!0),i in l&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},vC={performRawSeries:!0,overallReset:function(e){var t=$();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var a=r.type+"-"+n,i=t.get(a);i||(i={},t.set(a,i)),Rc(r).scope=i}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),a={},i=r.getData(),o=Rc(r).scope,s=r.visualStyleAccessPath||"itemStyle",u=b0(r,s);i.each(function(l){var f=i.getRawIndex(l);a[f]=l}),n.each(function(l){var f=a[l],h=i.getItemVisual(f,"colorFromPalette");if(h){var c=i.ensureUniqueItemVisual(f,"style"),v=n.getName(l)||l+"",d=n.count();c[u]=r.getColorFromPalette(v,o,d)}})}})}},qi=Math.PI;function cC(e,t){t=t||{},Q(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 r=new de,n=new Ct({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var a=new Vt({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 Ct({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(i);var o;return t.showSpinner&&(o=new Xf({shape:{startAngle:-qi/2,endAngle:-qi/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:qi*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:qi*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=a.getBoundingRect().width,u=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-u*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:u),f=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:f}),i.setShape({x:l-u,y:f-u,width:u*2,height:u*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var dC=function(){function e(t,r,n,a){this._stageTaskMap=$(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},e.prototype.getPerformArgs=function(t,r){if(!!t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),a=n.context,i=!r&&n.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,u=s!=null?Math.ceil(s/o):null;return{step:o,modBy:u,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&i>=n.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),u=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:u,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=$();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}),r._pipe(a,a.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;M(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),o="";Ae(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,r,n),a.overallReset&&this._createOverallStageTask(a,i,r,n)},this)},e.prototype.prepareView=function(t,r,n,a){var i=t.renderTask,o=i.context;o.model=r,o.ecModel=n,o.api=a,i.__block=!t.incrementalPrepareRender,this._pipe(r,i)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,a){a=a||{};var i=!1,o=this;M(t,function(u,l){if(!(a.visualType&&a.visualType!==u.visualType)){var f=o._stageTaskMap.get(u.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,y){s(a,p)&&p.dirty();var m=o.getPerformArgs(p,a.block);m.skip=!u.performRawSeries&&r.isSeriesFiltered(p.context.model),o.updatePayload(p,n),p.perform(m)&&(i=!0)})}});function s(u,l){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(l.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,a){var i=this,o=r.seriesTaskMap,s=r.seriesTaskMap=$(),u=t.seriesType,l=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):u?n.eachRawSeriesByType(u,f):l&&l(n,a).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||Ya({plan:_C,reset:SC,count:wC}));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)}},e.prototype._createOverallStageTask=function(t,r,n,a){var i=this,o=r.overallTask=r.overallTask||Ya({reset:pC});o.context={ecModel:n,api:a,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,u=o.agentStubMap=$(),l=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";Ae(!t.createOnAllSeries,v),l?n.eachRawSeriesByType(l,d):f?f(n,a).each(d):(h=!1,M(n.getSeries(),d));function d(g){var p=g.uid,y=u.set(p,s&&s.get(p)||(c=!0,Ya({reset:gC,onDirty:mC})));y.context={model:g,overallProgress:h},y.agent=o,y.__block=h,i._pipe(g,y)}c&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=r),a.tail&&a.tail.pipe(r),a.tail=r,r.__idxInPipeline=a.count++,r.__pipeline=a},e.wrapStageHandler=function(t,r){return q(t)&&(t={overallReset:t,seriesType:bC(t)}),t.uid=xs("stageHandler"),r&&(t.visualType=r),t},e}();function pC(e){e.overallReset(e.ecModel,e.api,e.payload)}function gC(e){return e.overallProgress&&yC}function yC(){this.agent.dirty(),this.getDownstream().dirty()}function mC(){this.agent&&this.agent.dirty()}function _C(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function SC(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=gt(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?G(t,function(r,n){return T0(n)}):xC}var xC=T0(0);function T0(e){return function(t,r){var n=r.data,a=r.resetDefines[e];if(a&&a.dataEach)for(var i=t.start;i0&&v===l.length-c.length){var d=l.slice(0,v);d!=="data"&&(r.mainType=d,r[c.toLowerCase()]=u,f=!0)}}s.hasOwnProperty(l)&&(n[l]=u,f=!0),f||(a[l]=u)})}return{cptQuery:r,dataQuery:n,otherQuery:a}},e.prototype.filter=function(t,r){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 u=r.cptQuery,l=r.dataQuery;return f(u,o,"mainType")&&f(u,o,"subType")&&f(u,o,"index","componentIndex")&&f(u,o,"name")&&f(u,o,"id")&&f(l,i,"name")&&f(l,i,"dataIndex")&&f(l,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,a,i));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Kl=["symbol","symbolSize","symbolRotate","symbolOffset"],Nc=Kl.concat(["symbolKeepAspect"]),DC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o=0&&on(u)?u:.5;var l=e.createRadialGradient(o,s,0,o,s,u);return l}function Jl(e,t,r){for(var n=t.type==="radial"?XC(e,t,r):$C(e,t,r),a=t.colorStops,i=0;i0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:ft(e)?[e]:B(e)?e:null}function L0(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&ZC(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var a=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&a!==1&&(r=G(r,function(i){return i/a}),n/=a)}return[r,n]}var KC=new Dr(!0);function Ko(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function Fc(e){return typeof e=="string"&&e!=="none"}function Qo(e){var t=e.fill;return t!=null&&t!=="none"}function zc(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function Gc(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function jl(e,t,r){var n=Mg(t.image,t.__image,r);if(cs(n)){var a=e.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)*Fa),i.scaleSelf(t.scaleX||1,t.scaleY||1),a.setTransform(i)}return a}}function QC(e,t,r,n){var a,i=Ko(r),o=Qo(r),s=r.strokePercent,u=s<1,l=!t.path;(!t.silent||u)&&l&&t.createPathProxy();var f=t.path||KC,h=t.__dirty;if(!n){var c=r.fill,v=r.stroke,d=o&&!!c.colorStops,g=i&&!!v.colorStops,p=o&&!!c.image,y=i&&!!v.image,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0;(d||g)&&(x=t.getBoundingRect()),d&&(m=h?Jl(e,c,x):t.__canvasFillGradient,t.__canvasFillGradient=m),g&&(_=h?Jl(e,v,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),p&&(S=h||!t.__canvasFillPattern?jl(e,c,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(w=h||!t.__canvasStrokePattern?jl(e,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),d?e.fillStyle=m:p&&(S?e.fillStyle=S:o=!1),g?e.strokeStyle=_:y&&(w?e.strokeStyle=w:i=!1)}var b=t.getGlobalScale();f.setScale(b[0],b[1],t.segmentIgnoreThreshold);var T,C;e.setLineDash&&r.lineDash&&(a=L0(t),T=a[0],C=a[1]);var A=!0;(l||h&Gn)&&(f.setDPR(e.dpr),u?f.setContext(null):(f.setContext(e),A=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(e,u?s:1),T&&(e.setLineDash(T),e.lineDashOffset=C),n||(r.strokeFirst?(i&&Gc(e,r),o&&zc(e,r)):(o&&zc(e,r),i&&Gc(e,r))),T&&e.setLineDash([])}function JC(e,t,r){var n=t.__image=Mg(r.image,t.__image,t,t.onload);if(!(!n||!cs(n))){var a=r.x||0,i=r.y||0,o=t.getWidth(),s=t.getHeight(),u=n.width/n.height;if(o==null&&s!=null?o=s*u:s==null&&o!=null?s=o/u:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var l=r.sx||0,f=r.sy||0;e.drawImage(n,l,f,r.sWidth,r.sHeight,a,i,o,s)}else if(r.sx&&r.sy){var l=r.sx,f=r.sy,h=o-l,c=s-f;e.drawImage(n,l,f,h,c,a,i,o,s)}else e.drawImage(n,a,i,o,s)}}function jC(e,t,r){var n,a=r.text;if(a!=null&&(a+=""),a){e.font=r.font||pn,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var i=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=L0(t),i=n[0],o=n[1]),i&&(e.setLineDash(i),e.lineDashOffset=o),r.strokeFirst?(Ko(r)&&e.strokeText(a,r.x,r.y),Qo(r)&&e.fillText(a,r.x,r.y)):(Qo(r)&&e.fillText(a,r.x,r.y),Ko(r)&&e.strokeText(a,r.x,r.y)),i&&e.setLineDash([])}}var Hc=["shadowBlur","shadowOffsetX","shadowOffsetY"],Vc=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function I0(e,t,r,n,a){var i=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){Kt(e,a),i=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?fn.opacity:o}(n||t.blend!==r.blend)&&(i||(Kt(e,a),i=!0),e.globalCompositeOperation=t.blend||fn.blend);for(var s=0;s0&&r.unfinished);r.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(r,n,a){if(!this[Rt]){if(this._disposed){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[Rt]=!0,!this._model||n){var u=new sT(this._api),l=this._theme,f=this._model=new Ky;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,l,this._locale,u)}this._model.setOption(r,{replaceMerge:o},rf);var h={seriesTransition:s,optionChanged:!0};if(a)this[$t]={silent:i,updateParams:h},this[Rt]=!1,this.getZr().wakeUp();else{try{kn(this),fr.update.call(this,null,h)}catch(c){throw this[$t]=null,this[Rt]=!1,c}this._ssr||this._zr.flush(),this[$t]=null,this[Rt]=!1,wa.call(this,i),ba.call(this,i)}}},t.prototype.setTheme=function(){},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||fM&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){if(!!j.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return M(n,function(a){a.stopAnimation(null,!0)}),r.painter.toDataURL()}},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,a=this._model,i=[],o=this;M(n,function(u){a.eachComponent({mainType:u},function(l){var f=o._componentsMap[l.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return M(i,function(u){u.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(es[a]){var u=s,l=s,f=-s,h=-s,c=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();M(cn,function(_,S){if(_.group===a){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(rt(r)),x=_.getDom().getBoundingClientRect();u=i(x.left,u),l=i(x.top,l),f=o(x.right,f),h=o(x.bottom,h),c.push({dom:w,left:x.left,top:x.top})}}),u*=v,l*=v,f*=v,h*=v;var d=f-u,g=h-l,p=er.createCanvas(),y=Cl(p,{renderer:n?"svg":"canvas"});if(y.resize({width:d,height:g}),n){var m="";return M(c,function(_){var S=_.left-u,w=_.top-l;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new Ct({shape:{x:0,y:0,width:d,height:g},style:{fill:r.connectedBackgroundColor}})),M(c,function(_){var S=new aa({style:{x:_.left*v-u,y:_.top*v-l,image:_.dom}});y.add(S)}),y.refreshImmediately(),p.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n){return Ou(this,"convertToPixel",r,n)},t.prototype.convertFromPixel=function(r,n){return Ou(this,"convertFromPixel",r,n)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var a=this._model,i,o=nu(a,r);return M(o,function(s,u){u.indexOf("Models")>=0&&M(s,function(l){var f=l.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(u==="seriesModels"){var h=this._chartsMap[l.__viewId];h&&h.containPoint&&(i=i||h.containPoint(n,l))}},this)},this),!!i},t.prototype.getVisual=function(r,n){var a=this._model,i=nu(a,r,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),u=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return u!=null?LC(s,u,n):IC(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;M(CM,function(n){var a=function(i){var o=r.getModel(),s=i.target,u,l=n==="globalout";if(l?u={}:s&&Na(s,function(d){var g=lt(d);if(g&&g.dataIndex!=null){var p=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return u=p&&p.getDataParams(g.dataIndex,g.dataType)||{},!0}else if(g.eventData)return u=O({},g.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var c=f&&h!=null&&o.getComponent(f,h),v=c&&r[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];u.event=i,u.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:u,model:c,view:v},r.trigger(n,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(n,a,r)}),M($a,function(n,a){r._messageCenter.on(a,function(i){this.trigger(a,i)},r)}),M(["selectchanged"],function(n){r._messageCenter.on(n,function(a){this.trigger(n,a)},r)}),RC(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&bg(this.getDom(),_h,"");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 cn[n.id]},t.prototype.resize=function(r){if(!this[Rt]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=r&&r.silent;this[$t]&&(i==null&&(i=this[$t].silent),a=!0,this[$t]=null),this[Rt]=!0;try{a&&kn(this),fr.update.call(this,{type:"resize",animation:O({duration:0},r&&r.animation)})}catch(o){throw this[Rt]=!1,o}this[Rt]=!1,wa.call(this,i),ba.call(this,i)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(W(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!nf[r]){var a=nf[r](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=O({},r);return n.type=$a[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(W(n)||(n={silent:!!n}),!!jo[r.type]&&!!this._model){if(this[Rt]){this._pendingActions.push(r);return}var a=n.silent;Bu.call(this,r,a);var i=n.flush;i?this._zr.flush():i!==!1&&j.browser.weChat&&this._throttledZrFlush(),wa.call(this,a),ba.call(this,a)}},t.prototype.updateLabelLayout=function(){xe.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){kn=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Eu(h,!0),Eu(h,!1),c.plan()},Eu=function(h,c){for(var v=h._model,d=h._scheduler,g=c?h._componentsViews:h._chartsViews,p=c?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_c.get("hoverLayerThreshold")&&!j.node&&!j.worker&&c.eachSeries(function(p){if(!p.preventUsingHoverLayer){var y=h._chartsMap[p.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(h,c){if(!h.preventAutoZ){var v=h.get("z")||0,d=h.get("zlevel")||0;c.eachRendered(function(g){return u(g,v,d,-1/0),!0})}}function u(h,c,v,d){var g=h.getTextContent(),p=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(y){if(y.states&&y.states.emphasis){if(qn(y))return;if(y instanceof nt&&cw(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=p;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=p),S&&(S.stateTransition=p)}y.__dirty&&a(y)}})}ed=function(h){return new(function(c){N(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){Rl(d,g),oe(h)},v.prototype.leaveEmphasis=function(d,g){El(d,g),oe(h)},v.prototype.enterBlur=function(d){nw(d),oe(h)},v.prototype.leaveBlur=function(d){Wg(d),oe(h)},v.prototype.enterSelect=function(d){Ug(d),oe(h)},v.prototype.leaveSelect=function(d){Yg(d),oe(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},v}(Qy))(h)},$0=function(h){function c(v,d){for(var g=0;g=0)){nd.push(r);var i=D0.wrapStageHandler(r,a);i.__prio=t,i.__raw=r,e.push(i)}}function J0(e,t){nf[e]=t}function kP(e){L_({createCanvas:e})}function EM(e,t,r){var n=N0("registerMap");n&&n(e,t,r)}function BP(e){var t=N0("getMap");return t&&t(e)}var OM=BT;wn(yh,fC);wn(Rs,hC);wn(Rs,vC);wn(yh,DC);wn(Rs,AC);wn(G0,sM);K0(jy);Q0(cM,pT);J0("default",cC);sa({type:hn,event:hn,update:hn},Gt);sa({type:To,event:To,update:To},Gt);sa({type:Ha,event:Ha,update:Ha},Gt);sa({type:Co,event:Co,update:Co},Gt);sa({type:Va,event:Va,update:Va},Gt);Z0("light",TC);Z0("dark",CC);var NP={};function Ta(e){return e==null?0:e.length||1}function ad(e){return e}var kM=function(){function e(t,r,n,a,i,o){this._old=t,this._new=r,this._oldKeyGetter=n||ad,this._newKeyGetter=a||ad,this.context=i,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},a=new Array(t.length),i=new Array(r.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(r,n,i,"_newKeyGetter");for(var o=0;o1){var f=u.shift();u.length===1&&(n[s]=u[0]),this._update&&this._update(f,o)}else l===1?(n[s]=null,this._update&&this._update(u,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},a={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(r,a,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,l),a[u]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,l),a[u]=null;else if(h===1&&c===1)this._update&&this._update(f,l),a[u]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,l),a[u]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var Ca=W,hr=G,WM=typeof Int32Array>"u"?Array:Int32Array,UM="e\0\0",id=-1,YM=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],$M=["_approximateExtent"],od,to,Ma,Da,zu,eo,Gu,XM=function(){function e(t,r){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;tm(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,n=t),n=n||["x","y"];for(var i={},o=[],s={},u=!1,l={},f=0;f=r)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,u=s===pe;if(u&&!a.pure)for(var l=[],f=t;f0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,a=n[t];a||(a=n[t]={});var i=a[r];return i==null&&(i=this.getVisual(r),B(i)?i=i.slice():Ca(i)&&(i=O({},i)),a[r]=i),i},e.prototype.setItemVisual=function(t,r,n){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,Ca(r)?O(a,r):a[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){Ca(t)?O(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?O(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;Xx(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){M(this._graphicEls,function(n,a){n&&t&&t.call(r,n,a)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:hr(this.dimensions,this._getDimInfo,this),this.hostModel)),zu(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];!q(n)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=n.apply(this,arguments);return r.apply(this,[a].concat(fs(arguments)))})},e.internalField=function(){od=function(t){var r=t._invertedIndicesMap;M(r,function(n,a){var i=t._dimInfos[a],o=i.ordinalMeta,s=t._store;if(o){n=r[a]=new WM(o.categories.length);for(var u=0;u1&&(u+="__ec__"+f),a[r]=u}}}(),e}();const am=XM;function FP(e,t){return wh(e,t).dimensions}function wh(e,t){lh(e)||(e=fh(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],a=$(),i=[],o=ZM(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&nm(o),u=n===e.dimensionsDefine,l=u?rm(e):em(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,o));for(var h=$(f),c=new f0(o),v=0;v0&&(n.name=a+(i-1)),i++,t.set(a,i)}}function ZM(e,t,r,n){var a=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return M(t,function(i){var o;W(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function KM(e,t,r){var n=t.data;if(r||n.hasOwnProperty(e)){for(var a=0;n.hasOwnProperty(e+a);)a++;e+=a}return t.set(e,!0),e}var QM=function(){function e(t){this.coordSysDims=[],this.axisMap=$(),this.categoryAxisMap=$(),this.coordSysName=t}return e}();function JM(e){var t=e.get("coordinateSystem"),r=new QM(t),n=jM[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var jM={cartesian2d:function(e,t,r,n){var a=e.getReferringComponents("xAxis",Te).models[0],i=e.getReferringComponents("yAxis",Te).models[0];t.coordSysDims=["x","y"],r.set("x",a),r.set("y",i),Bn(a)&&(n.set("x",a),t.firstCategoryDimIndex=0),Bn(i)&&(n.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var a=e.getReferringComponents("singleAxis",Te).models[0];t.coordSysDims=["single"],r.set("single",a),Bn(a)&&(n.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var a=e.getReferringComponents("polar",Te).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",i),r.set("angle",o),Bn(i)&&(n.set("radius",i),t.firstCategoryDimIndex=0),Bn(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var a=e.ecModel,i=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();M(i.parallelAxisIndex,function(s,u){var l=a.getComponent("parallelAxis",s),f=o[u];r.set(f,l),Bn(l)&&(n.set(f,l),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=u))})}};function Bn(e){return e.get("type")==="category"}function tD(e,t,r){r=r||{};var n=r.byIndex,a=r.stackedCoordDimension,i,o,s;eD(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var u=!!(e&&e.get("stack")),l,f,h,c;if(M(i,function(m,_){z(m)&&(i[_]=m={name:m}),u&&!m.isExtraCoord&&(!n&&!l&&m.ordinalMeta&&(l=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!a||a===m.coordDim)&&(f=m))}),f&&!n&&!l&&(n=!0),f){h="__\0ecstackresult_"+e.id,c="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var v=f.coordDim,d=f.type,g=0;M(i,function(m){m.coordDim===v&&g++});var p={name:h,coordDim:v,coordDimIndex:g,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={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),y.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(p),o.appendCalculationDimension(y)):(i.push(p),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:l&&l.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:h}}function eD(e){return!tm(e.schema)}function im(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function rD(e,t){return im(e,t)?e.getCalculationInfo("stackResultDimension"):t}function nD(e,t){var r=e.get("coordinateSystem"),n=As.get(r),a;return t&&t.coordSysDims&&(a=G(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var u=s.get("type");o.type=FM(u)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function aD(e,t,r){var n,a;return r&&M(e,function(i,o){var s=i.coordDim,u=r.categoryAxisMap.get(s);u&&(n==null&&(n=o),i.ordinalMeta=u.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(e[n].otherDims.itemName=0),n}function om(e,t,r){r=r||{};var n=t.getSourceManager(),a,i=!1;e?(i=!0,a=fh(e)):(a=n.getSource(),i=a.sourceFormat===pe);var o=JM(t),s=nD(t,o),u=r.useEncodeDefaulter,l=q(u)?u:u?_t(Vb,s,t):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!i},h=wh(a,f),c=aD(h.dimensions,r.createInvertedIndices,o),v=i?null:n.getSharedDataStore(h),d=tD(t,{schema:h,store:v}),g=new am(h,t);g.setCalculationInfo(d);var p=c!=null&&iD(a)?function(y,m,_,S){return S===c?_:this.defaultDimValueGetter(y,m,_,S)}:null;return g.hasItemOption=!1,g.initData(i?a:v,null,p),g}function iD(e){if(e.sourceFormat===pe){var t=oD(e.data||[]);return!B(_i(t))}}function oD(e){for(var t=0;tr[1]&&(r[1]=t[1])},e.prototype.unionExtentFromData=function(t,r){this.unionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r)},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();vs(sm);const ir=sm;var sD=0,uD=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++sD}return e.createByAxisModel=function(t){var r=t.option,n=r.data,a=n&&G(n,lD);return new e({categories:a,needCollect:!a,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!z(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,r;var a=this._getOrCreateMap();return r=a.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,a.set(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=$(this.categories))},e}();function lD(e){return W(e)&&e.value!=null?e.value:e+""}const of=uD;function sf(e){return e.type==="interval"||e.type==="log"}function fD(e,t,r,n){var a={},i=e[1]-e[0],o=a.interval=yg(i/t,!0);r!=null&&on&&(o=a.interval=n);var s=a.intervalPrecision=um(o),u=a.niceTickExtent=[Tt(Math.ceil(e[0]/o)*o,s),Tt(Math.floor(e[1]/o)*o,s)];return hD(u,e),a}function Hu(e){var t=Math.pow(10,Bf(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Tt(r*t)}function um(e){return je(e)+2}function sd(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function hD(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),sd(e,0,t),sd(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function Es(e,t){return e>=t[0]&&e<=t[1]}function Os(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function ks(e,t){return e*(t[1]-t[0])+t[0]}var lm=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new of({})),B(a)&&(a=new of({categories:G(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(r){return r==null?NaN:z(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return r=this.parse(r),Es(r,this._extent)&&this._ordinalMeta.categories[r]!=null},t.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),Os(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(ks(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,a=n[0];a<=n[1];)r.push({value:a}),a++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,u=Math.min(s,n.length);o=0&&r=0&&r=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(ir);ir.registerClass(lm);const fm=lm;var Kr=Tt,hm=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return Es(r,this._extent)},t.prototype.normalize=function(r){return Os(r,this._extent)},t.prototype.scale=function(r){return ks(r,this._extent)},t.prototype.setExtent=function(r,n){var a=this._extent;isNaN(r)||(a[0]=parseFloat(r)),isNaN(n)||(a[1]=parseFloat(n))},t.prototype.unionExtent=function(r){var n=this._extent;r[0]n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=um(r)},t.prototype.getTicks=function(r){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var u=1e4;a[0]u)return[];var f=s.length?s[s.length-1].value:i[1];return a[1]>f&&(r?s.push({value:Kr(f+n,o)}):s.push({value:a[1]})),s},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;oi[0]&&v0&&(i=i===null?s:Math.min(i,s))}r[n]=i}}return r}function dm(e){var t=cD(e),r=[];return M(e,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 u=i.dim+"_"+i.index,l=t[u],f=Math.abs(o[1]-o[0]),h=i.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=l?f/c*l:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=st(n.get("barWidth"),s),g=st(n.get("barMaxWidth"),s),p=st(n.get("barMinWidth")||(ym(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:p,barGap:y,barCategoryGap:m,axisKey:Th(i),stackId:bh(n)})}),pm(r)}function pm(e){var t={};M(e,function(n,a){var i=n.axisKey,o=n.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},u=s.stacks;t[i]=s;var l=n.stackId;u[l]||s.autoWidthCount++,u[l]=u[l]||{width:0,maxWidth:0};var f=n.barWidth;f&&!u[l].width&&(u[l].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=n.barMaxWidth;h&&(u[l].maxWidth=h);var c=n.barMinWidth;c&&(u[l].minWidth=c);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var r={};return M(t,function(n,a){r[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var u=ct(i).length;s=Math.max(35-u*4,15)+"%"}var l=st(s,o),f=st(n.gap,1),h=n.remainedWidth,c=n.autoWidthCount,v=(h-l)/(c+(c-1)*f);v=Math.max(v,0),M(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,c--}else{var S=v;m&&mS&&(S=_),S!==v&&(y.width=S,h-=S+f*S,c--)}}),v=(h-l)/(c+(c-1)*f),v=Math.max(v,0);var d=0,g;M(i,function(y,m){y.width||(y.width=v),g=y,d+=y.width*(1+f)}),g&&(d-=g.width*f);var p=-d/2;M(i,function(y,m){r[a][m]=r[a][m]||{bandWidth:o,offset:p,width:y.width},p+=y.width*(1+f)})}),r}function dD(e,t,r){if(e&&t){var n=e[Th(t)];return n!=null&&r!=null?n[bh(r)]:n}}function pD(e,t){var r=cm(e,t),n=dm(r);M(r,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),u=bh(a),l=n[Th(s)][u],f=l.offset,h=l.width;i.setLayout({bandWidth:l.bandWidth,offset:f,size:h})})}function gD(e){return{seriesType:e,plan:_0(),reset:function(t){if(!!gm(t)){var r=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=r.getDimensionIndex(r.mapDimension(i.dim)),s=r.getDimensionIndex(r.mapDimension(a.dim)),u=t.get("showBackground",!0),l=r.mapDimension(i.dim),f=r.getCalculationInfo("stackResultDimension"),h=im(r,l)&&!!r.getCalculationInfo("stackedOnSeries"),c=i.isHorizontal(),v=yD(a,i),d=ym(t),g=t.get("barMinHeight")||0,p=f&&r.getDimensionIndex(f),y=r.getLayout("size"),m=r.getLayout("offset");return{progress:function(_,S){for(var w=_.count,x=d&&Vu(w*3),b=d&&u&&Vu(w*3),T=d&&Vu(w),C=n.master.getRect(),A=c?C.width:C.height,D,L=S.getStore(),I=0;(D=_.next())!=null;){var P=L.get(h?p:o,D),R=L.get(s,D),E=v,U=void 0;h&&(U=+P-L.get(o,D));var k=void 0,F=void 0,H=void 0,Z=void 0;if(c){var X=n.dataToPoint([P,R]);if(h){var ht=n.dataToPoint([U,R]);E=ht[0]}k=E,F=X[1]+m,H=X[0]-E,Z=y,Math.abs(H)>>1;e[a][1]a&&(this._approxInterval=a);var s=ro.length,u=Math.min(mD(ro,this._approxInterval,0,s),s-1);this._interval=ro[u][1],this._minLevelUnit=ro[Math.max(u-1,0)][0]},t.prototype.parse=function(r){return ft(r)?r:+We(r)},t.prototype.contain=function(r){return Es(this.parse(r),this._extent)},t.prototype.normalize=function(r){return Os(this.parse(r),this._extent)},t.prototype.scale=function(r){return ks(r,this._extent)},t.type="time",t}(Ti),ro=[["second",nh],["minute",ah],["hour",Ua],["quarter-day",Ua*6],["half-day",Ua*12],["day",ce*1.2],["half-week",ce*3.5],["week",ce*7],["month",ce*31],["quarter",ce*95],["half-year",Qv/2],["year",Qv]];function _D(e,t,r,n){var a=We(t),i=We(r),o=function(d){return jv(a,d,n)===jv(i,d,n)},s=function(){return o("year")},u=function(){return s()&&o("month")},l=function(){return u()&&o("day")},f=function(){return l()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(e){case"year":return s();case"month":return u();case"day":return l();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function SD(e,t){return e/=ce,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function xD(e){var t=30*ce;return e/=t,e>6?6:e>3?3:e>2?2:1}function wD(e){return e/=Ua,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function ud(e,t){return e/=t?ah:nh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function bD(e){return yg(e,!0)}function TD(e,t,r){var n=new Date(e);switch(Zn(t)){case"year":case"month":n[Ey(r)](0);case"day":n[Oy(r)](1);case"hour":n[ky(r)](0);case"minute":n[By(r)](0);case"second":n[Ny(r)](0),n[Fy(r)](0)}return n.getTime()}function CD(e,t,r,n){var a=1e4,i=Py,o=0;function s(A,D,L,I,P,R,E){for(var U=new Date(D),k=D,F=U[I]();k1&&R===0&&L.unshift({value:L[0].value-k})}}for(var R=0;R=n[0]&&m<=n[1]&&h++)}var _=(n[1]-n[0])/t;if(h>_*1.5&&c>_/1.5||(l.push(p),h>_||e===i[v]))break}f=[]}}}for(var S=wt(G(l,function(A){return wt(A,function(D){return D.value>=n[0]&&D.value<=n[1]&&!D.notAdd})}),function(A){return A.length>0}),w=[],x=S.length-1,v=0;v0;)i*=10;var s=[Tt(LD(n[0]/i)*i),Tt(AD(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){Xa.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return r=me(r)/me(this.base),Es(r,this._extent)},t.prototype.normalize=function(r){return r=me(r)/me(this.base),Os(r,this._extent)},t.prototype.scale=function(r){return r=ks(r,this._extent),no(this.base,r)},t.type="log",t}(ir),_m=Ch.prototype;_m.getMinorTicks=Xa.getMinorTicks;_m.getLabel=Xa.getLabel;function ao(e,t){return DD(e,je(t))}ir.registerClass(Ch);const ID=Ch;var PD=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&u>0&&!l&&(s=0),s<0&&u<0&&!f&&(u=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,l=!0),v!=null&&(u=v,f=!0),{min:s,max:u,minFixed:l,maxFixed:f,isBlank:h}},e.prototype.modifyDataMinMax=function(t,r){this[ED[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=RD[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),RD={min:"_determinedMin",max:"_determinedMax"},ED={min:"_dataMin",max:"_dataMax"};function OD(e,t,r){var n=e.rawExtentInfo;return n||(n=new PD(e,t,r),e.rawExtentInfo=n,n)}function io(e,t){return t==null?null:Ka(t)?NaN:e.parse(t)}function Sm(e,t){var r=e.type,n=OD(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var a=n.min,i=n.max,o=t.ecModel;if(o&&r==="time"){var s=cm("bar",o),u=!1;if(M(s,function(h){u=u||h.getBaseAxis()===t.axis}),u){var l=dm(s),f=kD(a,i,t,l);a=f.min,i=f.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function kD(e,t,r,n){var a=r.axis.getExtent(),i=a[1]-a[0],o=dD(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var u=-1/0;M(o,function(v){u=Math.max(v.offset+v.width,u)}),s=Math.abs(s),u=Math.abs(u);var l=s+u,f=t-e,h=1-(s+u)/i,c=f/h-f;return t+=c*(u/l),e-=c*(s/l),{min:e,max:t}}function fd(e,t){var r=t,n=Sm(e,r),a=n.extent,i=r.get("splitNumber");e instanceof ID&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),u=o==="interval"||o==="time";e.setExtent(a[0],a[1]),e.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:u?r.get("minInterval"):null,maxInterval:u?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function BD(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new fm({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new MD({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(ir.getClass(t)||Ti)}}function ND(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Ci(e){var t=e.getLabelModel().get("formatter"),r=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?function(n){return function(a,i){return e.scale.getFormattedLabel(a,i,n)}}(t):z(t)?function(n){return function(a){var i=e.scale.getLabel(a),o=n.replace("{value}",i!=null?i:"");return o}}(t):q(t)?function(n){return function(a,i){return r!=null&&(i=a.value-r),n(Mh(e,a),i,a.level!=null?{level:a.level}:null)}}(t):function(n){return e.scale.getLabel(n)}}function Mh(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function FD(e){var t=e.model,r=e.scale;if(!(!t.get(["axisLabel","show"])||r.isBlank())){var n,a,i=r.getExtent();r instanceof fm?a=r.count():(n=r.getTicks(),a=n.length);var o=e.getLabelModel(),s=Ci(e),u,l=1;a>40&&(l=Math.ceil(a/40));for(var f=0;fe[1]&&(e[1]=a[1])})}var GD=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}(),hd=[],HD={registerPreprocessor:K0,registerProcessor:Q0,registerPostInit:LM,registerPostUpdate:IM,registerUpdateLifecycle:Sh,registerAction:sa,registerCoordinateSystem:PM,registerLayout:RM,registerVisual:wn,registerTransform:OM,registerLoading:J0,registerMap:EM,registerImpl:lM,PRIORITY:wM,ComponentModel:dt,ComponentView:Ye,SeriesModel:mn,ChartView:vn,registerComponentModel:function(e){dt.registerClass(e)},registerComponentView:function(e){Ye.registerClass(e)},registerSeriesModel:function(e){mn.registerClass(e)},registerChartView:function(e){vn.registerClass(e)},registerSubTypeDefaulter:function(e,t){dt.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){cg(e,t)}};function _n(e){if(B(e)){M(e,function(t){_n(t)});return}it(hd,e)>=0||(hd.push(e),q(e)&&(e={install:e}),e.install(HD))}var VD=1e-8;function vd(e,t){return Math.abs(e-t)a&&(n=o,a=u)}if(n)return UD(n.exterior);var l=this.getBoundingRect();return[l.x+l.width/2,l.y+l.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return M(o,function(s){s.type==="polygon"?dd(s.exterior,a,i,r):M(s.points,function(u){dd(u,a,i,r)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new tt(a[0],a[1],i[0]-a[0],i[1]-a[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(r[0],r[1]))return!1;t:for(var i=0,o=a.length;i>1^-(s&1),u=u>>1^-(u&1),s+=a,u+=i,a=s,i=u,n.push([s/r,u/r])}return n}function VP(e,t){return e=$D(e),G(wt(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,a=r.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new pd(o[0],o.slice(1)));break;case"MultiPolygon":M(a.coordinates,function(u){u[0]&&i.push(new pd(u[0],u.slice(1)))});break;case"LineString":i.push(new gd([a.coordinates]));break;case"MultiLineString":i.push(new gd(a.coordinates))}var s=new YD(n[t||"name"],i,n.cp);return s.properties=n,s})}var vi=yt();function XD(e){return e.type==="category"?ZD(e):QD(e)}function qD(e,t){return e.type==="category"?KD(e,t):{ticks:G(e.scale.getTicks(),function(r){return r.value})}}function ZD(e){var t=e.getLabelModel(),r=Cm(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function Cm(e,t){var r=Mm(e,"labels"),n=Dh(t),a=Dm(r,n);if(a)return a;var i,o;return q(n)?i=Im(e,n):(o=n==="auto"?JD(e):n,i=Lm(e,o)),Am(r,n,{labels:i,labelCategoryInterval:o})}function KD(e,t){var r=Mm(e,"ticks"),n=Dh(t),a=Dm(r,n);if(a)return a;var i,o;if((!t.get("show")||e.scale.isBlank())&&(i=[]),q(n))i=Im(e,n,!0);else if(n==="auto"){var s=Cm(e,e.getLabelModel());o=s.labelCategoryInterval,i=G(s.labels,function(u){return u.tickValue})}else o=n,i=Lm(e,o,!0);return Am(r,n,{ticks:i,tickCategoryInterval:o})}function QD(e){var t=e.scale.getTicks(),r=Ci(e);return{labels:G(t,function(n,a){return{level:n.level,formattedLabel:r(n,a),rawLabel:e.scale.getLabel(n),tickValue:n.value}})}}function Mm(e,t){return vi(e)[t]||(vi(e)[t]=[])}function Dm(e,t){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var u=i[0],l=e.dataToCoord(u+1)-e.dataToCoord(u),f=Math.abs(l*Math.cos(n)),h=Math.abs(l*Math.sin(n)),c=0,v=0;u<=i[1];u+=s){var d=0,g=0,p=Ef(r({value:u}),t.font,"center","top");d=p.width*1.3,g=p.height*1.3,c=Math.max(c,d,7),v=Math.max(v,g,7)}var y=c/f,m=v/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=vi(e.model),w=e.getExtent(),x=S.lastAutoInterval,b=S.lastTickCount;return x!=null&&b!=null&&Math.abs(x-_)<=1&&Math.abs(b-o)<=1&&x>_&&S.axisExtent0===w[0]&&S.axisExtent1===w[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=w[0],S.axisExtent1=w[1]),_}function tA(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Lm(e,t,r){var n=Ci(e),a=e.scale,i=a.getExtent(),o=e.getLabelModel(),s=[],u=Math.max((t||0)+1,1),l=i[0],f=a.count();l!==0&&u>1&&f/u>2&&(l=Math.round(Math.ceil(l/u)*u));var h=xm(e),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&l!==i[0]&&g(i[0]);for(var d=l;d<=i[1];d+=u)g(d);v&&d-u!==i[1]&&g(i[1]);function g(p){var y={value:p};s.push(r?p:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:p})}return s}function Im(e,t,r){var n=e.scale,a=Ci(e),i=[];return M(n.getTicks(),function(o){var s=n.getLabel(o),u=o.value;t(o.value,s)&&i.push(r?u:{formattedLabel:a(o),rawLabel:s,tickValue:u})}),i}var yd=[0,1],eA=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return t>=n&&t<=a},e.prototype.containData=function(t){return this.scale.contain(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return bS(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(n=n.slice(),md(n,a.count())),Ml(t,yd,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),md(n,a.count()));var i=Ml(t,n,yd,r);return this.scale.scale(i)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=qD(this,r),a=n.ticks,i=G(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return rA(this,i,o,t.clamp),i},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),a=G(n,function(i){return G(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},e.prototype.getViewLabels=function(){return XD(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/n},e.prototype.calculateCategoryInterval=function(){return jD(this)},e}();function md(e,t){var r=e[1]-e[0],n=t,a=r/n/2;e[0]+=a,e[1]-=a}function rA(e,t,r,n){var a=t.length;if(!e.onBand||r||!a)return;var i=e.getExtent(),o,s;if(a===1)t[0].coord=i[0],o=t[1]={coord:i[0]};else{var u=t[a-1].tickValue-t[0].tickValue,l=(t[a-1].coord-t[0].coord)/u;M(t,function(v){v.coord-=l/2});var f=e.scale.getExtent();s=1+f[1]-t[a-1].tickValue,o={coord:t[a-1].coord+l*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=Tt(v),d=Tt(d),h?v>d:va&&(a+=Aa);var v=Math.atan2(s,o);if(v<0&&(v+=Aa),v>=n&&v<=a||v+Aa>=n&&v+Aa<=a)return u[0]=f,u[1]=h,l-r;var d=r*Math.cos(n)+e,g=r*Math.sin(n)+t,p=r*Math.cos(a)+e,y=r*Math.sin(a)+t,m=(d-o)*(d-o)+(g-s)*(g-s),_=(p-o)*(p-o)+(y-s)*(y-s);return m<_?(u[0]=d,u[1]=g,Math.sqrt(m)):(u[0]=p,u[1]=y,Math.sqrt(_))}function rs(e,t,r,n,a,i,o,s){var u=a-e,l=i-t,f=r-e,h=n-t,c=Math.sqrt(f*f+h*h);f/=c,h/=c;var v=u*f+l*h,d=v/c;s&&(d=Math.min(Math.max(d,0),1)),d*=c;var g=o[0]=e+d*f,p=o[1]=t+d*h;return Math.sqrt((g-a)*(g-a)+(p-i)*(p-i))}function Pm(e,t,r,n,a,i,o){r<0&&(e=e+r,r=-r),n<0&&(t=t+n,n=-n);var s=e+r,u=t+n,l=o[0]=Math.min(Math.max(a,e),s),f=o[1]=Math.min(Math.max(i,t),u);return Math.sqrt((l-a)*(l-a)+(f-i)*(f-i))}var we=[];function sA(e,t,r){var n=Pm(t.x,t.y,t.width,t.height,e.x,e.y,we);return r.set(we[0],we[1]),n}function uA(e,t,r){for(var n=0,a=0,i=0,o=0,s,u,l=1/0,f=t.data,h=e.x,c=e.y,v=0;v0){t=t/180*Math.PI,Ce.fromArray(e[0]),ut.fromArray(e[1]),mt.fromArray(e[2]),V.sub(Ge,Ce,ut),V.sub(Fe,mt,ut);var r=Ge.len(),n=Fe.len();if(!(r<.001||n<.001)){Ge.scale(1/r),Fe.scale(1/n);var a=Ge.dot(Fe),i=Math.cos(t);if(i1&&V.copy(zt,mt),zt.toArray(e[1])}}}}function lA(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Ce.fromArray(e[0]),ut.fromArray(e[1]),mt.fromArray(e[2]),V.sub(Ge,ut,Ce),V.sub(Fe,mt,ut);var n=Ge.len(),a=Fe.len();if(!(n<.001||a<.001)){Ge.scale(1/n),Fe.scale(1/a);var i=Ge.dot(t),o=Math.cos(r);if(i=u)V.copy(zt,mt);else{zt.scaleAndAdd(Fe,s/Math.tan(Math.PI/2-f));var h=mt.x!==ut.x?(zt.x-ut.x)/(mt.x-ut.x):(zt.y-ut.y)/(mt.y-ut.y);if(isNaN(h))return;h<0?V.copy(zt,ut):h>1&&V.copy(zt,mt)}zt.toArray(e[1])}}}}function Sd(e,t,r,n){var a=r==="normal",i=a?e:e.ensureState(r);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?e.useStyle(s):i.style=s}function fA(e,t){var r=t.smooth,n=t.points;if(!!n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var a=Oo(n[0],n[1]),i=Oo(n[1],n[2]);if(!a||!i){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*r,s=za([],n[1],n[0],o/a),u=za([],n[1],n[2],o/i),l=za([],s,u,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(u[0],u[1],u[0],u[1],n[2][0],n[2][1])}else for(var f=1;f0&&i&&w(-f/o,0,o);var g=e[0],p=e[o-1],y,m;_(),y<0&&x(-y,.8),m<0&&x(m,.8),_(),S(y,m,1),S(m,y,-1),_(),y<0&&b(-y),m<0&&b(m);function _(){y=g.rect[t]-n,m=a-p.rect[t]-p.rect[r]}function S(T,C,A){if(T<0){var D=Math.min(C,-T);if(D>0){w(D*A,0,o);var L=D+T;L<0&&x(-L*A,1)}else x(-T*A,1)}}function w(T,C,A){T!==0&&(l=!0);for(var D=C;D0)for(var L=0;L0;L--){var E=A[L-1]*R;w(-E,L,o)}}}function b(T){var C=T<0?-1:1;T=Math.abs(T);for(var A=Math.ceil(T/(o-1)),D=0;D0?w(A,0,D+1):w(-A,o-D-1,o),T-=A,T<=0)return}return l}function hA(e,t,r,n){return Bm(e,"x","width",t,r,n)}function Nm(e,t,r,n){return Bm(e,"y","height",t,r,n)}function Fm(e){var t=[];e.sort(function(g,p){return p.priority-g.priority});var r=new tt(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)),te(n,l,r,u)}else if(n.attr(l),!wi(n).valueAnimation){var h=K(n.style.opacity,1);n.style.opacity=0,Jt(n,{style:{opacity:h}},r,u)}if(i.oldLayout=l,n.states.select){var v=i.oldLayoutSelect={};oo(v,l,so),oo(v,n.states.select,so)}if(n.states.emphasis){var d=i.oldLayoutEmphasis={};oo(d,l,so),oo(d,n.states.emphasis,so)}db(n,u,f,r,r)}if(a&&!a.ignore&&!a.invisible){var i=dA(a),o=i.oldLayout,g={points:a.shape.points};o?(a.attr({shape:o}),te(a,{shape:g},r)):(a.setShape(g),a.style.strokePercent=0,Jt(a,{style:{strokePercent:1}},r)),i.oldLayout=g}},e}();const gA=pA;var $u=yt();function WP(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var a=$u(r).labelManager;a||(a=$u(r).labelManager=new gA),a.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var a=$u(r).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(r.getViewOfSeriesModel(i))}),a.updateLayoutConfig(r),a.layout(r),a.processLabelsOverall()})}function yA(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var a=ta(e,t,r[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(t[i])}return n.join(" ")}function _A(e,t,r,n,a){var i=e.getArea(),o=i.x,s=i.y,u=i.width,l=i.height,f=r.get(["lineStyle","width"])||2;o-=f/2,s-=f/2,u+=f,l+=f,o=Math.floor(o),u=Math.round(u);var h=new Ct({shape:{x:o,y:s,width:u,height:l}});if(t){var c=e.getBaseAxis(),v=c.isHorizontal(),d=c.inverse;v?(d&&(h.shape.x+=u),h.shape.width=0):(d||(h.shape.y+=l),h.shape.height=0);var g=q(a)?function(p){a(p,h)}:null;Jt(h,{shape:{width:u,height:l,x:o,y:s}},r,null,n,g)}return h}function SA(e,t,r){var n=e.getArea(),a=Tt(n.r0,1),i=Tt(n.r,1),o=new nr({shape:{cx:Tt(e.cx,1),cy:Tt(e.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=a,Jt(o,{shape:{endAngle:n.endAngle,r:i}},r)}return o}function xA(e,t,r,n,a){if(e){if(e.type==="polar")return SA(e,t,r);if(e.type==="cartesian2d")return _A(e,t,r,n,a)}else return null;return null}function zm(e,t){return e.type===t}var wA={average:function(e){for(var t=0,r=0,n=0;nt&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&i){var u=o.getBaseAxis(),l=o.getOtherAxis(u),f=u.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(l.dim),1/v));var d=void 0;z(i)?d=wA[i]:q(i)&&(d=i),d&&t.setData(a.downSample(a.mapDimension(l.dim),1/v,d,bA))}}}}}var Gm=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return om(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r){var n=this.coordinateSystem;if(n&&n.clampData){var a=n.dataToPoint(n.clampData(r)),i=this.getData(),o=i.getLayout("offset"),s=i.getLayout("size"),u=n.getBaseAxis().isHorizontal()?0:1;return a[u]+=o+s/2,a}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}(mn);mn.registerClass(Gm);const wd=Gm;var CA=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return om(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 r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,a){return a.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Ay(wd.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}(wd);const MA=CA;var DA=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),AA=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new DA},t.prototype.buildPath=function(r,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),u=(s-o)*.5,l=o+u,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(r,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(r.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,a,i){if(!!this._isOrderChangedWithinSameData(r,n,a)){var o=this._dataSort(r,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(r,n,a){var i=n.baseAxis,o=this._dataSort(r,i,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,a=this._data;r&&r.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){Uo(i,r,lt(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}(vn),Td={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=e.x+e.width,i=e.y+e.height,o=Xu(t.x,e.x),s=qu(t.x+t.width,a),u=Xu(t.y,e.y),l=qu(t.y+t.height,i),f=sa?s:o,t.y=h&&u>i?l:u,t.width=f?0:s-o,t.height=h?0:l-u,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var a=qu(t.r,e.r),i=Xu(t.r0,e.r0);t.r=a,t.r0=i;var o=a-i<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},Cd={cartesian2d:function(e,t,r,n,a,i,o,s,u){var l=new Ct({shape:O({},n),z2:1});if(l.__dataIndex=r,l.name="item",i){var f=l.shape,h=a?"height":"width";f[h]=0}return l},polar:function(e,t,r,n,a,i,o,s,u){var l=!a&&u?bd:nr,f=new l({shape:n,z2:1});f.name="item";var h=Hm(a);if(f.calculateTextPosition=LA(h,{isRoundCap:l===bd}),i){var c=f.shape,v=a?"r":"endAngle",d={};c[v]=a?0:n.startAngle,d[v]=n[v],(s?te:Jt)(f,{shape:d},i)}return f}};function EA(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function Md(e,t,r,n,a,i,o,s){var u,l;i?(l={x:n.x,width:n.width},u={y:n.y,height:n.height}):(l={y:n.y,height:n.height},u={x:n.x,width:n.width}),s||(o?te:Jt)(r,{shape:u},t,a,null);var f=t?e.baseAxis.model:null;(o?te:Jt)(r,{shape:l},f,a)}function Dd(e,t){for(var r=0;r0?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(e,t,r){var n=e.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 BA(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Hm(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function Ld(e,t,r,n,a,i,o,s){var u=t.getItemVisual(r,"style");s||e.setShape("r",n.get(["itemStyle","borderRadius"])||0),e.useStyle(u);var l=n.getShallow("cursor");l&&e.attr("cursor",l);var f=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",h=Cy(n);th(e,h,{labelFetcher:i,labelDataIndex:r,defaultText:yA(i.getData(),r),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:f});var c=e.getTextContent();if(s&&c){var v=n.get(["label","position"]);e.textConfig.inside=v==="middle"?!0:null,IA(e,v==="outside"?f:v,Hm(o),n.get(["label","rotate"]))}cb(c,h,i.getRawValue(r),function(g){return mA(t,g)});var d=n.getModel(["emphasis"]);qg(e,d.get("focus"),d.get("blurScope"),d.get("disabled")),Zg(e,n),BA(a)&&(e.style.fill="none",e.style.stroke="none",M(e.states,function(g){g.style&&(g.style.fill=g.style.stroke="none")}))}function NA(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.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 FA=function(){function e(){}return e}(),Id=function(e){N(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new FA},t.prototype.buildPath=function(r,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],u=[],l=this.barWidth,f=0;f=0?r:null},30,!1);function zA(e,t,r){for(var n=e.baseDimIdx,a=1-n,i=e.shape.points,o=e.largeDataIndices,s=[],u=[],l=e.barWidth,f=0,h=i.length/3;f=s[0]&&t<=s[0]+u[0]&&r>=s[1]&&r<=s[1]+u[1])return o[f]}return-1}function Vm(e,t,r){if(zm(r,"cartesian2d")){var n=t,a=r.getArea();return{x:e?n.x:a.x,y:e?a.y:n.y,width:e?n.width:a.width,height:e?a.height:n.height}}else{var a=r.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:e?a.r0:i.r0,r:e?a.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:Math.PI*2}}}function GA(e,t,r){var n=e.type==="polar"?nr:Ct;return new n({shape:Vm(t,r,e),silent:!0,z2:0})}const HA=RA;function UP(e){e.registerChartView(HA),e.registerSeriesModel(MA),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,_t(pD,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,gD("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,TA("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var ho=Math.PI*2,Ed=Math.PI/180;function Wm(e,t){return Lr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Um(e,t){var r=Wm(e,t),n=e.get("center"),a=e.get("radius");B(a)||(a=[0,a]),B(n)||(n=[n,n]);var i=st(r.width,t.getWidth()),o=st(r.height,t.getHeight()),s=Math.min(i,o),u=st(a[0],s/2),l=st(a[1],s/2),f,h,c=e.coordinateSystem;if(c){var v=c.dataToPoint(n);f=v[0]||0,h=v[1]||0}else f=st(n[0],i)+r.x,h=st(n[1],o)+r.y;return{cx:f,cy:h,r0:u,r:l}}function VA(e,t,r){t.eachSeriesByType(e,function(n){var a=n.getData(),i=a.mapDimension("value"),o=Wm(n,r),s=Um(n,r),u=s.cx,l=s.cy,f=s.r,h=s.r0,c=-n.get("startAngle")*Ed,v=n.get("minAngle")*Ed,d=0;a.each(i,function(A){!isNaN(A)&&d++});var g=a.getSum(i),p=Math.PI/(g||d)*2,y=n.get("clockwise"),m=n.get("roseType"),_=n.get("stillShowZeroSum"),S=a.getDataExtent(i);S[0]=0;var w=ho,x=0,b=c,T=y?1:-1;if(a.setLayout({viewRect:o,r:f}),a.each(i,function(A,D){var L;if(isNaN(A)){a.setItemLayout(D,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:u,cy:l,r0:h,r:m?NaN:f});return}m!=="area"?L=g===0&&_?p:A*p:L=ho/d,Lr?y:p,w=Math.abs(_.label.y-r);if(w>=S.maxY){var x=_.label.x-t-_.len2*a,b=n+_.len,T=Math.abs(x)e.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(e){return e.position==="center"}function $A(e){var t=e.getData(),r=[],n,a,i=!1,o=(e.get("minShowLabelAngle")||0)*UA,s=t.getLayout("viewRect"),u=t.getLayout("r"),l=s.width,f=s.x,h=s.y,c=s.height;function v(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var b in x.states)if(x.states[b].ignore===!1)return!0;return!1}t.each(function(x){var b=t.getItemGraphicEl(x),T=b.shape,C=b.getTextContent(),A=b.getTextGuideLine(),D=t.getItemModel(x),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=st(L.get("edgeDistance"),l),U=L.get("bleedMargin"),k=D.getModel("labelLine"),F=k.get("length");F=st(F,l);var H=k.get("length2");if(H=st(H,l),Math.abs(T.endAngle-T.startAngle)0?"right":"left":X>0?"left":"right"}var or=Math.PI,qe=0,ua=L.get("rotate");if(ft(ua))qe=ua*(or/180);else if(I==="center")qe=0;else if(ua==="radial"||ua===!0){var m_=X<0?-Z+or:-Z;qe=m_}else if(ua==="tangential"&&I!=="outside"&&I!=="outer"){var bn=Math.atan2(X,ht);bn<0&&(bn=or*2+bn);var __=ht>0;__&&(bn=or+bn),qe=bn-or}if(i=!!qe,C.x=St,C.y=Lt,C.rotation=qe,C.setStyle({verticalAlign:"middle"}),It){C.setStyle({align:Ut});var Bs=C.states.select;Bs&&(Bs.x+=C.x,Bs.y+=C.y)}else{var la=C.getBoundingRect().clone();la.applyTransform(C.getComputedTransform());var Eh=(C.style.margin||0)+2.1;la.y-=Eh/2,la.height+=Eh,r.push({label:C,labelLine:A,position:I,len:F,len2:H,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new V(X,ht),linePoints:ie,textAlign:Ut,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:U,rect:la,unconstrainedWidth:la.width,labelStyleWidth:C.style.width})}b.setTextConfig({inside:It})}}),!i&&e.get("avoidLabelOverlap")&&YA(r,n,a,u,l,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}(vn);const ZA=qA;function KA(e,t,r){t=B(t)&&{coordDimensions:t}||O({encodeDefine:e.getEncode()},t);var n=e.getSource(),a=wh(n,t).dimensions,i=new am(a,e);return i.initData(n,r),i}var QA=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}();const JA=QA;var jA=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new JA(vt(this.getData,this),vt(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){var r=KA(this,{coordDimensions:["value"],encodeDefaulter:_t(Wb,this)}),n=[];return r.each(r.mapDimension("value"),function(a){n.push(a)}),this.seats=pg(n,r.hostModel.get("percentPrecision")),r},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.call(this,r);return n.percent=this.seats[r],n.$vars.push("percent"),n},t.prototype._defaultLabelLine=function(r){Dl(r,"labelLine",["show"]);var n=r.labelLine,a=r.emphasis.labelLine;n.show=n.show&&r.label.show,a.show=a.show&&r.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}(mn);const tL=jA;function eL(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(ft(o)&&!isNaN(o)&&o<0)})}}}function YP(e){e.registerChartView(ZA),e.registerSeriesModel(tL),PC("pie",e.registerAction),e.registerLayout(_t(VA,"pie")),e.registerProcessor(WA("pie")),e.registerProcessor(eL("pie"))}var rL=function(e){N(t,e);function t(){return e!==null&&e.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}(dt);const nL=rL;var lf=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Te).models[0]},t.type="cartesian2dAxis",t}(dt);Le(lf,GD);var $m={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)"]}}},aL=at({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},$m),Ah=at({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}}},$m),iL=at({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ah),oL=Q({logBase:10},Ah);const sL={category:aL,value:Ah,time:iL,log:oL};var uL={value:1,category:1,time:1,log:1};function kd(e,t,r,n){M(uL,function(a,i){var o=at(at({},sL[i],!0),n,!0),s=function(u){N(l,u);function l(){var f=u!==null&&u.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return l.prototype.mergeDefaultAndTheme=function(f,h){var c=si(this),v=c?Ds(f):{},d=h.getTheme();at(f,d.get(i+"Axis")),at(f,this.getDefaultOption()),f.type=Bd(f),c&&jn(f,v,c)},l.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=of.createByAxisModel(this))},l.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.type=t+"Axis."+i,l.defaultOption=o,l}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",Bd)}function Bd(e){return e.type||(e.data?"category":"value")}var lL=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return G(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),wt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}();const fL=lL;var ff=["x","y"];function Nd(e){return e.type==="interval"||e.type==="time"}var hL=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=ff,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Nd(r)||!Nd(n))){var a=r.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),u=a[1]-a[0],l=i[1]-i[0];if(!(!u||!l)){var f=(s[0]-o[0])/u,h=(s[1]-o[1])/l,c=o[0]-a[0]*f,v=o[1]-i[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=ra([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&a.contain(a.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var a=this.dataToPoint(r),i=this.dataToPoint(n),o=this.getArea(),s=new tt(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,a){a=a||[];var i=r[0],o=r[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Ht(a,r,this._transform);var s=this.getAxis("x"),u=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=u.toGlobalCoord(u.dataToCoord(o,n)),a},t.prototype.clampData=function(r,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),u=a.parse(r[0]),l=i.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n){var a=[];if(this._invTransform)return Ht(a,r,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(r[0]),n),a[1]=o.coordToData(o.toLocalCoord(r[1]),n),a},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(){var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(r[0],r[1]),i=Math.min(n[0],n[1]),o=Math.max(r[0],r[1])-a,s=Math.max(n[0],n[1])-i;return new tt(a,i,o,s)},t}(fL),vL=function(e){N(t,e);function t(r,n,a,i,o){var s=e.call(this,r,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(nA);const cL=vL;function hf(e,t,r){r=r||{};var n=e.coordinateSystem,a=t.axis,i={},o=a.getAxesOnZeroOf()[0],s=a.position,u=o?"onZero":s,l=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=l==="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=[l==="y"?d[c[u]]:h[0],l==="x"?d[c[u]]:h[3]],i.rotation=Math.PI/2*(l==="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),Jn(r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=t.get(["axisLabel","rotate"]);return i.labelRotate=u==="top"?-y:y,i.z2=1,i}function Fd(e){return e.get("coordinateSystem")==="cartesian2d"}function zd(e){var t={xAxisModel:null,yAxisModel:null};return M(t,function(r,n){var a=n.replace(/Model$/,""),i=e.getReferringComponents(a,Te).models[0];t[n]=i}),t}var Ku=Math.log;function dL(e,t,r){var n=Ti.prototype,a=n.getTicks.call(r),i=n.getTicks.call(r,!0),o=a.length-1,s=n.getInterval.call(r),u=Sm(e,t),l=u.extent,f=u.fixMin,h=u.fixMax;if(e.type==="log"){var c=Ku(e.base);l=[Ku(l[0])/c,Ku(l[1])/c]}e.setExtent(l[0],l[1]),e.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=n.getExtent.call(e);f&&(l[0]=v[0]),h&&(l[1]=v[1]);var d=n.getInterval.call(e),g=l[0],p=l[1];if(f&&h)d=(p-g)/o;else if(f)for(p=l[0]+d*o;pl[0]&&isFinite(g)&&isFinite(l[0]);)d=Hu(d),g=l[1]-d*o;else{var y=e.getTicks().length-1;y>o&&(d=Hu(d));var m=d*o;p=Math.ceil(l[1]/d)*d,g=Tt(p-m),g<0&&l[0]>=0?(g=0,p=Tt(m)):p>0&&l[1]<=0&&(p=0,g=-Tt(m))}var _=(a[0].value-i[0].value)/s,S=(a[o].value-i[o].value)/s;n.setExtent.call(e,g+d*_,p+d*S),n.setInterval.call(e,d),(_||S)&&n.setNiceExtent.call(e,g+d,p-d)}var pL=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ff,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function a(o){var s,u=ct(o),l=u.length;if(!!l){for(var f=[],h=l-1;h>=0;h--){var c=+u[h],v=o[c],d=v.model,g=v.scale;sf(g)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(fd(g,d),sf(g)&&(s=v))}f.length&&(s||(s=f.pop(),fd(s.scale,s.model)),M(f,function(p){dL(p.scale,p.model,s.scale)}))}}a(n.x),a(n.y);var i={};M(n.x,function(o){Gd(n,"y",o,i)}),M(n.y,function(o){Gd(n,"x",o,i)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var a=t.getBoxLayoutParams(),i=!n&&t.get("containLabel"),o=Lr(a,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;u(),i&&(M(s,function(l){if(!l.model.get(["axisLabel","inside"])){var f=FD(l);if(f){var h=l.isHorizontal()?"height":"width",c=l.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,l.position==="top"?o.y+=f.height+c:l.position==="left"&&(o.x+=f.width+c)}}}),u()),M(this._coordsList,function(l){l.calcAffineTransform()});function u(){M(s,function(l){var f=l.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=l.inverse?1:0;l.setExtent(h[c],h[1-c]),gL(l,f?o.x:o.y)})}},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}W(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a0?"top":"bottom",i="center"):Ho(a-Sr)?(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}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),Vd={axisLine:function(e,t,r,n){var a=t.get(["axisLine","show"]);if(a==="auto"&&e.handleAutoShown&&(a=e.handleAutoShown("axisLine")),!!a){var i=t.axis.getExtent(),o=n.transform,s=[i[0],0],u=[i[1],0],l=s[0]>u[0];o&&(Ht(s,s,o),Ht(u,u,o));var f=O({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new yn({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:f,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});ni(h.shape,h.style.lineWidth),h.anid="line",r.add(h);var c=t.get(["axisLine","symbol"]);if(c!=null){var v=t.get(["axisLine","symbolSize"]);z(c)&&(c=[c,c]),(z(v)||ft(v))&&(v=[v,v]);var d=YC(t.get(["axisLine","symbolOffset"])||0,v),g=v[0],p=v[1];M([{rotate:e.rotation+Math.PI/2,offset:d[0],r:0},{rotate:e.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(y,m){if(c[m]!=="none"&&c[m]!=null){var _=gh(c[m],-g/2,-p/2,g,p,f.stroke,!0),S=y.r+y.offset,w=l?u:s;_.attr({rotation:y.rotate,x:w[0]+S*Math.cos(e.rotation),y:w[1]-S*Math.sin(e.rotation),silent:!0,z2:11}),r.add(_)}})}}},axisTickLabel:function(e,t,r,n){var a=SL(r,n,t,e),i=wL(r,n,t,e);if(_L(t,i,a),xL(r,n,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=km(G(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));Fm(o)}},axisName:function(e,t,r,n){var a=Jn(e.axisName,t.get("name"));if(!!a){var i=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),u=t.get("nameGap")||0,l=t.axis.getExtent(),f=l[0]>l[1]?-1:1,h=[i==="start"?l[0]-f*u:i==="end"?l[1]+f*u:(l[0]+l[1])/2,Ud(i)?e.labelOffset+o*u:0],c,v=t.get("nameRotate");v!=null&&(v=v*Sr/180);var d;Ud(i)?c=dn.innerTextLayout(e.rotation,v!=null?v:e.rotation,o):(c=mL(e.rotation,i,v||0,l),d=e.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var g=s.getFont(),p=t.get("nameTruncate",!0)||{},y=p.ellipsis,m=Jn(e.nameTruncateMaxWidth,p.maxWidth,d),_=new Vt({x:h[0],y:h[1],rotation:c.rotation,silent:dn.isLabelSilent(t),style:Ar(s,{text:a,font:g,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(Jf({el:_,componentModel:t,itemName:a}),_.__fullText=a,_.anid="name",t.get("triggerEvent")){var S=dn.makeAxisEventDataBase(t);S.targetType="axisName",S.name=a,lt(_).eventData=S}n.add(_),_.updateTransform(),r.add(_),_.decomposeTransform()}}};function mL(e,t,r,n){var a=gg(r-e),i,o,s=n[0]>n[1],u=t==="start"&&!s||t!=="start"&&s;return Ho(a-Sr/2)?(o=u?"bottom":"top",i="center"):Ho(a-Sr*1.5)?(o=u?"top":"bottom",i="center"):(o="middle",aSr/2?i=u?"left":"right":i=u?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function _L(e,t,r){if(!xm(e.axis)){var n=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var i=t[0],o=t[1],s=t[t.length-1],u=t[t.length-2],l=r[0],f=r[1],h=r[r.length-1],c=r[r.length-2];n===!1?(se(i),se(l)):Wd(i,o)&&(n?(se(o),se(f)):(se(i),se(l))),a===!1?(se(s),se(h)):Wd(u,s)&&(a?(se(u),se(c)):(se(s),se(h)))}}function se(e){e&&(e.ignore=!0)}function Wd(e,t){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!r||!n)){var a=gi([]);return hs(a,a,-e.rotation),r.applyTransform(xr([],a,e.getLocalTransform())),n.applyTransform(xr([],a,t.getLocalTransform())),r.intersect(n)}}function Ud(e){return e==="middle"||e==="center"}function Xm(e,t,r,n,a){for(var i=[],o=[],s=[],u=0;u=0||e===t}function AL(e){var t=Lh(e);if(!!t){var r=t.axisPointerModel,n=t.axis.scale,a=r.option,i=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=vf(r);i==null&&(a.status=s?"show":"hide");var u=n.getExtent().slice();u[0]>u[1]&&u.reverse(),(o==null||o>u[1])&&(o=u[1]),os)return!0;if(o){var u=Lh(t).seriesDataCount,l=a.getExtent();return Math.abs(l[0]-l[1])/u>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,a,i){},e.prototype.createPointerEl=function(t,r,n,a){var i=r.pointer;if(i){var o=en(t).pointerEl=new lb[i.type](Xd(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,a){if(r.label){var i=en(t).labelEl=new Vt(Xd(r.label));t.add(i),Zd(i,a)}},e.prototype.updatePointerEl=function(t,r,n){var a=en(t).pointerEl;a&&r.pointer&&(a.setStyle(r.pointer.style),n(a,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,a){var i=en(t).labelEl;i&&(i.setStyle(r.label.style),n(i,{x:r.label.x,y:r.label.y}),Zd(i,a))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=r.getModel("handle"),o=r.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=Qf(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){Hp(l.event)},onmousedown:ju(this._onHandleDragMove,this,0,0),drift:ju(this._onHandleDragMove,this),ondragend:ju(this._onHandleDragEnd,this)}),n.add(a)),Kd(a,r,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=i.get("size");B(u)||(u=[u,u]),a.scaleX=u[0]/2,a.scaleY=u[1]/2,x0(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){qd(this._axisPointerModel,!r&&this._moveAnimation,this._handle,tl(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(!!n){this._dragging=!0;var a=this.updateHandleTransform(tl(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(tl(a)),en(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(!!t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(!!t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,a=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),a&&r.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),Zl(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function qd(e,t,r,n){Jm(en(r).lastProp,n)||(en(r).lastProp=n,t?te(r,n,e):(r.stopAnimation(),r.attr(n)))}function Jm(e,t){if(W(e)&&W(t)){var r=!0;return M(t,function(n,a){r=r&&Jm(e[a],n)}),!!r}else return e===t}function Zd(e,t){e[t.get(["label","show"])?"show":"hide"]()}function tl(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Kd(e,t,r){var n=t.get("z"),a=t.get("zlevel");e&&e.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=r)})}const GL=zL;function HL(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function VL(e,t,r,n,a){var i=r.get("value"),o=jm(i,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),u=bi(s.get("padding")||0),l=s.getFont(),f=Ef(o,l),h=a.position,c=f.width+u[1]+u[3],v=f.height+u[0]+u[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),WL(h,c,v,n);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=t.get(["axisLine","lineStyle","color"])),e.label={x:h[0],y:h[1],style:Ar(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:p}),z2:10}}function WL(e,t,r,n){var a=n.getWidth(),i=n.getHeight();e[0]=Math.min(e[0]+t,a)-t,e[1]=Math.min(e[1]+r,i)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function jm(e,t,r,n,a){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:a.precision}),o=a.formatter;if(o){var s={value:Mh(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};M(n,function(u){var l=r.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,h=l&&l.getDataParams(f);h&&s.seriesData.push(h)}),z(o)?i=o.replace("{value}",i):q(o)&&(i=o(s))}return i}function t_(e,t,r){var n=gn();return hs(n,n,r.rotation),ko(n,n,r.position),Kf([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function UL(e,t,r,n,a,i){var o=qm.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=a.get(["label","margin"]),VL(t,n,a,i,{position:t_(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function YL(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function $L(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function $P(e,t,r,n,a,i){return{cx:e,cy:t,r0:r,r:n,startAngle:a,endAngle:i,clockwise:!0}}var XL=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,a,i,o){var s=a.axis,u=s.grid,l=i.get("type"),f=Qd(u,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var c=HL(i),v=qL[l](s,h,f);v.style=c,r.graphicKey=v.type,r.pointer=v}var d=hf(u.model,a);UL(n,r,d,a,i,o)},t.prototype.getHandleTransform=function(r,n,a){var i=hf(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=t_(n.axis,r,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,a,i){var o=a.axis,s=o.grid,u=o.getGlobalExtent(!0),l=Qd(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[r.x,r.y];h[f]+=n[f],h[f]=Math.min(u[1],h[f]),h[f]=Math.max(u[0],h[f]);var c=(l[1]+l[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(GL);function Qd(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var qL={line:function(e,t,r){var n=YL([t,r[0]],[t,r[1]],Jd(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),a=r[1]-r[0];return{type:"Rect",shape:$L([t-n/2,r[0]],[n,a],Jd(e))}}};function Jd(e){return e.dim==="x"?0:1}const ZL=XL;var KL=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(dt);const QL=KL;var tr=yt(),JL=M;function e_(e,t,r){if(!j.node){var n=t.getZr();tr(n).records||(tr(n).records={}),jL(n,t);var a=tr(n).records[e]||(tr(n).records[e]={});a.handler=r}}function jL(e,t){if(tr(e).initialized)return;tr(e).initialized=!0,r("click",_t(jd,"click")),r("mousemove",_t(jd,"mousemove")),r("globalout",e2);function r(n,a){e.on(n,function(i){var o=r2(t);JL(tr(e).records,function(s){s&&a(s,i,o.dispatchAction)}),t2(o.pendings,t)})}}function t2(e,t){var r=e.showTip.length,n=e.hideTip.length,a;r?a=e.showTip[r-1]:n&&(a=e.hideTip[n-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function e2(e,t,r){e.handler("leave",null,r)}function jd(e,t,r,n){t.handler(e,r,n)}function r2(e){var t={showTip:[],hideTip:[]},r=function(n){var a=t[n.type];a?a.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function df(e,t){if(!j.node){var r=t.getZr(),n=(tr(r).records||{})[e];n&&(tr(r).records[e]=null)}}var n2=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){var i=n.getComponent("tooltip"),o=r.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";e_("axisPointer",a,function(s,u,l){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&l({type:"updateAxisPointer",currTrigger:s,x:u&&u.offsetX,y:u&&u.offsetY})})},t.prototype.remove=function(r,n){df("axisPointer",n)},t.prototype.dispose=function(r,n){df("axisPointer",n)},t.type="axisPointer",t}(Ye);const a2=n2;function r_(e,t){var r=[],n=e.seriesIndex,a;if(n==null||!(a=t.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=Si(i,e);if(o==null||o<0||B(o))return{point:[]};var s=i.getItemGraphicEl(o),u=a.coordinateSystem;if(a.getTooltipPosition)r=a.getTooltipPosition(o)||[];else if(u&&u.dataToPoint)if(e.isStacked){var l=u.getBaseAxis(),f=u.getOtherAxis(l),h=f.dim,c=l.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),r=u.dataToPoint(g)||[]}else r=u.dataToPoint(i.getValues(G(u.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var p=s.getBoundingRect().clone();p.applyTransform(s.transform),r=[p.x+p.width/2,p.y+p.height/2]}return{point:r,el:s}}var tp=yt();function i2(e,t,r){var n=e.currTrigger,a=[e.x,e.y],i=e,o=e.dispatchAction||vt(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(!!s){Po(a)&&(a=r_({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var u=Po(a),l=i.axesInfo,f=s.axesInfo,h=n==="leave"||Po(a),c={},v={},d={list:[],map:{}},g={showPointer:_t(s2,v),showTooltip:_t(u2,d)};M(s.coordSysMap,function(y,m){var _=u||y.containPoint(a);M(s.coordSysAxesInfo[m],function(S,w){var x=S.axis,b=v2(l,S);if(!h&&_&&(!l||b)){var T=b&&b.value;T==null&&!u&&(T=x.pointToData(a)),T!=null&&ep(S,T,g,!1,c)}})});var p={};return M(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&M(_.axesInfo,function(S,w){var x=v[w];if(S!==y&&x){var b=x.value;_.mapper&&(b=y.axis.scale.parse(_.mapper(b,rp(S),rp(y)))),p[y.key]=b}})}),M(p,function(y,m){ep(f[m],y,g,!0,c)}),l2(v,f,c),f2(d,a,e,o),h2(f,o,r),c}}function ep(e,t,r,n,a){var i=e.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=o2(t,e),s=o.payloadBatch,u=o.snapToValue;s[0]&&a.seriesIndex==null&&O(a,s[0]),!n&&e.snap&&i.containData(u)&&u!=null&&(t=u),r.showPointer(e,t,s),r.showTooltip(e,o,u)}}function o2(e,t){var r=t.axis,n=r.dim,a=e,i=[],o=Number.MAX_VALUE,s=-1;return M(t.seriesModels,function(u,l){var f=u.getData().mapDimensionsAll(n),h,c;if(u.getAxisTooltipData){var v=u.getAxisTooltipData(f,e,r);c=v.dataIndices,h=v.nestestValue}else{if(c=u.getData().indicesOfNearest(f[0],e,r.type==="category"?.5:null),!c.length)return;h=u.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=e-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:u.seriesIndex,dataIndexInside:p,dataIndex:u.getData().getRawIndex(p)})}))}}),{payloadBatch:i,snapToValue:a}}function s2(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function u2(e,t,r,n){var a=r.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var u=t.coordSys.model,l=ci(u),f=e.map[l];f||(f=e.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},e.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 l2(e,t,r){var n=r.axesInfo=[];M(t,function(a,i){var o=a.axisPointerModel.option,s=e[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 f2(e,t,r,n){if(Po(t)||!e.list.length){n({type:"hideTip"});return}var a=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:e.list})}function h2(e,t,r){var n=r.getZr(),a="axisPointerLastHighlights",i=tp(n)[a]||{},o=tp(n)[a]={};M(e,function(l,f){var h=l.axisPointerModel.option;h.status==="show"&&M(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],u=[];M(i,function(l,f){!o[f]&&u.push(l)}),M(o,function(l,f){!i[f]&&s.push(l)}),u.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function v2(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function rp(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function Po(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function n_(e){Zm.registerAxisPointerClass("CartesianAxisPointer",ZL),e.registerComponentModel(QL),e.registerComponentView(a2),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!B(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=bL(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},i2)}function XP(e){_n(FL),_n(n_)}function qP(e,t,r){var n=t.getBoxLayoutParams(),a=t.get("padding"),i={width:r.getWidth(),height:r.getHeight()},o=Lr(n,i,a);Qn(t.get("orient"),e,t.get("itemGap"),o.width,o.height),Bb(e,n,i,a)}function c2(e,t){var r=bi(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new Ct({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),e}var d2=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}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}(dt);const p2=d2;function a_(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function i_(e){if(!!j.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",u+="translateY(-50%) rotate("+(l=i==="left"?-225:-45)+"deg)"):(s+="left:50%",u+="translateX(-50%) rotate("+(l=i==="top"?225:45)+"deg)");var f=l*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;",s+";"+u+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function w2(e,t){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+e/2+"s "+r,a="opacity"+n+",visibility"+n;return t||(n=" "+e+"s "+r,a+=j.transformSupported?","+Ih+n:",left"+n+",top"+n),m2+":"+a}function np(e,t,r){var n=e.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!j.transformSupported)return r?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=j.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return r?"top:0;left:0;"+Ih+":"+o+";":[["top",0],["left",0],[o_,o]]}function b2(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont()),r&&t.push("line-height:"+Math.round(r*3/2)+"px");var a=e.get("textShadowColor"),i=e.get("textShadowBlur")||0,o=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return a&&i&&t.push("text-shadow:"+o+"px "+s+"px "+i+"px "+a),M(["decoration","align"],function(u){var l=e.get(u);l&&t.push("text-"+u+":"+l)}),t.join(";")}function T2(e,t,r){var n=[],a=e.get("transitionDuration"),i=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),u=e.get("shadowOffsetX"),l=e.get("shadowOffsetY"),f=e.getModel("textStyle"),h=m0(e,"html"),c=u+"px "+l+"px "+o+"px "+s;return n.push("box-shadow:"+c),t&&a&&n.push(w2(a,r)),i&&n.push("background-color:"+i),M(["width","color","radius"],function(v){var d="border-"+v,g=Gy(d),p=e.get(g);p!=null&&n.push(d+":"+p+(v==="color"?"":"px"))}),n.push(b2(f)),h!=null&&n.push("padding:"+bi(h).join("px ")+"px"),n.join(";")+";"}function ap(e,t,r,n,a){var i=t&&t.painter;if(r){var o=i&&i.getViewportRoot();o&&Q_(e,o,document.body,n,a)}else{e[0]=n,e[1]=a;var s=i&&i.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var C2=function(){function e(t,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,j.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;ap(this._styleCoord,i,o,r.getWidth()/2,r.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(u){if(u=u||window.event,!s._enterable){var l=i.handler,f=i.painter.getViewportRoot();le(f,u,!0),l.dispatch("mousemove",u)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){var r=this._container,n=y2(r,"position"),a=r.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative");var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=_2+T2(t,!this._firstShow,this._longHide)+np(i[0],i[1],!0)+("border-color:"+oi(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,a,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(z(i)&&n.get("trigger")==="item"&&!a_(n)&&(s=x2(n,a,i)),z(t))o.innerHTML=t+s;else if(t){o.innerHTML="",B(t)||(t=[t]);for(var u=0;u=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,a=this._api,i=r.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(r,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,a,i){if(!(i.from===this.uid||j.node||!a.getDom())){var o=sp(i,a);this._ticket="";var s=i.dataByCoordSys,u=O2(i,n,a);if(u){var l=u.el.getBoundingRect().clone();l.applyTransform(u.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:u.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=L2;f.x=i.x,f.y=i.y,f.update(),lt(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(r,n,a,i))return;var h=r_(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(r,n,a,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(sp(i,a))},t.prototype._manuallyAxisShowTip=function(r,n,a,i){var o=i.seriesIndex,s=i.dataIndex,u=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||u==null)){var l=n.getSeriesByIndex(o);if(!!l){var f=l.getData(),h=La([f.getItemModel(s),l,(l.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(r,n){var a=r.target,i=this._tooltipModel;if(!!i){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(a){this._lastDataByCoordSys=null;var s,u;Na(a,function(l){if(lt(l).dataIndex!=null)return s=l,!0;if(lt(l).tooltipConfig!=null)return u=l,!0},!0),s?this._showSeriesItemTooltip(r,s,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var a=r.get("showDelay");n=vt(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},t.prototype._showAxisTooltip=function(r,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=La([n.tooltipOption],i),u=this._renderMode,l=[],f=li("section",{blocks:[],noHeader:!0}),h=[],c=new Lu;M(r,function(m){M(m.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var x=jm(w,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),b=li("section",{header:x,noHeader:!be(x),sortBlocks:!0,blocks:[]});f.blocks.push(b),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=Mh(S.axis,{value:w}),D.axisValueLabel=x,D.marker=c.makeTooltipMarker("item",oi(D.color),u);var L=_c(C.formatTooltip(A,!0,null)),I=L.frag;if(I){var P=La([C],i).get("valueFormatter");b.blocks.push(P?O({valueFormatter:P},I):I)}L.text&&h.push(L.text),l.push(D)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,d=s.get("order"),g=Cc(f,c,u,d,a.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var p=u==="richText"?` `:"
",y=h.join(p);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,l)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(s,y,l,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(r,n,a){var i=this._ecModel,o=lt(n),s=o.seriesIndex,u=i.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,h=o.dataType,c=l.getData(h),v=this._renderMode,d=r.positionDefault,g=La([c.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=g.get("trigger");if(!(p!=null&&p!=="item")){var y=l.getDataParams(f,h),m=new Lu;y.marker=m.makeTooltipMarker("item",oi(y.color),v);var _=_c(l.formatTooltip(f,!1,h)),S=g.get("order"),w=g.get("valueFormatter"),x=_.frag,b=x?Cc(w?O({valueFormatter:w},x):x,m,v,S,i.get("useUTC"),g.get("textStyle")):_.text,T="item_"+l.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,b,y,T,r.offsetX,r.offsetY,r.position,r.target,m)}),a({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,a){var i=lt(n),o=i.tooltipConfig,s=o.option||{};if(z(s)){var u=s;s={content:u,formatter:u}}var l=[s],f=this._ecModel.getComponent(i.componentMainType,i.componentIndex);f&&l.push(f),l.push({formatter:s.content});var h=r.positionDefault,c=La(l,this._tooltipModel,h?{position:h}:null),v=c.get("content"),d=Math.random()+"",g=new Lu;this._showOrMove(c,function(){var p=rt(c.get("formatterParams")||{});this._showTooltipContent(c,v,p,d,r.offsetX,r.offsetY,r.position,n,g)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,a,i,o,s,u,l,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var c=r.get("formatter");u=u||r.get("position");var v=n,d=this._getNearestPoint([o,s],a,r.get("trigger"),r.get("borderColor")),g=d.color;if(c)if(z(c)){var p=r.ecModel.get("useUTC"),y=B(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=ws(y.axisValue,v,p)),v=Hy(v,a,!0)}else if(q(c)){var _=vt(function(S,w){S===this._ticket&&(h.setContent(w,f,r,g,u),this._updatePosition(r,u,o,s,h,a,l))},this);this._ticket=i,v=c(a,i,_)}else v=c;h.setContent(v,f,r,g,u),h.show(r,g),this._updatePosition(r,u,o,s,h,a,l)}},t.prototype._getNearestPoint=function(r,n,a,i){if(a==="axis"||B(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!B(n))return{color:i||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,a,i,o,s,u){var l=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),c=r.get("align"),v=r.get("verticalAlign"),d=u&&u.getBoundingRect().clone();if(u&&d.applyTransform(u.transform),q(n)&&(n=n([a,i],s,o.el,d,{viewSize:[l,f],contentSize:h.slice()})),B(n))a=st(n[0],l),i=st(n[1],f);else if(W(n)){var g=n;g.width=h[0],g.height=h[1];var p=Lr(g,{width:l,height:f});a=p.x,i=p.y,c=null,v=null}else if(z(n)&&u){var y=E2(n,d,h,r.get("borderWidth"));a=y[0],i=y[1]}else{var y=P2(a,i,o,l,f,c?null:20,v?null:20);a=y[0],i=y[1]}if(c&&(a-=up(c)?h[0]/2:c==="right"?h[0]:0),v&&(i-=up(v)?h[1]/2:v==="bottom"?h[1]:0),a_(r)){var y=R2(a,i,o,l,f);a=y[0],i=y[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===r.length;return o&&M(a,function(s,u){var l=s.dataByAxis||[],f=r[u]||{},h=f.dataByAxis||[];o=o&&l.length===h.length,o&&M(l,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(y,m){var _=p[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&M(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){j.node||!n.getDom()||(Zl(this,"_updatePosition"),this._tooltipContent.dispose(),df("itemTooltip",n))},t.type="tooltip",t}(Ye);function La(e,t,r){var n=t.ecModel,a;r?(a=new kt(r,n,n),a=new kt(t.option,a,n)):a=t;for(var i=e.length-1;i>=0;i--){var o=e[i];o&&(o instanceof kt&&(o=o.get("tooltip",!0)),z(o)&&(o={formatter:o}),o&&(a=new kt(o,a,n)))}return a}function sp(e,t){return e.dispatchAction||vt(t.dispatchAction,t)}function P2(e,t,r,n,a,i,o){var s=r.getSize(),u=s[0],l=s[1];return i!=null&&(e+u+i+2>n?e-=u+i:e+=i),o!=null&&(t+l+o>a?t-=l+o:t+=o),[e,t]}function R2(e,t,r,n,a){var i=r.getSize(),o=i[0],s=i[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,a)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function E2(e,t,r,n){var a=r[0],i=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,u=0,l=t.width,f=t.height;switch(e){case"inside":s=t.x+l/2-a/2,u=t.y+f/2-i/2;break;case"top":s=t.x+l/2-a/2,u=t.y-i-o;break;case"bottom":s=t.x+l/2-a/2,u=t.y+f+o;break;case"left":s=t.x-a-o,u=t.y+f/2-i/2;break;case"right":s=t.x+l+o,u=t.y+f/2-i/2}return[s,u]}function up(e){return e==="center"||e==="middle"}function O2(e,t,r){var n=Ff(e).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=xi(t,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(!!o){var s=r.getViewOfComponentModel(o),u;if(s.group.traverse(function(l){var f=lt(l).tooltipConfig;if(f&&f.name===e.name)return u=l,!0}),u)return{componentMainType:a,componentIndex:o.componentIndex,el:u}}}}const k2=I2;function ZP(e){_n(n_),e.registerComponentModel(p2),e.registerComponentView(k2),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Gt),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Gt)}var B2=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}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}(dt),N2=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){if(this.group.removeAll(),!!r.get("show")){var i=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),u=r.get("textAlign"),l=K(r.get("textBaseline"),r.get("textVerticalAlign")),f=new Vt({style:Ar(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=r.get("subtext"),v=new Vt({style:Ar(s,{text:c,fill:s.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=r.get("link"),g=r.get("sublink"),p=r.get("triggerEvent",!0);f.silent=!d&&!p,v.silent=!g&&!p,d&&f.on("click",function(){ec(d,"_"+r.get("target"))}),g&&v.on("click",function(){ec(g,"_"+r.get("subtarget"))}),lt(f).eventData=lt(v).eventData=p?{componentType:"title",componentIndex:r.componentIndex}:null,i.add(f),c&&i.add(v);var y=i.getBoundingRect(),m=r.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Lr(m,{width:a.getWidth(),height:a.getHeight()},r.get("padding"));u||(u=r.get("left")||r.get("right"),u==="middle"&&(u="center"),u==="right"?_.x+=_.width:u==="center"&&(_.x+=_.width/2)),l||(l=r.get("top")||r.get("bottom"),l==="center"&&(l="middle"),l==="bottom"?_.y+=_.height:l==="middle"&&(_.y+=_.height/2),l=l||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var S={align:u,verticalAlign:l};f.setStyle(S),v.setStyle(S),y=i.getBoundingRect();var w=_.margin,x=r.getItemStyle(["color","opacity"]);x.fill=r.get("backgroundColor");var b=new Ct({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:r.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}},t.type="title",t}(Ye);function KP(e){e.registerComponentModel(B2),e.registerComponentView(N2)}var F2=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},z2=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,a=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),B(n)&&M(n,function(i,o){z(i)&&(i={type:i}),n[o]=at(i,F2(a,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[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}(dt);const pf=z2;var Nn=_t,gf=M,co=de,G2=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new co),this.group.add(this._selectorGroup=new co),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var u=r.get("selector",!0),l=r.get("selectorPosition",!0);u&&(!l||l==="auto")&&(l=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,a,u,s,l);var f=r.getBoxLayoutParams(),h={width:a.getWidth(),height:a.getHeight()},c=r.get("padding"),v=Lr(f,h,c),d=this.layoutInner(r,o,v,i,u,l),g=Lr(Q({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=c2(d,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,a,i,o,s,u){var l=this.getContentGroup(),f=$(),h=n.get("selectedMode"),c=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),gf(n.getData(),function(v,d){var g=v.get("name");if(!this.newlineDisabled&&(g===""||g===` `)){var p=new co;p.newline=!0,l.add(p);return}var y=a.getSeriesByName(g)[0];if(!f.get(g))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,g,d,v,n,r,_,w,S,h,i);x.on("click",Nn(lp,g,null,i,c)).on("mouseover",Nn(yf,y.name,null,i,c)).on("mouseout",Nn(mf,y.name,null,i,c)),f.set(g,!0)}else a.eachRawSeries(function(b){if(!f.get(g)&&b.legendVisualProvider){var T=b.legendVisualProvider;if(!T.containName(g))return;var C=T.indexOfName(g),A=T.getItemVisual(C,"style"),D=T.getItemVisual(C,"legendIcon"),L=Qt(A.fill);L&&L[3]===0&&(L[3]=.2,A=O(O({},A),{fill:Ir(L,"rgba")}));var I=this._createItem(b,g,d,v,n,r,{},A,D,h,i);I.on("click",Nn(lp,null,g,i,c)).on("mouseover",Nn(yf,null,g,i,c)).on("mouseout",Nn(mf,null,g,i,c)),f.set(g,!0)}},this)},this),o&&this._createSelector(o,n,i,s,u)},t.prototype._createSelector=function(r,n,a,i,o){var s=this.getSelectorGroup();gf(r,function(l){var f=l.type,h=new Vt({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"]);th(h,{normal:c,emphasis:v},{defaultText:l.title}),Bl(h)})},t.prototype._createItem=function(r,n,a,i,o,s,u,l,f,h,c){var v=r.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),p=o.isSelected(n),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=H2(f,i,u,l,v,p,c),w=new co,x=i.getModel("textStyle");if(q(r.getLegendIcon)&&(!_||_==="inherit"))w.add(r.getLegendIcon({itemWidth:d,itemHeight:g,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;w.add(V2({itemWidth:d,itemHeight:g,icon:f,iconRotate:b,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,A=o.get("formatter"),D=n;z(A)&&A?D=A.replace("{name}",n!=null?n:""):q(A)&&(D=A(n));var L=i.get("inactiveColor");w.add(new Vt({style:Ar(x,{text:D,x:T,y:g/2,fill:p?x.getTextColor():L,align:C,verticalAlign:"middle"})}));var I=new Ct({shape:w.getBoundingRect(),invisible:!0}),P=i.getModel("tooltip");return P.get("show")&&Jf({el:I,componentModel:o,itemName:n,itemTooltipOption:P.option}),w.add(I),w.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(w),Bl(w),w.__legendDataIndex=a,w},t.prototype.layoutInner=function(r,n,a,i,o,s){var u=this.getContentGroup(),l=this.getSelectorGroup();Qn(r.get("orient"),u,r.get("itemGap"),a.width,a.height);var f=u.getBoundingRect(),h=[-f.x,-f.y];if(l.markRedraw(),u.markRedraw(),o){Qn("horizontal",l,r.get("selectorItemGap",!0));var c=l.getBoundingRect(),v=[-c.x,-c.y],d=r.get("selectorButtonGap",!0),g=r.getOrient().index,p=g===0?"width":"height",y=g===0?"height":"width",m=g===0?"y":"x";s==="end"?v[g]+=f[p]+d:h[g]+=c[p]+d,v[1-g]+=f[y]/2-c[y]/2,l.x=v[0],l.y=v[1],u.x=h[0],u.y=h[1];var _={x:0,y:0};return _[p]=f[p]+d+c[p],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-g]),_}else return u.x=h[0],u.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Ye);function H2(e,t,r,n,a,i,o){function s(p,y){p.lineWidth==="auto"&&(p.lineWidth=y.lineWidth>0?2:0),gf(p,function(m,_){p[_]==="inherit"&&(p[_]=y[_])})}var u=t.getModel("itemStyle"),l=u.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",h=u.getShallow("decal");l.decal=!h||h==="inherit"?n.decal:tf(h,o),l.fill==="inherit"&&(l.fill=n[a]),l.stroke==="inherit"&&(l.stroke=n[f]),l.opacity==="inherit"&&(l.opacity=(a==="fill"?n:r).opacity),s(l,n);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,r),l.fill==="auto"&&(l.fill=n.fill),l.stroke==="auto"&&(l.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var d=t.get("inactiveBorderWidth"),g=l[f];l.lineWidth=d==="auto"?n.lineWidth>0&&g?2:0:l.lineWidth,l.fill=t.get("inactiveColor"),l.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:l,lineStyle:v}}function V2(e){var t=e.icon||"roundRect",r=gh(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function lp(e,t,r,n){mf(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e!=null?e:t}),yf(e,t,r,n)}function u_(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,a=t.length;na[o],p=[-v.x,-v.y];n||(p[i]=f[l]);var y=[0,0],m=[-d.x,-d.y],_=K(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var S=r.get("pageButtonPosition",!0);S==="end"?m[i]+=a[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,f.setPosition(p),h.setPosition(y),c.setPosition(m);var w={x:0,y:0};if(w[o]=g?a[o]:v[o],w[s]=Math.max(v[s],d[s]),w[u]=Math.min(0,d[u]+m[1-i]),h.__rectSize=a[o],g){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=w[s],h.setClipPath(new Ct({shape:x})),h.__rectSize=x[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(r);return b.pageIndex!=null&&te(f,{x:b.contentPosition[0],y:b.contentPosition[1]},g?r:null),this._updatePageInfoView(r,b),w},t.prototype._pageGo=function(r,n,a){var i=this._getPageInfo(n)[r];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},t.prototype._updatePageInfoView=function(r,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?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var i=a.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,u=s!=null?s+1:0,l=n.pageCount;i&&o&&i.setStyle("text",z(o)?o.replace("{current}",u==null?"":u+"").replace("{total}",l==null?"":l+""):o({current:u,total:l}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=r.getOrient().index,s=el[o],u=rl[o],l=this._findTargetItemIndex(n),f=a.children(),h=f[l],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=l+1,y=g,m=g,_=null;p<=c;++p)_=S(f[p]),(!_&&m.e>y.s+i||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var p=l-1,y=g,m=g,_=null;p>=-1;--p)_=S(f[p]),(!_||!w(m,_.s))&&y.i=b&&x.s<=b+i}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var u=o.__legendDataIndex;i==null&&u!=null&&(i=s),u===r&&(n=s)}),n!=null?n:i},t.type="legend.scroll",t}(l_);const q2=X2;function Z2(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(n)})})}function K2(e){_n(f_),e.registerComponentModel($2),e.registerComponentView(q2),Z2(e)}function QP(e){_n(f_),_n(K2)}var vp={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Q2=function(){function e(t){var r=this._condVal=z(t)?new RegExp(t):Rp(t)?t:null;if(r==null){var n="";et(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return z(r)?this._condVal.test(t):ft(r)?this._condVal.test(t+""):!1},e}(),J2=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),j2=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r2&&n.push(a),a=[I,P]}function f(I,P,R,E){Un(I,R)&&Un(P,E)||a.push(I,P,R,E,R,E)}function h(I,P,R,E,U,k){var F=Math.abs(P-I),H=Math.tan(F/4)*4/3,Z=PT:D2&&n.push(a),n}function Sf(e,t,r,n,a,i,o,s,u,l){if(Un(e,r)&&Un(t,n)&&Un(a,o)&&Un(i,s)){u.push(o,s);return}var f=2/l,h=f*f,c=o-e,v=s-t,d=Math.sqrt(c*c+v*v);c/=d,v/=d;var g=r-e,p=n-t,y=a-o,m=i-s,_=g*g+p*p,S=y*y+m*m;if(_=0&&T=0){u.push(o,s);return}var C=[],A=[];Tr(e,r,a,o,.5,C),Tr(t,n,i,s,.5,A),Sf(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],u,l),Sf(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],u,l)}function hI(e,t){var r=_f(e),n=[];t=t||1;for(var a=0;a0)for(var l=0;lMath.abs(l),h=v_([u,l],f?0:1,t),c=(f?s:l)/h.length,v=0;va,o=v_([n,a],i?0:1,t),s=i?"width":"height",u=i?"height":"width",l=i?"x":"y",f=i?"y":"x",h=e[s]/o.length,c=0;c1?null:new V(g*u+e,g*l+t)}function dI(e,t,r){var n=new V;V.sub(n,r,t),n.normalize();var a=new V;V.sub(a,e,t);var i=a.dot(n);return i}function Fn(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function pI(e,t,r){for(var n=e.length,a=[],i=0;io?(l.x=f.x=s+i/2,l.y=u,f.y=u+o):(l.y=f.y=u+o/2,l.x=s,f.x=s+i),pI(t,l,f)}function as(e,t,r,n){if(r===1)n.push(t);else{var a=Math.floor(r/2),i=e(t);as(e,i[0],a,n),as(e,i[1],r-a,n)}return n}function gI(e,t){for(var r=[],n=0;n0)for(var w=n/r,x=-n/2;x<=n/2;x+=w){for(var b=Math.sin(x),T=Math.cos(x),C=0,_=0;_0;l/=2){var f=0,h=0;(e&l)>0&&(f=1),(t&l)>0&&(h=1),s+=l*l*(3*f^h),h===0&&(f===1&&(e=l-1-e,t=l-1-t),u=e,e=t,t=u)}return s}function ss(e){var t=1/0,r=1/0,n=-1/0,a=-1/0,i=G(e,function(s){var u=s.getBoundingRect(),l=s.getComputedTransform(),f=u.x+u.width/2+(l?l[4]:0),h=u.y+u.height/2+(l?l[5]:0);return t=Math.min(f,t),r=Math.min(h,r),n=Math.max(f,n),a=Math.max(h,a),[f,h]}),o=G(i,function(s,u){return{cp:s,z:CI(s[0],s[1],t,r,n,a),path:e[u]}});return o.sort(function(s,u){return s.z-u.z}).map(function(s){return s.path})}function p_(e){return _I(e.path,e.count)}function xf(){return{fromIndividuals:[],toIndividuals:[],count:0}}function MI(e,t,r){var n=[];function a(w){for(var x=0;x=0;a--)if(!r[a].many.length){var u=r[s].many;if(u.length<=1)if(s)s=0;else return r;var i=u.length,l=Math.ceil(i/2);r[a].many=u.slice(l,i),r[s].many=u.slice(0,l),s++}return r}var AI={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o),l,f;Sp(e)&&(l=e,f=t),Sp(t)&&(l=t,f=e);function h(y,m,_,S,w){var x=y.many,b=y.one;if(x.length===1&&!w){var T=m?x[0]:b,C=m?b:x[0];if(is(T))h({many:[T],one:C},!0,_,S,!0);else{var A=s?Q({delay:s(_,S)},u):u;Rh(T,C,A),i(T,C,T,C,A)}}else for(var D=Q({dividePath:AI[r],individualDelay:s&&function(U,k,F,H){return s(U+_,S)}},u),L=m?MI(x,b,D):DI(b,x,D),I=L.fromIndividuals,P=L.toIndividuals,R=I.length,E=0;Et.length,v=l?xp(f,l):xp(c?t:e,[c?e:t]),d=0,g=0;gg_))for(var a=n.getIndices(),i=II(n),o=0;o0&&S.group.traverse(function(x){x instanceof nt&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function bp(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function Tp(e){return B(e)?e.sort().join(","):e}function dr(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function EI(e,t){var r=$(),n=$(),a=$();return M(e.oldSeries,function(i,o){var s=e.oldData[o],u=bp(i),l=Tp(u);n.set(l,s),B(u)&&M(u,function(f){a.set(f,{data:s,key:l})})}),M(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.getData(),s=bp(i),u=Tp(s),l=n.get(u);if(l)r.set(u,{oldSeries:[{divide:dr(l),data:l}],newSeries:[{divide:dr(o),data:o}]});else if(B(s)){var f=[];M(s,function(v){var d=n.get(v);d&&f.push({divide:dr(d),data:d})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{data:o,divide:dr(o)}]})}else{var h=a.get(s);if(h){var c=r.get(h.key);c||(c={oldSeries:[{data:h.data,divide:dr(h.data)}],newSeries:[]},r.set(h.key,c)),c.newSeries.push({data:o,divide:dr(o)})}}}}),r}function Cp(e,t){for(var r=0;r=0&&a.push({data:t.oldData[s],divide:dr(t.oldData[s]),dim:o.dimension})}),M(gt(e.to),function(o){var s=Cp(r.updatedSeries,o);if(s>=0){var u=r.updatedSeries[s].getData();i.push({data:u,divide:dr(u),dim:o.dimension})}}),a.length>0&&i.length>0&&y_(a,i,n)}function tR(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){M(gt(n.seriesTransition),function(a){M(gt(a.to),function(i){for(var o=n.updatedSeries,s=0;s=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=p.__endIndex;else for(var A=v.dpr,D=0;D0&&t>a[0]){for(u=0;ut);u++);s=n[a[u]]}if(a.splice(u+1,0,t),n[t]=r,!r.virtual)if(s){var l=s.dom;l.nextSibling?o.insertBefore(r.dom,l.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,a=0;a0?po:0),this._needsManuallyCompositing),f.__builtin__||ls("ZLevel "+l+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==u&&(f.__dirty=!0),f.__startIndex=u,f.incremental?f.__drawIndex=-1:f.__drawIndex=u,r(u),i=f),a.__dirty&ne&&!a.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=u))}r(u),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)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,M(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?at(n[t],r,!0):n[t]=r;for(var a=0;a