var p_=Object.defineProperty;var g_=(e,t,r)=>t in e?p_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var cc=(e,t,r)=>g_(e,typeof t!="symbol"?t+"":t,r);import{d as m_,aV as y_,D as yo,a1 as tg,G as eg,H as __,I as _l,aQ as Sl,j as Pi,P as S_,bz as T_,ah as w_,B as _o,c_ as Ks,bg as x_,bW as So}from"./index-B7nSi2no.js";/*! ***************************************************************************** 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 Tl=function(e,t){return Tl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Tl(e,t)};function z(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Tl(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var b_=(function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e})(),C_=(function(){function e(){this.browser=new b_,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})(),K=new C_;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(K.wxa=!0,K.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?K.worker=!0:!K.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(K.node=!0,K.svgSupported=!0):M_(navigator.userAgent,K);function M_(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[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);var s=t.domSupported=typeof document<"u";if(s){var u=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in u||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in u)&&!("OTransition"in u),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}}var Gf=12,D_="sans-serif",Sr=Gf+"px "+D_,A_=20,L_=100,I_="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function P_(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=B_&&(Qs=0),Qs++}function Yf(){for(var e=[],t=0;t>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",i[l]+":0",n[1-u]+":auto",i[1-l]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return t.clearMarkers=function(){b(r,function(f){f.parentNode&&f.parentNode.removeChild(f)})},r}function a1(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=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&&a&&c===a[h]&&v===a[h+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return u&&i?i:(t.srcCoords=o,t[n]=r?gc(s,o):gc(o,s))}function ug(e){return e.nodeName.toUpperCase()==="CANVAS"}var o1=/([&<>"'])/g,s1={"&":"&","<":"<",">":">",'"':""","'":"'"};function Yt(e){return e==null?"":(e+"").replace(o1,function(t,r){return s1[r]})}var u1=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,eu=[],l1=K.browser.firefox&&+K.browser.version.split(".")[0]<39;function Dl(e,t,r,n){return r=r||{},n?mc(e,t,r):l1&&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):mc(e,t,r),r}function mc(e,t,r){if(K.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(ug(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Ml(eu,e,n,i)){r.zrX=eu[0],r.zrY=eu[1];return}}r.zrX=r.zrY=0}function $f(e){return e||window.event}function le(e,t,r){if(t=$f(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Dl(e,o,t,r)}else{Dl(e,t,t,r);var a=f1(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&u1.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function f1(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function h1(e,t,r,n){e.addEventListener(t,r,n)}function c1(e,t,r,n){e.removeEventListener(t,r,n)}var lg=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function M2(e){return e.which===2||e.which===3}var v1=(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 i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=yc(n)/yc(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=d1(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Be(){return[1,0,0,1,0,0]}function ma(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function qf(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 Vi(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=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]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e}function Al(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 Kf(e,t,r,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],u=t[3],l=t[5],f=Math.sin(r),h=Math.cos(r);return e[0]=i*h+s*f,e[1]=-i*f+s*h,e[2]=a*h+u*f,e[3]=-a*f+h*u,e[4]=h*(o-n[0])+f*(l-n[1])+n[0],e[5]=h*(l-n[1])-f*(o-n[0])+n[1],e}function p1(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function ya(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],u=r*o-a*n;return u?(u=1/u,e[0]=o*u,e[1]=-a*u,e[2]=-n*u,e[3]=r*u,e[4]=(n*s-o*i)*u,e[5]=(a*i-r*s)*u,e):null}var ct=(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,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e})(),jr=Math.min,Fn=Math.max,Ll=Math.abs,_c=["x","y"],g1=["width","height"],Dr=new ct,Ar=new ct,Lr=new ct,Ir=new ct,te=fg(),Ei=te.minTv,Il=te.maxTv,Gi=[0,0],Z=(function(){function e(t,r,n,i){nu(this,t,r,n,i)}return e.set=function(t,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),t.x=r,t.y=n,t.width=i,t.height=a,t},e.prototype.union=function(t){var r=jr(t.x,this.x),n=jr(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Fn(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Fn(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){return m1(Be(),this,t)},e.prototype.intersect=function(t,r,n){return e.intersect(this,t,r,n)},e.intersect=function(t,r,n,i){n&&ct.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!r)return!1;t instanceof e||(t=nu(y1,t.x,t.y,t.width,t.height)),r instanceof e||(r=nu(_1,r.x,r.y,r.width,r.height));var s=!!n;te.reset(i,s);var u=te.touchThreshold,l=t.x+u,f=t.x+t.width-u,h=t.y+u,c=t.y+t.height-u,v=r.x+u,d=r.x+r.width-u,g=r.y+u,p=r.y+r.height-u;if(l>f||h>c||v>d||g>p)return!1;var m=!(f=t.x&&r<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},e.prototype.contain=function(t,r){return e.contain(this,t,r)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){Sc(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?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(t,r){return t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height,t},e.applyTransform=function(t,r,n){if(!n){t!==r&&Sc(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Dr.x=Lr.x=r.x,Dr.y=Ir.y=r.y,Ar.x=Ir.x=r.x+r.width,Ar.y=Lr.y=r.y+r.height,Dr.transform(n),Ir.transform(n),Ar.transform(n),Lr.transform(n),t.x=jr(Dr.x,Ar.x,Lr.x,Ir.x),t.y=jr(Dr.y,Ar.y,Lr.y,Ir.y);var u=Fn(Dr.x,Ar.x,Lr.x,Ir.x),l=Fn(Dr.y,Ar.y,Lr.y,Ir.y);t.width=u-t.x,t.height=l-t.y},e.calculateTransform=function(t,r,n){var i=n.width/r.width,a=n.height/r.height;return t=ma(t||[]),Al(t,t,js(iu,-r.x,-r.y)),p1(t,t,js(iu,i,a)),Al(t,t,js(iu,n.x,n.y)),t},e})();Z.create;var nu=Z.set,Sc=Z.copy,m1=Z.calculateTransform;Z.applyTransform;Z.contain;var y1=new Z(0,0,0,0),_1=new Z(0,0,0,0),iu=[];function Tc(e,t,r,n,i,a,o,s){var u=Ll(t-r),l=Ll(n-e),f=jr(u,l),h=_c[i],c=_c[1-i],v=g1[i];t=l||!te.bidirectional)&&(Ei[h]=-l,Ei[c]=0,te.useDir&&te.calcDirMTV())))}function fg(){var e=0,t=new ct,r=new ct,n={minTv:new ct,maxTv:new ct,useDir:!1,dirMinTv:new ct,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=Fn(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),e=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,u=Math.sin(e),l=Math.cos(e),f=u*a.y+l*a.x;if(i(f)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*l/f,r.y=s*u/f,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||t.dot(r)>0)&&r.len()=0;h--){var c=a[h];c!==i&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(au.copy(c.getBoundingRect()),c.transform&&au.applyTransform(c.transform),au.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(a,e,t)}});function b1(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?hg:!0}return!1}function wc(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=b1(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==hg)){t.target=o;break}}}function vg(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var dg=32,vi=7;function C1(e){for(var t=0;e>=dg;)t|=e&1,e>>=1;return e+t}function xc(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function M1(e,t,r){for(r--;t>>1,i(a,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]=a}}function ou(e,t,r,n,i,a){var o=0,s=0,u=1;if(a(e,t[r+i])>0){for(s=n-i;u0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}else{for(s=i+1;us&&(u=s);var l=o;o=i-u,u=i-l}for(o++;o>>1);a(e,t[r+f])>0?o=f+1:u=f}return u}function su(e,t,r,n,i,a){var o=0,s=0,u=1;if(a(e,t[r+i])<0){for(s=i+1;us&&(u=s);var l=o;o=i-u,u=i-l}else{for(s=n-i;u=0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}for(o++;o>>1);a(e,t[r+f])<0?u=f:o=f+1}return u}function D1(e,t){var r=vi,n,i,a=0,o=[];n=[],i=[];function s(v,d){n[a]=v,i[a]=d,a+=1}function u(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]i[v+1])break;f(v)}}function l(){for(;a>1;){var v=a-2;v>0&&i[v-1]=vi||x>=vi);if(D)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),d===1){for(m=0;m=0;m--)e[w+m]=e[T+m];e[S]=o[_];return}for(var x=r;;){var D=0,M=0,C=!1;do if(t(o[_],e[y])<0){if(e[S--]=e[y--],D++,M=0,--d===0){C=!0;break}}else if(e[S--]=o[_--],M++,D=0,--p===1){C=!0;break}while((D|M)=0;m--)e[w+m]=e[T+m];if(d===0){C=!0;break}}if(e[S--]=o[_--],--p===1){C=!0;break}if(M=p-ou(e[y],o,0,p,p-1,t),M!==0){for(S-=M,_-=M,p-=M,w=S+1,T=_+1,m=0;m=vi||M>=vi);if(C)break;x<0&&(x=0),x+=2}if(r=x,r<1&&(r=1),p===1){for(S-=d,y-=d,w=S+1,T=y+1,m=d-1;m>=0;m--)e[w+m]=e[T+m];e[S]=o[_]}else{if(p===0)throw new Error;for(T=S-(p-1),m=0;ms&&(u=s),bc(e,r,r+u,r+a,t),a=u}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var $t=1,Ri=2,On=4,Cc=!1;function uu(){Cc||(Cc=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Mc(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var A1=(function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Mc}return e.prototype.traverse=function(t,r){for(var n=0;n=0&&this._roots.splice(i,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})(),Uo;Uo=K.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Ui={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-Ui.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?Ui.bounceIn(e*2)*.5:Ui.bounceOut(e*2-1)*.5+.5}},La=Math.pow,gr=Math.sqrt,Wo=1e-8,pg=1e-4,Dc=gr(3),Ia=1/3,Re=oi(),ce=oi(),Wn=oi();function vr(e){return e>-Wo&&eWo||e<-Wo}function Vt(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function Ac(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function mg(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),u=3*(t-e),l=e-i,f=s*s-3*o*u,h=s*u-9*o*l,c=u*u-3*s*l,v=0;if(vr(f)&&vr(h))if(vr(s))a[0]=0;else{var d=-u/s;d>=0&&d<=1&&(a[v++]=d)}else{var g=h*h-4*f*c;if(vr(g)){var p=h/f,d=-s/o+p,m=-p/2;d>=0&&d<=1&&(a[v++]=d),m>=0&&m<=1&&(a[v++]=m)}else if(g>0){var y=gr(g),_=f*s+1.5*o*(-h+y),S=f*s+1.5*o*(-h-y);_<0?_=-La(-_,Ia):_=La(_,Ia),S<0?S=-La(-S,Ia):S=La(S,Ia);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var T=(2*f*s-3*o*h)/(2*gr(f*f*f)),w=Math.acos(T)/3,x=gr(f),D=Math.cos(w),d=(-s-2*x*D)/(3*o),m=(-s+x*(D+Dc*Math.sin(w)))/(3*o),M=(-s+x*(D-Dc*Math.sin(w)))/(3*o);d>=0&&d<=1&&(a[v++]=d),m>=0&&m<=1&&(a[v++]=m),M>=0&&M<=1&&(a[v++]=M)}}return v}function yg(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,u=0;if(vr(o)){if(gg(a)){var l=-s/a;l>=0&&l<=1&&(i[u++]=l)}}else{var f=a*a-4*o*s;if(vr(f))i[0]=-a/(2*o);else if(f>0){var h=gr(f),l=(-a+h)/(2*o),c=(-a-h)/(2*o);l>=0&&l<=1&&(i[u++]=l),c>=0&&c<=1&&(i[u++]=c)}}return u}function Yo(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,u=(n-r)*i+r,l=(s-o)*i+o,f=(u-s)*i+s,h=(f-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=h,a[4]=h,a[5]=f,a[6]=u,a[7]=n}function L1(e,t,r,n,i,a,o,s,u,l,f){var h,c=.005,v=1/0,d,g,p,m;Re[0]=u,Re[1]=l;for(var y=0;y<1;y+=.05)ce[0]=Vt(e,r,i,o,y),ce[1]=Vt(t,n,a,s,y),p=Un(Re,ce),p=0&&p=0&&l<=1&&(i[u++]=l)}}else{var f=o*o-4*a*s;if(vr(f)){var l=-o/(2*a);l>=0&&l<=1&&(i[u++]=l)}else if(f>0){var h=gr(f),l=(-o+h)/(2*a),c=(-o-h)/(2*a);l>=0&&l<=1&&(i[u++]=l),c>=0&&c<=1&&(i[u++]=c)}}return u}function _g(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function Xo(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function E1(e,t,r,n,i,a,o,s,u){var l,f=.005,h=1/0;Re[0]=o,Re[1]=s;for(var c=0;c<1;c+=.05){ce[0]=Xt(e,r,i,c),ce[1]=Xt(t,n,a,c);var v=Un(Re,ce);v=0&&v=1?1:mg(0,n,a,1,u,s)&&Vt(0,i,o,1,s[0])}}}var k1=(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||Nt,this.ondestroy=t.ondestroy||Nt,this.onrestart=t.onrestart||Nt,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,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var u=i%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=j(t)?t:Ui[t]||Sg(t)},e})(),Tg=(function(){function e(t){this.value=t}return e})(),B1=(function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new Tg(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})(),qn=(function(){function e(t){this._list=new B1,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=n.head;n.remove(u),delete i[u.key],a=u.value,this._lastRemovedEntry=u}s?s.value=r:s=new Tg(r),s.key=t,n.insertEntry(s),i[t]=s}return a},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})(),Ic={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 mr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Pl(e){return e<0?0:e>1?1:e}function lu(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?mr(parseFloat(t)/100*255):mr(parseInt(t,10))}function rn(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Pl(parseFloat(t)/100):Pl(parseFloat(t))}function fu(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 Pa(e,t,r){return e+(t-e)*r}function se(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function El(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var wg=new qn(20),Ea=null;function _n(e,t){Ea&&El(Ea,t),Ea=wg.put(e,Ea||t.slice())}function Ne(e,t){if(e){t=t||[];var r=wg.get(e);if(r)return El(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in Ic)return El(t,Ic[n]),_n(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){se(t,0,0,0,1);return}return se(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),_n(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){se(t,0,0,0,1);return}return se(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),_n(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){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?se(t,+l[0],+l[1],+l[2],1):se(t,0,0,0,1);f=rn(l.pop());case"rgb":if(l.length>=3)return se(t,lu(l[0]),lu(l[1]),lu(l[2]),l.length===3?f:rn(l[3])),_n(e,t),t;se(t,0,0,0,1);return;case"hsla":if(l.length!==4){se(t,0,0,0,1);return}return l[3]=rn(l[3]),Rl(l,t),_n(e,t),t;case"hsl":if(l.length!==3){se(t,0,0,0,1);return}return Rl(l,t),_n(e,t),t;default:return}}se(t,0,0,0,1)}}function Rl(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=rn(e[1]),i=rn(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],se(t,mr(fu(o,a,r+1/3)*255),mr(fu(o,a,r)*255),mr(fu(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function N1(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,u,l;if(o===0)u=0,l=0;else{s<.5?l=o/(a+i):l=o/(2-a-i);var f=((a-t)/6+o/2)/o,h=((a-r)/6+o/2)/o,c=((a-n)/6+o/2)/o;t===a?u=c-h:r===a?u=1/3+f-c:n===a&&(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 Pc(e,t){var r=Ne(e);if(r){for(var n=0;n<3;n++)r[n]=r[n]*(1-t)|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return _a(r,r.length===4?"rgba":"rgb")}}function D2(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=Ne(t[i]),s=Ne(t[a]),u=n-i,l=_a([mr(Pa(o[0],s[0],u)),mr(Pa(o[1],s[1],u)),mr(Pa(o[2],s[2],u)),Pl(Pa(o[3],s[3],u))],"rgba");return r?{color:l,leftIndex:i,rightIndex:a,value:n}:l}}function Ol(e,t,r,n){var i=Ne(e);if(e)return i=N1(i),r!=null&&(i[1]=rn(j(r)?r(i[1]):r)),n!=null&&(i[2]=rn(j(n)?n(i[2]):n)),_a(Rl(i),"rgba")}function _a(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 Zo(e,t){var r=Ne(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}var Ec=new qn(100);function Rc(e){if(F(e)){var t=Ec.get(e);return t||(t=Pc(e,-.1),Ec.put(e,t)),t}else if(Ts(e)){var r=k({},e);return r.colorStops=Y(e.colorStops,function(n){return{offset:n.offset,color:Pc(n.color,-.1)}}),r}return e}function F1(e){return e.type==="linear"}function z1(e){return e.type==="radial"}(function(){return typeof Buffer<"u"&&typeof Buffer.from=="function"?function(e){return Buffer.from(e).toString("base64")}:typeof btoa=="function"&&typeof unescape=="function"&&typeof encodeURIComponent=="function"?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var kl=Array.prototype.slice;function je(e,t,r){return(t-e)*r+e}function hu(e,t,r,n){for(var i=t.length,a=0;an?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var u=a;u=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=kc,u=r;if(Kt(r)){var l=U1(r);s=l,(l===1&&!Tt(r[0])||l===2&&!Tt(r[0][0]))&&(o=!0)}else if(Tt(r)&&!ea(r))s=Oa;else if(F(r))if(!isNaN(+r))s=Oa;else{var f=Ne(r);f&&(u=f,s=Oi)}else if(Ts(r)){var h=k({},u);h.colorStops=Y(r.colorStops,function(v){return{offset:v.offset,color:Ne(v.color)}}),F1(r)?s=Bl:z1(r)&&(s=Nl),u=h}a===0?this.valType=s:(s!==this.valType||s===kc)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:u,rawValue:r,percent:0};return n&&(c.easing=n,c.easingFunc=j(n)?n:Ui[n]||Sg(n)),i.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 i=this.valType,a=n.length,o=n[a-1],s=this.discrete,u=ka(i),l=Bc(i),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,m=p===0?1:c((r-v.percent)/p,1);d.easingFunc&&(m=d.easingFunc(m));var y=n?this._additiveValue:l?di:t[u];if((ka(a)||l)&&!y&&(y=this._additiveValue=[]),this.discrete)t[u]=m<1?v.rawValue:d.rawValue;else if(ka(a))a===bo?hu(y,v[i],d[i],m):H1(y,v[i],d[i],m);else if(Bc(a)){var _=v[i],S=d[i],T=a===Bl;t[u]={type:T?"linear":"radial",x:je(_.x,S.x,m),y:je(_.y,S.y,m),colorStops:Y(_.colorStops,function(x,D){var M=S.colorStops[D];return{offset:je(x.offset,M.offset,m),color:xo(hu([],x.color,M.color,m))}}),global:S.global},T?(t[u].x2=je(_.x2,S.x2,m),t[u].y2=je(_.y2,S.y2,m)):t[u].r=je(_.r,S.r,m)}else if(l)hu(y,v[i],d[i],m),n||(t[u]=xo(y));else{var w=je(v[i],d[i],m);n?this._additiveValue=w:t[u]=w}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Oa?t[n]=t[n]+i:r===Oi?(Ne(t[n],di),Ra(di,di,i,1),t[n]=xo(di)):r===bo?Ra(t[n],t[n],i,1):r===xg&&Oc(t[n],t[n],i,1)},e})(),Qf=(function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){Yf("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,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,gt(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o0&&u.addKeyframe(0,wo(l),i),this._trackKeys.push(s)}u.addKeyframe(t,wo(r[s]),i)}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=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e})();function zn(){return new Date().getTime()}var Y1=(function(e){z(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,i=r.next;n?n.next=i:this._head=i,i?i.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=zn()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Uo(n),!r._paused&&r.update())}Uo(n)},t.prototype.start=function(){this._running||(this._time=zn(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=zn(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=zn()-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 i=new Qf(r,n.loop);return this.addAnimator(i),i},t})(Ye),X1=300,cu=K.domSupported,vu=(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=Y(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}})(),Nc={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Fc=!1;function Fl(e){var t=e.pointerType;return t==="pen"||t==="touch"}function Z1(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 du(e){e&&(e.zrByTouch=!0)}function $1(e,t){return le(e.dom,new q1(e,t),!0)}function bg(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 q1=(function(){function e(t,r){this.stopPropagation=Nt,this.stopImmediatePropagation=Nt,this.preventDefault=Nt,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e})(),we={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;bg(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Fc=!0,e=le(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Fc||(e=le(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=le(this.dom,e),du(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),we.mousemove.call(this,e),we.mousedown.call(this,e)},touchmove:function(e){e=le(this.dom,e),du(e),this.handler.processGesture(e,"change"),we.mousemove.call(this,e)},touchend:function(e){e=le(this.dom,e),du(e),this.handler.processGesture(e,"end"),we.mouseup.call(this,e),+new Date-+this.__lastTouchMomentVc||e<-Vc}var Er=[],Sn=[],gu=Be(),mu=Math.abs,Sa=(function(){function e(){}return e.prototype.getLocalTransform=function(t){return tS(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 Pr(this.rotation)||Pr(this.x)||Pr(this.y)||Pr(this.scaleX-1)||Pr(this.scaleY-1)||Pr(this.skewX)||Pr(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(Hc(n),this.invTransform=null);return}n=n||Be(),r?this.getLocalTransform(n):Hc(n),t&&(r?Vi(n,t,n):qf(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||Be(),ya(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Er);var n=Er[0]<0?-1:1,i=Er[1]<0?-1:1,a=((Er[0]-n)*r+n)/Er[0]||0,o=((Er[1]-i)*r+i)/Er[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}},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],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,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&&(t.invTransform=t.invTransform||Be(),Vi(Sn,t.invTransform,r),r=Sn);var n=this.originX,i=this.originY;(n||i)&&(gu[4]=n,gu[5]=i,Vi(Sn,r,gu),Sn[4]-=n,Sn[5]-=i,r=Sn),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],i=this.invTransform;return i&&ye(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&ye(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&mu(t[0]-1)>1e-10&&mu(t[3]-1)>1e-10?Math.sqrt(mu(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){qo(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=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||i||s||u){var d=n+s,g=i+u;r[4]=-d*a-c*g*o,r[5]=-g*o-v*d*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=v*a,r[2]=c*o,l&&Kf(r,r,l),r[4]+=n+f,r[5]+=i+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})(),tS=Sa.getLocalTransform,xs=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function qo(e,t){return N_(e,t,xs)}function Fe(e){Ba||(Ba=new qn(100)),e=e||Sr;var t=Ba.get(e);return t||(t={font:e,strWidthCache:new qn(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:ee.measureText("国",e).width,asciiCharWidth:ee.measureText("a",e).width},Ba.put(e,t)),t}var Ba;function eS(e){if(!(yu>=Gc)){e=e||Sr;for(var t=[],r=+new Date,n=0;n<=127;n++)t[n]=ee.measureText(String.fromCharCode(n),e).width;var i=+new Date-r;return i>16?yu=Gc:i>2&&yu++,t}}var yu=0,Gc=5;function Mg(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=eS(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap!=null?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function ze(e,t){var r=e.strWidthCache,n=r.get(t);return n==null&&(n=ee.measureText(t,e.font).width,r.put(t,n)),n}function Uc(e,t,r,n){var i=ze(Fe(t),e),a=bs(t),o=Kn(0,i,r),s=nn(0,a,n),u=new Z(o,s,i,a);return u}function Dg(e,t,r,n){var i=((e||"")+"").split(` `),a=i.length;if(a===1)return Uc(i[0],t,r,n);for(var o=new Z(0,0,0,0),s=0;s=0?parseFloat(e)/100*t:parseFloat(e):e}function Ag(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,u=r.x,l=r.y,f="left",h="top";if(n instanceof Array)u+=Qn(n[0],r.width),l+=Qn(n[1],r.height),f=null,h=null;else switch(n){case"left":u-=i,l+=s,f="right",h="middle";break;case"right":u+=i+o,l+=s,h="middle";break;case"top":u+=o/2,l-=i,f="center",h="bottom";break;case"bottom":u+=o/2,l+=a+i,f="center";break;case"inside":u+=o/2,l+=s,f="center",h="middle";break;case"insideLeft":u+=i,l+=s,h="middle";break;case"insideRight":u+=o-i,l+=s,f="right",h="middle";break;case"insideTop":u+=o/2,l+=i,f="center";break;case"insideBottom":u+=o/2,l+=a-i,f="center",h="bottom";break;case"insideTopLeft":u+=i,l+=i;break;case"insideTopRight":u+=o-i,l+=i,f="right";break;case"insideBottomLeft":u+=i,l+=a-i,h="bottom";break;case"insideBottomRight":u+=o-i,l+=a-i,f="right",h="bottom";break}return e=e||{},e.x=u,e.y=l,e.align=f,e.verticalAlign=h,e}var _u="__zr_normal__",Su=xs.concat(["ignore"]),rS=Tr(xs,function(e,t){return e[t]=!0,e},{ignore:!1}),Tn={},nS=new Z(0,0,0,0),Na=[],Mo=0,Cs=1,Ms=(function(){function e(t){this.id=ig(),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 i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[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,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,u=!1;a.parent=i?this:null;var l=!1;a.copyTransform(r);var f=n.position!=null,h=n.autoOverflowArea,c=void 0;if((h||f)&&(c=nS,n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(Tn,n,c):Ag(Tn,n,c),a.x=Tn.x,a.y=Tn.y,o=Tn.align,s=Tn.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var d=void 0,g=void 0;v==="center"?(d=c.width*.5,g=c.height*.5):(d=Qn(v[0],c.width),g=Qn(v[1],c.height)),l=!0,a.originX=-a.x+d+(i?0:c.x),a.originY=-a.y+g+(i?0:c.y)}}n.rotation!=null&&(a.rotation=n.rotation);var p=n.offset;p&&(a.x+=p[0],a.y+=p[1],l||(a.originX=-p[0],a.originY=-p[1]));var m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var y=m.overflowRect=m.overflowRect||new Z(0,0,0,0);a.getLocalTransform(Na),ya(Na,Na),Z.copy(y,c),y.applyTransform(Na)}else m.overflowRect=null;var _=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,S=void 0,T=void 0,w=void 0;_&&this.canBeInsideText()?(S=n.insideFill,T=n.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(T==null||T==="auto")&&(T=this.getInsideTextStroke(S),w=!0)):(S=n.outsideFill,T=n.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(T==null||T==="auto")&&(T=this.getOutsideStroke(S),w=!0)),S=S||"#000",(S!==m.fill||T!==m.stroke||w!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(u=!0,m.fill=S,m.stroke=T,m.autoStroke=w,m.align=o,m.verticalAlign=s,r.setDefaultTextStyle(m)),r.__dirty|=$t,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()?Gl:Vl},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Ne(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,_a(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||{},k(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(H(t))for(var n=t,i=gt(n),a=0;a0},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(_u,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===_u,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,u=this.stateTransition;if(!(st(s,t)>=0&&(r||s.length===1))){var l;if(this.stateProxy&&!a&&(l=this.stateProxy(t)),l||(l=this.states&&this.states[t]),!l&&!a){Yf("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(l);var f=this._textContent,h=Wc(this,f,l,i);h&&!this.__inHover&&(this.__inHover=h),this._applyStateObj(t,l,this._normalState,r,Xc(this,n,u),u);var c=this._textGuide;return f&&f.useState(t,r,n,!!h),c&&c.useState(t,r,n,!!h),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this.__inHover=Mo,this.__dirty&=~$t),l}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var u=0;u=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var i=this.currentStates.slice(),a=st(i,t),o=st(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i=0&&a.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,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(d,g){r.during(g)});for(var c=0;c0||i.force&&!o.length){var D=void 0,M=void 0,C=void 0;if(s){M={},c&&(D={});for(var S=0;S<_;S++){var m=g[S];M[m]=r[m],c?D[m]=n[m]:r[m]=n[m]}}else if(c){C={};for(var S=0;S<_;S++){var m=g[S];C[m]=wo(r[m]),aS(r,n,m)}}var T=new Qf(r,!1,!1,h?kt(d,function(I){return I.targetName===t}):null);T.targetName=t,i.scope&&(T.scope=i.scope),c&&D&&T.whenWithKeys(0,D,g),C&&T.whenWithKeys(0,C,g),T.whenWithKeys(l??500,s?M:n,g).delay(f||0),e.addAnimator(T,t),o.push(T)}}function Wc(e,t,r,n){return!(r&&r.hoverLayer||n)||Yc(e)||t&&Yc(t)?Mo:Cs}function Yc(e){return e.type==="text"||e.type==="tspan"}function Xc(e,t,r){return!t&&!e.__inHover&&r&&r.duration>0}var re=(function(e){z(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,i=0;i=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=st(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.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,i=this._children,a=st(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this._disposed||this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},e.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/u*l+o}var Bt=pS;function pS(e,t,r){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Wl(e,t,r)}function Wl(e,t,r){return F(e)?gS(e)?parseFloat(e)/100*t+(r||0):parseFloat(e):e==null?NaN:+e}function gS(e){return!!cS(e).match(/%$/)}function at(e,t,r){return isNaN(t)?r?""+e:+e:(t=ne(ht(0,t),Pg),e=(+e).toFixed(t),r?e:+e)}function Eg(e){return e.sort(function(t,r){return t-r}),e}function dr(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(er(e*t)/t===e)return r}return mS(e)}function mS(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return ht(0,o-n)}function yS(e,t,r){var n=Lt(e[1]-e[0]);if(!isFinite(n)||n===0)return NaN;var i=ra(2*Lt(r||1)*Lt(n))/Ul,a=ra(Lt(t))/Ul,o=ht(0,Ta(-i+a));return isFinite(o)||(o=NaN),o}function L2(e,t){var r=Tr(e,function(v,d){return v+(isNaN(d)?0:d)},0);if(r===0)return[];for(var n=dn(10,t),i=Y(e,function(v){return(isNaN(v)?0:v)/r*n*100}),a=n*100,o=Y(i,function(v){return ln(v)}),s=Tr(o,function(v,d){return v+d},0),u=Y(i,function(v,d){return v-o[d]});sl&&(l=u[h],f=h);++o[f],u[f]=0,++s}return Y(o,function(v){return v/n})}function _S(e,t){var r=ht(dr(e),dr(t)),n=e+t;return r>Pg?n:at(n,r)}var Kc=dn(2,53)-1;function Rg(e){var t=vS*2;return(e%t+t)%t}function Ko(e){return e>-$c&&e<$c}var SS=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function si(e){if(e instanceof Date)return e;if(F(e)){var t=SS.exec(e);if(!t)return new Date(NaN);if(t[8]){var r=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(r-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,r,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(er(e))}function Og(e){return dn(10,jf(e))}function jf(e){if(e===0)return 0;var t=ln(ra(e)/Ul);return e/dn(10,t)>=10&&t++,t}var kg=2;function Jf(e,t){var r=jf(e),n=dn(10,r),i=e/n,a;return t===kg?a=1:t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,at(e,-r)}function Qo(e){var t=parseFloat(e);return t==e&&(t!==0||!F(e)||e.indexOf("x")<=0)?t:NaN}function TS(e){return!isNaN(Qo(e))}function th(){return er(dS()*9)}function Bg(e,t){return t===0?e:Bg(t,e%t)}function Qc(e,t){return e==null?t:t==null?e:e*t/Bg(e,t)}function Ge(e){return e!=null&&isFinite(e)}var wS="[ECharts] ",xS=typeof console<"u"&&console.warn&&console.log;function bS(e,t,r){xS&&console[e](wS+t)}function Ng(e,t){bS("error",e)}function Zt(e){throw new Error(e)}function jc(e,t,r){return(t-e)*r+e}var Fg="series\0",CS="\0_ec_\0";function Ut(e){return e instanceof Array?e:e==null?[]:[e]}function Jc(e,t,r){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,i=r.length;ne[1]&&(e[1]=t))}function Vg(e,t){rr(t)&&te[1]&&(e[1]=t)}function GS(e,t){jn(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function rr(e){return e!=null&&isFinite(e)}function jn(e,t){return rr(e)&&rr(t)&&e<=t}function US(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function WS(e){jn(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function YS(){var e="__ec_once_"+XS++;return function(t,r){qt(t,e)||(t[e]=1,r())}}var XS=th();function nh(e,t,r){var n=W(),i=0;b(e,function(a){var o=t(a),s=n.get(o)||0;r&&r(a,s),!s&&!r&&(e[i++]=a),n.set(o,s+1)}),r||(e.length=i)}function ZS(e){return e.value+""}function $S(e){return e+""}function P2(e,t){return G(t,!0)?e.seriesIndex+2:0}function qS(e,t,r){var n=e.getData().count();return{progressiveRender:r.progressiveEnabled&&t.incrementalPrepareRender&&n>=r.threshold,large:e.get("large")&&n>=e.get("largeThreshold"),modDataCount:e.get("progressiveChunkMode")==="mod"?e.getData().count():null}}function E2(e,t){return{seriesType:e,overallReset:t}}function ih(e){return{overallReset:e}}var KS=".",Rr="___EC__COMPONENT__CONTAINER___",Ug="___EC__EXTENDED_CLASS___";function ke(e){var t={main:"",sub:""};if(e){var r=e.split(KS);t.main=r[0]||"",t.sub=r[1]||""}return t}function QS(e){tr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function jS(e){return!!(e&&e[Ug])}function ah(e,t){e.$constructor=e,e.extend=function(r){var n=this,i;return JS(n)?i=(function(a){z(o,a);function o(){return a.apply(this,arguments)||this}return o})(n):(i=function(){(r.$constructor||n).apply(this,arguments)},F_(i,this)),k(i.prototype,r),i[Ug]=!0,i.extend=this.extend,i.superCall=rT,i.superApply=nT,i.superClass=n,i}}function JS(e){return j(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Wg(e,t){e.extend=t.extend}var tT=Math.round(Math.random()*10);function eT(e){var t=["__\0is_clz",tT++].join("_");e.prototype[t]=!0,e.isInstance=function(r){return!!(r&&r[t])}}function rT(e,t){for(var r=[],n=2;n=0||a&&st(a,u)<0)){var l=n.getShallow(u,t);l!=null&&(o[e[s][0]]=l)}}return o}}var iT=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],aT=ia(iT),oT=(function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return aT(this,t,r)},e})(),Yl=new qn(50);function sT(e){if(typeof e=="string"){var t=Yl.get(e);return t&&t.image}else return e}function Yg(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=Yl.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!As(t)&&a.pending.push(o)):(t=ee.loadImage(e,ev,ev),t.__zrImageSrc=e,Yl.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function ev(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;l++)u-=s;var f=ze(o,r);return f>u&&(r="",f=0),u=e-f,i.ellipsis=r,i.ellipsisWidth=f,i.contentWidth=u,i.containerWidth=e,i}function Zg(e,t,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){e.textLine="",e.isTruncated=!1;return}var o=ze(a,t);if(o<=n){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){t+=r.ellipsis;break}var u=s===0?lT(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,u),o=ze(a,t)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function lT(e,t,r){for(var n=0,i=0,a=e.length;ip&&v){var _=Math.floor(p/c);d=d||m.length>_,m=m.slice(0,_),y=m.length*c}if(i&&f&&g!=null)for(var S=Xg(g,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),T={},w=0;wd&&Cu(a,o.substring(d,p),t,v),Cu(a,g[2],t,v,g[1]),d=bu.lastIndex}dh){var $=a.lines.length;I>0?(M.tokens=M.tokens.slice(0,I),x(M,A,C),a.lines=a.lines.slice(0,D+1)):a.lines=a.lines.slice(0,D),a.isTruncated=a.isTruncated||a.lines.length<$;break t}var J=P.width,q=J==null||J==="auto";if(typeof J=="string"&&J.charAt(J.length-1)==="%")L.percentWidth=J,m.push(L),L.contentWidth=ze(Fe(N),L.text);else{if(q){var tt=P.backgroundColor,et=tt&&tt.image;et&&(et=sT(et),As(et)&&(L.width=Math.max(L.width,et.width*X/et.height)))}var V=S&&f!=null?f-A:null;V!=null&&V0&&d+n.accumWidth>n.width&&(f=t.split(` `),l=!0),n.accumWidth=d}else{var g=$g(t,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+v,h=g.linesWidths,f=g.lines}}f||(f=t.split(` `));for(var p=Fe(u),m=0;m=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var pT=Tr(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function gT(e){return dT(e)?!!pT[e]:!0}function $g(e,t,r,n,i){for(var a=[],o=[],s="",u="",l=0,f=0,h=Fe(t),c=0;cr:i+f+d>r){f?(s||u)&&(g?(s||(s=u,u="",l=0,f=l),a.push(s),o.push(f-l),u+=v,l+=d,s="",f=l):(u&&(s+=u,u="",l=0),a.push(s),o.push(f),s=v,f=d)):g?(a.push(u),o.push(l),u=v,l=d):(a.push(v),o.push(d));continue}f+=d,g?(u+=v,l+=d):(u&&(s+=u,u="",l=0),s+=v)}return u&&(s+=u),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}function nv(e,t,r,n,i,a){if(e.baseX=r,e.baseY=n,e.outerWidth=e.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;Z.set(iv,Kn(r,o,i),nn(n,s,a),o,s),Z.intersect(t,iv,null,av);var u=av.outIntersectRect;e.outerWidth=u.width,e.outerHeight=u.height,e.baseX=Kn(u.x,u.width,i,!0),e.baseY=nn(u.y,u.height,a,!0)}}var iv=new Z(0,0,0,0),av={outIntersectRect:{},clamp:!0};function oh(e){return e!=null?e+="":e=""}function mT(e){var t=oh(e.text),r=e.font,n=ze(Fe(r),t),i=bs(r);return Xl(e,n,i,null)}function Xl(e,t,r,n){var i=new Z(Kn(e.x||0,t,e.textAlign),nn(e.y||0,r,e.textBaseline),t,r),a=n??(qg(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function qg(e){var t=e.stroke;return t!=null&&t!=="none"&&e.lineWidth>0}var Zl="__zr_style_"+Math.round(Math.random()*10),an={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ls={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};an[Zl]=!0;var ov=["z","z2","invisible"],yT=["invisible"],Ca=(function(e){z(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=gt(r),i=0;i1e-4){s[0]=e-r,s[1]=t-n,u[0]=e+r,u[1]=t+n;return}if(Fa[0]=Lu(i)*r+e,Fa[1]=Au(i)*n+t,za[0]=Lu(a)*r+e,za[1]=Au(a)*n+t,l(s,Fa,za),f(u,Fa,za),i=i%Or,i<0&&(i=i+Or),a=a%Or,a<0&&(a=a+Or),i>a&&!o?a+=Or:ii&&(Ha[0]=Lu(v)*r+e,Ha[1]=Au(v)*n+t,l(s,Ha,s),f(u,Ha,u))}var ot={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},kr=[],Br=[],De=[],ir=[],Ae=[],Le=[],Iu=Math.min,Pu=Math.max,Nr=Math.cos,Fr=Math.sin,$e=Math.abs,$l=Math.PI,fr=$l*2,Eu=typeof Float32Array<"u",pi=[];function Ru(e){var t=Math.round(e/$l*1e8)/1e8;return t%2*$l}function xT(e,t){var r=Ru(e[0]);r<0&&(r+=fr);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=fr?i=r+fr:t&&r-i>=fr?i=r-fr:!t&&r>i?i=r+(fr-Ru(r-i)):t&&r0&&(this._ux=$e(n/$o/t)||0,this._uy=$e(n/$o/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=$e(t-this._xi),i=$e(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(ot.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(ot.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(ot.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),pi[0]=i,pi[1]=a,xT(pi,o),i=pi[0],a=pi[1];var s=a-i;return this.addData(ot.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=Nr(a)*n+t,this._yi=Fr(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(ot.R,t,r,n,i),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){if(this._saveData){var r=t.length;!(this.data&&this.data.length===r)&&Eu&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sf.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(){De[0]=De[1]=Ae[0]=Ae[1]=Number.MAX_VALUE,ir[0]=ir[1]=Le[0]=Le[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||$e(_)>i||c===r-1)&&(g=Math.sqrt(y*y+_*_),a=p,o=m);break}case ot.C:{var S=t[c++],T=t[c++],p=t[c++],m=t[c++],w=t[c++],x=t[c++];g=I1(a,o,S,T,p,m,w,x,10),a=w,o=x;break}case ot.Q:{var S=t[c++],T=t[c++],p=t[c++],m=t[c++];g=R1(a,o,S,T,p,m,10),a=p,o=m;break}case ot.A:var D=t[c++],M=t[c++],C=t[c++],A=t[c++],I=t[c++],L=t[c++],P=L+I;c+=1,d&&(s=Nr(I)*C+D,u=Fr(I)*A+M),g=Pu(C,A)*Iu(fr,Math.abs(L)),a=Nr(P)*C+D,o=Fr(P)*A+M;break;case ot.R:{s=a=t[c++],u=o=t[c++];var E=t[c++],R=t[c++];g=E*2+R*2;break}case ot.Z:{var y=s-a,_=u-o;g=Math.sqrt(y*y+_*_),a=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,i=this._ux,a=this._uy,o=this._len,s,u,l,f,h,c,v=r<1,d,g,p=0,m=0,y,_=0,S,T;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,g=this._pathLen,y=r*g,!y)))t:for(var w=0;w0&&(t.lineTo(S,T),_=0),x){case ot.M:s=l=n[w++],u=f=n[w++],t.moveTo(l,f);break;case ot.L:{h=n[w++],c=n[w++];var M=$e(h-l),C=$e(c-f);if(M>i||C>a){if(v){var A=d[m++];if(p+A>y){var I=(y-p)/A;t.lineTo(l*(1-I)+h*I,f*(1-I)+c*I);break t}p+=A}t.lineTo(h,c),l=h,f=c,_=0}else{var L=M*M+C*C;L>_&&(S=h,T=c,_=L)}break}case ot.C:{var P=n[w++],E=n[w++],R=n[w++],N=n[w++],X=n[w++],$=n[w++];if(v){var A=d[m++];if(p+A>y){var I=(y-p)/A;Yo(l,P,R,X,I,kr),Yo(f,E,N,$,I,Br),t.bezierCurveTo(kr[1],Br[1],kr[2],Br[2],kr[3],Br[3]);break t}p+=A}t.bezierCurveTo(P,E,R,N,X,$),l=X,f=$;break}case ot.Q:{var P=n[w++],E=n[w++],R=n[w++],N=n[w++];if(v){var A=d[m++];if(p+A>y){var I=(y-p)/A;Xo(l,P,R,I,kr),Xo(f,E,N,I,Br),t.quadraticCurveTo(kr[1],Br[1],kr[2],Br[2]);break t}p+=A}t.quadraticCurveTo(P,E,R,N),l=R,f=N;break}case ot.A:var J=n[w++],q=n[w++],tt=n[w++],et=n[w++],V=n[w++],it=n[w++],ut=n[w++],jt=!n[w++],Ze=tt>et?tt:et,Jt=$e(tt-et)>.001,It=V+it,Q=!1;if(v){var A=d[m++];p+A>y&&(It=V+it*(y-p)/A,Q=!0),p+=A}if(Jt&&t.ellipse?t.ellipse(J,q,tt,et,ut,V,It,jt):t.arc(J,q,Ze,V,It,jt),Q)break t;D&&(s=Nr(V)*tt+J,u=Fr(V)*et+q),l=Nr(It)*tt+J,f=Fr(It)*et+q;break;case ot.R:s=l=n[w],u=f=n[w+1],h=n[w++],c=n[w++];var nt=n[w++],Mr=n[w++];if(v){var A=d[m++];if(p+A>y){var zt=y-p;t.moveTo(h,c),t.lineTo(h+Iu(zt,nt),c),zt-=nt,zt>0&&t.lineTo(h+nt,c+Iu(zt,Mr)),zt-=Mr,zt>0&&t.lineTo(h+Pu(nt-zt,0),c+Mr),zt-=nt,zt>0&&t.lineTo(h,c+Pu(Mr-zt,0));break t}p+=A}t.rect(h,c,nt,Mr);break;case ot.Z:if(v){var A=d[m++];if(p+A>y){var I=(y-p)/A;t.lineTo(l*(1-I)+s*I,f*(1-I)+u*I);break t}p+=A}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.prototype.canSave=function(){return!!this._saveData},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})();function wn(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,u=0,l=e;if(o>t+s&&o>n+s||oe+s&&a>r+s||at+h&&f>n+h&&f>a+h&&f>s+h||fe+h&&l>r+h&&l>i+h&&l>o+h||lt+l&&u>n+l&&u>a+l||ue+l&&s>r+l&&s>i+l||sr||f+li&&(i+=gi);var c=Math.atan2(u,s);return c<0&&(c+=gi),c>=n&&c<=i||c+gi>=n&&c+gi<=i}function zr(e,t,r,n,i,a){if(a>t&&a>n||ai?s:0}var ar=Jn.CMD,Hr=Math.PI*2,DT=1e-4;function AT(e,t){return Math.abs(e-t)t&&l>n&&l>a&&l>s||l1&<(),v=Vt(t,n,a,s,he[0]),c>1&&(d=Vt(t,n,a,s,he[1]))),c===2?pt&&s>n&&s>a||s=0&&l<=1){for(var f=0,h=Xt(t,n,a,l),c=0;cr||s<-r)return 0;var u=Math.sqrt(r*r-s*s);Ht[0]=-u,Ht[1]=u;var l=Math.abs(n-i);if(l<1e-4)return 0;if(l>=Hr-1e-4){n=0,i=Hr;var f=a?1:-1;return o>=Ht[0]+e&&o<=Ht[1]+e?f:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=Hr,i+=Hr);for(var c=0,v=0;v<2;v++){var d=Ht[v];if(d+e>o){var g=Math.atan2(s,d),f=a?1:-1;g<0&&(g=Hr+g),(g>=n&&g<=i||g+Hr>=n&&g+Hr<=i)&&(g>Math.PI/2&&g1&&(r||(s+=zr(u,l,f,h,n,i))),p&&(u=a[d],l=a[d+1],f=u,h=l),g){case ar.M:f=a[d++],h=a[d++],u=f,l=h;break;case ar.L:if(r){if(wn(u,l,a[d],a[d+1],t,n,i))return!0}else s+=zr(u,l,a[d],a[d+1],n,i)||0;u=a[d++],l=a[d++];break;case ar.C:if(r){if(bT(u,l,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=IT(u,l,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;u=a[d++],l=a[d++];break;case ar.Q:if(r){if(CT(u,l,a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=PT(u,l,a[d++],a[d++],a[d],a[d+1],n,i)||0;u=a[d++],l=a[d++];break;case ar.A:var m=a[d++],y=a[d++],_=a[d++],S=a[d++],T=a[d++],w=a[d++];d+=1;var x=!!(1-a[d++]);c=Math.cos(T)*_+m,v=Math.sin(T)*S+y,p?(f=c,h=v):s+=zr(u,l,c,v,n,i);var D=(n-m)*S/_+m;if(r){if(MT(m,y,S,T,T+w,x,t,D,i))return!0}else s+=ET(m,y,S,T,T+w,x,D,i);u=Math.cos(T+w)*_+m,l=Math.sin(T+w)*S+y;break;case ar.R:f=u=a[d++],h=l=a[d++];var M=a[d++],C=a[d++];if(c=f+M,v=h+C,r){if(wn(f,h,c,h,t,n,i)||wn(c,h,c,v,t,n,i)||wn(c,v,f,v,t,n,i)||wn(f,v,f,h,t,n,i))return!0}else s+=zr(c,h,c,v,n,i),s+=zr(f,v,f,h,n,i);break;case ar.Z:if(r){if(wn(u,l,f,h,t,n,i))return!0}else s+=zr(u,l,f,h,n,i);u=f,l=h;break}}return!r&&!AT(l,h)&&(s+=zr(u,l,f,h,n,i)||0),s!==0}function RT(e,t,r){return Kg(e,0,!1,t,r)}function OT(e,t,r,n){return Kg(e,t,!0,r,n)}var Qg=pt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},an),kT={style:pt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ls.style)},Ou=xs.concat(["invisible","culling","z","z2","zlevel","parent"]),mt=(function(e){z(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 i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(u){r.buildPath(u,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Vl:n>.2?J1:Gl}else if(r)return Gl}return Vl},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(F(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Zo(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,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&On)&&(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||i){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??4)}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 i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.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)),OT(s,u/l,r,n)))return!0}if(this.hasFill())return RT(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=On,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 i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:k(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&On)},t.prototype.createStyle=function(r){return ws(Qg,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=k({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){if(e.prototype._applyStateObj.call(this,r,n,i,a,o,s),this.__inHover!==Cs){var u=!(n&&a),l;if(n&&n.shape?o?a?l=n.shape:(l=k({},i.shape),k(l,n.shape)):(l=k({},a?this.shape:i.shape),k(l,n.shape)):u&&(l=i.shape),l)if(o){this.shape=k({},this.shape);for(var f={},h=gt(l),c=0;ci&&(h=s+u,s*=i/h,u*=i/h),l+f>i&&(h=l+f,l*=i/h,f*=i/h),u+l>a&&(h=u+l,u*=a/h,l*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),e.moveTo(r+s,n),e.lineTo(r+i-u,n),u!==0&&e.arc(r+i-u,n+u,u,-Math.PI/2,0),e.lineTo(r+i,n+a-l),l!==0&&e.arc(r+i-l,n+a-l,l,0,Math.PI/2),e.lineTo(r+f,n+a),f!==0&&e.arc(r+f,n+a-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),e.closePath()}var Hn=Math.round;function jg(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(Hn(n*2)===Hn(i*2)&&(e.x1=e.x2=Jr(n,s,!0)),Hn(a*2)===Hn(o*2)&&(e.y1=e.y2=Jr(a,s,!0))),e}}function Jg(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=Jr(n,s,!0),e.y=Jr(i,s,!0),e.width=Math.max(Jr(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Jr(i+o,s,!1)-e.y,o===0?0:1)),e}}function Jr(e,t,r){if(!t)return e;var n=Hn(e*2);return(n+Hn(t))%2===0?n/2:(n+(r?1:-1))/2}var VT=(function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e})(),GT={},Mt=(function(e){z(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new VT},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var u=Jg(GT,n,this.style);i=u.x,a=u.y,o=u.width,s=u.height,u.r=n.r,n=u}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?HT(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(mt);Mt.prototype.type="rect";var hv={fill:"#000"},cv=2,Ie={},UT={style:pt({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},Ls.style)},ie=(function(e){z(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=hv,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,I=0;I=0&&(P=w[L],P.align==="right");)this._placeToken(P,r,D,m,I,"right",_),M-=P.width,I-=P.width,L--;for(A+=(f-(A-p)-(y-I)-M)/2;C<=L;)P=w[C],this._placeToken(P,r,D,m,A+P.width/2,"center",_),A+=P.width,C++;m+=D}},t.prototype._placeToken=function(r,n,i,a,o,s,u){var l=n.rich[r.styleName]||{};l.text=r.text;var f=r.verticalAlign,h=a+i/2;f==="top"?h=a+r.height/2:f==="bottom"&&(h=a+i-r.height/2);var c=!r.isLineHolder&&ku(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=yv(o,s,d),h-=r.height/2-d[0]-r.innerHeight/2);var g=this._getOrCreateChild(jo),p=g.createStyle();g.useStyle(p);var m=this._defaultStyle,y=!1,_=0,S=!1,T=mv("fill"in l?l.fill:"fill"in n?n.fill:(y=!0,m.fill)),w=gv("stroke"in l?l.stroke:"stroke"in n?n.stroke:!v&&!u&&(!m.autoStroke||y)?(_=cv,S=!0,m.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||Sr,p.opacity=Gn(l.opacity,n.opacity,1),dv(p,l),w&&(p.lineWidth=Gn(l.lineWidth,n.lineWidth,_),p.lineDash=G(l.lineDash,n.lineDash),p.lineDashOffset=n.lineDashOffset||0,p.stroke=w),T&&(p.fill=T),g.setBoundingRect(Xl(p,r.contentWidth,r.contentHeight,S?0:null))},t.prototype._renderBackground=function(r,n,i,a,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(Mt),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=v,g.dirtyShape()}if(c){var y=g.style;y.fill=u||null,y.fillOpacity=G(r.fillOpacity,1)}else if(h){p=this._getOrCreateChild(pn),p.onload=function(){d.dirtyStyle()};var _=p.style;_.image=u.image,_.x=i,_.y=a,_.width=o,_.height=s}if(l&&f){var y=g.style;y.lineWidth=l,y.stroke=f,y.strokeOpacity=G(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.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=Gn(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return ZT(r)&&(n=[r.fontStyle,r.fontWeight,XT(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Oe(n)||r.textFont||r.font},t})(Ca),WT={left:!0,right:1,center:1},YT={top:1,bottom:1,middle:1},vv=["fontStyle","fontWeight","fontSize","fontFamily"];function XT(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?Gf+"px":e+"px"}function dv(e,t){for(var r=0;r=0,a=!1;if(e instanceof mt){var o=im(e),s=i&&o.selectFill||o.normalFill,u=i&&o.selectStroke||o.normalStroke;if(xn(s)||xn(u)){n=n||{};var l=n.style||{};l.fill==="inherit"?(a=!0,n=k({},n),l=k({},l),l.fill=s):!xn(l.fill)&&xn(s)?(a=!0,n=k({},n),l=k({},l),l.fill=Rc(s)):!xn(l.stroke)&&xn(u)&&(a||(n=k({},n),l=k({},l)),l.stroke=Rc(u)),n.style=l}}if(n&&n.z2==null){a||(n=k({},n));var f=e.z2EmphasisLift;n.z2=e.z2+(f??jT)}return n}function iw(e,t,r){if(r&&r.z2==null){r=k({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??JT)}return r}function aw(e,t,r){var n=st(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:rw(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=k({},r),o=k({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Bu(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return nw(this,e,t,r);if(e==="blur")return aw(this,e,r);if(e==="select")return iw(this,e,r)}return r}function ow(e){e.stateProxy=Bu;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=Bu),r&&(r.stateProxy=Bu)}function bv(e,t){!hm(e,t)&&!e.__highByOuter&&nr(e,am)}function Cv(e,t){!hm(e,t)&&!e.__highByOuter&&nr(e,om)}function Kl(e,t){e.__highByOuter|=1<<(t||0),nr(e,am)}function Ql(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&nr(e,om)}function sw(e){nr(e,fh)}function um(e){nr(e,sm)}function lm(e){nr(e,tw)}function fm(e){nr(e,ew)}function hm(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function cm(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=sh(a),s=QT(e,a),u=i==="series";!u&&n.push(s),o.isBlured&&(s.group.traverse(function(l){sm(l)}),u&&r.push(a)),o.isBlured=!1}),b(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function jl(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(l,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function tf(e,t,r){vm(e,!0),nr(e,ow),dw(e,t,r)}function vw(e){vm(e,!1)}function O2(e,t,r,n){n?vw(e):tf(e,t,r)}function dw(e,t,r){var n=yt(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var Dv=["emphasis","blur","select"],pw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function k2(e,t,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=Nu(d),s*=Nu(d));var g=(i===a?-1:1)*Nu((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,p=g*o*v/s,m=g*-s*c/o,y=(e+r)/2+Ua(h)*p-Ga(h)*m,_=(t+n)/2+Ga(h)*p+Ua(h)*m,S=Pv([1,0],[(c-p)/o,(v-m)/s]),T=[(c-p)/o,(v-m)/s],w=[(-1*c-p)/o,(-1*v-m)/s],x=Pv(T,w);if(nf(T,w)<=-1&&(x=mi),nf(T,w)>=1&&(x=0),x<0){var D=Math.round(x/mi*1e6)/1e6;x=mi*2+D%2*mi}f.addData(l,y,_,o,s,S,x,h,a)}var Tw=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,ww=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function xw(e){var t=new Jn;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=Jn.CMD,u=e.match(Tw);if(!u)return t;for(var l=0;lP*P+E*E&&(D=C,M=A),{cx:D,cy:M,x0:-f,y0:-h,x1:D*(i/T-1),y1:M*(i/T-1)}}function Pw(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 Ew(e,t){var r,n=ki(t.r,0),i=ki(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var u=t.startAngle,l=t.endAngle;if(!(isNaN(u)||isNaN(l))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=Rv(l-u),d=v>Fu&&v%Fu;if(d>Te&&(v=d),!(n>Te))e.moveTo(f,h);else if(v>Fu-Te)e.moveTo(f+n*Cn(u),h+n*Vr(u)),e.arc(f,h,n,u,l,!c),i>Te&&(e.moveTo(f+i*Cn(l),h+i*Vr(l)),e.arc(f,h,i,l,u,c));else{var g=void 0,p=void 0,m=void 0,y=void 0,_=void 0,S=void 0,T=void 0,w=void 0,x=void 0,D=void 0,M=void 0,C=void 0,A=void 0,I=void 0,L=void 0,P=void 0,E=n*Cn(u),R=n*Vr(u),N=i*Cn(l),X=i*Vr(l),$=v>Te;if($){var J=t.cornerRadius;J&&(r=Pw(J),g=r[0],p=r[1],m=r[2],y=r[3]);var q=Rv(n-i)/2;if(_=Pe(q,m),S=Pe(q,y),T=Pe(q,g),w=Pe(q,p),M=x=ki(_,S),C=D=ki(T,w),(x>Te||D>Te)&&(A=n*Cn(l),I=n*Vr(l),L=i*Cn(u),P=i*Vr(u),vTe){var Jt=Pe(m,M),It=Pe(y,M),Q=Wa(L,P,E,R,n,Jt,c),nt=Wa(A,I,N,X,n,It,c);e.moveTo(f+Q.cx+Q.x0,h+Q.cy+Q.y0),M0&&e.arc(f+Q.cx,h+Q.cy,Jt,Et(Q.y0,Q.x0),Et(Q.y1,Q.x1),!c),e.arc(f,h,n,Et(Q.cy+Q.y1,Q.cx+Q.x1),Et(nt.cy+nt.y1,nt.cx+nt.x1),!c),It>0&&e.arc(f+nt.cx,h+nt.cy,It,Et(nt.y1,nt.x1),Et(nt.y0,nt.x0),!c))}else e.moveTo(f+E,h+R),e.arc(f,h,n,u,l,!c);if(!(i>Te)||!$)e.lineTo(f+N,h+X);else if(C>Te){var Jt=Pe(g,C),It=Pe(p,C),Q=Wa(N,X,A,I,i,-It,c),nt=Wa(E,R,L,P,i,-Jt,c);e.lineTo(f+Q.cx+Q.x0,h+Q.cy+Q.y0),C0&&e.arc(f+Q.cx,h+Q.cy,It,Et(Q.y0,Q.x0),Et(Q.y1,Q.x1),!c),e.arc(f,h,i,Et(Q.cy+Q.y1,Q.cx+Q.x1),Et(nt.cy+nt.y1,nt.cx+nt.x1),c),Jt>0&&e.arc(f+nt.cx,h+nt.cy,Jt,Et(nt.y1,nt.x1),Et(nt.y0,nt.x0),!c))}else e.lineTo(f+N,h+X),e.arc(f,h,i,l,u,c)}e.closePath()}}}var Rw=(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})(),Os=(function(e){z(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Rw},t.prototype.buildPath=function(r,n){Ew(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(mt);Os.prototype.type="sector";var Ow=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e})(),vh=(function(e){z(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Ow},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t})(mt);vh.prototype.type="ring";function kw(e,t,r,n){var i=[],a=[],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 a=kw(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var u=a[s*2],l=a[s*2+1],f=i[(s+1)%o];e.bezierCurveTo(u[0],u[1],l[0],l[1],f[0],f[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;sUr[1]){if(a=!1,At.negativeSize||n)return a;var u=Ya(Ur[0]-Gr[1]),l=Ya(Gr[0]-Ur[1]);zu(u,l)>Za.len()&&(u=l||!At.bidirectional)&&(ct.scale(Xa,s,-l*i),At.useDir&&At.calcDirMTV()))}}return a},e.prototype._getProjMinMaxOnAxis=function(t,r,n){for(var i=this._axes[t],a=this._origin,o=r[0].dot(i)+a[t],s=o,u=o,l=1;l0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!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),a&&a()}function Ma(e,t,r,n,i,a){mh("update",e,t,r,n,i,a)}function Bs(e,t,r,n,i,a){mh("enter",e,t,r,n,i,a)}function Xi(e){if(!e.__zr)return!0;for(var t=0;tLt(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Bv(e){return!e.isGroup}function lx(e){return e.shape!=null}function Lm(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(u){Bv(u)&&u.anid&&(s[u.anid]=u)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return lx(o)&&(s.shape=rt(o.shape)),s}var a=n(e);t.traverse(function(o){if(Bv(o)&&o.anid){var s=a[o.anid];if(s){var u=i(o);o.attr(i(s)),Ma(o,u,r,yt(o).dataIndex)}}})}function fx(e,t){return Y(e,function(r){var n=r[0];n=ht(n,t.x),n=ne(n,t.x+t.width);var i=r[1];return i=ht(i,t.y),i=ne(i,t.y+t.height),[n,i]})}function hx(e,t){var r=ht(e.x,t.x),n=ne(e.x+e.width,t.x+t.width),i=ht(e.y,t.y),a=ne(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Sh(e,t,r){var n=k({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),pt(i,r),new pn(n)):yh(e.replace("path://",""),n,r,"center")}function cx(e,t,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var p=Hu(v,d,f,h)/c;return!(p<0||p>1)}function Hu(e,t,r,n){return e*n-r*t}function vx(e){return e<=1e-6&&e>=-1e-6}function es(e,t,r,n,i){return t==null||(Tt(t)?dt[0]=dt[1]=dt[2]=dt[3]=t:(dt[0]=t[0],dt[1]=t[1],dt[2]=t[2],dt[3]=t[3]),n&&(dt[0]=ht(0,dt[0]),dt[1]=ht(0,dt[1]),dt[2]=ht(0,dt[2]),dt[3]=ht(0,dt[3])),r&&(dt[0]=-dt[0],dt[1]=-dt[1],dt[2]=-dt[2],dt[3]=-dt[3]),Nv(e,dt,"x","width",3,1,i&&i[0]||0),Nv(e,dt,"y","height",0,2,i&&i[1]||0)),e}var dt=[0,0,0,0];function Nv(e,t,r,n,i,a,o){var s=t[a]+t[i],u=e[n];e[n]+=s,o=ht(0,ne(o,u)),e[n]=0?-t[i]:t[a]>=0?u+t[a]:Lt(s)>1e-8?(u-o)*t[i]/s:0):e[r]-=t[i]}function Ns(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=F(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var u=e.formatterParamsExtra;u&&b(gt(u),function(f){qt(s,f)||(s[f]=u[f],s.$vars.push(f))});var l=yt(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:n,option:pt({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function of(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function Pm(e,t){if(e)if(B(e))for(var r=0;rt&&(t=o),ot&&(r=t=0),{min:r,max:t}}function Rm(e,t,r){Om(e,t,r,-1/0)}function Om(e,t,r,n){if(e.ignoreModelZ)return n;var i=e.getTextContent(),a=e.getTextGuideLine(),o=e.isGroup;if(o)for(var s=e.childrenRef(),u=0;u=0&&s.push(u)}),s}}function Rx(e,t){return lt(lt({},e,!0),t,!0)}const Ox={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",custom:"Custom chart",chart:"Chart"}},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:". "}}}},kx={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var rs="ZH",bh="EN",Yn=bh,Io={},Ch={},Fm=K.domSupported?(function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Yn).toUpperCase();return e.indexOf(rs)>-1?rs:Yn})():Yn;function zm(e,t){e=e.toUpperCase(),Ch[e]=new St(t),Io[e]=t}function Bx(e){if(F(e)){var t=Io[e.toUpperCase()]||{};return e===rs||e===bh?rt(t):lt(rt(t),rt(Io[Yn]),!1)}else return lt(rt(e),rt(Io[Yn]),!1)}function Nx(e){return Ch[e]}function Fx(){return Ch[Yn]}zm(bh,Ox);zm(rs,kx);var zx=null;function Hs(){return zx}function Hm(e,t){t.breakOption;var r=t.breakParsed;return r}function Mh(e){var t=e.brk;return t?t.breaks:[]}function ns(e){var t=e.brk;return t?t.hasBreaks():!1}var Dh=1e3,Ah=Dh*60,Zi=Ah*60,ge=Zi*24,Uv=ge*365,Hx={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Po={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Vx="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",qa="{yyyy}-{MM}-{dd}",Wv={year:"{yyyy}",month:"{yyyy}-{MM}",day:qa,hour:qa+" "+Po.hour,minute:qa+" "+Po.minute,second:qa+" "+Po.second,millisecond:Vx},sn=["year","month","day","hour","minute","second","millisecond"],Gx=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ux(e){return!F(e)&&!j(e)?Wx(e):e}function Wx(e){e=e||{};var t={},r=!0;return b(sn,function(n){r&&(r=e[n]==null)}),b(sn,function(n,i){var a=e[n];t[n]={};for(var o=null,s=i;s>=0;s--){var u=sn[s],l=H(a)&&!B(a)?a[u]:a,f=void 0;B(l)?(f=l.slice(),o=f[0]||""):F(l)?(o=l,f=[o]):(o==null?o=Po[n]:Hx[u].test(o)||(o=t[u][u][0]+" "+o),f=[o],r&&(f[1]="{primary|"+o+"}")),t[n][u]=f}}),t}function or(e,t){return e+="","0000".substr(0,t-e.length)+e}function $i(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 Yx(e){return e===$i(e)}function Xx(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Vs(e,t,r,n){var i=si(e),a=i[Vm(r)](),o=i[Lh(r)]()+1,s=Math.floor((o-1)/3)+1,u=i[Ih(r)](),l=i["get"+(r?"UTC":"")+"Day"](),f=i[Ph(r)](),h=(f-1)%12+1,c=i[Eh(r)](),v=i[Rh(r)](),d=i[Oh(r)](),g=f>=12?"pm":"am",p=g.toUpperCase(),m=n instanceof St?n:Nx(n||Fm)||Fx(),y=m.getModel("time"),_=y.get("month"),S=y.get("monthAbbr"),T=y.get("dayOfWeek"),w=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,p+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,or(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,or(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,or(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,T[l]).replace(/{ee}/g,w[l]).replace(/{e}/g,l+"").replace(/{HH}/g,or(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,or(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,or(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,or(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,or(d,3)).replace(/{S}/g,d+"")}function Zx(e,t,r,n,i){var a=null;if(F(r))a=r;else if(j(r)){var o={time:e.time,level:e.time?e.time.level:0},s=Hs();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=r(e.value,t,o)}else{var u=e.time;if(u){var l=r[u.lowerTimeUnit][u.upperTimeUnit];a=l[Math.min(u.level,l.length-1)]||""}else{var f=Eo(e.value,i);a=r[f][f][0]}}return Vs(new Date(e.value),a,i,n)}function Eo(e,t){var r=si(e),n=r[Lh(t)]()+1,i=r[Ih(t)](),a=r[Ph(t)](),o=r[Eh(t)](),s=r[Rh(t)](),u=r[Oh(t)](),l=u===0,f=l&&s===0,h=f&&o===0,c=h&&a===0,v=c&&i===1,d=v&&n===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":l?"second":"millisecond"}function uf(e,t,r){switch(t){case"year":e[Gm(r)](0);case"month":e[Um(r)](1);case"day":e[Wm(r)](0);case"hour":e[Ym(r)](0);case"minute":e[Xm(r)](0);case"second":e[Zm(r)](0)}return e}function Vm(e){return e?"getUTCFullYear":"getFullYear"}function Lh(e){return e?"getUTCMonth":"getMonth"}function Ih(e){return e?"getUTCDate":"getDate"}function Ph(e){return e?"getUTCHours":"getHours"}function Eh(e){return e?"getUTCMinutes":"getMinutes"}function Rh(e){return e?"getUTCSeconds":"getSeconds"}function Oh(e){return e?"getUTCMilliseconds":"getMilliseconds"}function $x(e){return e?"setUTCFullYear":"setFullYear"}function Gm(e){return e?"setUTCMonth":"setMonth"}function Um(e){return e?"setUTCDate":"setDate"}function Wm(e){return e?"setUTCHours":"setHours"}function Ym(e){return e?"setUTCMinutes":"setMinutes"}function Xm(e){return e?"setUTCSeconds":"setSeconds"}function Zm(e){return e?"setUTCMilliseconds":"setMilliseconds"}function $m(e){if(!TS(e))return F(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function qm(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 Gs=Zf;function lf(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Oe(f)?f:"-"}function a(f){return Ge(f)}var o=t==="time",s=e instanceof Date;if(o||s){var u=o?si(e):e;if(isNaN(+u)){if(s)return"-"}else return Vs(u,n,r)}if(t==="ordinal")return wl(e)?i(e):Tt(e)&&a(e)?e+"":"-";var l=Qo(e);return a(l)?$m(l):wl(e)?i(e):typeof e=="boolean"?e+"":"-"}var Yv=["a","b","c","d","e","f","g"],Uu=function(e,t){return"{"+e+(t??"")+"}"};function Km(e,t,r){B(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function sa(e,t){return t=t||"transparent",F(e)?e:H(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Ro={},Wu={},kh=(function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(t,r){this._nonSeriesBoxMasterList=n(Ro),this._normalMasterList=n(Wu);function n(i,a){var o=[];return b(i,function(s,u){var l=s.create(t,r);o=o.concat(l||[])}),o}},e.prototype.update=function(t,r){b(this._normalMasterList,function(n){n.update&&n.update(t,r)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(t,r){if(t==="matrix"||t==="calendar"){Ro[t]=r;return}Wu[t]=r},e.get=function(t){return Wu[t]||Ro[t]},e})();function Kx(e){return!!Ro[e]}var Qx=1,Qm=2;function H2(e){jm.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var jm=W();function Jm(e){var t=e.getShallow("coord",!0),r=Qx;if(t==null){var n=jm.get(e.type);n&&n.getCoord2&&(r=Qm,t=n.getCoord2(e))}return{coord:t,from:r}}var Xn=0,Oo=1,jx=2;function Jx(e,t){var r=e.getShallow("coordinateSystem"),n=e.getShallow("coordinateSystemUsage",!0),i=Xn;if(r){var a=e.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=Oo,a||(i=Xn)):n==="box"&&(i=jx,!a&&!Kx(r)&&(i=Xn))}return{coordSysType:r,kind:i}}function tb(e){var t=e.targetModel,r=e.coordSysType,n=e.coordSysProvider,i=e.isDefaultDataCoordSys,a=Jx(t),o=a.kind,s=a.coordSysType;if(i&&o!==Oo&&(o=Oo,s=r),o===Xn||s!==r)return Xn;var u=n(r,t);return u?(o===Oo?t.coordinateSystem=u:t.boxCoordinateSystem=u,o):Xn}var ko=b,eb=["left","right","top","bottom","width","height"],Ka=[["width","left","right"],["height","top","bottom"]];function Bh(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=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=a+g,v>n||u.newline?(a=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>i||u.newline?(a+=s+r,o=0,d=p,s=f.width):s=Math.max(s,f.width)}u.newline||(u.x=a,u.y=o,u.markRedraw(),e==="horizontal"?a=v+r:o=d+r)})}var qi=Bh;Ct(Bh,"vertical");Ct(Bh,"horizontal");function rb(e,t){return{left:e.getShallow("left",t),top:e.getShallow("top",t),right:e.getShallow("right",t),bottom:e.getShallow("bottom",t),width:e.getShallow("width",t),height:e.getShallow("height",t)}}function nb(e,t){var r=Nh(e,t,{enableLayoutOnlyByCenter:!0}),n=e.getBoxLayoutParams(),i,a;if(r.type===Ni.point)a=r.refPoint,i=fn(n,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get("center"),s=B(o)?o:[o,o];i=fn(n,r.refContainer),a=r.boxCoordFrom===Qm?r.refPoint:[Bt(s[0],i.width)+i.x,Bt(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function V2(e,t){var r=nb(e,t),n=r.viewRect,i=r.center,a=e.get("radius");B(a)||(a=[0,a]);var o=Bt(n.width,t.getWidth()),s=Bt(n.height,t.getHeight()),u=Math.min(o,s),l=Bt(a[0],u/2),f=Bt(a[1],u/2);return{cx:i[0],cy:i[1],r0:l,r:f,viewRect:n}}function fn(e,t,r){r=Gs(r||0);var n=t.width,i=t.height,a=Bt(e.left,n),o=Bt(e.top,i),s=Bt(e.right,n),u=Bt(e.bottom,i),l=Bt(e.width,n),f=Bt(e.height,i),h=r[2]+r[0],c=r[1]+r[3],v=e.aspect;switch(isNaN(l)&&(l=n-s-c-a),isNaN(f)&&(f=i-u-h-o),v!=null&&(isNaN(l)&&isNaN(f)&&(v>n/i?l=n*.8:f=i*.8),isNaN(l)&&(l=v*f),isNaN(f)&&(f=l/v)),isNaN(a)&&(a=n-s-l-c),isNaN(o)&&(o=i-u-f-h),e.left||e.right){case"center":a=n/2-l/2-r[3];break;case"right":a=n-l-c;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-h;break}a=a||0,o=o||0,isNaN(l)&&(l=n-c-a-(s||0)),isNaN(f)&&(f=i-h-o-(u||0));var d=new Z((t.x||0)+a+r[3],(t.y||0)+o+r[0],l,f);return d.margin=r,d}var Ni={rect:1,point:2};function Nh(e,t,r){var n,i,a,o=e.boxCoordinateSystem,s;if(o){var u=Jm(e),l=u.coord,f=u.from;if(o.dataToLayout){a=Ni.rect,s=f;var h=o.dataToLayout(l);n=h.contentRect||h.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Ni.point,s=f,i=o.dataToPoint(l))}return a==null&&(a=Ni.rect),a===Ni.rect&&(n||(n={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),i=[n.x+n.width/2,n.y+n.height/2]),{type:a,refContainer:n,refPoint:i,boxCoordFrom:s}}function ua(e){var t=e.layoutMode||e.constructor.layoutMode;return H(t)?t:t?{type:t}:null}function br(e,t,r){var n=r&&r.ignoreSize;!B(n)&&(n=[n,n]);var i=o(Ka[0],0),a=o(Ka[1],1);u(Ka[0],e,i),u(Ka[1],e,a);function o(l,f){var h={},c=0,v={},d=0,g=2;if(ko(l,function(y){v[y]=e[y]}),ko(l,function(y){qt(t,y)&&(h[y]=v[y]=t[y]),s(h,y)&&c++,s(v,y)&&d++}),n[f])return s(t,l[1])?v[l[2]]=null:s(t,l[2])&&(v[l[1]]=null),v;if(d===g||!c)return v;if(c>=g)return h;for(var p=0;p=0;u--)s=lt(s,i[u],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return ba(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){return rb(this,!1)},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})(St);Wg(ft,St);Ds(ft);Px(ft);Ex(ft,ob);function ob(e){var t=[];return b(ft.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=Y(t,function(r){return ke(r).main}),e!=="dataset"&&st(t,"dataset")<=0&&t.unshift("dataset"),t}var U={color:{},darkColor:{},size:{}},wt=U.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};k(wt,{primary:wt.neutral80,secondary:wt.neutral70,tertiary:wt.neutral60,quaternary:wt.neutral50,disabled:wt.neutral20,border:wt.neutral30,borderTint:wt.neutral20,borderShade:wt.neutral40,background:wt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:wt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:wt.neutral70,axisLineTint:wt.neutral40,axisTick:wt.neutral70,axisTickMinor:wt.neutral60,axisLabel:wt.neutral70,axisSplitLine:wt.neutral15,axisMinorSplitLine:wt.neutral05});for(var Wr in wt)if(wt.hasOwnProperty(Wr)){var Xv=wt[Wr];Wr==="theme"?U.darkColor.theme=wt.theme.slice():Wr==="highlight"?U.darkColor.highlight="rgba(255,231,130,0.4)":Wr.indexOf("accent")===0?U.darkColor[Wr]=Ol(Xv,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):U.darkColor[Wr]=Ol(Xv,null,function(e){return e*.9},function(e){return 1-Math.pow(e,1.5)})}U.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var ty="";typeof navigator<"u"&&(ty=navigator.platform||"");var Mn="rgba(0, 0, 0, 0.2)",ey=U.color.theme[0],sb=Ol(ey,null,null,.9);const ry={darkMode:"auto",colorBy:"series",color:U.color.theme,gradientColor:[sb,ey],aria:{decal:{decals:[{color:Mn,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Mn,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Mn,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Mn,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Mn,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Mn,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ty.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 Pt={Must:1,Might:2,Not:3},ny=vt();function ub(e){ny(e).datasetMap=W()}function lb(e,t,r){var n={},i=Fh(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,u=ny(s).datasetMap,l=i.uid+"_"+r.seriesLayoutBy,f,h;e=e.slice(),b(e,function(g,p){var m=H(g)?g:e[p]={name:g};m.type==="ordinal"&&f==null&&(f=p,h=d(m)),n[m.name]=[]});var c=u.get(l)||u.set(l,{categoryWayDim:h,valueWayDim:0});b(e,function(g,p){var m=g.name,y=d(g);if(f==null){var _=c.valueWayDim;v(n[m],_,y),v(o,_,y),c.valueWayDim+=y}else if(f===p)v(n[m],0,y),v(a,0,y);else{var _=c.categoryWayDim;v(n[m],_,y),v(o,_,y),c.categoryWayDim+=y}});function v(g,p,m){for(var y=0;yt)return e[n];return e[r-1]}function db(e,t,r,n,i,a,o){a=a||e;var s=t(a),u=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var f=o==null||!n?r:vb(n,o);if(f=f||r,!(!f||!f.length)){var h=f[u];return i&&(l[i]=h),s.paletteIdx=(u+1)%f.length,h}}function pb(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Qa,yi,$v,qv="\0_ec_inner",gb=1,Hh=(function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new St(a),this._locale=new St(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=jv(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,jv(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?$v(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var u=a.getMediaOption(this);u.length&&b(u,function(l){i=!0,this._mergeOption(l,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],u=W(),l=n&&n.replaceMergeMainTypeMap;ub(this),b(r,function(h,c){h!=null&&(ft.hasClass(c)?c&&(s.push(c),u.set(c,!0)):i[c]=i[c]==null?rt(h):lt(i[c],h,!0))}),l&&l.each(function(h,c){ft.hasClass(c)&&!u.get(c)&&(s.push(c),u.set(c,!0))}),ft.topologicalTravel(s,ft.getAllClassMainTypes(),f,this);function f(h){var c=cb(this,h,Ut(r[h])),v=a.get(h),d=v?l&&l.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=DS(v,c,d);OS(g,h,ft),i[h]=null,a.set(h,null),o.set(h,0);var p=[],m=[],y=0,_;b(g,function(S,T){var w=S.existing,x=S.newOption;if(!x)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var D=h==="series",M=ft.getClass(h,S.keyInfo.subType,!D);if(!M)return;if(h==="tooltip"){if(_)return;_=!0}if(w&&w.constructor===M)w.name=S.keyInfo.name,w.mergeOption(x,this),w.optionUpdated(x,!1);else{var C=k({componentIndex:T},S.keyInfo);w=new M(x,this,this,C),k(w,C),S.brandNew&&(w.__requireNewView=!0),w.init(x,this,this),w.optionUpdated(null,!0)}}w?(p.push(w.option),m.push(w),y++):(p.push(void 0),m.push(void 0))},this),i[h]=p,a.set(h,m),o.set(h,y),h==="series"&&Qa(this)}this._seriesIndices||Qa(this)},t.prototype.getOption=function(){var r=rt(this.option);return b(r,function(n,i){if(ft.hasClass(i)){for(var a=Ut(n),o=a.length,s=!1,u=o-1;u>=0;u--)a[u]&&!na(a[u])?s=!0:(a[u]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[qv],r},t.prototype.setTheme=function(r){this._theme=new St(r),this._resetOption("recreate",null)},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 i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=t:r==="max"?e<=t:e===t}function bb(e,t){return e.join(",")===t.join(",")}var Se=b,la=H,Jv=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Yu(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=Jv.length;r0?r[o-1].seriesModel:null)}),Ob(r)}})}function Ob(e){b(e,function(t,r){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,u=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(l,f,h){var c=o.get(t.stackedDimension,h);if(isNaN(c))return i;var v,d;s?d=o.getRawIndex(h):v=o.get(t.stackedByDimension,h);for(var g=NaN,p=r-1;p>=0;p--){var m=e[p];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(u==="all"||u==="positive"&&y>0||u==="negative"&&y<0||u==="samesign"&&c>=0&&y>0||u==="samesign"&&c<=0&&y<0){c=_S(c,y),g=y;break}}}return n[0]=c,n[1]=g,n})})}var Us=(function(){function e(t){this.data=t.data||(t.sourceFormat===be?{}:[]),this.sourceFormat=t.sourceFormat||rm,this.seriesLayoutBy=t.seriesLayoutBy||Ve,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}},i=function(){return this._data?this._data.length/this._dimSize:0};od=(t={},t[Ft+"_"+Ve]={pure:!0,appendData:a},t[Ft+"_"+gn]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[_e]={pure:!0,appendData:a},t[be]={pure:!0,appendData:function(o){var s=this._data;b(o,function(u,l){for(var f=s[l]||(s[l]=[]),h=0;h<(u||[]).length;h++)f.push(u[h])})}},t[ae]={appendData:a},t[yr]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[p])}return g!=null?g+"":""})}},e.prototype.getRawValue=function(t,r){return ri(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e})();function fd(e){var t,r;return H(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function Ki(e){return new Ub(e)}var Ub=(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 i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,u=f(t&&t.modBy),l=t&&t.modDataCount||0;(o!==u||s!==l)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||a==="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 a;function o(){return t=e?null:ui?-this._resultLT:0},e})();function Yb(e){var t="",r=-1/0,n=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+="G"+e.g,r=e.g),e.ge!=null&&(t+="GE"+e.ge,n=e.ge),e.l!=null&&(t+="L"+e.l,i=e.l),e.le!=null&&(t+="LE"+e.le,a=e.le)),{key:t,g:r,ge:n,l:i,le:a}}function Xb(e,t){return t>e.g&&t>=e.ge&&t65535?rC:nC}function iC(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function vd(e,t,r,n,i){var a=my[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var u=new a(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 i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,u=this._rawExtent,l=Y(o,function(y){return y.property}),f=0;fm[1]&&(m[1]=p)}}!i.persistent&&i.clean&&i.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)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a=h&&y<=c||isNaN(y))&&(u[l++]=g),g++}d=!0}else if(a===2){for(var p=v[i[0]],_=v[i[1]],S=t[i[1]][0],T=t[i[1]][1],m=0;m=h&&y<=c||isNaN(y))&&(w>=S&&w<=T||isNaN(w))&&(u[l++]=g),g++}d=!0}}if(!d)if(a===1)for(var m=0;m=h&&y<=c||isNaN(y))&&(u[l++]=x)}else for(var m=0;mt[C][1])&&(D=!1)}D&&(u[l++]=r.getRawIndex(m))}return lm[1]&&(m[1]=p)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,u=Math.floor(1/r),l=this.getRawIndex(0),f,h,c,v=new(Dn(this._rawCount))(Math.min((Math.ceil(o/u)+2)*2,o));v[s++]=l;for(var d=1;df&&(f=h,c=S)}A>0&&As&&(g=s-f);for(var p=0;pd&&(d=y,v=f+p)}var _=this.getRawIndex(h),S=this.getRawIndex(v);hf-d&&(u=f-d,s.length=u);for(var g=0;gh[1]&&(h[1]=m),c[v++]=y}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();av&&(v=p))}return u[f]=[c,v]},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=(function(){function t(r,n,i,a){return Bo(r[a],this._dimensions[a])}$u={arrayRows:t,objectRows:function(r,n,i,a){return Bo(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Bo(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}})(),e})(),aC=(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,i,a;if(Ja(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,a=[f._getVersionSign()]}else s=o.get("data",!0),u=Qt(s)?yr:ae,a=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},v=G(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=G(h.sourceHeader,c.sourceHeader),g=G(h.dimensions,c.dimensions),p=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||g;i=p?[ff(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:g},u)]:[]}else{var m=t;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[ff(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&dd(a)}var o,s=[],u=[];return b(t,function(l){l.prepareSource();var f=l.getSource(i||0),h="";i!=null&&!f&&dd(h),s.push(f),u.push(l._getVersionSign())}),n?o=tC(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[kb(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 b(e.blocks,function(i){var a=Ty(i);a>=t&&(t=a+ +(n&&(!a||cf(i)&&!i.noHeader)))}),t}return 0}function lC(e,t,r,n){var i=t.noHeader,a=hC(Ty(t)),o=[],s=t.blocks||[];tr(!s||B(s)),s=s||[];var u=e.orderMode;if(t.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(qt(l,u)){var f=new Wb(l[u],null);s.sort(function(g,p){return f.evaluate(g.sortParam,p.sortParam)})}else u==="seriesDesc"&&s.reverse()}b(s,function(g,p){var m=t.valueFormatter,y=Sy(g)(m?k(k({},e),{valueFormatter:m}):e,g,p>0?a.html:0,n);y!=null&&o.push(y)});var h=e.renderMode==="richText"?o.join(a.richText):vf(n,o.join(""),i?r:a.html);if(i)return h;var c=lf(t.header,"ordinal",e.useUTC),v=_y(n,e.renderMode).nameStyle,d=yy(n);return e.renderMode==="richText"?wy(e,c,v)+a.richText+h:vf(n,'
'+Yt(c)+"
"+h,r)}function fC(e,t,r,n){var i=e.renderMode,a=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],Y(S,function(T,w){return lf(T,B(v)?v[w]:v,l)})};if(!(a&&o)){var h=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||U.color.secondary,i),c=a?"":lf(u,"ordinal",l),v=t.valueType,d=o?[]:f(t.value,t.rawDataIndex),g=!s||!a,p=!s&&a,m=_y(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":h)+(a?"":wy(e,c,y))+(o?"":dC(e,d,g,p,_)):vf(n,(s?"":h)+(a?"":cC(c,!s,y))+(o?"":vC(d,g,p,_)),r)}}function pd(e,t,r,n,i,a){if(e){var o=Sy(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function hC(e){return{html:sC[e],richText:uC[e]}}function vf(e,t,r){var n='
',i="margin: "+r+"px 0 0",a=yy(e);return'
'+t+n+"
"}function cC(e,t,r){var n=t?"margin-left:2px":"";return''+Yt(e)+""}function vC(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=B(e)?e:[e],''+Y(e,function(o){return Yt(o)}).join("  ")+""}function wy(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function dC(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(" "):t,a)}function pC(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return sa(n)}function xy(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var qu=(function(){function e(){this.richTextStyles={},this._nextStyleNameId=th()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=qx({color:r,type:t,renderMode:n,markerId:i});return F(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};B(r)?b(r,function(a){return k(n,a)}):k(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e})();function gC(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),u=B(s),l=pC(t,r),f,h,c,v;if(o>1||u&&!o){var d=mC(s,t,r,a,l);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);v=f=ri(i,r,a[0]),h=g.type}else v=f=u?s[0]:s;var p=eh(t),m=p&&t.name||"",y=i.getName(r),_=n?m:y;return fa("section",{header:m,noHeader:n||!p,sortParam:v,blocks:[fa("nameValue",{markerType:"item",markerColor:l,name:_,noName:!Oe(_),value:f,valueType:h,rawDataIndex:i.getRawIndex(r)})].concat(c||[])})}function mC(e,t,r,n,i){var a=t.getData(),o=Tr(e,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],u=[],l=[];n.length?b(n,function(h){f(ri(a,r,h),h)}):b(e,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?l.push(fa("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:h,valueType:v.type})):(s.push(h),u.push(v.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:l}}var sr=vt();function to(e,t){return e.getName(t)||e.getId(t)}var yC="__universalTransitionEnabled",hn=(function(e){z(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Ki({count:SC,reset:TC}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=sr(this).sourceManager=new aC(this);a.prepareSource();var o=this.getInitialData(r,i);md(o,this),this.dataTask.context.data=o,sr(this).dataBeforeProcessed=o,gd(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=ua(this),a=i?Da(r):{},o=this.subType;ft.hasClass(o)&&(o+="Series"),lt(r,n.getTheme().get(this.subType)),lt(r,this.getDefaultOption()),Jc(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&br(r,a,i)},t.prototype.mergeOption=function(r,n){r=lt(this.option,r,!0),this.fillDataTextStyle(r.data);var i=ua(this);i&&br(this.option,r,i);var a=sr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);md(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,sr(this).dataBeforeProcessed=o,gd(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Qt(r))for(var n=["show"],i=0;i=0&&c<0)&&(h=T,c=S,v=0),S===c&&(f[v++]=p))}return f.length=v,f},t.prototype.formatTooltip=function(r,n,i){return gC({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(K.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=zh.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),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 i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[to(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[yC])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,u=n.length;if(!(!s||!u)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){H(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,f=0;f0&&this._innerSelect(r,n)}},t.registerClass=function(r){return ft.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})(ft);We(hn,Gb);We(hn,zh);Wg(hn,ft);function gd(e){var t=e.name;eh(e)||(e.name=_C(e)||t)}function _C(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return b(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function SC(e){return e.model.getRawData().count()}function TC(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),wC}function wC(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function md(e,t){b(Y_(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Ct(xC,t))})}function xC(e,t){var r=df(e);return r&&r.setOutputEnd((t||this).count()),t}function df(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var Ue=(function(){function e(){this.group=new re,this.uid=zs("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e})();ah(Ue);Ds(Ue);function bC(){var e=vt();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var by=vt(),CC=bC(),un=(function(){function e(){this.group=new re,this.uid=zs("viewChart"),this.renderTask=Ki({plan:MC,reset:DC}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&_d(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&_d(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){Pm(this.group,t)},e.markUpdateMethod=function(t,r){by(t).updateMethod=r},e.protoInitialize=(function(){var t=e.prototype;t.type="chart"})(),e})();function yd(e,t,r){e&&ef(e)&&(t==="emphasis"?Kl:Ql)(e,r)}function _d(e,t,r){var n=xa(e,t),i=t&&t.highlightKey!=null?gw(t.highlightKey):null;n!=null?b(Ut(n),function(a){yd(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){yd(a,r,i)})}ah(un);Ds(un);function MC(e){return CC(e.model)}function DC(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&by(i).updateMethod,u=a?"incrementalPrepareRender":s&&o[s]?s:"render";return u!=="render"&&o[u](t,r,n,i),AC[u]}var AC={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)}}},is="\0__throttleOriginMethod",Sd="\0__throttleRate",Td="\0__throttleType";function Wh(e,t,r){var n,i=0,a=0,o=null,s,u,l,f;t=t||0;function h(){a=new Date().getTime(),o=null,e.apply(u,l||[])}var c=function(){for(var v=[],d=0;d=0?h():o=setTimeout(h,-s),i=n};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function Cy(e,t,r,n){var i=e[t];if(i){var a=i[is]||i,o=i[Td],s=i[Sd];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=Wh(a,r,n==="debounce"),i[is]=a,i[Td]=n,i[Sd]=r}return i}}function pf(e,t){var r=e[t];r&&r[is]&&(r.clear&&r.clear(),e[t]=r[is])}var wd=vt(),xd={itemStyle:ia(Nm,!0),lineStyle:ia(Bm,!0)},LC={lineStyle:"stroke",itemStyle:"fill"};function My(e,t){var r=e.visualStyleMapper||xd[t];return r||(console.warn("Unknown style type '"+t+"'."),xd.itemStyle)}function Dy(e,t){var r=e.visualDrawType||LC[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var IC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=My(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var u=Dy(e,n),l=o[u],f=j(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"||j(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||j(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=k({},o);p[u]=f(g),v.setItemVisual(d,"style",p)}}}},Si=new St,PC={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=My(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var u=o.getRawDataItem(s);if(u&&u[n]){Si.option=u[n];var l=i(Si),f=o.ensureUniqueItemVisual(s,"style");k(f,l),Si.option.decal&&(o.setItemVisual(s,"decal",Si.option.decal),Si.option.decal.dirty=!0),a in l&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},EC={performRawSeries:!0,overallReset:function(e){var t=W();e.eachSeries(function(r){if(!r.isColorBySeries()){var n=r.type+"-"+r.getColorBy();wd(r).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(r){if(!r.isColorBySeries()){var n=r.getRawData(),i={},a=r.getData(),o=wd(r).scope,s=r.visualStyleAccessPath||"itemStyle",u=Dy(r,s);a.each(function(l){var f=a.getRawIndex(l);i[f]=l}),n.each(function(l){var f=i[l],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=n.getName(l)||l+"",d=n.count();c[u]=r.getColorFromPalette(v,o,d)}})}})}},eo=Math.PI;function RC(e,t){t=t||{},pt(t,{text:"loading",textColor:U.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:U.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new re,n=new Mt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new ie({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Mt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new ks({shape:{startAngle:-eo/2,endAngle:-eo/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:eo*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:eo*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.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}),a.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 Ay=(function(){function e(t,r,n,i){this._stageTaskMap=W(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.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),i=t.__preparePipelineContext?t.__preparePipelineContext(r,n):qS(t,r,n);t.pipelineContext=n.context=i},e.prototype.restorePipelines=function(t,r){var n=this,i=n._pipelineMap=W();r.eachSeries(function(a){var o=t.painter.type==="canvas"&&a.getProgressive(),s=a.uid;i.set(s,{id:s,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:o&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),n._pipe(a,a.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;b(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";tr(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},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,i){i=i||{};var a=!1,o=this;b(t,function(u,l){if(!(i.visualType&&i.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(i,p)&&(p.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,n);var g=o.getPerformArgs(c,i.block);d.each(function(p){p.perform(g)}),c.perform(g)&&(a=!0)}else h&&h.each(function(p,m){s(i,p)&&p.dirty();var y=o.getPerformArgs(p,i.block);y.skip=!u.performRawSeries&&r.isSeriesFiltered(p.context.model),o.updatePayload(p,n),p.perform(y)&&(a=!0)})}});function s(u,l){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(l.__pipeline.id))}this.unfinished=a||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,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=W(),u=t.seriesType,l=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):u?n.eachRawSeriesByType(u,f):l&&l(n,i).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||Ki({plan:FC,reset:zC,count:VC}));v.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,v)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||Ki({reset:OC});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,u=o.agentStubMap=W(),l=t.seriesType,f=t.getTargetSeries,h=t.dirtyOnOverallProgress,c=!1,v="";tr(!t.createOnAllSeries,v),l?n.eachRawSeriesByType(l,d):f?f(n,i).each(d):b(n.getSeries(),d);function d(g){var p=g.uid,m=u.set(p,s&&s.get(p)||(c=!0,Ki({reset:kC,onDirty:NC})));m.context={model:g,dirtyOnOverallProgress:h},m.agent=o,m.__block=h,a._pipe(g,m)}c&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return j(t)&&(t={overallReset:t,seriesType:GC(t)}),t.uid=zs("stageHandler"),r&&(t.visualType=r),t},e})();function OC(e){e.overallReset(e.ecModel,e.api,e.payload)}function kC(e){return e.dirtyOnOverallProgress&&BC}function BC(){this.agent.dirty(),this.getDownstream().dirty()}function NC(){this.agent&&this.agent.dirty()}function FC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function zC(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Ut(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Y(t,function(r,n){return Ly(n)}):HC}var HC=Ly(0);function Ly(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&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||(i[l]=u)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var 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,a,"name")&&f(l,a,"dataIndex")&&f(l,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e})(),gf=["symbol","symbolSize","symbolRotate","symbolOffset"],Md=gf.concat(["symbolKeepAspect"]),WC={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={},i={},a=!1,o=0;o=0&&tn(u)?u:.5;var l=e.createRadialGradient(o,s,0,o,s,u);return l}function yf(e,t,r){for(var n=t.type==="radial"?vM(e,t,r):cM(e,t,r),i=t.colorStops,a=0;a0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Tt(e)?[e]:B(e)?e:null}function Oy(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&pM(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=Y(r,function(a){return a/i}),n/=i)}return[r,n]}var gM=new Jn(!0);function os(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function Dd(e){return typeof e=="string"&&e!=="none"}function ss(e){var t=e.fill;return t!=null&&t!=="none"}function Ad(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 Ld(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 _f(e,t,r){var n=Yg(t.image,t.__image,r);if(As(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*X_),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function mM(e,t,r,n,i){var a,o=os(r),s=ss(r),u=r.strokePercent,l=u<1,f=!t.path;(!t.silent||l)&&f&&t.createPathProxy();var h=t.path||gM,c=t.__dirty;if(!n){var v=r.fill,d=r.stroke,g=s&&!!v.colorStops,p=o&&!!d.colorStops,m=s&&!!v.image,y=o&&!!d.image,_=void 0,S=void 0,T=void 0,w=void 0,x=void 0;(g||p)&&(x=t.getBoundingRect()),g&&(_=c?yf(e,v,x):t.__canvasFillGradient,t.__canvasFillGradient=_),p&&(S=c?yf(e,d,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=S),m&&(T=c||!t.__canvasFillPattern?_f(e,v,t):t.__canvasFillPattern,t.__canvasFillPattern=T),y&&(w=c||!t.__canvasStrokePattern?_f(e,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),g?e.fillStyle=_:m&&(T?e.fillStyle=T:s=!1),p?e.strokeStyle=S:y&&(w?e.strokeStyle=w:o=!1)}var D=t.getGlobalScale();h.setScale(D[0],D[1],t.segmentIgnoreThreshold);var M,C;e.setLineDash&&r.lineDash&&(a=Oy(t),M=a[0],C=a[1]);var A=!0;(f||c&On)&&(h.setDPR(e.dpr),l?h.setContext(null):(h.setContext(e),A=!1),h.reset(),t.buildPath(h,t.shape,n),h.toStatic(),t.pathUpdated()),A&&h.rebuildPath(e,l?u:1),M&&(e.setLineDash(M),e.lineDashOffset=C),n?(i.batchFill=s,i.batchStroke=o):r.strokeFirst?(o&&Ld(e,r),s&&Ad(e,r)):(s&&Ad(e,r),o&&Ld(e,r)),M&&e.setLineDash([])}function yM(e,t,r){var n=t.__image=Yg(r.image,t.__image,t,t.onload);if(!(!n||!As(n))){var i=r.x||0,a=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,i,a,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,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function _M(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||Sr,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=Oy(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(os(r)&&e.strokeText(i,r.x,r.y),ss(r)&&e.fillText(i,r.x,r.y)):(ss(r)&&e.fillText(i,r.x,r.y),os(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var Id=["shadowBlur","shadowOffsetX","shadowOffsetY"],Pd=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function ky(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){Gt(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?an.opacity:o}(n||t.blend!==r.blend)&&(a||(Gt(e,i),a=!0),e.globalCompositeOperation=t.blend||an.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,i){if(!this[bt]){if(this._disposed){this.id;return}var a,o,s;if(H(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[bt]=!0,Pn(this),!this._model||n){var u=new Sb(this._api),l=this._theme,f=this._model=new Hh;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,l,this._locale,u)}this._model.setOption(r,{replaceMerge:o},bf);var h={seriesTransition:s,optionChanged:!0};if(i)this[Dt]={silent:a,updateParams:h},this[bt]=!1,this.getZr().wakeUp();else{try{qr(this),Ke.update.call(this,null,h)}catch(c){throw this[Dt]=null,this[bt]=!1,c}this._ssr||this._zr.flush(),this[Dt]=null,this[bt]=!1,Ln.call(this,a),In.call(this,a)}}},t.prototype.setTheme=function(r,n){if(!this[bt]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[Dt]&&(a==null&&(a=this[Dt].silent),o=this[Dt].updateParams,this[Dt]=null),this[bt]=!0,Pn(this);try{this._updateTheme(r),i.setTheme(this._theme),qr(this),Ke.update.call(this,{type:"setTheme"},o)}catch(s){throw this[bt]=!1,s}this[bt]=!1,Ln.call(this,a),In.call(this,a)}}},t.prototype._updateTheme=function(r){F(r)&&(r=Qy[r]),r&&(r=rt(r),r&&sy(r,!0),this._theme=r)},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||K.hasGlobalWindow&&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(){var r=this._zr,n=r.storage.getDisplayList();return b(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;b(n,function(u){i.eachComponent({mainType:u},function(l){var f=o._componentsMap[l.__viewId];f.group.ignore||(a.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 b(a,function(u){u.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Zd[i]){var u=s,l=s,f=-s,h=-s,c=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();b(Qi,function(_,S){if(_.group===i){var T=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(rt(r)),w=_.getDom().getBoundingClientRect();u=a(w.left,u),l=a(w.top,l),f=o(w.right,f),h=o(w.bottom,h),c.push({dom:T,left:w.left,top:w.top})}}),u*=v,l*=v,f*=v,h*=v;var d=f-u,g=h-l,p=ee.createCanvas(),m=Zc(p,{renderer:n?"svg":"canvas"});if(m.resize({width:d,height:g}),n){var y="";return b(c,function(_){var S=_.left-u,T=_.top-l;y+=''+_.dom+""}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new Mt({shape:{x:0,y:0,width:d,height:g},style:{fill:r.connectedBackgroundColor}})),b(c,function(_){var S=new pn({style:{x:_.left*v-u,y:_.top*v-l,image:_.dom}});m.add(S)}),m.refreshImmediately(),p.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return oo(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return oo(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return oo(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=xu(i,r);return b(o,function(s,u){u.indexOf("Models")>=0&&b(s,function(l){var f=l.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(u==="seriesModels"){var h=this._chartsMap[l.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,l))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=xu(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),u=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return u!=null?XC(s,u,n):ZC(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;b(UM,function(i){var a=function(o){var s=r.getModel(),u=o.target,l,f=i==="globalout";if(f?l={}:u&&zi(u,function(g){var p=yt(g);if(p&&p.dataIndex!=null){var m=p.dataModel||s.getSeriesByIndex(p.seriesIndex);return l=m&&m.getDataParams(p.dataIndex,p.dataType,u)||{},!0}else if(p.eventData)return l=k({},p.eventData),!0},!0),l){var h=l.componentType,c=l.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",c=l.seriesIndex);var v=h&&c!=null&&s.getComponent(h,c),d=v&&r[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];l.event=o,l.type=i,r._$eventProcessor.eventInfo={targetEl:u,packedEvent:l,model:v,view:d},r.trigger(i,l)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;b(wf,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),$C(n,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&&Hg(this.getDom(),$h,"");var n=this,i=n._api,a=n._model;b(n._componentsViews,function(o){o.dispose(a,i)}),b(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Qi[n.id]},t.prototype.resize=function(r){if(!this[bt]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Dt]&&(a==null&&(a=this[Dt].silent),i=!0,this[Dt]=null),this[bt]=!0,Pn(this);try{i&&qr(this),Ke.update.call(this,{type:"resize",animation:k({duration:0},r&&r.animation)})}catch(o){throw this[bt]=!1,o}this[bt]=!1,Ln.call(this,a),In.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(H(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!Cf[r]){var i=Cf[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},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=k({},r);return n.type=Tf[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(H(n)||(n={silent:!!n}),!!us[r.type]&&this._model){if(this[bt]){this._pendingActions.push(r);return}var i=n.silent;el.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&K.browser.weChat&&this._throttledZrFlush(),Ln.call(this,i),In.call(this,i)}},t.prototype.updateLabelLayout=function(){ue.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){qr=function(h){QC(h._model);var c=h._scheduler;c.restorePipelines(h._zr,h._model),c.prepareStageTasks(),Ju(h,!0),Ju(h,!1),c.plan()},Ju=function(h,c){for(var v=h._model,d=h._scheduler,g=c?h._componentsViews:h._chartsViews,p=c?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_G(c.get("hoverLayerThreshold"),ry.hoverLayerThreshold)&&!K.node&&!K.worker;(h._usingTHL||p)&&(c.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=h._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){var S=_.states.emphasis;S&&S.hoverLayer!==Cm&&(S.hoverLayer=p?bm:xm)})}}),h._usingTHL=p)}}function s(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function u(h,c){if(!h.preventAutoZ){var v=Em(h);c.eachRendered(function(d){return Rm(d,v.z,v.zlevel),!0})}}function l(h,c){c.eachRendered(function(v){if(!Xi(v)){var d=v.getTextContent(),g=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function f(h,c){var v=h.getModel("stateAnimation"),d=h.isAnimationEnabled(),g=v.get("duration"),p=g>0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Xi(m))return;if(m instanceof mt&&mw(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=p;var _=m.getTextContent(),S=m.getTextGuideLine();_&&(_.stateTransition=p),S&&(S.stateTransition=p)}m.__dirty&&a(m)}})}Yd=function(h){return new((function(c){z(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){Kl(d,g),oe(h)},v.prototype.leaveEmphasis=function(d,g){Ql(d,g),oe(h)},v.prototype.enterBlur=function(d){sw(d),oe(h)},v.prototype.leaveBlur=function(d){um(d),oe(h)},v.prototype.enterSelect=function(d){lm(d),oe(h)},v.prototype.leaveSelect=function(d){fm(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.prototype.getECUpdateCycleVersion=function(){return h[io]},v.prototype.usingTHL=function(){return h._usingTHL},v})(nm))(h)},qy=function(h){function c(v,d){for(var g=0;g=0)){$d.push(r);var o=Ay.wrapStageHandler(r,i);o.__prio=t,o.__raw=r,e.push(o)}}function e0(e,t){Cf[e]=t}function QM(e,t,r){var n=KC("registerMap");n&&n(e,t,r)}var jM=Jb;mn(Xh,IC);mn(Ys,PC);mn(Ys,EC);mn(Xh,WC);mn(Ys,YC);mn(Uy,DM);Jy(sy);t0(PM,Eb);e0("default",RC);fi({type:on,event:on,update:on},Nt);fi({type:Ao,event:Ao,update:Ao},Nt);fi({type:Jo,event:lh,update:Jo,action:Nt,refineEvent:Qh,publishNonRefinedEvent:!0});fi({type:ql,event:lh,update:ql,action:Nt,refineEvent:Qh,publishNonRefinedEvent:!0});fi({type:ts,event:lh,update:ts,action:Nt,refineEvent:Qh,publishNonRefinedEvent:!0});function Qh(e,t,r,n){return{eventContent:{selected:cw(r),isFromClick:t.isFromClick||!1}}}jy("default",{});jy("dark",Ey);function wi(e){return e==null?0:e.length||1}function qd(e){return e}var JM=(function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||qd,this._newKeyGetter=i||qd,this.context=a,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={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_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(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,l),i[u]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,l),i[u]=null;else if(h===1&&c===1)this._update&&this._update(f,l),i[u]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,l),i[u]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var xi=H,ur=Y,oD=typeof Int32Array>"u"?Array:Int32Array,sD="e\0\0",Kd=-1,uD=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],lD=["_approximateExtent"],Qd,uo,bi,Ci,il,Mi,al,fD=(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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;n0(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},u=!1,l={},f=0;f=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,u=s===ae;if(u&&!i.pure)for(var l=[],f=t;f0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),B(a)?a=a.slice():xi(a)&&(a=k({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,xi(r)?k(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){xi(t)?k(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?k(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;qT(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){b(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:ur(this.dimensions,this._getDimInfo,this),this.hostModel)),il(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];j(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(Xf(arguments)))})},e.internalField=(function(){Qd=function(t){var r=t._invertedIndicesMap;b(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new oD(o.categories.length);for(var u=0;u1&&(u+="__ec__"+f),i[r]=u}}})(),e})();function hD(e,t){Vh(e)||(e=uy(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=W(),a=[],o=cD(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&a0(o),u=n===e.dimensionsDefine,l=u?i0(e):jh(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,o));for(var h=W(f),c=new gy(o),v=0;v0&&(M.name=M.name+(C-1))}),new r0({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function cD(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return b(t,function(a){var o;H(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function vD(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var dD=(function(){function e(t){this.coordSysDims=[],this.axisMap=W(),this.categoryAxisMap=W(),this.coordSysName=t}return e})();function pD(e){var t=e.get("coordinateSystem"),r=new dD(t),n=gD[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var gD={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",pe).models[0],a=e.getReferringComponents("yAxis",pe).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),En(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),En(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",pe).models[0];t.coordSysDims=["single"],r.set("single",i),En(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",pe).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),En(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),En(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 i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();b(a.parallelAxisIndex,function(s,u){var l=i.getComponent("parallelAxis",s),f=o[u];r.set(f,l),En(l)&&(n.set(f,l),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=u))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",pe).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function En(e){return e.get("type")==="category"}function mD(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;yD(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var u=!!(e&&e.get("stack")),l,f,h,c,v=!0;function d(S){return S.type!=="ordinal"&&S.type!=="time"}if(b(a,function(S,T){F(S)&&(a[T]=S={name:S}),d(S)||(v=!1)}),b(a,function(S,T){u&&!S.isExtraCoord&&(!n&&!l&&S.ordinalMeta&&(l=S),!f&&d(S)&&(!v||S.coordDim!=="x"&&S.coordDim!=="angle")&&(!i||i===S.coordDim)&&(f=S))}),f&&!n&&!l&&(n=!0),f){h="__\0ecstackresult_"+e.id,c="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var g=f.coordDim,p=f.type,m=0;b(a,function(S){S.coordDim===g&&m++});var y={name:h,coordDim:g,coordDimIndex:m,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},_={name:c,coordDim:c,coordDimIndex:m+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(y.storeDimIndex=s.ensureCalculationDimension(c,p),_.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(y),o.appendCalculationDimension(_)):(a.push(y),a.push(_))}return{stackedDimension:f&&f.name,stackedByDimension:l&&l.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:h}}function yD(e){return!n0(e.schema)}function _D(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function SD(e,t){return _D(e,t)?e.getCalculationInfo("stackResultDimension"):t}function TD(e,t){var r=e.get("coordinateSystem"),n=kh.get(r),i;return t&&t.coordSysDims&&(i=Y(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var u=s.get("type");o.type=rD(u)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function wD(e,t,r){var n,i;return r&&b(e,function(a,o){var s=a.coordDim,u=r.categoryAxisMap.get(s);u&&(n==null&&(n=o),a.ordinalMeta=u.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function Y2(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===ae;var o=pD(t),s=TD(t,o),u=r.useEncodeDefaulter,l=j(u)?u:u?Ct(lb,s,t):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},h=hD(i,f),c=wD(h.dimensions,r.createInvertedIndices,o),v=a?null:n.getSharedDataStore(h),d=mD(t,{schema:h,store:v}),g=new fD(h,t);g.setCalculationInfo(d);var p=c!=null&&xD(i)?function(m,y,_,S){return S===c?_:this.defaultDimValueGetter(m,y,_,S)}:null;return g.hasItemOption=!1,g.initData(a?i:v,null,p),g}function xD(e){if(e.sourceFormat===ae){var t=bD(e.data||[]);return!B(wa(t))}}function bD(e){for(var t=0;t=t[0]&&e<=t[1]},getExtent:function(){return this._extents[me].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){jd(this._extents,me,e,t)},setExtent2:function(e,t,r){var n=this._extents;n[e]||(n[e]=n[me].slice()),jd(n,e,t,r)},freeze:function(){}};function jd(e,t,r,n){jn(r,n)&&(e[t][0]=r,e[t][1]=n)}function l0(e){return cs(e)||ni(e)}function cs(e){return e.type==="interval"}function tc(e){return e.type==="time"}function ni(e){return e.type==="log"}function Xe(e){return e.type==="ordinal"}function ED(e){var t=jf(e),r=dn(10,t),n=er(e/r);return n?n===2?n=3:n===3?n=5:n*=2:n=1,at(n*r,-t)}function cn(e){return dr(e)+2}function lo(e,t){return ra(e)/ra(t)}function ol(e,t,r){var n=r&&r.lookup;if(n){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==n[0]&&u(n[0],!0,!0);for(var s=i;s<=n[1];s+=o)u(s,!1,s===n[0]||s===n[1]);s-o!==n[1]&&u(n[1],!0,!0);function u(l,f,h){r({value:l,offInterval:f},h)}}var c0=(function(e){z(t,e);function t(r){var n=e.call(this)||this;n.type="ordinal",n.parse=t.parse,s0(n,t.decoratedMethods);var i=r.ordinalMeta;i||(i=new Mf({})),B(i)&&(i=new Mf({categories:Y(i,function(o){return H(o)?o.value:o})})),n._ordinalMeta=i;var a=Jh(null,null,r.extent||[0,i.categories.length-1]);return n._mapper=a.mapper,u0(n),n}return t.parse=function(r){return r==null?r=NaN:F(r)?(r=this._ordinalMeta.getOrdinal(r),r==null&&(r=NaN)):r=er(r),r},t.prototype.getTicks=function(){var r=[];return h0(this,0,function(n){r.push(n)}),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,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,u=ne(s,n.length);o=0&&r=0&&r=0&&ro[0]&&go[1]||!isFinite(g)||!isFinite(o[1]))break}else{if(p>d)break;g=ne(g,o[1]),p===d&&(g=o[1])}if(h.push({value:g}),g=at(g+i,s),l){var m=l.calcNiceTickMultiple(g,v);m>=0&&(g=at(g+m*i,s))}if(h.length>0&&g===h[h.length-1].value)break;if(h.length>c)return[]}var y=h.length?h[h.length-1].value:o[1];return a[1]>y&&h.push({value:r.expandToNicedExtent?at(y+i,s):a[1]}),h},t.prototype.getMinorTicks=function(r){return rc(this,r,Mh(this),this._cfg.interval)},t.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=dr(r.value)||0:i==="auto"&&(i=this._cfg.intervalPrecision);var a=at(r.value,i,!0);return $m(a)},t.type="interval",t})(Me);Me.registerClass($n);var OD=function(e,t,r,n){for(;r>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ND(e){var t=30*ge;return e/=t,e>6?6:e>3?3:e>2?2:1}function FD(e){return e/=Zi,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Jd(e,t){return e/=t?Ah:Dh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function zD(e){return ht(Jf(e,!0),1)}function HD(e,t,r){var n=Math.max(0,st(sn,t)-1);return uf(new Date(e),sn[n],r).getTime()}function VD(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function GD(e,t,r,n,i,a){var o=3e3,s=Gx,u=0;function l(R,N,X,$,J,q,tt){for(var et=VD(J,R),V=N,it=new Date(V);Vo));)if(it[J](it[$]()+R),V=it.getTime(),a){var ut=a.calcNiceTickMultiple(V,et);ut>0&&(it[J](it[$]()+ut*R),V=it.getTime())}tt.push({value:V,notAdd:V>n[1]})}function f(R,N,X){var $=[],J=!N.length;if(!kD($i(R),n[0],n[1],r)){J&&(N=[{value:HD(n[0],R,r)},{value:n[1]}]);for(var q=0;q=n[0]&&tt<=n[1]&&l(V,tt,et,it,ut,jt,$),R==="year"&&X.length>1&&q===0&&X.unshift({value:X[0].value-V})}}for(var q=0;q<$.length;q++)X.push($[q])}}for(var h=[],c=[],v=0,d=0,g=0;g=n[0]&&S<=n[1]&&v++)}var T=i/t;if(v>T*1.5&&d>T/1.5||(h.push(y),v>T||e===s[g]))break}c=[]}}}for(var w=kt(Y(h,function(R){return kt(R,function(N){return N.value>=n[0]&&N.value<=n[1]&&!N.notAdd})}),function(R){return R.length>0}),x=w.length-1,D=[],g=0;gn[0])&&D.unshift({value:n[0],time:{level:0,upperTimeUnit:P,lowerTimeUnit:P},notNice:!0}),(!L||L.values&&(a=s);var u=fo.length,l=Math.min(OD(fo,a,0,u),u-1),f=fo[l][1],h=fo[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:f,minLevelUnit:h})};Me.registerClass(v0);var ho=0,co=1,d0=(function(e){z(t,e);function t(r){var n=e.call(this)||this;n.type="log",n.parse=$n.parse,n.base=r.logBase||10;var i=[],a=[];n._lookup={from:i,to:a},i[ho]=i[co]=a[ho]=a[co]=NaN,s0(n,t.mapperMethods),r.breakOption;var o={};return n.powStub=new $n({breakParsed:o.original}),n.intervalStub=new $n({breakParsed:o.transformed}),u0(n,n.intervalStub),n}return t.prototype.getTicks=function(r){var n=this.base,i=this.powStub,a=this.intervalStub,o=a.getExtent(),s=i.getExtent(),u={lookup:{from:o,to:s}};return Y(a.getTicks(r||{}),function(l){var f=l.value,h=ol(f,n,u),c;return{value:h,break:c}},this)},t.prototype.getMinorTicks=function(r){return rc(this,r,Mh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(r,n){return this.intervalStub.getLabel(r,n)},t.type="log",t.mapperMethods={needTransform:function(){return!0},normalize:function(r){return this.intervalStub.normalize(lo(r,this.base))},scale:function(r){return ol(this.intervalStub.scale(r),this.base,null)},transformIn:function(r,n){return r=lo(r,this.base),n&&n.depth===fs?r:this.intervalStub.transformIn(r,n)},transformOut:function(r,n){var i=n?n.depth:null;return tp.depth=i,ep.lookup=this._lookup,ol(i===fs?r:this.intervalStub.transformOut(r,tp),this.base,ep)},contain:function(r){return this.powStub.contain(r)},setExtent:function(r,n){this.setExtent2(me,r,n)},setExtent2:function(r,n,i){if(!(!jn(n,i)||n<=0||i<=0)){var a=rp,o=rp;if(r===me){var s=this._lookup;a=s.to,o=s.from}this.powStub.setExtent2(r,a[ho]=n,a[co]=i);var u=this.base;this.intervalStub.setExtent2(r,o[ho]=lo(n,u),o[co]=lo(i,u))}},getFilter:function(){return{g:0}},sanitize:function(r,n){return jn(n[0],n[1])&&Ge(r)&&r<=0&&(r=n[0]),r},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(r,n){return n===null?this.powStub.getExtentUnsafe(r,null):this.intervalStub.getExtentUnsafe(r,n)}},t})(Me);Me.registerClass(d0);var tp={},ep={},rp=[],p0={value:1,category:1,time:1,log:1},g0=vt();function WD(e){var t=e.get("type");return(t==null||!qt(p0,t)&&!Me.getClass(t))&&(t="value"),t}function YD(e,t,r){var n;switch(t){case"category":return new c0({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Ee()});case"time":return new v0({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC"),breakOption:n});case"log":return new d0({logBase:e.get("logBase"),breakOption:n});case"value":return new $n({breakOption:n});default:return new(Me.getClass(t)||$n)({})}}function XD(e,t,r){var n=e.getExtentUnsafe(me,null),i=n[0],a=n[1];return jn(i,a)?i===t||a===t?$D:it?ZD:Df:Df}var ZD=1,$D=2,Df=3;function qD(e){g0(e).noOnMyZero=!0}function KD(e){return g0(e).noOnMyZero}function Zs(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=Ux(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(F(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(j(t)){if(e.type==="category")return function(i,a){return t(vs(e,i),i.value-e.scale.getExtent()[0],null)};var n=Hs();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(vs(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function vs(e,t){var r=e.scale;return Xe(r)?r.getLabel(t):t.value}function nc(e){var t=e.get("interval");return t??"auto"}function QD(e){return e.type==="category"&&nc(e.getLabelModel())===0}function jD(e,t){var r={};return b(e.mapDimensionsAll(t),function(n){r[SD(e,n)]=!0}),gt(r)}function ii(e){return e==="middle"||e==="center"}function da(e){return e.getShallow("show")}function JD(e,t,r){var n=e.get("breaks",!0);n==null}function m0(e,t,r,n,i,a){var o=ni(e),s=o?e.intervalStub:e;if(s.setExtent(n[0],n[1]),o){var u=e.powStub,l={depth:fs},f=e.transformOut(n[0],l),h=e.transformOut(n[1],l),c=RD(r,n);t[0]&&!c[0]&&(f=i[0]),t[1]&&!c[1]&&(h=i[1]),u.setExtent(f,h)}s.setConfig(a)}function $s(e,t){return Xe(e)?e.getRawOrdinalNumber(t.value):t.value}function y0(e,t){return Xe(e)&&!!t.get("boundaryGap")}var tA=(function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e})(),eA=YS(),np="|&",hi=vt(),rA=-2,X2=-1,nA=vt();function _0(e,t){var r=e.model,n=hi(li(r.ecModel)).keyed,i=n&&n.get(t);return i&&i.get(r.uid)}function iA(e,t){return T0(_0(e,t))}function aA(e,t){var r=[];return S0(e.model.ecModel,function(n){for(var i=0;i0&&h[1]>0&&!c[0]&&(h[0]=0),h[0]<0&&h[1]<0&&!c[1]&&(h[1]=0));var S=!1;h[0]>h[1]&&(h.reverse(),S=!0);var T=Di(t,r.get("startValue",!0)),w=T!=null;!Ge(T)&&i&&(T=t.getDefaultStartValue?t.getDefaultStartValue():0),Ge(T)&&(w||!y||_)&&(Th[1]&&!c[1]&&(h[1]=T,c[1]=!0));var x=this._i={scale:t,dataMM:f,noZoomEffMM:h,zoomMM:[],fixMM:c,zoomFixMM:[!1,!1],startValue:T,isBlank:m,incl0:_,tggAxInv:S,ctnShp:a};ap(x,h)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var t=this._i,r=t.zoomMM,n=t.noZoomEffMM,i=t.zoomFixMM,a=t.fixMM,o={fixMM:a,zoomFixMM:i,isBlank:t.isBlank,incl0:t.incl0,tggAxInv:t.tggAxInv,ctnShp:t.ctnShp,effMM:n.slice()},s=o.effMM;return r[0]!=null&&(s[0]=r[0],a[0]=i[0]=!0),r[1]!=null&&(s[1]=r[1],a[1]=i[1]=!0),ap(t,s),o},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(t,r){this._i.zoomMM[t]=r},e})();function ap(e,t){var r=e.scale,n=e.dataMM;r.sanitize&&(t[0]=r.sanitize(t[0],n),t[1]=r.sanitize(t[1],n),WS(t))}function Di(e,t){return t==null?null:ea(t)?NaN:e.parse(t)}function hA(e,t){var r;if(Xe(e))r=[0,0];else{var n=t.get("boundaryGap");typeof n=="boolean"&&(n=null),r=B(n)?n:[n,n]}return[op(r[0]),op(r[1])]}function op(e){return Qn(typeof e=="boolean"?0:e,1)||0}function M0(e){var t=uA(e.scale);return t.extent||(t.extent=Ee()),t}function cA(e,t){M0(e).dimIdxInCoord=t.get(e.dim)}function vA(e,t){var r=e.scale,n=e.model,i=e.dim;r.rawExtentInfo||dA(r,e,i,n,t)}function dA(e,t,r,n,i){var a=M0(t),o=a.extent,s=!1;oA(t,function(f){if(f.boxCoordinateSystem){var h=Jm(f).coord,c=a.dimIdxInCoord;if(c>=0){if(B(h)){var v=h[c];v!=null&&!B(v)&&VS(o,e.parse(v))}}}else if(f.coordinateSystem){var d=f.getData();if(d){var g=e.getFilter?e.getFilter():null;b(jD(d,r),function(p){GS(o,d.getApproximateExtent(p,g))})}f.__requireStartValue&&f.__requireStartValue(t)&&(s=!0)}});var u=gA(e,t,n),l=new C0(e,n,o,s,u);D0(e,l,i),a.extent=null}function pA(e,t){var r=e.scale;D0(r,new C0(r,e.model,t,!1,!1),fA)}function D0(e,t,r){e.rawExtentInfo=t,t.from=r}function j2(e,t){ic.set(e,t)}var ic=W();function A0(e,t,r,n,i){e.rawExtentInfo||pA({scale:e,model:t},Ee());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),n&&a.tggAxInv&&r&&!r.get("legacyMinMaxDontInverseAxis")&&(n.inverse=!n.inverse),a}function gA(e,t,r){var n=y0(e,r),i=r.get("containShape",!0);if(i==null&&!n&&(i=!0),!i)return!1;var a=!1;return x0(t,function(o){a=!!ic.get(o)||a}),a}function mA(e,t,r,n){if(r.ctnShp){var i;if(x0(e,function(s){var u=ic.get(s);if(u){var l=u(e,n);l&&(i=i||[0,0],Vg(i,l[0]),Gg(i,l[1]),qD(e))}}),!!i){var a=t.getExtent();if(Xe(t))e.onBand||t.setExtent2(ca,ne(a[0],a[0]+i[0]),ht(a[1],a[1]+i[1]));else{var o=a.slice();r.zoomFixMM[0]||(o[0]=ne(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),r.zoomFixMM[1]||(o[1]=ht(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(ca,o[0],o[1])}}}}function sp(e,t){var r=ni(e),n=r?e.intervalStub:e,i=t.fixMinMax||[],a=r?e.getExtent():null,o=n.getExtent(),s=f0(o,i,t.rawExtentResult);n.setExtent(s[0],s[1]),s=n.getExtent();var u=r?_A(n,t):yA(n,t),l=u.intervalPrecision,f=u.interval,h=t.userInterval;h!=null&&(u.interval=h,u.intervalPrecision=cn(h)),i[0]||(s[0]=at(ln(s[0]/f)*f,l)),i[1]||(s[1]=at(Ta(s[1]/f)*f,l)),h!=null&&(u.niceExtent=s.slice()),m0(e,i,o,s,a,u)}function yA(e,t){var r=ec(t.splitNumber,5),n=Xs(e),i=t.minInterval,a=t.maxInterval,o=Jf(n/r,!0);i!=null&&oa&&(o=a);var s=cn(o),u=e.getExtent(),l=[at(Ta(u[0]/o)*o,s),at(ln(u[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function _A(e,t){var r=ec(t.splitNumber,10),n=e.getExtent(),i=Xs(e),a=ht(Og(i),1),o=r/i*a;o<=.5&&(a*=10);var s=cn(a),u=[at(Ta(n[0]/a)*a,s),at(ln(n[1]/a)*a,s)];return{intervalPrecision:s,interval:a,niceExtent:u}}function up(e){var t=e.scale,r=e.model,n=r.axis,i=r.ecModel;SA(t,r,n,i)}function SA(e,t,r,n,i){var a=A0(e,t,n,r),o=cs(e)||tc(e);TA(e,{splitNumber:t.get("splitNumber"),fixMinMax:a.fixMM,userInterval:t.get("interval"),minInterval:o?t.get("minInterval"):null,maxInterval:o?t.get("maxInterval"):null,rawExtentResult:a}),r&&n&&mA(r,e,a,n)}function TA(e,t){wA[e.type](e,t)}var wA={interval:sp,log:sp,time:UD,ordinal:Nt},lp=[],xA={registerPreprocessor:Jy,registerProcessor:t0,registerPostInit:ZM,registerPostUpdate:$M,registerUpdateLifecycle:qh,registerAction:fi,registerCoordinateSystem:qM,registerLayout:KM,registerVisual:mn,registerTransform:jM,registerLoading:e0,registerMap:QM,registerImpl:qC,PRIORITY:HM,ComponentModel:ft,ComponentView:Ue,SeriesModel:hn,ChartView:un,registerComponentModel:function(e){ft.registerClass(e)},registerComponentView:function(e){Ue.registerClass(e)},registerSeriesModel:function(e){hn.registerClass(e)},registerChartView:function(e){un.registerClass(e)},registerCustomSeries:function(e,t){},registerSubTypeDefaulter:function(e,t){ft.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){hS(e,t)}};function vn(e){if(B(e)){b(e,function(t){vn(t)});return}st(lp,e)>=0||(lp.push(e),j(e)&&(e={install:e}),e.install(xA))}var bA=vt(),ji=vt(),xe={estimate:1,determine:2};function ds(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function CA(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=e.scale;return{labels:Y(L0(r,n),function(i,a){return{formattedLabel:Zs(e)(i,a),rawLabel:n.getLabel(i),tick:i}})}}return e.type==="category"?DA(e,t):LA(e)}function MA(e,t,r){var n=e.scale,i=e.getTickModel().get("customValues");return i?{ticks:L0(i,n)}:e.type==="category"?AA(e,t):{ticks:n.getTicks(r)}}function L0(e,t){var r=t.getExtent(),n=[];return b(e,function(i){i=t.parse(i),i>=r[0]&&i<=r[1]&&n.push(i)}),nh(n,$S,null),Eg(n),Y(n,function(i){return{value:i}})}function DA(e,t){var r=e.getLabelModel(),n=I0(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function I0(e,t,r){var n=PA(e),i=nc(t),a=r.kind===xe.estimate;if(!a){var o=E0(n,i);if(o)return o}var s,u;j(i)?s=ps(e,i,!1):(u=i==="auto"?EA(e,r):i,s=ps(e,u,!1));var l={labels:s,labelCategoryInterval:u};return a?r.out.noPxChangeTryDetermine.push(function(){return If(n,i,l),!0}):If(n,i,l),l}function AA(e,t){var r=IA(e),n=nc(t),i=E0(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),j(n))a=ps(e,n,!0);else if(n==="auto"){var s=I0(e,e.getLabelModel(),ds(xe.determine));o=s.labelCategoryInterval,a=Y(s.labels,function(u){return u.tick})}else o=n,a=ps(e,o,!0);return If(r,n,{ticks:a,tickCategoryInterval:o})}function LA(e){var t=e.scale.getTicks(),r=Zs(e);return{labels:Y(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tick:n}})}}var IA=P0("axisTick"),PA=P0("axisLabel");function P0(e){return function(r){return ji(r)[e]||(ji(r)[e]={list:[]})}}function E0(e,t){for(var r=0;rf&&(l=Math.max(1,Math.floor(u/f)));for(var h=s[0],c=e.dataToCoord(h+1)-e.dataToCoord(h),v=Math.abs(c*Math.cos(a)),d=Math.abs(c*Math.sin(a)),g=0,p=0;h<=s[1];h+=l){var m=0,y=0,_=Dg(i({value:h}),n.font,"center","top");m=_.width*1.3,y=_.height*1.3,g=Math.max(g,m,7),p=Math.max(p,y,7)}var S=g/v,T=p/d;isNaN(S)&&(S=1/0),isNaN(T)&&(T=1/0);var w=Math.max(0,Math.floor(Math.min(S,T)));if(r===xe.estimate)return t.out.noPxChangeTryDetermine.push(_t(OA,null,e,w,u)),w;var x=R0(e,w,u);return x??w}function OA(e,t,r){return R0(e,t,r)==null}function R0(e,t,r){var n=bA(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function kA(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 ps(e,t,r){var n=Zs(e),i=e.scale,a=[],o=j(t);return h0(i,o?0:t,function(s,u){var l=i.getLabel(s);if(o){var f=!!t(s.value,l);if(s.offInterval=!f,!f&&!u)return}a.push(r?s:{formattedLabel:n(s),rawLabel:l,tick:s})}),a}var BA=.8;function qs(e,t){t=t||{};var r={w:NaN,w2:NaN},n=e.scale,i=t.fromStat,a=t.min,o=LD(n);Ge(o)||(o=NaN);var s=e.getExtent(),u=Lt(s[1]-s[0]);return Xe(n)?NA(r,e,o,u):i&&FA(r,e,o,u,i),a!=null&&(r.w=Ge(r.w)?ht(a,r.w):a),r}function NA(e,t,r,n){var i=t.onBand,a=r+(i?1:0);a===0&&(a=1),e.w=n/a,!i&&r&&n&&(e.w2=e.w*r/n)}function FA(e,t,r,n,i){var a=!1,o=-1/0;b(i.key?[iA(t,i.key)]:aA(t,i.sers||[]),function(s){var u=s.liPosMinGap;u!=null&&(u>0?(u>o&&(o=u),a=!1):u===rA&&(a=!0))}),Ge(r)&&r>0&&Ge(o)?(e.w=n/r*o,e.w2=o):a&&(e.w=n*BA,e.w2=e.w*r/n)}var fp=[0,1],zA=(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]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},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.scale;return t=n.normalize(n.parse(t)),qc(t,fp,hp(this),r)},e.prototype.coordToData=function(t,r){var n=qc(t,hp(this),fp,r);return this.scale.scale(n)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=MA(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=Y(n.ticks,function(s){return{coord:this.dataToCoord($s(this.scale,s)),tick:s}},this),a=r.get("alignWithLabel"),o=HA(this,i,a);return Y(i,function(s){return{coord:s.coord,tickValue:s.tick.value,onBand:o}})},e.prototype.getMinorTicksCoords=function(){if(Xe(this.scale))return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=Y(n,function(a){return Y(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||ds(xe.determine),CA(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){return qs(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(t){return t=t||ds(xe.determine),RA(this,t)},e})();function hp(e){var t=e.getExtent();if(e.onBand){var r=t[1]-t[0],n=r/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function HA(e,t,r){var n=t.length;if(!e.onBand||r||!n)return!1;var i=qs(e).w;if(!i)return!1;b(t,function(s){s.coord-=i/2});var a=e.scale.getExtent(),o=t[n-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var cp=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],VA=1,gs=2,O0=VA|gs;function ms(e,t,r){r=r||O0,t?e.dirty|=r:e.dirty&=~r}function k0(e,t){return t=t||O0,e.dirty==null||!!(e.dirty&t)}function Cr(e){if(e)return k0(e)&&GA(e,e.label,e),e}function GA(e,t,r){var n=t.getComputedTransform();e.transform=wh(e.transform,n);var i=e.localRect=oa(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=r&&r.marginForce,u=r&&r.minMarginForce,l=r&&r.marginDefault,f=a.__marginType;f==null&&l&&(o=l,f=Vn.textMargin);for(var h=0;h<4;h++)sl[h]=f===Vn.minMargin&&u&&u[h]!=null?u[h]:s&&s[h]!=null?s[h]:o?o[h]:0;f===Vn.textMargin&&es(i,sl,!1,!1);var c=e.rect=oa(e.rect,i);return n&&c.applyTransform(n),f===Vn.minMargin&&es(c,sl,!1,!1),e.axisAligned=Th(n),(e.label=e.label||{}).ignore=t.ignore,ms(e,!1),ms(e,!0,gs),e}var sl=[0,0,0,0];function UA(e,t,r){return e.transform=wh(e.transform,r),e.localRect=oa(e.localRect,t),e.rect=oa(e.rect,t),r&&e.rect.applyTransform(r),e.axisAligned=Th(r),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function WA(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var r=e.transform;r&&(r[4]+=t.x,r[5]+=t.y);var n=e.rect;n&&(n.x+=t.x,n.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,r)}}function vp(e,t){for(var r=0;r0){S(C*M,0,a);var A=C+x;A<0&&T(-A*M,1)}else T(-x*M,1)}}function S(x,D,M){x!==0&&(f=!0);for(var C=D;C0)for(var A=0;A0;A--){var E=M[A-1]*P;S(-E,A,a)}}}function w(x){var D=x<0?-1:1;x=Math.abs(x);for(var M=Math.ceil(x/(a-1)),C=0;C0?S(M,0,C+1):S(-M,a-C-1,a),x-=M,x<=0)return}return f}function YA(e){var t=[];e.sort(function(l,f){return(f.suggestIgnore?1:0)-(l.suggestIgnore?1:0)||f.priority-l.priority});function r(l){if(!l.ignore){var f=l.ensureState("emphasis");f.ignore==null&&(f.ignore=!1)}l.ignore=!0}for(var n=0;n(r[n]=t(n),r),{})}function $A(e,t,r){yo([r,e,t],([n,i,a],o,s)=>{let u=null;if(n&&i&&a){const{offsetWidth:l,offsetHeight:f}=n,{throttle:h=100,onResize:c}=a===!0?{}:a;let v=!1;const d=()=>{i.resize(),c==null||c()},g=h?Wh(d,h):d;u=new ResizeObserver(()=>{!v&&(v=!0,n.offsetWidth===l&&n.offsetHeight===f)||n.offsetWidth===0||n.offsetHeight===0||g()}),u.observe(n)}s(()=>{u&&(u.disconnect(),u=null)})})}const qA={autoresize:[Boolean,Object]},KA=Symbol();function QA(e,t,r){const n=_o(KA,{}),i=Pi(()=>({...So(n),...r==null?void 0:r.value}));tg(()=>{const a=e.value;a&&(t.value?a.showLoading(i.value):a.hideLoading())})}const jA={loading:Boolean,loadingOptions:Object};function B0(){return typeof window<"u"&&typeof document<"u"}const JA=/^on[^a-z]/,N0=e=>JA.test(e);function tL(e){const t={};for(const r in e)N0(r)||(t[r]=e[r]);return t}function eL(e){const t=Number(e);return Number.isInteger(t)&&t>=0&&te===t||e.startsWith(t+"-"))}function iL(e,t){const r=B0()?document.createElement("div"):void 0,n=Ks({}),i=Ks({}),a=Ks({}),o=Sl(!1),s=()=>o.value&&r?_l(x_,{to:r},Object.entries(e).filter(([h])=>ul(h)).map(([h,c])=>{const v=h;return _l("div",{ref:d=>{d instanceof HTMLElement&&(n[v]=d)},style:{display:"contents"}},i[v]?c==null?void 0:c(a[v]):void 0)})):void 0;function u(h){return h!==null&&typeof h=="object"&&!Array.isArray(h)}function l(h){const c={...h},v=(d,g)=>{const p=d[g];if(Array.isArray(p))return d[g]=[...p],d[g];if(u(p))return d[g]={...p},d[g];if(p===void 0)return d[g]=eL(g)?[]:{},d[g]};return Object.keys(e).filter(d=>ul(d)).forEach(d=>{const[g,...p]=d.split("-"),m=z0[g];if(!m)return;const y=[...p,...m];if(y.length===0)return;let _=c;for(let S=0;S(i[d]=!0,a[d]=S,n[d])}),c}let f=[];return T_(()=>{const h=Object.keys(e).filter(ul);rL(h,f)||(f.forEach(c=>{h.includes(c)||(delete a[c],delete i[c],delete n[c])}),f=h,t())}),eg(()=>{o.value=!0}),w_(()=>{r==null||r.remove()}),{teleportedSlots:s,patchOption:l}}let lr=null;const Pf="x-vue-echarts";function aL(){if(lr!=null)return lr;const e=globalThis.customElements;if(!B0()||!(e!=null&&e.get))return lr=!1,lr;if(!e.get(Pf))try{class t extends HTMLElement{constructor(){super(...arguments);cc(this,"__dispose",null)}disconnectedCallback(){this.__dispose&&(this.__dispose(),this.__dispose=null)}}e.define(Pf,t)}catch{return lr=!1,lr}return lr=!0,lr}function oL(e){if(!F0(e))return;const t=e.id;if(typeof t=="string")return t;if(typeof t=="number"&&Number.isFinite(t))return String(t)}function pp(e){const t=e,r=Array.isArray(t.options)?t.options.length:0,n=Array.isArray(t.media)?t.media.length:0,i=Object.create(null),a=[],o=[];for(const s of Object.keys(t)){if(s==="options"||s==="media")continue;const u=t[s];if(Array.isArray(u)){const l=u,f=new Set;let h=0;for(let c=0;c0?Array.from(f).sort():[],noIdCount:h}}else F0(u)?a.push(s):u!==void 0&&o.push(s)}return a.length>1&&a.sort(),o.length>1&&o.sort(),{optionsLength:r,mediaLength:n,arrays:i,objects:a,scalars:o}}function gp(e,t){if(e.length===0)return[];if(t.length===0)return e.slice();const r=new Set(t),n=[];for(let i=0;i0)return{option:t,signature:r,plan:{notMerge:!0}};const n=new Set,i=new Map,a=gp(e.objects,r.objects);for(let l=0;l0||f.noIdCount>0)&&(i.set(l,[]),n.add(l));continue}if(sL(f.idsSorted,h.idsSorted)){n.add(l);continue}h.noIdCount0){const l={...t};i.forEach((f,h)=>{l[h]=f}),o=l,s=pp(o)}const u=n.size>0?Array.from(n).sort():void 0;return{option:o,signature:s,plan:u?{notMerge:!1,replaceMerge:u}:{notMerge:!1}}}var mp=`x-vue-echarts{display:block;width:100%;height:100%;min-width:0;} x-vue-echarts>:first-child,x-vue-echarts>:first-child>canvas{border-radius:inherit;} `;if(typeof document<"u")if(Array.isArray(document.adoptedStyleSheets)&&"replaceSync"in CSSStyleSheet.prototype){const e=new CSSStyleSheet;e.replaceSync(mp),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}else{const e=document.createElement("style");e.textContent=mp,document.head.appendChild(e)}const lL=aL(),fL=Symbol(),hL=Symbol(),cL=Symbol();var vL=m_({name:"Echarts",inheritAttrs:!1,props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...qA,...jA},emits:{},slots:Object,setup(e,{attrs:t,expose:r,slots:n}){const i=Sl(),a=Sl(),o=_o(fL,null),s=_o(hL,null),u=_o(cL,null),{autoresize:l,manualUpdate:f,loading:h,loadingOptions:c}=y_(e),v=Pi(()=>e.theme||So(o)),d=Pi(()=>e.initOptions||So(s)||void 0),g=Pi(()=>e.updateOptions||So(u)),p=Pi(()=>tL(t)),m={},y=new Map,{teleportedSlots:_,patchOption:S}=iL(n,()=>{!f.value&&e.option&&a.value&&x(a.value,e.option)});let T;function w(I){const L={},P=((I==null?void 0:I.replaceMerge)??[]).filter(E=>E!=null);return P.length>0&&(L.replaceMerge=[...new Set(P)]),(I==null?void 0:I.notMerge)!==void 0&&(L.notMerge=I.notMerge),L}function x(I,L,P,E=!1){const R=S(L);if(E){I.setOption(R,P??{}),T=void 0;return}if(g.value){const $=P??g.value;I.setOption(R,$),T=void 0;return}const N=uL(T,R),X=w(N.plan);I.setOption(N.option,X),T=N.signature}Object.keys(t).filter(I=>N0(I)).forEach(I=>{if(I.indexOf("Native:")===2){const R=`on${I.charAt(9).toUpperCase()}${I.slice(10)}`;m[R]=t[I];return}let L=I.charAt(2).toLowerCase()+I.slice(3),P;L.indexOf("zr:")===0&&(P=!0,L=L.substring(3));let E;L.substring(L.length-4)==="Once"&&(E=!0,L=L.substring(0,L.length-4)),y.set({event:L,zr:P,once:E},t[I])});function D(){if(!i.value)return;const I=a.value=YM(i.value,v.value,d.value);e.group&&(I.group=e.group),y.forEach((E,{zr:R,once:N,event:X})=>{if(!E)return;const $=R?I.getZr():I;if(N){const J=E;let q=!1;E=(...tt)=>{q||(q=!0,J(...tt),$.off(X,E))}}$.on(X,E)});function L(){I&&!I.isDisposed()&&I.resize()}function P(){const{option:E}=e;if(f.value){E&&x(I,E,void 0,!0);return}E&&x(I,E)}l.value?S_(()=>{L(),P()}):P()}const M=(I,L,P)=>{if(!e.manualUpdate)return;const E=typeof L=="boolean"?{notMerge:L,lazyUpdate:P}:L;a.value&&x(a.value,I,E??void 0,!0)};function C(){a.value&&(a.value.dispose(),a.value=void 0),T=void 0}yo(()=>e.option,I=>{if(!I){T=void 0;return}f.value||a.value&&x(a.value,I)},{deep:!0}),yo([f,d],()=>{C(),D()},{deep:!0}),yo(v,I=>{var L;(L=a.value)==null||L.setTheme(I||{})},{deep:!0}),tg(()=>{e.group&&a.value&&(a.value.group=e.group)});const A=ZA(a);return QA(a,h,c),$A(a,l,i),eg(()=>{D()}),__(()=>{lL&&i.value?i.value.__dispose=C:C()}),r({setOption:M,root:i,chart:a,...A}),(()=>_l(Pf,{...p.value,...m,ref:i,class:["echarts",p.value.class]},_()))}}),tP=vL;function yp(e,t,r){var n=ee.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}function ll(e){return!e.__cursors.get(Tm)}function _p(e){var t=e.__cursors.get(Tm);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var H0=(function(e){z(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.zlevel=0,a.zlevel2=Lo,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__prevIdx={startIdx:0,endIdx:0};var o;i=i||$o,typeof r=="string"?o=yp(r,n,i):H(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(sg(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.afterBrush=function(){this.__prevIdx=_p(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=yp("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,u=!1,l=new Z(0,0,0,0);function f(S){if(!(!S.isFinite()||S.isZero()))if(o.length===0){var T=new Z(0,0,0,0);T.copy(S),o.push(T)}else{for(var w=!1,x=1/0,D=0,M=0;M=s)}}for(var h=_p(this),c=h.startIdx;c=0)&&(o=!0)}),!(!o&&!a.__dirty)){var s=n._opts.useDirtyRect&&!ll(a)?a.createRepaintRects(t,r,n._width,n._height):null,u=n._i.layerStack[0],l=!0;if(a.__dirty){l=!1,a.__dirty=!1;var f=a.zlevel===u.zl&&a.zlevel2===u.zl2?n._backgroundColor:null;a.clear(!1,f,s)}vo(a,function(h){var c=n._paintPerCursor(a,h,t,s,l);i=i&&c})}},po),K.wxa&&Rt(this._i,function(a){a&&a.ctx&&a.ctx.draw&&a.ctx.draw()}),i},e.prototype._paintPerCursor=function(t,r,n,i,a){var o=t.ctx;if(i)if(!i.length)r.drawIdx=r.endIdx;else for(var s=this.dpr,u=0;u=r.endIdx},e.prototype._paintPerCursorInRect=function(t,r,n,i,a){for(var o={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:a}},s=t.ctx,u=ll(t),l=u&&ee.getTime(),f=r.drawIdx,h=r.notClearIdx,c=h>=0?Math.min(h,f):f;c15){c++;break}}}}Zn(s,o),r.drawIdx=Math.max(c,f)},e.prototype.getLayer=function(t,r){return this._ensureLayer(t,0,r)},e.prototype._ensureLayer=function(t,r,n){r=r||0;var i=this._singleCanvas;i&&!this._needsManuallyCompositing&&(t=Kr,r=0);var a=cl(this._i,t)[r];return a||(a=Tp("zr_"+t+"."+r,this,t,r),this._layerConfig[t]&<(a,this._layerConfig[t],!0),(n||i&&t!==Kr)&&(a.virtual=!0),this._insertLayer(a,t,r,!1),a.initContext()),a},e.prototype.insertLayer=function(t,r){this._insertLayer(r,t,0,!1)},e.prototype._insertLayer=function(t,r,n,i){var a=this._i,o=a.layers,s=a.layerStack,u=this._domRoot,l=null;if(!(o[r]&&o[r][n])&&pL(t)){for(var f=s.length,h=0;h0&&(l=cl(a,s[h-1].zl)[s[h-1].zl2]),s.splice(h,0,{zl:r,zl2:n}),cl(a,r)[n]=t,!i&&!t.virtual)if(l){var c=l.dom;c.nextSibling?u.insertBefore(t.dom,c.nextSibling):u.appendChild(t.dom)}else u.firstChild?u.insertBefore(t.dom,u.firstChild):u.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(t,r){return Rt(this._i,function(n,i){t.call(r,n,i)})},e.prototype.eachBuiltinLayer=function(t,r){return Rt(this._i,function(n,i){t.call(r,n,i)},Ji)},e.prototype.eachOtherLayer=function(t,r){return Rt(this._i,function(n,i){t.call(r,n,i)},Ef)},e.prototype.getLayers=function(){var t={};return Rt(this._i,function(r,n,i){t[r.id]=r}),t},e.prototype._updateLayerStatus=function(t,r){var n=this;if(n._singleCanvas)for(var i=1;i=0;_--){var S=y.get(m[_]);if(!S.used)p.__dirty=!0,y.removeKey(m[_]),m.splice(_,1);else{var T=S.endIdxNew;(ll(p)?T=0;i--){var a=r[i];if(a.zl===t){var o=n[t][a.zl2];if(o.__builtin__)continue;if(r.splice(i,1),n[t][a.zl2]=void 0,!o.virtual){var s=o.dom.parentNode;s&&s.removeChild(o.dom)}}}},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;t!=null&&(i.width=t),r!=null&&(i.height=r),t=no(a,0,i),r=no(a,1,i),n.style.display="",(this._width!==t||r!==this._height)&&(n.style.width=t+"px",n.style.height=r+"px",Rt(this._i,function(o){o.resize(t,r)}),this.refresh({paintAll:!0})),this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this._ensureLayer(Kr).resize(t,r)}return this},e.prototype.clearLayer=function(t){b(this._i.layers[t],function(r){r&&!r.__builtin__&&r.clear()})},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[Kr][0].dom;var r=new H0("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var n=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;Rt(this._i,function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},s=this.storage.getDisplayList(!0),u=0,l=s.length;u=0&&n.push(t[a])}return n.join(" ")}var SL=typeof Float32Array!==ui?Float32Array:void 0,iP=typeof Float64Array!==ui?Float64Array:void 0;function aP(e){return TL({ctor:SL},e).arr}function TL(e,t){var r=e.arr,n=e.ctor;if(t>Kc&&(t=Kc),!r||e.typed&&r.lengtht&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){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){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/v)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(l.dim),1/v));var d=void 0;F(a)?d=bL[a]:j(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/v,d,CL))}}}}}var ML=(function(e){z(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"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})(zA),DL=null;function AL(){return DL}var LL="expandAxisBreak",pr=Math.PI,IL=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],PL=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ai=vt(),U0=vt(),W0=(function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e})();function EL(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,u=oc(e.axisName)&&ii(e.nameLocation);b(n,function(d){var g=Cr(d);if(!(!g||g.label.ignore)){o.push(g);var p=a.transGroup;u&&(p.transform?ya(Ai,p.transform):ma(Ai),g.transform&&Vi(Ai,Ai,g.transform),Z.copy(go,g.localRect),go.applyTransform(Ai),s?s.union(go):Z.copy(s=new Z(0,0,0,0),go))}});var l=Math.abs(a.dirVec.x)>.1?"x":"y",f=a.transGroup[l];if(o.sort(function(d,g){return Math.abs(d.label[l]-f)-Math.abs(g.label[l]-f)}),u&&s){var h=i.getExtent(),c=Math.min(h[0],h[1]),v=Math.max(h[0],h[1])-c;s.union(new Z(c,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Ai=Be(),go=new Z(0,0,0,0),Y0=function(e,t,r,n,i,a){if(ii(e.nameLocation)){var o=a.stOccupiedRect;o&&X0(UA({},o,a.transGroup.transform),n,i)}else Z0(a.labelInfoList,a.dirVec,n,i)};function X0(e,t,r){var n=new ct;ac(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&WA(t,n)}function Z0(e,t,r,n){for(var i=ct.dot(n,t)>=0,a=0,o=e.length;a0?"top":"bottom",a="center"):Ko(i-pr)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},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})(),RL=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],OL={axisLine:function(e,t,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),!!s){var u=n.axis.getExtent(),l=a.transform,f=[u[0],0],h=[u[1],0],c=f[0]>h[0];l&&(ye(f,f,l),ye(h,h,l));var v=k({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&ns(n.axis.scale))AL().buildAxisBreakLine(n,i,a,d);else{var g=new xr(k({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},d));aa(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var p=n.get(["axisLine","symbol"]);if(p!=null){var m=n.get(["axisLine","symbolSize"]);F(p)&&(p=[p,p]),(F(m)||Tt(m))&&(m=[m,m]);var y=hM(n.get(["axisLine","symbolOffset"])||0,m),_=m[0],S=m[1];b([{rotate:e.rotation+Math.PI/2,offset:y[0],r:0},{rotate:e.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],function(T,w){if(p[w]!=="none"&&p[w]!=null){var x=Yh(p[w],-_/2,-S/2,_,S,v.stroke,!0),D=T.r+T.offset,M=c?h:f;x.attr({rotation:T.rotate,x:M[0]+D*Math.cos(e.rotation),y:M[1]-D*Math.sin(e.rotation),silent:!0,z2:11}),i.add(x)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){var u=xp(t,i,s);u&&wp(e,t,r,n,i,a,o,xe.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){var u=xp(t,i,s);u&&wp(e,t,r,n,i,a,o,xe.determine);var l=FL(e,i,a,n);NL(e,t.labelLayoutList,l),zL(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var u=r.ensureRecord(n);t.nameEl&&(i.remove(t.nameEl),t.nameEl=u.nameLayout=u.nameLocation=null);var l=e.axisName;if(oc(l)){var f=e.nameLocation,h=e.nameDirection,c=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,d=n.axis.getExtent(),g=n.axis.inverse?-1:1,p=new ct(0,0),m=new ct(0,0);f==="start"?(p.x=d[0]-g*v,m.x=-g):f==="end"?(p.x=d[1]+g*v,m.x=g):(p.x=(d[0]+d[1])/2,p.y=e.labelOffset+h*v,m.y=h);var y=Be();m.transform(Kf(y,y,e.rotation));var _=n.get("nameRotate");_!=null&&(_=_*pr/180);var S,T;ii(f)?S=_r.innerTextLayout(e.rotation,_??e.rotation,h):(S=kL(e.rotation,f,_||0,d),T=e.raw.axisNameAvailableWidth,T!=null&&(T=Math.abs(T/Math.sin(S.rotation)),!isFinite(T)&&(T=null)));var w=c.getFont(),x=n.get("nameTruncate",!0)||{},D=x.ellipsis,M=Vo(e.raw.nameTruncateMaxWidth,x.maxWidth,T),C=s.nameMarginLevel||0,A=new ie({x:p.x,y:p.y,rotation:S.rotation,silent:_r.isLabelSilent(n),style:ei(c,{text:l,font:w,overflow:"truncate",width:M,ellipsis:D,fill:c.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:c.get("align")||S.textAlign,verticalAlign:c.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(Ns({el:A,componentModel:n,itemName:l}),A.__fullText=l,A.anid="name",n.get("triggerEvent")){var I=_r.makeAxisEventDataBase(n);I.targetType="axisName",I.name=l,yt(A).eventData=I}a.add(A),A.updateTransform(),t.nameEl=A;var L=u.nameLayout=Cr({label:A,priority:A.z2,defaultAttr:{ignore:A.ignore},marginDefault:ii(f)?IL[C]:PL[C]});if(u.nameLocation=f,i.add(A),A.decomposeTransform(),e.shouldNameMoveOverlap&&L){var P=r.ensureRecord(n);r.resolveAxisNameOverlap(e,r,n,L,m,P)}}}};function wp(e,t,r,n,i,a,o,s){q0(t)||HL(e,t,i,s,n,o);var u=t.labelLayoutList;VL(e,n,u,a),e.rotation;var l=e.optionHideOverlap;BL(n,u,l),l&&YA(kt(u,function(f){return f&&!f.label.ignore})),EL(e,r,n,u)}function kL(e,t,r,n){var i=Rg(r-e),a,o,s=n[0]>n[1],u=t==="start"&&!s||t!=="start"&&s;return Ko(i-pr/2)?(o=u?"bottom":"top",a="center"):Ko(i-pr*1.5)?(o=u?"top":"bottom",a="center"):(o="middle",ipr/2?a=u?"left":"right":a=u?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function BL(e,t,r){var n=e.axis,i=e.get(["axisLabel","customValues"]);if(QD(n))return;function a(l,f,h){var c=Cr(t[f]),v=Cr(t[h]),d=n.scale;if(!(!c||!v)){if(l==null){if(!r&&i)return;var g=ai(c.label).labelInfo.tick;if(tc(d)&&g.notNice||Xe(d)&&g.offInterval){kn(c.label);return}}if(l===!1||c.suggestIgnore){kn(c.label);return}if(v.suggestIgnore){kn(v.label);return}var p=.1;if(!r){var m=[0,0,0,0];c=vp({marginForce:m},c),v=vp({marginForce:m},v)}ac(c,v,null,{touchThreshold:p})&&kn(l?v.label:c.label)}}var o=e.get(["axisLabel","showMinLabel"]),s=e.get(["axisLabel","showMaxLabel"]),u=t.length;a(o,0,1),a(s,u-1,u-2)}function NL(e,t,r){e.showMinorTicks||b(t,function(n){if(n&&n.label.ignore)for(var i=0;i=x[1])return!0})):S[1]?(M=x[1],P(function(){if(X(),L=at(I-C*d,A),E(),D<=x[0])return!0})):P(function(){L=at(Ta(x[0]/C)*C,A),I=at(ln(x[1]/C)*C,A);var tt=er((I-L)/C);if(tt<=d){var et=d-tt,V=void 0,it=i.incl0||a;if(it&&x[0]===0)V=[0,et];else if(it&&x[1]===0)V=[et,0];else{var ut=ln(et/2);V=et%2===0?[ut,ut]:D+M=x[1])return!0}})}m0(r,S,w,[D,M],T,{interval:C,intervalCount:d,intervalPrecision:A,niceExtent:[L,I]})}var Dp=[[3,1],[0,2]],eI=(function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=zo,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;b(this._axesList,function(o){vA(o,lA);var s=o.scale;Xe(s)&&s.setSortInfo(o.model.get("categorySortInfo"))});function i(o){for(var s=gt(o),u=[],l=s.length-1;l>=0;l--){var f=o[+s[l]];f.__alignTo?u.push(f):up(f)}b(u,function(h){nI(h,h.__alignTo)?up(h):tI(h,h.__alignTo.scale)})}i(n.x),i(n.y);var a={};b(n.x,function(o){Ap(n,"y",o,a)}),b(n.y,function(o){Ap(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=Nh(t,r),a=this._rect=fn(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,u=t.get("containLabel");if(j0(o,a),!n){var l=aI(a,s,o,u,r),f=void 0;if(u)f=Ep(a.clone(),"axisLabel",null,a,o,l,i);else{var h=oI(t,a,i),c=h.outerBoundsRect,v=h.parsedOuterBoundsContain,d=h.outerBoundsClamp;c&&(f=Ep(c,v,d,a,o,l,i))}J0(a,o,xe.determine,null,f,i),b(this._coordsList,function(g){g.calcAffineTransform()})}},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]}H(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i=0;i--){var a=e[+t[i]];l0(a.scale)&&JD(a.model,a.type)==null&&(a.model.get("alignTicks")&&a.model.get("interval")==null?n.push(a):r=a)}r||(r=n.pop()),r&&b(n,function(o){o.__alignTo=r})}function nI(e,t){return ns(e.scale)||ns(t.scale)||t.scale.getTicks().length<2}function iI(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return n-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function j0(e,t){b(e.x,function(r){return Pp(r,t.x,t.width)}),b(e.y,function(r){return Pp(r,t.y,t.height)})}function Pp(e,t,r){var n=[0,r],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),iI(e,t)}function Ep(e,t,r,n,i,a,o){J0(n,i,xe.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),f(n,0,NaN),f(n,1,NaN);var u=z_(s,function(c){return c>0})==null;return es(n,s,!0,!0,r),j0(i,n),u;function l(c){b(i[cr[c]],function(v){if(da(v.model)){var d=a.ensureRecord(v.model),g=d.labelInfoList;if(g)for(var p=0;p0&&!ea(v)&&v>1e-4&&(c/=v),c}}function aI(e,t,r,n,i){var a=new W0(sI);return b(r,function(o){return b(o,function(s){if(da(s.model)){var u=!n;s.axisBuilder=YL(e,t,s.model,i,a,u)}})}),a}function J0(e,t,r,n,i,a){var o=r===xe.determine;b(t,function(l){return b(l,function(f){da(f.model)&&(XL(f.axisBuilder,e,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};u(0),u(1);function u(l){s[cr[1-l]]=e[ti[l]]<=a.refContainer[ti[l]]*.5?0:1-l===1?2:1}b(t,function(l,f){return b(l,function(h){da(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function oI(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():(i==null||i==="auto")&&(n=fn(e.get("outerBounds",!0)||K0,r.refContainer));var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"||st(["all","axisLabel"],a)<0?o="all":o=a;var s=[Wl(G(e.get("outerBoundsClampWidth",!0),_s[0]),t.width),Wl(G(e.get("outerBoundsClampHeight",!0),_s[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var sI=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";Y0(e,t,r,n,i,a),ii(e.nameLocation)||b(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&Z0(s.labelInfoList,s.dirVec,n,i)})};function uI(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return lI(r,e,t),r.seriesInvolved&&hI(r,e),r}function lI(e,t,r){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];b(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var u=pa(s.model),l=e.coordSysAxesInfo[u]={};e.coordSysMap[u]=s;var f=s.model,h=f.getModel("tooltip",n);if(b(s.getAxes(),Ct(g,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var c=h.get("trigger")==="axis",v=h.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(h.get(["axisPointer","axis"]));(c||v)&&b(d.baseAxes,Ct(g,v?"cross":!0,c)),v&&b(d.otherAxes,Ct(g,"cross",!1))}function g(p,m,y){var _=y.model.getModel("axisPointer",i),S=_.get("show");if(!(!S||S==="auto"&&!p&&!kf(_))){m==null&&(m=_.get("triggerTooltip")),_=p?fI(y,h,i,t,p,m):_;var T=_.get("snap"),w=_.get("triggerEmphasis"),x=pa(y.model),D=m||T||y.type==="category",M=e.axesInfo[x]={key:x,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:w,involveSeries:D,snap:T,useHandle:kf(_),seriesModels:[],linkGroup:null};l[x]=M,e.seriesInvolved=e.seriesInvolved||D;var C=cI(a,y);if(C!=null){var A=o[C]||(o[C]={axesInfo:{}});A.axesInfo[x]=M,A.mapper=a[C].mapper,M.linkGroup=A}}}})}function fI(e,t,r,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],u={};b(s,function(c){u[c]=rt(o.get(c))}),u.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(u.type="line");var l=u.label||(u.label={});if(l.show==null&&(l.show=!1),i==="cross"){var f=o.get(["label","show"]);if(l.show=f??!0,!a){var h=u.lineStyle=o.get("crossStyle");h&&pt(l,h.textStyle)}}return e.model.getModel("axisPointer",new St(u,r,n))}function hI(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||b(e.coordSysAxesInfo[pa(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function cI(e,t){for(var r=t.model,n=t.dim,i=0;i=0||e===t}function vI(e){var t=uc(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=kf(r);a==null&&(i.status=s?"show":"hide");var u=n.getExtent();(o==null||o>u[1])&&(o=u[1]),os)return!0;if(o){var u=uc(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/u>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=Qr(t).pointerEl=new yx[a.type](kp(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=Qr(t).labelEl=new ie(kp(r.label));t.add(a),Np(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=Qr(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=Qr(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),Np(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Sh(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){lg(l.event)},onmousedown:dl(this._onHandleDragMove,this,0,0),drift:dl(this._onHandleDragMove,this),ondragend:dl(this._onHandleDragEnd,this)}),n.add(i)),Fp(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=a.get("size");B(u)||(u=[u,u]),i.scaleX=u[0]/2,i.scaleY=u[1]/2,Cy(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){Bp(this._axisPointerModel,!r&&this._moveAnimation,this._handle,pl(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(pl(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(pl(i)),Qr(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,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),pf(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 Bp(e,t,r,n){n_(Qr(r).lastProp,n)||(Qr(r).lastProp=n,t?Ma(r,n,e):(r.stopAnimation(),r.attr(n)))}function n_(e,t){if(H(e)&&H(t)){var r=!0;return b(t,function(n,i){r=r&&n_(e[i],n)}),!!r}else return e===t}function Np(e,t){e[t.get(["label","show"])?"show":"hide"]()}function pl(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Fp(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function xI(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 bI(e,t,r,n,i){var a=r.get("value"),o=i_(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),u=Gs(s.get("padding")||0),l=s.getFont(),f=Dg(o,l),h=i.position,c=f.width+u[1]+u[3],v=f.height+u[0]+u[2],d=i.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(h[1]-=v),g==="middle"&&(h[1]-=v/2),CI(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:ei(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:p}),z2:10}}function CI(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function i_(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:vs(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};b(n,function(u){var l=r.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,h=l&&l.getDataParams(f);h&&s.seriesData.push(h)}),F(o)?a=o.replace("{value}",a):j(o)&&(a=o(s))}return a}function a_(e,t,r){var n=Be();return Kf(n,n,r.rotation),Al(n,n,r.position),_h([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function MI(e,t,r,n,i,a){var o=_r.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),bI(t,n,i,a,{position:a_(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function DI(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function AI(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function LI(e,t,r){return qs(e,{fromStat:{sers:Y(t,function(n){return r.getSeriesByIndex(n.seriesIndex)})},min:1}).w}function II(e,t,r){return[ht(ne(t[0],t[1]),e-r/2),ne(e+r/2,ht(t[0],t[1]))]}var PI=(function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,u=s.grid,l=a.get("type"),f=s.getGlobalExtent(),h=zp(u,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var v=xI(a),d=EI[l](s,c,f,h,a.get("seriesDataIndices"),a.ecModel);d.style=v,r.graphicKey=d.type,r.pointer=d}var g=ys(u.getRect(),i);MI(n,r,g,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=ys(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=a_(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,u=o.getGlobalExtent(!0),l=zp(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[r.x,r.y];h[f]+=n[f],h[f]=ne(u[1],h[f]),h[f]=ht(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})(wI);function zp(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var EI={line:function(e,t,r,n){var i=DI([t,n[0]],[t,n[1]],Hp(e));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(e,t,r,n,i,a){var o=LI(e,i,a),s=n[1]-n[0],u=II(t,r,o),l=u[0],f=u[1];return{type:"Rect",shape:AI([l,n[0]],[f-l,s],Hp(e))}}};function Hp(e){return e.dim==="x"?0:1}var RI=(function(e){z(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,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:U.color.border,width:1,type:"dashed"},shadowStyle:{color:U.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:U.color.neutral00,padding:[5,7,5,7],backgroundColor:U.color.accent60,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:U.color.accent40,throttle:40}},t})(ft),Je=vt(),OI=b;function o_(e,t,r){if(!K.node){var n=t.getZr();Je(n).records||(Je(n).records={}),kI(n,t);var i=Je(n).records[e]||(Je(n).records[e]={});i.handler=r}}function kI(e,t){if(Je(e).initialized)return;Je(e).initialized=!0,r("click",Ct(gl,"click")),r("mousemove",Ct(gl,"mousemove")),r("mousewheel",Ct(gl,"mousewheel")),r("globalout",NI);function r(n,i){e.on(n,function(a){var o=FI(t);OI(Je(e).records,function(s){s&&i(s,a,o.dispatchAction)}),BI(o.pendings,t)})}}function BI(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function NI(e,t,r){e.handler("leave",null,r)}function gl(e,t,r,n){t.handler(e,r,n)}function FI(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function Nf(e,t){if(!K.node){var r=t.getZr(),n=(Je(r).records||{})[e];n&&(Je(r).records[e]=null)}}var zI=(function(e){z(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,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click|mousewheel";o_("axisPointer",i,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){Nf("axisPointer",n)},t.prototype.dispose=function(r,n){Nf("axisPointer",n)},t.type="axisPointer",t})(Ue);function s_(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=xa(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.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=a.mapDimension(c),g=[];g[v]=a.get(d,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=u.dataToPoint(g)||[]}else r=u.dataToPoint(a.getValues(Y(u.dimensions,function(m){return a.mapDimension(m)}),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 Vp=vt();function HI(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||_t(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Ho(i)&&(i=s_({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var u=Ho(i),l=a.axesInfo,f=s.axesInfo,h=n==="leave"||Ho(i),c={},v={},d={list:[],map:{}},g={showPointer:Ct(GI,v),showTooltip:Ct(UI,d)};b(s.coordSysMap,function(m,y){var _=u||m.containPoint(i);b(s.coordSysAxesInfo[y],function(S,T){var w=S.axis,x=ZI(l,S);if(!h&&_&&(!l||x)){var D=x&&x.value;D==null&&!u&&(D=w.pointToData(i)),D!=null&&Gp(S,D,g,!1,c)}})});var p={};return b(f,function(m,y){var _=m.linkGroup;_&&!v[y]&&b(_.axesInfo,function(S,T){var w=v[T];if(S!==m&&w){var x=w.value;_.mapper&&(x=m.axis.scale.parse(_.mapper(x,Up(S),Up(m)))),p[m.key]=x}})}),b(p,function(m,y){Gp(f[y],m,g,!0,c)}),WI(v,f,c),YI(d,i,e,o),XI(f,o,r),c}}function Gp(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=VI(t,e),s=o.payloadBatch,u=o.snapToValue;s[0]&&i.seriesIndex==null&&k(i,s[0]),!n&&e.snap&&a.containData(u)&&u!=null&&(t=u),r.showPointer(e,t,s),r.showTooltip(e,o,u)}}function VI(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return b(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.indicesOfNearest(n,f[0],e,r.type==="category"?.5:null),!c.length)return;h=u.getData().get(f[0],c[0])}if(Ge(h)){var d=e-h,g=Math.abs(d);g<=o&&((g=0&&s<0)&&(o=g,s=d,i=h,a.length=0),b(c,function(p){a.push({seriesIndex:u.seriesIndex,dataIndexInside:p,dataIndex:u.getData().getRawIndex(p)})}))}}),{payloadBatch:a,snapToValue:i}}function GI(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function UI(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var u=t.coordSys.model,l=pa(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:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function WI(e,t,r){var n=r.axesInfo=[];b(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function YI(e,t,r,n){if(Ho(t)||!e.list.length){n({type:"hideTip"});return}var i=((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:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function XI(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=Vp(n)[i]||{},o=Vp(n)[i]={};b(e,function(f,h){var c=f.axisPointerModel.option;c.status==="show"&&f.triggerEmphasis&&b(c.seriesDataIndices,function(v){o[v.seriesIndex+"|"+v.dataIndex]=v})});var s=[],u=[];function l(f){return{seriesIndex:f.seriesIndex,dataIndex:f.dataIndex}}b(a,function(f,h){!o[h]&&u.push(l(f))}),b(o,function(f,h){!a[h]&&s.push(l(f))}),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 ZI(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 Up(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 Ho(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function u_(e){t_.registerAxisPointerClass("CartesianAxisPointer",PI),e.registerComponentModel(RI),e.registerComponentView(zI),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,{overallReset:function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=uI(t,r)}}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},HI)}function fP(e){vn(TI),vn(u_)}function $I(e,t){var r=Gs(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new Mt({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});return i}var qI=(function(e){z(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|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:U.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:U.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:U.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:U.color.tertiary,fontSize:14}},t})(ft);function l_(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function f_(e){if(K.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",u+="translateY(-50%) rotate("+(l=a==="left"?-225:-45)+"deg)"):(s+="left:50%",u+="translateX(-50%) rotate("+(l=a==="top"?225:45)+"deg)");var f=l*Math.PI/180,h=o+i,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*i)/2+Math.SQRT2*i-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+u+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function r2(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+e/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+n,a+=(a.length?",":"")+(K.transformSupported?""+lc+i:",left"+i+",top"+i)),jI+":"+a}function Wp(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!K.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=K.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+lc+":"+o+";":[["top",0],["left",0],[h_,o]]}function n2(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=G(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,u=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+u+"px "+o+"px "+a),b(["decoration","align"],function(l){var f=e.get(l);f&&t.push("text-"+l+":"+f)}),t.join(";")}function i2(e,t,r,n){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),u=e.get("shadowColor"),l=e.get("shadowOffsetX"),f=e.get("shadowOffsetY"),h=e.getModel("textStyle"),c=xy(e,"html"),v=l+"px "+f+"px "+s+"px "+u;return i.push("box-shadow:"+v),t&&a>0&&i.push(r2(a,r,n)),o&&i.push("background-color:"+o),b(["width","color","radius"],function(d){var g="border-"+d,p=qm(g),m=e.get(p);m!=null&&i.push(g+":"+m+(d==="color"?"":"px"))}),i.push(n2(h)),c!=null&&i.push("padding:"+Gs(c).join("px ")+"px"),i.join(";")+";"}function Yp(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&r1(e,o,r,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var a2=(function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,K.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(F(a)?document.querySelector(a):ta(a)?a:j(a)&&a(t.getDom()));Yp(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.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)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=QI(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=JI+i2(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+Wp(a[0],a[1],!0)+("border-color:"+sa(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(F(a)&&n.get("trigger")==="item"&&!l_(n)&&(s=e2(n,i,a)),F(t))o.innerHTML=t+s;else if(t){o.innerHTML="",B(t)||(t=[t]);for(var u=0;u=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(r.get("trigger")!=="axis"&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||K.node||!i.getDom())){var o=$p(a,i);this._ticket="";var s=a.dataByCoordSys,u=c2(a,n,i);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:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=s2;f.x=a.x,f.y=a.y,f.update(),yt(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var h=s_(a,n),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,a.from!==this.uid&&this._hide($p(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.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=Li([f.getItemModel(s),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=yt(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null,this._cbParamsList=null;var u,l;zi(i,function(f){if(f.tooltipDisabled)return u=l=null,!0;u||l||(yt(f).dataIndex!=null?u=f:yt(f).tooltipConfig!=null&&(l=f))},!0),u?this._showSeriesItemTooltip(r,u,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=_t(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Li([n.tooltipOption],a),u=this._renderMode,l=[],f=fa("section",{blocks:[],noHeader:!0}),h=[],c=new qu;b(r,function(y){b(y.dataByAxis,function(_){var S=i.getComponent(_.axisDim+"Axis",_.axisIndex),T=_.value,w=S.axis,x=w.scale.parse(T);if(!(!S||T==null)){var D=i_(T,w,i,_.seriesDataIndices,_.valueLabelOpt),M=fa("section",{header:D,noHeader:!Oe(D),sortBlocks:!0,blocks:[]});f.blocks.push(M),b(_.seriesDataIndices,function(C){var A=i.getSeriesByIndex(C.seriesIndex),I=C.dataIndexInside,L=A.getDataParams(I);if(!(L.dataIndex<0)){L.axisDim=_.axisDim,L.axisIndex=_.axisIndex,L.axisType=_.axisType,L.axisId=_.axisId,L.axisValue=vs(S.axis,{value:x}),L.axisValueLabel=D,L.marker=c.makeTooltipMarker("item",sa(L.color),u);var P=fd(A.formatTooltip(I,!0,null)),E=P.frag;if(E){var R=Li([A],a).get("valueFormatter");M.blocks.push(R?k({valueFormatter:R},E):E)}P.text&&h.push(P.text),l.push(L)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,d=s.get("order"),g=pd(f,c,u,d,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var p=u==="richText"?` `:"
",m=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,m,l,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=yt(n),s=o.seriesIndex,u=a.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,h=o.dataType,c=l.getData(h),v=this._renderMode,d=r.positionDefault,g=Li([c.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=g.get("trigger");if(!(p!=null&&p!=="item")){var m=l.getDataParams(f,h),y=new qu;m.marker=y.makeTooltipMarker("item",sa(m.color),v);var _=fd(l.formatTooltip(f,!1,h)),S=g.get("order"),T=g.get("valueFormatter"),w=_.frag,x=w?pd(T?k({valueFormatter:T},w):w,y,v,S,a.get("useUTC"),g.get("textStyle")):_.text,D="item_"+l.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,x,m,D,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=yt(n),s=o.tooltipConfig,u=s.option||{},l=u.encodeHTMLContent;if(F(u)){var f=u;u={content:f,formatter:f},l=!0}l&&a&&u.content&&(u=rt(u),u.content=Yt(u.content));var h=[u],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:u.content});var v=r.positionDefault,d=Li(h,this._tooltipModel,v?{position:v}:null),g=d.get("content"),p=Math.random()+"",m=new qu;this._showOrMove(d,function(){var y=rt(d.get("formatterParams")||{});this._showTooltipContent(d,g,y,p,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,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],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=d.color;if(c)if(F(c)){var p=r.ecModel.get("useUTC"),m=B(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;v=c,y&&(v=Vs(m.axisValue,v,p)),v=Km(v,i,!0)}else if(j(c)){var _=_t(function(S,T){S===this._ticket&&(h.setContent(T,f,r,g,u),this._updatePosition(r,u,o,s,h,i,l))},this);this._ticket=a,v=c(i,a,_)}else v=c;h.setContent(v,f,r,g,u),h.show(r,g),this._updatePosition(r,u,o,s,h,i,l)}},t.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||B(n))return{color:a||o};if(!B(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,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),j(n)&&(n=n([i,a],s,o.el,d,{viewSize:[l,f],contentSize:h.slice()})),B(n))i=Bt(n[0],l),a=Bt(n[1],f);else if(H(n)){var g=n;g.width=h[0],g.height=h[1];var p=fn(g,{width:l,height:f});i=p.x,a=p.y,c=null,v=null}else if(F(n)&&u){var m=h2(n,d,h,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=l2(i,a,o,l,f,c?null:20,v?null:20);i=m[0],a=m[1]}if(c&&(i-=qp(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=qp(v)?h[1]/2:v==="bottom"?h[1]:0),l_(r)){var m=f2(i,a,o,l,f);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&b(i,function(s,u){var l=s.dataByAxis||[],f=r[u]||{},h=f.dataByAxis||[];o=o&&l.length===h.length,o&&b(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&&b(g,function(m,y){var _=p[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&b(c.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],S=a[y];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,this._cbParamsList=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){K.node||!n.getDom()||(pf(this,"_updatePosition"),this._tooltipContent.dispose(),Nf("itemTooltip",n),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type="tooltip",t})(Ue);function Li(e,t,r){var n=t.ecModel,i;r?(i=new St(r,n,n),i=new St(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof St&&(o=o.get("tooltip",!0)),F(o)&&(o={formatter:o}),o&&(i=new St(o,i,n)))}return i}function $p(e,t){return e.dispatchAction||_t(t.dispatchAction,t)}function l2(e,t,r,n,i,a,o){var s=r.getSize(),u=s[0],l=s[1];return a!=null&&(e+u+a+2>n?e-=u+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function f2(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function h2(e,t,r,n){var i=r[0],a=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-i/2,u=t.y+f/2-a/2;break;case"top":s=t.x+l/2-i/2,u=t.y-a-o;break;case"bottom":s=t.x+l/2-i/2,u=t.y+f+o;break;case"left":s=t.x-i-o,u=t.y+f/2-a/2;break;case"right":s=t.x+l+o,u=t.y+f/2-a/2}return[s,u]}function qp(e){return e==="center"||e==="middle"}function c2(e,t,r){var n=rh(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ba(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),u;if(s.group.traverse(function(l){var f=yt(l).tooltipConfig;if(f&&f.name===e.name)return u=l,!0}),u)return{componentMainType:i,componentIndex:o.componentIndex,el:u}}}}function hP(e){vn(u_),e.registerComponentModel(qI),e.registerComponentView(u2),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Nt),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Nt)}var v2=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"])}},Ff=(function(e){z(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,i){this.mergeDefaultAndTheme(r,i),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,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),B(n)&&b(n,function(a,o){F(a)&&(a={type:a}),n[o]=lt(a,v2(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:U.size.m,align:"auto",backgroundColor:U.color.transparent,borderColor:U.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:U.color.disabled,inactiveBorderColor:U.color.disabled,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:U.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:U.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:U.color.tertiary,borderWidth:1,borderColor:U.color.border},emphasis:{selectorLabel:{show:!0,color:U.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(ft),Rn=Ct,zf=b,mo=re,v_=(function(e){z(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 mo),this.group.add(this._selectorGroup=new mo),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=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,i,u,s,l);var f=Nh(r,i).refContainer,h=r.getBoxLayoutParams(),c=r.get("padding"),v=fn(h,f,c),d=this.layoutInner(r,o,v,a,u,l),g=fn(pt({width:d.width,height:d.height},h),f,c);this.group.x=g.x-d.x,this.group.y=g.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=$I(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,i,a,o,s,u){var l=this.getContentGroup(),f=W(),h=n.get("selectedMode"),c=n.get("triggerEvent"),v=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&v.push(d.id)}),zf(n.getData(),function(d,g){var p=this,m=d.get("name");if(!this.newlineDisabled&&(m===""||m===` `)){var y=new mo;y.newline=!0,l.add(y);return}var _=i.getSeriesByName(m)[0];if(!f.get(m))if(_){var S=_.getData(),T=S.getVisual("legendLineStyle")||{},w=S.getVisual("legendIcon"),x=S.getVisual("style"),D=this._createItem(_,m,g,d,n,r,T,x,w,h,a);D.on("click",Rn(Kp,m,null,a,v)).on("mouseover",Rn(Hf,_.name,null,a,v)).on("mouseout",Rn(Vf,_.name,null,a,v)),i.ssr&&D.eachChild(function(M){var C=yt(M);C.seriesIndex=_.seriesIndex,C.dataIndex=g,C.ssrType="legend"}),c&&D.eachChild(function(M){p.packEventData(M,n,_,g,m)}),f.set(m,!0)}else i.eachRawSeries(function(M){var C=this;if(!f.get(m)&&M.legendVisualProvider){var A=M.legendVisualProvider;if(!A.containName(m))return;var I=A.indexOfName(m),L=A.getItemVisual(I,"style"),P=A.getItemVisual(I,"legendIcon"),E=Ne(L.fill);E&&E[3]===0&&(E[3]=.2,L=k(k({},L),{fill:_a(E,"rgba")}));var R=this._createItem(M,m,g,d,n,r,{},L,P,h,a);R.on("click",Rn(Kp,null,m,a,v)).on("mouseover",Rn(Hf,null,m,a,v)).on("mouseout",Rn(Vf,null,m,a,v)),i.ssr&&R.eachChild(function(N){var X=yt(N);X.seriesIndex=M.seriesIndex,X.dataIndex=g,X.ssrType="legend"}),c&&R.eachChild(function(N){C.packEventData(N,n,M,g,m)}),f.set(m,!0)}},this)},this),o&&this._createSelector(o,n,a,s,u)},t.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};yt(r).eventData=s},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();zf(r,function(l){var f=l.type,h=new ie({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);_x(h,{normal:c,emphasis:v},{defaultText:l.title}),tf(h)})},t.prototype._createItem=function(r,n,i,a,o,s,u,l,f,h,c){var v=r.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),p=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=d2(f,a,u,l,v,p,c),T=new mo,w=a.getModel("textStyle");if(j(r.getLegendIcon)&&(!_||_==="inherit"))T.add(r.getLegendIcon({itemWidth:d,itemHeight:g,icon:f,iconRotate:m,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}));else{var x=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;T.add(p2({itemWidth:d,itemHeight:g,icon:f,iconRotate:x,itemStyle:S.itemStyle,symbolKeepAspect:y}))}var D=s==="left"?d+5:-5,M=s,C=o.get("formatter"),A=n;F(C)&&C?A=C.replace("{name}",n??""):j(C)&&(A=C(n));var I=p?w.getTextColor():a.get("inactiveColor");T.add(new ie({style:ei(w,{text:A,x:D,y:g/2,fill:I,align:M,verticalAlign:"middle"},{inheritColor:I})}));var L=new Mt({shape:T.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&Ns({el:L,componentModel:o,itemName:n,itemTooltipOption:P.option}),T.add(L),T.eachChild(function(E){E.silent=!0}),L.silent=!h,this.getContentGroup().add(T),tf(T),T.__legendDataIndex=i,T},t.prototype.layoutInner=function(r,n,i,a,o,s){var u=this.getContentGroup(),l=this.getSelectorGroup();qi(r.get("orient"),u,r.get("itemGap"),i.width,i.height);var f=u.getBoundingRect(),h=[-f.x,-f.y];if(l.markRedraw(),u.markRedraw(),o){qi("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",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?v[g]+=f[p]+d:h[g]+=c[p]+d,v[1-g]+=f[m]/2-c[m]/2,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],_[m]=Math.max(f[m],c[m]),_[y]=Math.min(0,c[y]+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})(Ue);function d2(e,t,r,n,i,a,o){function s(p,m){p.lineWidth==="auto"&&(p.lineWidth=m.lineWidth>0?2:0),zf(p,function(y,_){p[_]==="inherit"&&(p[_]=m[_])})}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:Sf(h,o),l.fill==="inherit"&&(l.fill=n[i]),l.stroke==="inherit"&&(l.stroke=n[f]),l.opacity==="inherit"&&(l.opacity=(i==="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),!a){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 p2(e){var t=e.icon||"roundRect",r=Yh(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=U.color.neutral00,r.style.lineWidth=2),r}function Kp(e,t,r,n){Vf(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),Hf(e,t,r,n)}function Hf(e,t,r,n){r.usingTHL()||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function Vf(e,t,r,n){r.usingTHL()||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function Ii(e,t,r){var n=e==="allSelect"||e==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:t},function(s){n?s[e]():s[e](t.name),Qp(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){b(i,function(u,l){s[u?"select":"unSelect"](l)}),Qp(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Qp(e,t){var r=t||{};return b(e.getData(),function(n){var i=n.get("name");if(!(i===` `||i==="")){var a=e.isSelected(i);qt(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function g2(e){e.registerAction("legendToggleSelect","legendselectchanged",Ct(Ii,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Ct(Ii,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Ct(Ii,"inverseSelect")),e.registerAction("legendSelect","legendselected",Ct(Ii,"select")),e.registerAction("legendUnSelect","legendunselected",Ct(Ii,"unSelect"))}var m2=ih(y2);function y2(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;ni[o],p=[-v.x,-v.y];n||(p[a]=f[l]);var m=[0,0],y=[-d.x,-d.y],_=G(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var S=r.get("pageButtonPosition",!0);S==="end"?y[a]+=i[o]-d[o]:m[a]+=d[o]+_}y[1-a]+=v[s]/2-d[s]/2,f.setPosition(p),h.setPosition(m),c.setPosition(y);var T={x:0,y:0};if(T[o]=g?i[o]:v[o],T[s]=Math.max(v[s],d[s]),T[u]=Math.min(0,d[u]+y[1-a]),h.__rectSize=i[o],g){var w={x:0,y:0};w[o]=Math.max(i[o]-d[o]-_,0),w[s]=T[s],h.setClipPath(new Mt({shape:w})),h.__rectSize=w[o]}else c.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(r);return x.pageIndex!=null&&Ma(f,{x:x.contentPosition[0],y:x.contentPosition[1]},g?r:null),this._updatePageInfoView(r,x),T},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;b(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=n[h]!=null,v=i.childOfName(f);v&&(v.setStyle("fill",c?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,u=s!=null?s+1:0,l=n.pageCount;a&&o&&a.setStyle("text",F(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),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=ml[o],u=yl[o],l=this._findTargetItemIndex(n),f=i.children(),h=f[l],c=f.length,v=c?1:0,d={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var g=S(h);d.contentPosition[o]=-g.s;for(var p=l+1,m=g,y=g,_=null;p<=c;++p)_=S(f[p]),(!_&&y.e>m.s+a||_&&!T(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),y=_;for(var p=l-1,m=g,y=g,_=null;p>=-1;--p)_=S(f[p]),(!_||!T(y,_.s))&&m.i=x&&w.s<=x+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var u=o.__legendDataIndex;a==null&&u!=null&&(a=s),u===r&&(n=s)}),n??a},t.type="legend.scroll",t})(v_);function T2(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function w2(e){vn(d_),e.registerComponentModel(_2),e.registerComponentView(S2),T2(e)}function cP(e){vn(d_),vn(w2)}export{B2 as $,np as A,Bt as B,Fo as C,wv as D,b as E,iP as F,qt as G,ne as H,ht as I,Y2 as J,hn as K,X2 as L,qS as M,Rx as N,U as O,ct as P,Ag as Q,Tt as R,wr as S,B as T,Y as U,Qn as V,Pm as W,Bs as X,Ma as Y,Jw as Z,z as _,ph as a,Jn as a$,xh as a0,re as a1,oP as a2,yt as a3,un as a4,Os as a5,Mt as a6,k as a7,N2 as a8,_x as a9,Gn as aA,U2 as aB,vn as aC,eP as aD,fP as aE,hP as aF,cP as aG,tP as aH,xr as aI,at as aJ,ei as aK,qT as aL,pn as aM,Yh as aN,z2 as aO,F as aP,j as aQ,A2 as aR,hD as aS,fD as aT,Kl as aU,Ql as aV,hM as aW,wm as aX,W2 as aY,Cm as aZ,H as a_,rP as aa,F2 as ab,nP as ac,O2 as ad,k2 as ae,sP as af,P2 as ag,mt as ah,Wh as ai,uP as aj,_t as ak,Ct as al,G2 as am,L2 as an,Jc as ao,vt as ap,H2 as aq,Z as ar,GA as as,J2 as at,E2 as au,V2 as av,xT as aw,qc as ax,rt as ay,ie as az,j_ as b,mg as b0,Vt as b1,sa as b2,xa as b3,R2 as b4,HS as b5,$s as b6,Uw as b7,wL as b8,xL as b9,Nh as bA,Da as bB,fn as bC,mf as bD,tf as bE,sx as bF,ux as bG,_h as bH,dh as bI,VS as ba,D2 as bb,Ee as bc,fi as bd,Nt as be,Em as bf,M2 as bg,lg as bh,Ye as bi,_S as bj,JC as bk,st as bl,lt as bm,I2 as bn,pe as bo,ft as bp,Ue as bq,WS as br,tc as bs,yS as bt,Ta as bu,ln as bv,vA as bw,Q2 as bx,Cy as by,pf as bz,q2 as c,pt as d,W as e,Eg as f,w0 as g,Xb as h,Ge as i,rA as j,Xe as k,C2 as l,qs as m,K2 as n,$2 as o,Yb as p,lP as q,G as r,_D as s,TL as t,aP as u,bC as v,YS as w,j2 as x,Z2 as y,Lt as z};