import{d as be,r as Ft,a as Qi,o as F1,b as jt,c as he,e as at,_ as T4,f as Wt,w as J1,n as S9,g as BI,h as we,F as $o,i as D2,j as Qe,u as vt,k as w9,t as Mr,p as P0,l as R0,m as kI,q as FI,s as yb,v as _7,x as zI,y as Zh,z as Od,A as GI,B as _b,C as VI,D as N0,E as Ai,G as xb,N as G5,H as br,I as Sb,J as Qh,K as nn,T as HI,L as Fe,M as q1,O as O0,P as UI,Q as Jo,R as WI,S as XI,U as YI,V as ZI,W as QI,X as t4,Y as jh}from"./index-DOfL5DGB.js";const jI=""+new URL("icon1-DzZ3EAAm.png",import.meta.url).href,qI=""+new URL("icon2-TfyNJkmG.png",import.meta.url).href,KI=""+new URL("icon3-CVEMzhGp.png",import.meta.url).href,$I=""+new URL("icon4-BG4veA_t.png",import.meta.url).href,JI=""+new URL("line1-B71bjm7p.png",import.meta.url).href,tP=""+new URL("line2-BHsY8Ivs.png",import.meta.url).href,eP=""+new URL("line3-CtTb4JFW.png",import.meta.url).href,rP=""+new URL("line4-CEdqVrZG.png",import.meta.url).href,iP=""+new URL("line5-CHX4vXjx.png",import.meta.url).href,nP=""+new URL("line6-CbecP0qS.png",import.meta.url).href,aP=""+new URL("line7-CDANFz2y.png",import.meta.url).href,oP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAlCAMAAACXrSJOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAArlBMVEUAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAADw1SRkAAAAOHRSTlMAAZkCU10E2OAHZ3EK5usPfIYU8fUakJoh+PsppK4x/Tm5w0NOy9UDV2IF3OIJbHdyiI+WHg7uHM8qnTsAAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAAkElEQVQoz+3PxxrCIBCF0bF3E3s3GnuNWO/7P5mEAAHWLv1392zmGyJZJpsjtzwKLhVLKFccqwKo2VRvcGt6lvmIa5nU7gjr9gzrI2mQ0nAkbTzRNoVqpmgeaMNC2jIlhAmtYLYWz28s2+647WF3IDqeHDtf6Aq3iG6MsbveD74icdnT9tR//O339nqrPvH8ApFsUEzskoNTAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTA3LTE4VDAyOjQ3OjI4KzA4OjAw+5YazQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0wNy0xOFQwMjo0NzoyOCswODowMIrLonEAAAAASUVORK5CYII=",sP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAoCAMAAAArMzGQAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAolBMVEUAAAAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAA/wAAAAB/GCpjAAAANHRSTlMAAhEBHg+HmaWfenljDOnbBHNcCebWA2xWB+LRZlAF3sxfStnGWkTUwFQ+z7lNOMm0R/4y+SiTagAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAACTSURBVCjP7dJHFsIgFIXhi0TR2BJ7j7132f/aRIQn4AKc+I/gG/DgHAAVy9k4bJG05f/2YysIIYpkJbWLUZZhFVRrAdUTIA2soQ5stjxqd15Tup719OT+wKEhe19v5NjYXHmSEU3pE83I5vS2ZGFoiU8rY2vH2EbTFm47bXvP+EHREX4nZefA+EVeEXa7P74MKa2eULpJ3evhxAUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMDctMThUMDI6NDc6NDMrMDg6MDA//kewAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTA3LTE4VDAyOjQ3OjQzKzA4OjAwTqP/DAAAAABJRU5ErkJggg==";/*! ***************************************************************************** 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 U8=function(t,e){return U8=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},U8(t,e)};function F(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");U8(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var lP=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t}(),uP=function(){function t(){this.browser=new lP,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 t}(),Vt=new uP;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Vt.wxa=!0,Vt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Vt.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(Vt.node=!0,Vt.svgSupported=!0):fP(navigator.userAgent,Vt);function fP(t,e){var r=e.browser,i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);i&&(r.firefox=!0,r.version=i[1]),n&&(r.ie=!0,r.version=n[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}var qh=12,wb="sans-serif",ea=qh+"px "+wb,hP=20,cP=100,vP="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function dP(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function NP(t,e,r){for(var i=r?"invTrans":"trans",n=e[i],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=t[u].getBoundingClientRect(),h=2*u,c=f.left,v=f.top;o.push(c,v),l=l&&a&&c===a[h]&&v===a[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[i]=r?zd(s,o):zd(o,s))}function Mb(t){return t.nodeName.toUpperCase()==="CANVAS"}var OP=/([&<>"'])/g,BP={"&":"&","<":"<",">":">",'"':""","'":"'"};function Je(t){return t==null?"":(t+"").replace(OP,function(e,r){return BP[r]})}var kP=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,H5=[],FP=Vt.browser.firefox&&+Vt.browser.version.split(".")[0]<39;function q8(t,e,r,i){return r=r||{},i?Vd(t,e,r):FP&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):Vd(t,e,r),r}function Vd(t,e,r){if(Vt.domSupported&&t.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(Mb(t)){var a=t.getBoundingClientRect();r.zrX=i-a.left,r.zrY=n-a.top;return}else if(j8(H5,t,i,n)){r.zrX=H5[0],r.zrY=H5[1];return}}r.zrX=r.zrY=0}function nc(t){return t||window.event}function S1(t,e,r){if(e=nc(e),e.zrX!=null)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&q8(t,o,e,r)}else{q8(t,e,e,r);var a=zP(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&kP.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function zP(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,i=t.deltaY;if(r==null||i==null)return e;var n=Math.abs(i!==0?i:r),a=i>0?-1:i<0?1:r>0?-1:1;return 3*n*a}function K8(t,e,r,i){t.addEventListener(e,r,i)}function GP(t,e,r,i){t.removeEventListener(e,r,i)}var an=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function Hd(t){return t.which===2||t.which===3}var VP=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,i){return this._doTrack(e,r,i),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,i){var n=e.touches;if(n){for(var a={points:[],touches:[],target:r,event:e},o=0,s=n.length;o1&&i&&i.length>1){var a=Ud(i)/Ud(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=HP(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function a1(){return[1,0,0,1,0,0]}function z0(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ac(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function $i(t,e,r){var i=e[0]*r[0]+e[2]*r[1],n=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=i,t[1]=n,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Ii(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function U2(t,e,r,i){i===void 0&&(i=[0,0]);var n=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(r),h=Math.cos(r);return t[0]=n*h+s*f,t[1]=-n*f+s*h,t[2]=a*h+l*f,t[3]=-a*f+h*l,t[4]=h*(o-i[0])+f*(u-i[1])+i[0],t[5]=h*(u-i[1])-f*(o-i[0])+i[1],t}function oc(t,e,r){var i=r[0],n=r[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t}function W2(t,e){var r=e[0],i=e[2],n=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*i;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-i*l,t[3]=r*l,t[4]=(i*s-o*n)*l,t[5]=(a*n-r*s)*l,t):null}function UP(t){var e=a1();return ac(e,t),e}var Rt=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,i=this.y-e.y;return Math.sqrt(r*r+i*i)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,i=this.y-e.y;return r*r+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,i=this.y;return this.x=e[0]*r+e[2]*i+e[4],this.y=e[1]*r+e[3]*i+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,i){e.x=r,e.y=i},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,i){e.x=r.x+i.x,e.y=r.y+i.y},t.sub=function(e,r,i){e.x=r.x-i.x,e.y=r.y-i.y},t.scale=function(e,r,i){e.x=r.x*i,e.y=r.y*i},t.scaleAndAdd=function(e,r,i,n){e.x=r.x+i.x*n,e.y=r.y+i.y*n},t.lerp=function(e,r,i,n){var a=1-n;e.x=a*r.x+n*i.x,e.y=a*r.y+n*i.y},t}(),L3=Math.min,I3=Math.max,_a=new Rt,xa=new Rt,Sa=new Rt,wa=new Rt,t6=new Rt,e6=new Rt,Nt=function(){function t(e,r,i,n){i<0&&(e=e+i,i=-i),n<0&&(r=r+n,n=-n),this.x=e,this.y=r,this.width=i,this.height=n}return t.prototype.union=function(e){var r=L3(e.x,this.x),i=L3(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=I3(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=I3(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=r,this.y=i},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,i=e.width/r.width,n=e.height/r.height,a=a1();return Ii(a,a,[-r.x,-r.y]),oc(a,a,[i,n]),Ii(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,f=e.y,h=e.y+e.height,c=!(ad&&(d=_,pd&&(d=x,m=i.x&&e<=i.x+i.width&&r>=i.y&&r<=i.y+i.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height},t.applyTransform=function(e,r,i){if(!i){e!==r&&t.copy(e,r);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];e.x=r.x*n+o,e.y=r.y*a+s,e.width=r.width*n,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}_a.x=Sa.x=r.x,_a.y=wa.y=r.y,xa.x=wa.x=r.x+r.width,xa.y=Sa.y=r.y+r.height,_a.transform(i),wa.transform(i),xa.transform(i),Sa.transform(i),e.x=L3(_a.x,xa.x,Sa.x,wa.x),e.y=L3(_a.y,xa.y,Sa.y,wa.y);var l=I3(_a.x,xa.x,Sa.x,wa.x),u=I3(_a.y,xa.y,Sa.y,wa.y);e.width=l-e.x,e.height=u-e.y},t}(),Lb="silent";function WP(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:XP}}function XP(){an(this.event)}var YP=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(z1),r6=function(){function t(e,r){this.x=e,this.y=r}return t}(),ZP=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],W5=new Nt(0,0,0,0),Ib=function(t){F(e,t);function e(r,i,n,a,o){var s=t.call(this)||this;return s._hovered=new r6(0,0),s.storage=r,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new YP,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new LP(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(E(ZP,function(i){r.on&&r.on(i,this[i],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var i=r.zrX,n=r.zrY,a=Pb(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new r6(i,n):this.findHover(i,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},e.prototype.mouseout=function(r){var i=r.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new r6(0,0)},e.prototype.dispatch=function(r,i){var n=this[r];n&&n.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var i=this.proxy;i.setCursor&&i.setCursor(r)},e.prototype.dispatchToElement=function(r,i,n){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+i,s=WP(i,r,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},e.prototype.findHover=function(r,i,n){var a=this.storage.getDisplayList(),o=new r6(r,i);if(Wd(a,o,r,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new Nt(r-u,i-u,l,l),h=a.length-1;h>=0;h--){var c=a[h];c!==n&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(W5.copy(c.getBoundingRect()),c.transform&&W5.applyTransform(c.transform),W5.intersect(f)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function QP(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var i=t,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(e,r))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?Lb:!0}return!1}function Wd(t,e,r,i,n){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==n&&!o.ignore&&(s=QP(o,r,i))&&(!e.topTarget&&(e.topTarget=o),s!==Lb)){e.target=o;break}}}function Pb(t,e,r){var i=t.painter;return e<0||e>i.getWidth()||r<0||r>i.getHeight()}var Rb=32,i6=7;function jP(t){for(var e=0;t>=Rb;)e|=t&1,t>>=1;return t+e}function Xd(t,e,r,i){var n=e+1;if(n===r)return 1;if(i(t[n++],t[e])<0){for(;n=0;)n++;return n-e}function qP(t,e,r){for(r--;e>>1,n(a,t[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function X5(t,e,r,i,n,a){var o=0,s=0,l=1;if(a(t,e[r+n])>0){for(s=i-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);a(t,e[r+f])>0?o=f+1:l=f}return l}function Y5(t,e,r,i,n,a){var o=0,s=0,l=1;if(a(t,e[r+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);a(t,e[r+f])<0?l=f:o=f+1}return l}function KP(t,e){var r=i6,i,n,a=0,o=[];i=[],n=[];function s(v,d){i[a]=v,n[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]n[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&n[v-1]=i6||b>=i6);if(T)break;w<0&&(w=0),w+=2}if(r=w,r<1&&(r=1),d===1){for(m=0;m=0;m--)t[S+m]=t[w+m];t[x]=o[_];return}for(var b=r;;){var T=0,A=0,D=!1;do if(e(o[_],t[y])<0){if(t[x--]=t[y--],T++,A=0,--d===0){D=!0;break}}else if(t[x--]=o[_--],A++,T=0,--g===1){D=!0;break}while((T|A)=0;m--)t[S+m]=t[w+m];if(d===0){D=!0;break}}if(t[x--]=o[_--],--g===1){D=!0;break}if(A=g-X5(t[y],o,0,g,g-1,e),A!==0){for(x-=A,_-=A,g-=A,S=x+1,w=_+1,m=0;m=i6||A>=i6);if(D)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),g===1){for(x-=d,y-=d,S=x+1,w=y+1,m=d-1;m>=0;m--)t[S+m]=t[w+m];t[x]=o[_]}else{if(g===0)throw new Error;for(w=x-(g-1),m=0;ms&&(l=s),Yd(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),n-=a,r+=a}while(n!==0);o.forceMergeRuns()}}var f1=1,z6=2,Ro=4,Zd=!1;function Z5(){Zd||(Zd=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Qd(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var $P=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Qd}return t.prototype.traverse=function(e,r){for(var i=0;i0&&(f.__clipPaths=[]),isNaN(f.z)&&(Z5(),f.z=0),isNaN(f.z2)&&(Z5(),f.z2=0),isNaN(f.zlevel)&&(Z5(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,r,i);var c=e.getTextGuideLine();c&&this._updateAndAddDisplayable(c,r,i);var v=e.getTextContent();v&&this._updateAndAddDisplayable(v,r,i)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,i=e.length;r=0&&this._roots.splice(n,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),E2;E2=Vt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var r7={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,i=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)))},elasticOut:function(t){var e,r=.1,i=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},elasticInOut:function(t){var e,r=.1,i=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-r7.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?r7.bounceIn(t*2)*.5:r7.bounceOut(t*2-1)*.5+.5}},P3=Math.pow,qn=Math.sqrt,T9=1e-8,Nb=1e-4,jd=qn(3),R3=1/3,_i=H2(),A1=H2(),Xo=H2();function Hn(t){return t>-T9&&tT9||t<-T9}function ir(t,e,r,i,n){var a=1-n;return a*a*(a*t+3*n*e)+n*n*(n*i+3*a*r)}function qd(t,e,r,i,n){var a=1-n;return 3*(((e-t)*a+2*(r-e)*n)*a+(i-r)*n*n)}function A9(t,e,r,i,n,a){var o=i+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-n,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Hn(f)&&Hn(h))if(Hn(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var p=h*h-4*f*c;if(Hn(p)){var g=h/f,d=-s/o+g,m=-g/2;d>=0&&d<=1&&(a[v++]=d),m>=0&&m<=1&&(a[v++]=m)}else if(p>0){var y=qn(p),_=f*s+1.5*o*(-h+y),x=f*s+1.5*o*(-h-y);_<0?_=-P3(-_,R3):_=P3(_,R3),x<0?x=-P3(-x,R3):x=P3(x,R3);var d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var w=(2*f*s-3*o*h)/(2*qn(f*f*f)),S=Math.acos(w)/3,b=qn(f),T=Math.cos(S),d=(-s-2*b*T)/(3*o),m=(-s+b*(T+jd*Math.sin(S)))/(3*o),A=(-s+b*(T-jd*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[v++]=d),m>=0&&m<=1&&(a[v++]=m),A>=0&&A<=1&&(a[v++]=A)}}return v}function Bb(t,e,r,i,n){var a=6*r-12*e+6*t,o=9*e+3*i-3*t-9*r,s=3*e-3*t,l=0;if(Hn(o)){if(Ob(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var f=a*a-4*o*s;if(Hn(f))n[0]=-a/(2*o);else if(f>0){var h=qn(f),u=(-a+h)/(2*o),c=(-a-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function ia(t,e,r,i,n,a){var o=(e-t)*n+t,s=(r-e)*n+e,l=(i-r)*n+r,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;a[0]=t,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=i}function kb(t,e,r,i,n,a,o,s,l,u,f){var h,c=.005,v=1/0,d,p,g,m;_i[0]=l,_i[1]=u;for(var y=0;y<1;y+=.05)A1[0]=ir(t,r,n,o,y),A1[1]=ir(e,i,a,s,y),g=y2(_i,A1),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*a*s;if(Hn(f)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=qn(f),u=(-o+h)/(2*a),c=(-o-h)/(2*a);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function Fb(t,e,r){var i=t+r-2*e;return i===0?.5:(t-e)/i}function S7(t,e,r,i,n){var a=(e-t)*i+t,o=(r-e)*i+e,s=(o-a)*i+a;n[0]=t,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=r}function zb(t,e,r,i,n,a,o,s,l){var u,f=.005,h=1/0;_i[0]=o,_i[1]=s;for(var c=0;c<1;c+=.05){A1[0]=mr(t,r,n,c),A1[1]=mr(e,i,a,c);var v=y2(_i,A1);v=0&&v=1?1:A9(0,i,a,1,l,s)&&ir(0,n,o,1,s[0])}}}var iR=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||He,this.ondestroy=e.ondestroy||He,this.onrestart=e.onrestart||He,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var i=this._life,n=e-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=wt(e)?e:r7[e]||sc(e)},t}(),Gb=function(){function t(e){this.value=e}return t}(),nR=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new Gb(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,i=e.next;r?r.next=i:this.head=i,i?i.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),D4=function(){function t(e){this._list=new nR,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var i=this._list,n=this._map,a=null;if(n[e]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new Gb(r),s.key=e,i.insertEntry(s),n[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],i=this._list;if(r!=null)return r!==i.tail&&(i.remove(r),i.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Kd={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 ti(t){return t=Math.round(t),t<0?0:t>255?255:t}function aR(t){return t=Math.round(t),t<0?0:t>360?360:t}function w7(t){return t<0?0:t>1?1:t}function Q5(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?ti(parseFloat(e)/100*255):ti(parseInt(e,10))}function _2(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?w7(parseFloat(e)/100):w7(parseFloat(e))}function j5(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Un(t,e,r){return t+(e-t)*r}function x1(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t}function J8(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Vb=new D4(20),N3=null;function ro(t,e){N3&&J8(N3,e),N3=Vb.put(t,N3||e.slice())}function Vr(t,e){if(t){e=e||[];var r=Vb.get(t);if(r)return J8(e,r);t=t+"";var i=t.replace(/ /g,"").toLowerCase();if(i in Kd)return J8(e,Kd[i]),ro(t,e),e;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){x1(e,0,0,0,1);return}return x1(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),ro(t,e),e}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){x1(e,0,0,0,1);return}return x1(e,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),ro(t,e),e}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?x1(e,+u[0],+u[1],+u[2],1):x1(e,0,0,0,1);f=_2(u.pop());case"rgb":if(u.length>=3)return x1(e,Q5(u[0]),Q5(u[1]),Q5(u[2]),u.length===3?f:_2(u[3])),ro(t,e),e;x1(e,0,0,0,1);return;case"hsla":if(u.length!==4){x1(e,0,0,0,1);return}return u[3]=_2(u[3]),tf(u,e),ro(t,e),e;case"hsl":if(u.length!==3){x1(e,0,0,0,1);return}return tf(u,e),ro(t,e),e;default:return}}x1(e,0,0,0,1)}}function tf(t,e){var r=(parseFloat(t[0])%360+360)%360/360,i=_2(t[1]),n=_2(t[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return e=e||[],x1(e,ti(j5(o,a,r+1/3)*255),ti(j5(o,a,r)*255),ti(j5(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function oR(t){if(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),a=Math.max(e,r,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var f=((a-e)/6+o/2)/o,h=((a-r)/6+o/2)/o,c=((a-i)/6+o/2)/o;e===a?l=c-h:r===a?l=1/3+f-c:i===a&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function i4(t,e){var r=Vr(t);if(r){for(var i=0;i<3;i++)e<0?r[i]=r[i]*(1-e)|0:r[i]=(255-r[i])*e+r[i]|0,r[i]>255?r[i]=255:r[i]<0&&(r[i]=0);return Ji(r,r.length===4?"rgba":"rgb")}}function q5(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var i=t*(e.length-1),n=Math.floor(i),a=Math.ceil(i),o=e[n],s=e[a],l=i-n;return r[0]=ti(Un(o[0],s[0],l)),r[1]=ti(Un(o[1],s[1],l)),r[2]=ti(Un(o[2],s[2],l)),r[3]=w7(Un(o[3],s[3],l)),r}}function sR(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var i=t*(e.length-1),n=Math.floor(i),a=Math.ceil(i),o=Vr(e[n]),s=Vr(e[a]),l=i-n,u=Ji([ti(Un(o[0],s[0],l)),ti(Un(o[1],s[1],l)),ti(Un(o[2],s[2],l)),w7(Un(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}function i7(t,e,r,i){var n=Vr(t);if(t)return n=oR(n),e!=null&&(n[0]=aR(e)),r!=null&&(n[1]=_2(r)),i!=null&&(n[2]=_2(i)),Ji(tf(n),"rgba")}function C9(t,e){var r=Vr(t);if(r&&e!=null)return r[3]=w7(e),Ji(r,"rgba")}function Ji(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function D9(t,e){var r=Vr(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var $d=new D4(100);function ef(t){if(ht(t)){var e=$d.get(t);return e||(e=i4(t,-.1),$d.put(t,e)),e}else if(k0(t)){var r=H({},t);return r.colorStops=j(t.colorStops,function(i){return{offset:i.offset,color:i4(i.color,-.1)}}),r}return t}var E9=Math.round;function b7(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=Vr(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e==null?1:e}}var Jd=1e-4;function Wn(t){return t-Jd}function O3(t){return E9(t*1e3)/1e3}function rf(t){return E9(t*1e4)/1e4}function lR(t){return"matrix("+O3(t[0])+","+O3(t[1])+","+O3(t[2])+","+O3(t[3])+","+rf(t[4])+","+rf(t[5])+")"}var uR={left:"start",right:"end",center:"middle",middle:"middle"};function fR(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function hR(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function cR(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function Hb(t){return t&&!!t.image}function vR(t){return t&&!!t.svgElement}function lc(t){return Hb(t)||vR(t)}function Ub(t){return t.type==="linear"}function Wb(t){return t.type==="radial"}function Xb(t){return t&&(t.type==="linear"||t.type==="radial")}function G0(t){return"url(#"+t+")"}function Yb(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function Zb(t){var e=t.x||0,r=t.y||0,i=(t.rotation||0)*qs,n=It(t.scaleX,1),a=It(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),i&&l.push("rotate("+i+")"),(n!==1||a!==1)&&l.push("scale("+n+","+a+")"),(o||s)&&l.push("skew("+E9(o*qs)+"deg, "+E9(s*qs)+"deg)"),l.join(" ")}var dR=function(){return Vt.hasGlobalWindow&&wt(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),nf=Array.prototype.slice;function Wi(t,e,r){return(e-t)*r+t}function K5(t,e,r,i){for(var n=e.length,a=0;ai?e:t,a=Math.min(r,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)i.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=ep,l=r;if(Lr(r)){var u=yR(r);s=u,(u===1&&!te(r[0])||u===2&&!te(r[0][0]))&&(o=!0)}else if(te(r)&&!x7(r))s=k3;else if(ht(r))if(!isNaN(+r))s=k3;else{var f=Vr(r);f&&(l=f,s=G6)}else if(k0(r)){var h=H({},l);h.colorStops=j(r.colorStops,function(v){return{offset:v.offset,color:Vr(v.color)}}),Ub(r)?s=af:Wb(r)&&(s=of),l=h}a===0?this.valType=s:(s!==this.valType||s===ep)&&(o=!0),this.discrete=this.discrete||o;var c={time:e,value:l,rawValue:r,percent:0};return i&&(c.easing=i,c.easingFunc=wt(i)?i:r7[i]||sc(i)),n.push(c),c},t.prototype.prepare=function(e,r){var i=this.keyframes;this._needsSort&&i.sort(function(p,g){return p.time-g.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=F3(n),u=rp(n),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 g=d.percent-v.percent,m=g===0?1:c((r-v.percent)/g,1);d.easingFunc&&(m=d.easingFunc(m));var y=i?this._additiveValue:u?n6:e[l];if((F3(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?v.rawValue:d.rawValue;else if(F3(a))a===e9?K5(y,v[n],d[n],m):pR(y,v[n],d[n],m);else if(rp(a)){var _=v[n],x=d[n],w=a===af;e[l]={type:w?"linear":"radial",x:Wi(_.x,x.x,m),y:Wi(_.y,x.y,m),colorStops:j(_.colorStops,function(b,T){var A=x.colorStops[T];return{offset:Wi(b.offset,A.offset,m),color:t9(K5([],b.color,A.color,m))}}),global:x.global},w?(e[l].x2=Wi(_.x2,x.x2,m),e[l].y2=Wi(_.y2,x.y2,m)):e[l].r=Wi(_.r,x.r,m)}else if(u)K5(y,v[n],d[n],m),i||(e[l]=t9(y));else{var S=Wi(v[n],d[n],m);i?this._additiveValue=S:e[l]=S}i&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,i=this.propName,n=this._additiveValue;r===k3?e[i]=e[i]+n:r===G6?(Vr(e[i],n6),B3(n6,n6,n,1),e[i]=t9(n6)):r===e9?B3(e[i],e[i],n,1):r===Qb&&tp(e[i],e[i],n,1)},t}(),V0=function(){function t(e,r,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&n){Jh("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,i){return this.whenWithKeys(e,r,Ut(r),i)},t.prototype.whenWithKeys=function(e,r,i,n){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,n7(u),n),this._trackKeys.push(s)}l.addKeyframe(e,n7(r[s]),n)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,i=0;i0)){this._started=1;for(var r=this,i=[],n=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function zo(){return new Date().getTime()}var xR=function(t){F(e,t);function e(r){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,r=r||{},i.stage=r.stage||{},i}return e.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},e.prototype.addAnimator=function(r){r.animation=this;var i=r.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(r){if(r.animation){var i=r.prev,n=r.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var i=r.getClip();i&&this.removeClip(i),r.animation=null},e.prototype.update=function(r){for(var i=zo()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,r||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function i(){r._running&&(E2(i),!r._paused&&r.update())}E2(i)},e.prototype.start=function(){this._running||(this._time=zo(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=zo(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=zo()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var i=r.next;r.prev=r.next=r.animation=null,r=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,i){i=i||{},this.start();var n=new V0(r,i.loop);return this.addAnimator(n),n},e}(z1),SR=300,$5=Vt.domSupported,J5=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=j(t,function(n){var a=n.replace("mouse","pointer");return r.hasOwnProperty(a)?a:n});return{mouse:t,touch:e,pointer:i}}(),ip={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},np=!1;function sf(t){var e=t.pointerType;return e==="pen"||e==="touch"}function wR(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function tl(t){t&&(t.zrByTouch=!0)}function bR(t,e){return S1(t.dom,new TR(t,e),!0)}function jb(t,e){for(var r=e,i=!1;r&&r.nodeType!==9&&!(i=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return i}var TR=function(){function t(e,r){this.stopPropagation=He,this.stopImmediatePropagation=He,this.preventDefault=He,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),Z1={mousedown:function(t){t=S1(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=S1(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=S1(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=S1(this.dom,t);var e=t.toElement||t.relatedTarget;jb(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){np=!0,t=S1(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){np||(t=S1(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=S1(this.dom,t),tl(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Z1.mousemove.call(this,t),Z1.mousedown.call(this,t)},touchmove:function(t){t=S1(this.dom,t),tl(t),this.handler.processGesture(t,"change"),Z1.mousemove.call(this,t)},touchend:function(t){t=S1(this.dom,t),tl(t),this.handler.processGesture(t,"end"),Z1.mouseup.call(this,t),+new Date-+this.__lastTouchMomentsp||t<-sp}var Ta=[],io=[],rl=a1(),il=Math.abs,ji=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return ba(this.rotation)||ba(this.x)||ba(this.y)||ba(this.scaleX-1)||ba(this.scaleY-1)||ba(this.skewX)||ba(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),i=this.transform;if(!(r||e)){i&&(op(i),this.invTransform=null);return}i=i||a1(),r?this.getLocalTransform(i):op(i),e&&(r?$i(i,e,i):ac(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Ta);var i=Ta[0]<0?-1:1,n=Ta[1]<0?-1:1,a=((Ta[0]-i)*r+i)/Ta[0]||0,o=((Ta[1]-n)*r+n)/Ta[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||a1(),W2(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),a=Math.PI/2+n-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||a1(),$i(io,e.invTransform,r),r=io);var i=this.originX,n=this.originY;(i||n)&&(rl[4]=i,rl[5]=n,$i(io,r,rl),io[4]-=i,io[5]-=n,r=io),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var i=[e,r],n=this.invTransform;return n&&ur(i,i,n),i},t.prototype.transformCoordToGlobal=function(e,r){var i=[e,r],n=this.transform;return n&&ur(i,i,n),i},t.prototype.getLineScale=function(){var e=this.transform;return e&&il(e[0]-1)>1e-10&&il(e[3]-1)>1e-10?Math.sqrt(il(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){Kb(this,e)},t.getLocalTransform=function(e,r){r=r||[];var i=e.originX||0,n=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,h=e.y,c=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(i||n||s||l){var d=i+s,p=n+l;r[4]=-d*a-c*p*o,r[5]=-p*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,u&&U2(r,r,u),r[4]+=i+f,r[5]+=n+h,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Pi=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Kb(t,e){for(var r=0;r=0?parseFloat(t)/100*e:parseFloat(t):t}function L9(t,e,r){var i=e.position||"inside",n=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,f="left",h="top";if(i instanceof Array)l+=ai(i[0],r.width),u+=ai(i[1],r.height),f=null,h=null;else switch(i){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=a-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=a-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,f="right",h="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=f,t.verticalAlign=h,t}var nl="__zr_normal__",al=Pi.concat(["ignore"]),MR=ni(Pi,function(t,e){return t[e]=!0,t},{ignore:!1}),no={},LR=new Nt(0,0,0,0),U0=function(){function t(e){this.id=Ab(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,i){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(r),i.position!=null){var f=LR;i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(no,i,f):L9(no,i,f),a.x=no.x,a.y=no.y,o=no.align,s=no.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=ai(h[0],f.width),v=ai(h[1],f.height)),u=!0,a.originX=-a.x+c+(n?0:f.x),a.originY=-a.y+v+(n?0:f.y)}}i.rotation!=null&&(a.rotation=i.rotation);var d=i.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var p=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;p&&this.canBeInsideText()?(m=i.insideFill,y=i.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=i.outsideFill,y=i.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=o,g.verticalAlign=s,r.setDefaultTextStyle(g)),r.__dirty|=f1,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?hf:ff},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),i=typeof r=="string"&&Vr(r);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,Ji(i,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},H(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(Tt(e))for(var i=e,n=Ut(i),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(nl,!1,e)},t.prototype.useState=function(e,r,i,n){var a=e===nl,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(kt(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){Jh("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!i&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(e,r,i,f),c&&c.useState(e,r,i,f),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~f1),u}}},t.prototype.useStates=function(e,r,i){if(!e.length)this.clearStates();else{var n=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,r,c),g&&g.useStates(e,r,c),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~f1)}},t.prototype.isSilent=function(){for(var e=this.silent,r=this.parent;!e&&r;){if(r.silent){e=!0;break}r=r.parent}return e},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var i=this.currentStates.slice();i.splice(r,1),this.useStates(i)}},t.prototype.replaceState=function(e,r,i){var n=this.currentStates.slice(),a=kt(n,e),o=kt(n,r)>=0;a>=0?o?n.splice(a,1):n[a]=r:i&&!o&&n.push(r),this.useStates(n)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},i,n=0;n=0&&a.splice(o,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var i=this.animators,n=i.length,a=[],o=0;o0&&r.during&&a[0].during(function(d,p){r.during(p)});for(var c=0;c0||n.force&&!o.length){var T=void 0,A=void 0,D=void 0;if(s){A={},c&&(T={});for(var x=0;x<_;x++){var m=p[x];A[m]=r[m],c?T[m]=i[m]:r[m]=i[m]}}else if(c){D={};for(var x=0;x<_;x++){var m=p[x];D[m]=n7(r[m]),PR(r,i,m)}}var w=new V0(r,!1,!1,h?ce(d,function(M){return M.targetName===e}):null);w.targetName=e,n.scope&&(w.scope=n.scope),c&&T&&w.whenWithKeys(0,T,p),D&&w.whenWithKeys(0,D,p),w.whenWithKeys(u==null?500:u,s?A:i,p).delay(f||0),t.addAnimator(w,e),o.push(w)}}var Dt=function(t){F(e,t);function e(r){var i=t.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(r),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(r){return this._children[r]},e.prototype.childOfName=function(r){for(var i=this._children,n=0;n=0&&(n.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,i){var n=kt(this._children,r);return n>=0&&this.replaceAt(i,n),this},e.prototype.replaceAt=function(r,i){var n=this._children,a=n[i];if(r&&r!==this&&r.parent!==this&&r!==a){n[i]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var i=this.__zr;i&&i!==r.__zr&&r.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(r){var i=this.__zr,n=this._children,a=kt(n,r);return a<0?this:(n.splice(a,1),r.parent=null,i&&r.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,i=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,i){return this._disposed||this.handler.on(e,r,i),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r0){if(t<=n)return o;if(t>=a)return s}else{if(t>=n)return o;if(t<=a)return s}else{if(t===n)return o;if(t===a)return s}return(t-n)/l*u+o}function ot(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return ht(t)?VR(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function Ae(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),tT),t=(+t).toFixed(e),r?t:+t}function I1(t){return t.sort(function(e,r){return e-r}),t}function Si(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return uc(t)}function uc(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),i=r>0?+e.slice(r+1):0,n=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function eT(t,e){var r=Math.log,i=Math.LN10,n=Math.floor(r(t[1]-t[0])/i),a=Math.round(r(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function HR(t,e){var r=ni(t,function(v,d){return v+(isNaN(d)?0:d)},0);if(r===0)return[];for(var i=Math.pow(10,e),n=j(t,function(v){return(isNaN(v)?0:v)/r*i*100}),a=i*100,o=j(n,function(v){return Math.floor(v)}),s=ni(o,function(v,d){return v+d},0),l=j(n,function(v,d){return v-o[d]});su&&(u=l[h],f=h);++o[f],l[f]=0,++s}return j(o,function(v){return v/i})}function UR(t,e){var r=Math.max(Si(t),Si(e)),i=t+e;return r>tT?i:Ae(i,r)}var hp=9007199254740991;function rT(t){var e=Math.PI*2;return(t%e+e)%e}function T7(t){return t>-fp&&t=10&&e++,e}function iT(t,e){var r=fc(t),i=Math.pow(10,r),n=t/i,a;return n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10,t=a*i,r>=-20?+t.toFixed(r<0?-r:0):t}function ll(t,e){var r=(t.length-1)*e+1,i=Math.floor(r),n=+t[i-1],a=r-i;return a?n+a*(t[i]-n):n}function cp(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,i=0;i=0||a&&kt(a,l)<0)){var u=i.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var pN=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],gN=I2(pN),mN=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return gN(this,e,r)},t}(),pf=new D4(50);function yN(t){if(typeof t=="string"){var e=pf.get(t);return e&&e.image}else return t}function dc(t,e,r,i,n){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=pf.get(t),o={hostEl:r,cb:i,cbPayload:n};return a?(e=a.image,!X0(e)&&a.pending.push(o)):(e=ra.loadImage(t,gp,gp),e.__zrImageSrc=t,pf.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function gp(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=c1(r,e);return u>s&&(r="",u=0),s=t-u,n.ellipsis=r,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function gT(t,e){var r=e.containerWidth,i=e.font,n=e.contentWidth;if(!r)return"";var a=c1(t,i);if(a<=r)return t;for(var o=0;;o++){if(a<=n||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?xN(t,n,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*n/a):0;t=t.substr(0,s),a=c1(t,i)}return t===""&&(t=e.placeholder),t}function xN(t,e,r,i){for(var n=0,a=0,o=t.length;av&&u){var d=Math.floor(v/s);h=h.slice(0,d)}if(t&&a&&f!=null)for(var p=pT(f,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;gs&&fl(r,t.substring(s,u),e,o),fl(r,l[2],e,o,l[1]),s=ul.lastIndex}sn){w>0?(y.tokens=y.tokens.slice(0,w),g(y,x,_),r.lines=r.lines.slice(0,m+1)):r.lines=r.lines.slice(0,m);break t}var M=b.width,L=M==null||M==="auto";if(typeof M=="string"&&M.charAt(M.length-1)==="%")S.percentWidth=M,f.push(S),S.contentWidth=c1(S.text,D);else{if(L){var I=b.backgroundColor,P=I&&I.image;P&&(P=yN(P),X0(P)&&(S.width=Math.max(S.width,P.width*C/P.height)))}var R=d&&i!=null?i-x:null;R!=null&&R0&&d+i.accumWidth>i.width&&(f=e.split("\n"),u=!0),i.accumWidth=d}else{var p=mT(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=p.accumWidth+v,h=p.linesWidths,f=p.lines}}else f=e.split("\n");for(var g=0;g=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var CN=ni(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function DN(t){return AN(t)?!!CN[t]:!0}function mT(t,e,r,i,n){for(var a=[],o=[],s="",l="",u=0,f=0,h=0;hr:n+f+v>r){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=c,f=v)):d?(a.push(l),o.push(u),l=c,u=v):(a.push(c),o.push(v));continue}f+=v,d?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!a.length&&!s&&(s=t,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=n),{accumWidth:f,lines:a,linesWidths:o}}var gf="__zr_style_"+Math.round(Math.random()*10),x2={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Y0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};x2[gf]=!0;var yp=["z","z2","invisible"],EN=["invisible"],k1=function(t){F(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var i=Ut(r),n=0;n1e-4){s[0]=t-r,s[1]=e-i,l[0]=t+r,l[1]=e+i;return}if(z3[0]=dl(n)*r+t,z3[1]=vl(n)*i+e,G3[0]=dl(a)*r+t,G3[1]=vl(a)*i+e,u(s,z3,G3),f(l,z3,G3),n=n%Ca,n<0&&(n=n+Ca),a=a%Ca,a<0&&(a=a+Ca),n>a&&!o?a+=Ca:nn&&(V3[0]=dl(v)*r+t,V3[1]=vl(v)*i+e,u(s,V3,s),f(l,V3,l))}var me={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Da=[],Ea=[],ui=[],wn=[],fi=[],hi=[],pl=Math.min,gl=Math.max,Ma=Math.cos,La=Math.sin,zi=Math.abs,mf=Math.PI,On=mf*2,ml=typeof Float32Array<"u",a6=[];function yl(t){var e=Math.round(t/mf*1e8)/1e8;return e%2*mf}function pc(t,e){var r=yl(t[0]);r<0&&(r+=On);var i=r-t[0],n=t[1];n+=i,!e&&n-r>=On?n=r+On:e&&r-n>=On?n=r-On:!e&&r>n?n=r+(On-yl(r-n)):e&&r0&&(this._ux=zi(i/M9/e)||0,this._uy=zi(i/M9/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(me.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var i=zi(e-this._xi),n=zi(r-this._yi),a=i>this._ux||n>this._uy;if(this.addData(me.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,i,n,a,o){return this._drawPendingPt(),this.addData(me.C,e,r,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,i,n,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,i,n){return this._drawPendingPt(),this.addData(me.Q,e,r,i,n),this._ctx&&this._ctx.quadraticCurveTo(e,r,i,n),this._xi=i,this._yi=n,this},t.prototype.arc=function(e,r,i,n,a,o){this._drawPendingPt(),a6[0]=n,a6[1]=a,pc(a6,o),n=a6[0],a=a6[1];var s=a-n;return this.addData(me.A,e,r,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,i,n,a,o),this._xi=Ma(a)*i+e,this._yi=La(a)*i+r,this},t.prototype.arcTo=function(e,r,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,i,n,a),this},t.prototype.rect=function(e,r,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,i,n),this.addData(me.R,e,r,i,n),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(me.Z);var e=this._ctx,r=this._x0,i=this._y0;return e&&e.closePath(),this._xi=r,this._yi=i,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var r=e.length;!(this.data&&this.data.length===r)&&ml&&(this.data=new Float32Array(r));for(var i=0;if.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){ui[0]=ui[1]=fi[0]=fi[1]=Number.MAX_VALUE,wn[0]=wn[1]=hi[0]=hi[1]=-Number.MAX_VALUE;var e=this.data,r=0,i=0,n=0,a=0,o;for(o=0;oi||zi(_)>n||c===r-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case me.C:{var x=e[c++],w=e[c++],g=e[c++],m=e[c++],S=e[c++],b=e[c++];p=JP(a,o,x,w,g,m,S,b,10),a=S,o=b;break}case me.Q:{var x=e[c++],w=e[c++],g=e[c++],m=e[c++];p=eR(a,o,x,w,g,m,10),a=g,o=m;break}case me.A:var T=e[c++],A=e[c++],D=e[c++],C=e[c++],M=e[c++],L=e[c++],I=L+M;c+=1,d&&(s=Ma(M)*D+T,l=La(M)*C+A),p=gl(D,C)*pl(On,Math.abs(L)),a=Ma(I)*D+T,o=La(I)*C+A;break;case me.R:{s=a=e[c++],l=o=e[c++];var P=e[c++],R=e[c++];p=P*2+R*2;break}case me.Z:{var y=s-a,_=l-o;p=Math.sqrt(y*y+_*_),a=s,o=l;break}}p>=0&&(u[h++]=p,f+=p)}return this._pathLen=f,f},t.prototype.rebuildPath=function(e,r){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,f,h,c,v=r<1,d,p,g=0,m=0,y,_=0,x,w;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,y=r*p,!y)))t:for(var S=0;S0&&(e.lineTo(x,w),_=0),b){case me.M:s=u=i[S++],l=f=i[S++],e.moveTo(u,f);break;case me.L:{h=i[S++],c=i[S++];var A=zi(h-u),D=zi(c-f);if(A>n||D>a){if(v){var C=d[m++];if(g+C>y){var M=(y-g)/C;e.lineTo(u*(1-M)+h*M,f*(1-M)+c*M);break t}g+=C}e.lineTo(h,c),u=h,f=c,_=0}else{var L=A*A+D*D;L>_&&(x=h,w=c,_=L)}break}case me.C:{var I=i[S++],P=i[S++],R=i[S++],B=i[S++],O=i[S++],z=i[S++];if(v){var C=d[m++];if(g+C>y){var M=(y-g)/C;ia(u,I,R,O,M,Da),ia(f,P,B,z,M,Ea),e.bezierCurveTo(Da[1],Ea[1],Da[2],Ea[2],Da[3],Ea[3]);break t}g+=C}e.bezierCurveTo(I,P,R,B,O,z),u=O,f=z;break}case me.Q:{var I=i[S++],P=i[S++],R=i[S++],B=i[S++];if(v){var C=d[m++];if(g+C>y){var M=(y-g)/C;S7(u,I,R,M,Da),S7(f,P,B,M,Ea),e.quadraticCurveTo(Da[1],Ea[1],Da[2],Ea[2]);break t}g+=C}e.quadraticCurveTo(I,P,R,B),u=R,f=B;break}case me.A:var G=i[S++],U=i[S++],Z=i[S++],$=i[S++],W=i[S++],V=i[S++],K=i[S++],Y=!i[S++],q=Z>$?Z:$,et=zi(Z-$)>.001,nt=W+V,J=!1;if(v){var C=d[m++];g+C>y&&(nt=W+V*(y-g)/C,J=!0),g+=C}if(et&&e.ellipse?e.ellipse(G,U,Z,$,K,W,nt,Y):e.arc(G,U,q,W,nt,Y),J)break t;T&&(s=Ma(W)*Z+G,l=La(W)*$+U),u=Ma(nt)*Z+G,f=La(nt)*$+U;break;case me.R:s=u=i[S],l=f=i[S+1],h=i[S++],c=i[S++];var ut=i[S++],_t=i[S++];if(v){var C=d[m++];if(g+C>y){var St=y-g;e.moveTo(h,c),e.lineTo(h+pl(St,ut),c),St-=ut,St>0&&e.lineTo(h+ut,c+pl(St,_t)),St-=_t,St>0&&e.lineTo(h+gl(ut-St,0),c+_t),St-=ut,St>0&&e.lineTo(h,c+gl(_t-St,0));break t}g+=C}e.rect(h,c,ut,_t);break;case me.Z:if(v){var C=d[m++];if(g+C>y){var M=(y-g)/C;e.lineTo(u*(1-M)+s*M,f*(1-M)+l*M);break t}g+=C}e.closePath(),u=s,f=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.CMD=me,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Yi(t,e,r,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=t;if(o>e+s&&o>i+s||ot+s&&a>r+s||ae+h&&f>i+h&&f>a+h&&f>s+h||ft+h&&u>r+h&&u>n+h&&u>o+h||ue+u&&l>i+u&&l>a+u||lt+u&&s>r+u&&s>n+u||sr||f+un&&(n+=o6);var c=Math.atan2(l,s);return c<0&&(c+=o6),c>=i&&c<=n||c+o6>=i&&c+o6<=n}function Xi(t,e,r,i,n,a){if(a>e&&a>i||an?s:0}var bn=Ri.CMD,Ia=Math.PI*2,ON=1e-4;function BN(t,e){return Math.abs(t-e)e&&u>i&&u>a&&u>s||u1&&kN(),v=ir(e,i,a,s,b1[0]),c>1&&(d=ir(e,i,a,s,b1[1]))),c===2?ge&&s>i&&s>a||s=0&&u<=1){for(var f=0,h=mr(e,i,a,u),c=0;cr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Br[0]=-l,Br[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=Ia-1e-4){i=0,n=Ia;var f=a?1:-1;return o>=Br[0]+t&&o<=Br[1]+t?f:0}if(i>n){var h=i;i=n,n=h}i<0&&(i+=Ia,n+=Ia);for(var c=0,v=0;v<2;v++){var d=Br[v];if(d+t>o){var p=Math.atan2(s,d),f=a?1:-1;p<0&&(p=Ia+p),(p>=i&&p<=n||p+Ia>=i&&p+Ia<=n)&&(p>Math.PI/2&&p1&&(r||(s+=Xi(l,u,f,h,i,n))),g&&(l=a[d],u=a[d+1],f=l,h=u),p){case bn.M:f=a[d++],h=a[d++],l=f,u=h;break;case bn.L:if(r){if(Yi(l,u,a[d],a[d+1],e,i,n))return!0}else s+=Xi(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case bn.C:if(r){if(RN(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,i,n))return!0}else s+=FN(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case bn.Q:if(r){if(yT(l,u,a[d++],a[d++],a[d],a[d+1],e,i,n))return!0}else s+=zN(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case bn.A:var m=a[d++],y=a[d++],_=a[d++],x=a[d++],w=a[d++],S=a[d++];d+=1;var b=!!(1-a[d++]);c=Math.cos(w)*_+m,v=Math.sin(w)*x+y,g?(f=c,h=v):s+=Xi(l,u,c,v,i,n);var T=(i-m)*x/_+m;if(r){if(NN(m,y,x,w,w+S,b,e,T,n))return!0}else s+=GN(m,y,x,w,w+S,b,T,n);l=Math.cos(w+S)*_+m,u=Math.sin(w+S)*x+y;break;case bn.R:f=l=a[d++],h=u=a[d++];var A=a[d++],D=a[d++];if(c=f+A,v=h+D,r){if(Yi(f,h,c,h,e,i,n)||Yi(c,h,c,v,e,i,n)||Yi(c,v,f,v,e,i,n)||Yi(f,v,f,h,e,i,n))return!0}else s+=Xi(c,h,c,v,i,n),s+=Xi(f,v,f,h,i,n);break;case bn.Z:if(r){if(Yi(l,u,f,h,e,i,n))return!0}else s+=Xi(l,u,f,h,i,n);l=f,u=h;break}}return!r&&!BN(u,h)&&(s+=Xi(l,u,f,h,i,n)||0),s!==0}function VN(t,e,r){return _T(t,0,!1,e,r)}function HN(t,e,r,i){return _T(t,e,!0,r,i)}var I9=xt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},x2),UN={style:xt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Y0.style)},_l=Pi.concat(["invisible","culling","z","z2","zlevel","parent"]),zt=function(t){F(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){r.buildPath(l,r.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s<_l.length;++s)n[_l[s]]=this[_l[s]];n.__dirty|=f1}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var i=Ut(r);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a.5?ff:i>.2?ER:hf}else if(r)return hf}return ff},e.prototype.getInsideTextStroke=function(r){var i=this.style.fill;if(ht(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=D9(r,0)0))},e.prototype.hasFill=function(){var r=this.style,i=r.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,i=this.style,n=!r;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Ro)&&(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||n){s.copy(r);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f==null?4:f)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,i){var n=this.transformCoordToLocal(r,i),a=this.getBoundingRect(),o=this.style;if(r=n[0],i=n[1],a.contain(r,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),HN(s,l/u,r,i)))return!0}if(this.hasFill())return VN(s,r,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Ro,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,i){r==="shape"?this.setShape(i):t.prototype.attrKV.call(this,r,i)},e.prototype.setShape=function(r,i){var n=this.shape;return n||(n=this.shape={}),typeof r=="string"?n[r]=i:H(n,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Ro)},e.prototype.createStyle=function(r){return F0(I9,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var i=this._normalState;r.shape&&!i.shape&&(i.shape=H({},this.shape))},e.prototype._applyStateObj=function(r,i,n,a,o,s){t.prototype._applyStateObj.call(this,r,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=H({},n.shape),H(u,i.shape)):(u=H({},a?this.shape:n.shape),H(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=H({},this.shape);for(var f={},h=Ut(u),c=0;c0},e.prototype.hasFill=function(){var r=this.style,i=r.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(r){return F0(WN,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var i=r.text;i!=null?i+="":i="";var n=a3(i,r.font,r.textAlign,r.textBaseline);if(n.x+=r.x||0,n.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(k1);n4.prototype.type="tspan";var XN=xt({x:0,y:0},x2),YN={style:xt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Y0.style)};function ZN(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var pr=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return F0(XN,r)},e.prototype._getSize=function(r){var i=this.style,n=i[r];if(n!=null)return n;var a=ZN(i.image)?i.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=i[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return YN},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Nt(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(k1);pr.prototype.type="image";function QN(t,e){var r=e.x,i=e.y,n=e.width,a=e.height,o=e.r,s,l,u,f;n<0&&(r=r+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>n&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),t.moveTo(r+s,i),t.lineTo(r+n-l,i),l!==0&&t.arc(r+n-l,i+l,l,-Math.PI/2,0),t.lineTo(r+n,i+a-u),u!==0&&t.arc(r+n-u,i+a-u,u,0,Math.PI/2),t.lineTo(r+f,i+a),f!==0&&t.arc(r+f,i+a-f,f,Math.PI/2,Math.PI),t.lineTo(r,i+s),s!==0&&t.arc(r+s,i+s,s,Math.PI,Math.PI*1.5)}var Go=Math.round;function xT(t,e,r){if(e){var i=e.x1,n=e.x2,a=e.y1,o=e.y2;t.x1=i,t.x2=n,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(Go(i*2)===Go(n*2)&&(t.x1=t.x2=l2(i,s,!0)),Go(a*2)===Go(o*2)&&(t.y1=t.y2=l2(a,s,!0))),t}}function ST(t,e,r){if(e){var i=e.x,n=e.y,a=e.width,o=e.height;t.x=i,t.y=n,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=l2(i,s,!0),t.y=l2(n,s,!0),t.width=Math.max(l2(i+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(l2(n+o,s,!1)-t.y,o===0?0:1)),t}}function l2(t,e,r){if(!e)return t;var i=Go(t*2);return(i+Go(e))%2===0?i/2:(i+(r?1:-1))/2}var jN=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),qN={},Xt=function(t){F(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new jN},e.prototype.buildPath=function(r,i){var n,a,o,s;if(this.subPixelOptimize){var l=ST(qN,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?QN(r,i):r.rect(n,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(zt);Xt.prototype.type="rect";var bp={fill:"#000"},Tp=2,KN={style:xt({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},Y0.style)},Ht=function(t){F(e,t);function e(r){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=bp,i.attr(r),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,M=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),L=o.calculatedLineHeight,I=0;I=0&&(I=S[L],I.align==="right");)this._placeToken(I,r,T,m,M,"right",_),A-=I.width,M-=I.width,L--;for(C+=(a-(C-g)-(y-M)-A)/2;D<=L;)I=S[D],this._placeToken(I,r,T,m,C+I.width/2,"center",_),C+=I.width,D++;m+=T}},e.prototype._placeToken=function(r,i,n,a,o,s,l){var u=i.rich[r.styleName]||{};u.text=r.text;var f=r.verticalAlign,h=a+n/2;f==="top"?h=a+r.height/2:f==="bottom"&&(h=a+n-r.height/2);var c=!r.isLineHolder&&xl(u);c&&this._renderBackground(u,i,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var v=!!u.backgroundColor,d=r.textPadding;d&&(o=Lp(o,s,d),h-=r.height/2-d[0]-r.innerHeight/2);var p=this._getOrCreateChild(n4),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,x=Mp("fill"in u?u.fill:"fill"in i?i.fill:(y=!0,m.fill)),w=Ep("stroke"in u?u.stroke:"stroke"in i?i.stroke:!v&&!l&&(!m.autoStroke||y)?(_=Tp,m.stroke):null),S=u.textShadowBlur>0||i.textShadowBlur>0;g.text=r.text,g.x=o,g.y=h,S&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=r.font||ea,g.opacity=Ci(u.opacity,i.opacity,1),Cp(g,u),w&&(g.lineWidth=Ci(u.lineWidth,i.lineWidth,_),g.lineDash=It(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=w),x&&(g.fill=x);var b=r.contentWidth,T=r.contentHeight;p.setBoundingRect(new Nt(V6(g.x,b,g.textAlign),No(g.y,T,g.textBaseline),b,T))},e.prototype._renderBackground=function(r,i,n,a,o,s){var l=r.backgroundColor,u=r.borderWidth,f=r.borderColor,h=l&&l.image,c=l&&!h,v=r.borderRadius,d=this,p,g;if(c||r.lineHeight||u&&f){p=this._getOrCreateChild(Xt),p.useStyle(p.createStyle()),p.style.fill=null;var m=p.shape;m.x=n,m.y=a,m.width=o,m.height=s,m.r=v,p.dirtyShape()}if(c){var y=p.style;y.fill=l||null,y.fillOpacity=It(r.fillOpacity,1)}else if(h){g=this._getOrCreateChild(pr),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&f){var y=p.style;y.lineWidth=u,y.stroke=f,y.strokeOpacity=It(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var x=(p||g).style;x.shadowBlur=r.shadowBlur||0,x.shadowColor=r.shadowColor||"transparent",x.shadowOffsetX=r.shadowOffsetX||0,x.shadowOffsetY=r.shadowOffsetY||0,x.opacity=Ci(r.opacity,i.opacity,1)},e.makeFont=function(r){var i="";return bT(r)&&(i=[r.fontStyle,r.fontWeight,wT(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),i&&K1(i)||r.textFont||r.font},e}(k1),$N={left:!0,right:1,center:1},JN={top:1,bottom:1,middle:1},Ap=["fontStyle","fontWeight","fontSize","fontFamily"];function wT(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?qh+"px":t+"px"}function Cp(t,e){for(var r=0;r=0,a=!1;if(t instanceof zt){var o=TT(t),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(ao(s)||ao(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=H({},i),u=H({},u),u.fill=s):!ao(u.fill)&&ao(s)?(a=!0,i=H({},i),u=H({},u),u.fill=ef(s)):!ao(u.stroke)&&ao(l)&&(a||(i=H({},i),u=H({},u)),u.stroke=ef(l)),i.style=u}}if(i&&i.z2==null){a||(i=H({},i));var f=t.z2EmphasisLift;i.z2=t.z2+(f!=null?f:M4)}return i}function oO(t,e,r){if(r&&r.z2==null){r=H({},r);var i=t.z2SelectLift;r.z2=t.z2+(i!=null?i:eO)}return r}function sO(t,e,r){var i=kt(t.currentStates,e)>=0,n=t.style.opacity,a=i?null:nO(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=H({},r),o=H({opacity:i?n:a.opacity*.1},o),r.style=o),r}function Sl(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return aO(this,t,e,r);if(t==="blur")return sO(this,t,r);if(t==="select")return oO(this,t,r)}return r}function P2(t){t.stateProxy=Sl;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=Sl),r&&(r.stateProxy=Sl)}function Op(t,e){!IT(t,e)&&!t.__highByOuter&&pn(t,AT)}function Bp(t,e){!IT(t,e)&&!t.__highByOuter&&pn(t,CT)}function sn(t,e){t.__highByOuter|=1<<(e||0),pn(t,AT)}function ln(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&pn(t,CT)}function ET(t){pn(t,yc)}function _c(t){pn(t,DT)}function MT(t){pn(t,rO)}function LT(t){pn(t,iO)}function IT(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function PT(t){var e=t.getModel(),r=[],i=[];e.eachComponent(function(n,a){var o=gc(a),s=n==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){DT(u)}),s&&r.push(a)),o.isBlured=!1}),E(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(r,!1,e)})}function _f(t,e,r,i){var n=i.getModel();r=r||"coordinateSystem";function a(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Kn(t,e,r){u2(t,!0),pn(t,P2),Sf(t,e,r)}function vO(t){u2(t,!1)}function ke(t,e,r,i){i?vO(t):Kn(t,e,r)}function Sf(t,e,r){var i=Et(t);e!=null?(i.focus=e,i.blurScope=r):i.focus&&(i.focus=null)}var Fp=["emphasis","blur","select"],dO={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Tr(t,e,r,i){r=r||"itemStyle";for(var n=0;n1&&(o*=wl(d),s*=wl(d));var p=(n===a?-1:1)*wl((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,g=p*o*v/s,m=p*-s*c/o,y=(t+r)/2+U3(h)*g-H3(h)*m,_=(e+i)/2+H3(h)*g+U3(h)*m,x=Hp([1,0],[(c-g)/o,(v-m)/s]),w=[(c-g)/o,(v-m)/s],S=[(-1*c-g)/o,(-1*v-m)/s],b=Hp(w,S);if(bf(w,S)<=-1&&(b=s6),bf(w,S)>=1&&(b=0),b<0){var T=Math.round(b/s6*1e6)/1e6;b=s6*2+T%2*s6}f.addData(u,y,_,o,s,x,b,h,a)}var xO=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,SO=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function wO(t){var e=new Ri;if(!t)return e;var r=0,i=0,n=r,a=i,o,s=Ri.CMD,l=t.match(xO);if(!l)return e;for(var u=0;uI*I+P*P&&(T=D,A=C),{cx:T,cy:A,x0:-f,y0:-h,x1:T*(n/w-1),y1:A*(n/w-1)}}function MO(t){var e;if(X(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function LO(t,e){var r,i=H6(e.r,0),n=H6(e.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,h=e.cy,c=!!e.clockwise,v=Wp(u-l),d=v>bl&&v%bl;if(d>X1&&(v=d),!(i>X1))t.moveTo(f,h);else if(v>bl-X1)t.moveTo(f+i*so(l),h+i*Pa(l)),t.arc(f,h,i,l,u,!c),n>X1&&(t.moveTo(f+n*so(u),h+n*Pa(u)),t.arc(f,h,n,u,l,c));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,x=void 0,w=void 0,S=void 0,b=void 0,T=void 0,A=void 0,D=void 0,C=void 0,M=void 0,L=void 0,I=void 0,P=i*so(l),R=i*Pa(l),B=n*so(u),O=n*Pa(u),z=v>X1;if(z){var G=e.cornerRadius;G&&(r=MO(G),p=r[0],g=r[1],m=r[2],y=r[3]);var U=Wp(i-n)/2;if(_=ci(U,m),x=ci(U,y),w=ci(U,p),S=ci(U,g),A=b=H6(_,x),D=T=H6(w,S),(b>X1||T>X1)&&(C=i*so(u),M=i*Pa(u),L=n*so(l),I=n*Pa(l),vX1){var et=ci(m,A),nt=ci(y,A),J=W3(L,I,P,R,i,et,c),ut=W3(C,M,B,O,i,nt,c);t.moveTo(f+J.cx+J.x0,h+J.cy+J.y0),A0&&t.arc(f+J.cx,h+J.cy,et,Cr(J.y0,J.x0),Cr(J.y1,J.x1),!c),t.arc(f,h,i,Cr(J.cy+J.y1,J.cx+J.x1),Cr(ut.cy+ut.y1,ut.cx+ut.x1),!c),nt>0&&t.arc(f+ut.cx,h+ut.cy,nt,Cr(ut.y1,ut.x1),Cr(ut.y0,ut.x0),!c))}else t.moveTo(f+P,h+R),t.arc(f,h,i,l,u,!c);if(!(n>X1)||!z)t.lineTo(f+B,h+O);else if(D>X1){var et=ci(p,D),nt=ci(g,D),J=W3(B,O,C,M,n,-nt,c),ut=W3(P,R,L,I,n,-et,c);t.lineTo(f+J.cx+J.x0,h+J.cy+J.y0),D0&&t.arc(f+J.cx,h+J.cy,nt,Cr(J.y0,J.x0),Cr(J.y1,J.x1),!c),t.arc(f,h,n,Cr(J.cy+J.y1,J.cx+J.x1),Cr(ut.cy+ut.y1,ut.cx+ut.x1),c),et>0&&t.arc(f+ut.cx,h+ut.cy,et,Cr(ut.y1,ut.x1),Cr(ut.y0,ut.x0),!c))}else t.lineTo(f+B,h+O),t.arc(f,h,n,u,l,c)}t.closePath()}}}var IO=function(){function t(){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 t}(),Yr=function(t){F(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new IO},e.prototype.buildPath=function(r,i){LO(r,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(zt);Yr.prototype.type="sector";var PO=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),l3=function(t){F(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new PO},e.prototype.buildPath=function(r,i){var n=i.cx,a=i.cy,o=Math.PI*2;r.moveTo(n+i.r,a),r.arc(n,a,i.r,0,o,!1),r.moveTo(n+i.r0,a),r.arc(n,a,i.r0,0,o,!0)},e}(zt);l3.prototype.type="ring";function RO(t,e,r,i){var n=[],a=[],o=[],s=[],l,u,f,h;if(i){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=t.length;c=2){if(i){var a=RO(n,i,r,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=n[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{t.moveTo(n[0][0],n[0][1]);for(var s=1,h=n.length;sNa[1]){if(s=!1,a)return s;var f=Math.abs(Na[0]-Ra[1]),h=Math.abs(Ra[0]-Na[1]);Math.min(f,h)>n.len()&&(f0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,d):e.animateTo(r,d)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function re(t,e,r,i,n,a){bc("update",t,e,r,i,n,a)}function Ce(t,e,r,i,n,a){bc("enter",t,e,r,i,n,a)}function Yo(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Zp(t){return!t.isGroup}function KO(t){return t.shape!=null}function f3(t,e,r){if(!t||!e)return;function i(o){var s={};return o.traverse(function(l){Zp(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return KO(o)&&(s.shape=H({},o.shape)),s}var a=i(t);e.traverse(function(o){if(Zp(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),re(o,l,r,Et(o).dataIndex)}}})}function YT(t,e){return j(t,function(r){var i=r[0];i=N9(i,e.x),i=O9(i,e.x+e.width);var n=r[1];return n=N9(n,e.y),n=O9(n,e.y+e.height),[i,n]})}function $O(t,e){var r=N9(t.x,e.x),i=O9(t.x+t.width,e.x+e.width),n=N9(t.y,e.y),a=O9(t.y+t.height,e.y+e.height);if(i>=r&&a>=n)return{x:r,y:n,width:i-r,height:a-n}}function h3(t,e,r){var i=H({rectHover:!0},e),n=i.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(n.image=t.slice(8),xt(n,r),new pr(i)):$0(t.replace("path://",""),i,r,"center")}function U6(t,e,r,i,n){for(var a=0,o=n[n.length-1];a1)return!1;var g=Tl(v,d,f,h)/c;return!(g<0||g>1)}function Tl(t,e,r,i){return t*i-r*e}function JO(t){return t<=1e-6&&t>=-1e-6}function I4(t){var e=t.itemTooltipOption,r=t.componentModel,i=t.itemName,n=ht(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&E(Ut(l),function(f){gt(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=Et(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:xt({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function Qp(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function ua(t,e){if(t)if(X(t))for(var r=0;r=0&&s.push(l)}),s}}function fa(t,e){return mt(mt({},t,!0),e,!0)}const hB={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:". "}}}},cB={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 k9="ZH",Cc="EN",Zo=Cc,s9={},Dc={},JT=Vt.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Zo).toUpperCase();return t.indexOf(k9)>-1?k9:Zo}():Zo;function tA(t,e){t=t.toUpperCase(),Dc[t]=new Jt(e),s9[t]=e}function vB(t){if(ht(t)){var e=s9[t.toUpperCase()]||{};return t===k9||t===Cc?At(e):mt(At(e),At(s9[Zo]),!1)}else return mt(At(t),At(s9[Zo]),!1)}function Cf(t){return Dc[t]}function dB(){return Dc[Zo]}tA(Cc,hB);tA(k9,cB);var Ec=1e3,Mc=Ec*60,f7=Mc*60,L1=f7*24,Jp=L1*365,W6={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Z3="{yyyy}-{MM}-{dd}",tg={year:"{yyyy}",month:"{yyyy}-{MM}",day:Z3,hour:Z3+" "+W6.hour,minute:Z3+" "+W6.minute,second:Z3+" "+W6.second,millisecond:W6.none},Dl=["year","month","day","hour","minute","second","millisecond"],eA=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function kr(t,e){return t+="","0000".substr(0,e-t.length)+t}function Qo(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function pB(t){return t===Qo(t)}function gB(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function e5(t,e,r,i){var n=B1(t),a=n[Lc(r)](),o=n[jo(r)]()+1,s=Math.floor((o-1)/3)+1,l=n[r5(r)](),u=n["get"+(r?"UTC":"")+"Day"](),f=n[M7(r)](),h=(f-1)%12+1,c=n[i5(r)](),v=n[n5(r)](),d=n[a5(r)](),p=f>=12?"pm":"am",g=p.toUpperCase(),m=i instanceof Jt?i:Cf(i||JT)||dB(),y=m.getModel("time"),_=y.get("month"),x=y.get("monthAbbr"),w=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,kr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,kr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,kr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,kr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,kr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,kr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,kr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,kr(d,3)).replace(/{S}/g,d+"")}function mB(t,e,r,i,n){var a=null;if(ht(r))a=r;else if(wt(r))a=r(t.value,e,{level:t.level});else{var o=H({},W6);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(X(a)){var h=t.level==null?0:t.level>=0?t.level:a.length+t.level;h=Math.min(h,a.length-1),a=a[h]}}return e5(new Date(t.value),a,n,i)}function rA(t,e){var r=B1(t),i=r[jo(e)]()+1,n=r[r5(e)](),a=r[M7(e)](),o=r[i5(e)](),s=r[n5(e)](),l=r[a5(e)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&a===0,v=c&&n===1,d=v&&i===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function eg(t,e,r){var i=te(t)?B1(t):t;switch(e=e||rA(t,r),e){case"year":return i[Lc(r)]();case"half-year":return i[jo(r)]()>=6?1:0;case"quarter":return Math.floor((i[jo(r)]()+1)/4);case"month":return i[jo(r)]();case"day":return i[r5(r)]();case"half-day":return i[M7(r)]()/24;case"hour":return i[M7(r)]();case"minute":return i[i5(r)]();case"second":return i[n5(r)]();case"millisecond":return i[a5(r)]()}}function Lc(t){return t?"getUTCFullYear":"getFullYear"}function jo(t){return t?"getUTCMonth":"getMonth"}function r5(t){return t?"getUTCDate":"getDate"}function M7(t){return t?"getUTCHours":"getHours"}function i5(t){return t?"getUTCMinutes":"getMinutes"}function n5(t){return t?"getUTCSeconds":"getSeconds"}function a5(t){return t?"getUTCMilliseconds":"getMilliseconds"}function yB(t){return t?"setUTCFullYear":"setFullYear"}function iA(t){return t?"setUTCMonth":"setMonth"}function nA(t){return t?"setUTCDate":"setDate"}function aA(t){return t?"setUTCHours":"setHours"}function oA(t){return t?"setUTCMinutes":"setMinutes"}function sA(t){return t?"setUTCSeconds":"setSeconds"}function lA(t){return t?"setUTCMilliseconds":"setMilliseconds"}function F9(t){if(!nT(t))return ht(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function uA(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,i){return i.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var N4=ic;function Df(t,e,r){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&K1(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?B1(t):t;if(isNaN(+l)){if(s)return"-"}else return e5(l,i,r)}if(e==="ordinal")return W8(t)?n(t):te(t)&&a(t)?t+"":"-";var u=on(t);return a(u)?F9(u):W8(t)?n(t):typeof t=="boolean"?t+"":"-"}var rg=["a","b","c","d","e","f","g"],El=function(t,e){return"{"+t+(e==null?"":e)+"}"};function Ic(t,e,r){X(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function xB(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t="MM-dd\nyyyy");var i=B1(e),n="get",a=i[n+"FullYear"](),o=i[n+"Month"]()+1,s=i[n+"Date"](),l=i[n+"Hours"](),u=i[n+"Minutes"](),f=i[n+"Seconds"](),h=i[n+"Milliseconds"]();return t=t.replace("MM",kr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",kr(a%100+"",2)).replace("dd",kr(s,2)).replace("d",s).replace("hh",kr(l,2)).replace("h",l).replace("mm",kr(u,2)).replace("m",u).replace("ss",kr(f,2)).replace("s",f).replace("SSS",kr(h,3)),t}function SB(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function R2(t,e){return e=e||"transparent",ht(t)?t:Tt(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function z9(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var l9=E,hA=["left","right","top","bottom","width","height"],f2=[["width","left","right"],["height","top","bottom"]];function Pc(t,e,r,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),h=e.childAt(u+1),c=h&&h.getBoundingRect(),v,d;if(t==="horizontal"){var p=f.width+(c?-c.x+f.x:0);v=a+p,v>i||l.newline?(a=0,v=p,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(c?-c.y+f.y:0);d=o+g,d>n||l.newline?(a+=s+r,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=v+r:o=d+r)})}var b2=Pc;Lt(Pc,"vertical");Lt(Pc,"horizontal");function wB(t,e,r){var i=e.width,n=e.height,a=ot(t.left,i),o=ot(t.top,n),s=ot(t.right,i),l=ot(t.bottom,n);return(isNaN(a)||isNaN(parseFloat(t.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.right)))&&(s=i),(isNaN(o)||isNaN(parseFloat(t.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.bottom)))&&(l=n),r=N4(r||0),{width:Math.max(s-a-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function Re(t,e,r){r=N4(r||0);var i=e.width,n=e.height,a=ot(t.left,i),o=ot(t.top,n),s=ot(t.right,i),l=ot(t.bottom,n),u=ot(t.width,i),f=ot(t.height,n),h=r[2]+r[0],c=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=i-s-c-a),isNaN(f)&&(f=n-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>i/n?u=i*.8:f=n*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=i-s-u-c),isNaN(o)&&(o=n-l-f-h),t.left||t.right){case"center":a=i/2-u/2-r[3];break;case"right":a=i-u-c;break}switch(t.top||t.bottom){case"middle":case"center":o=n/2-f/2-r[0];break;case"bottom":o=n-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=i-c-a-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var d=new Nt(a+r[3],o+r[0],u,f);return d.margin=r,d}function o5(t,e,r,i,n,a){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(a=a||t,a.x=t.x,a.y=t.y,!o&&!s)return!1;var u;if(l==="raw")u=t.type==="group"?new Nt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var f=t.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=Re(xt({width:u.width,height:u.height},e),r,i),c=o?h.x-u.x:0,v=s?h.y-u.y:0;return l==="raw"?(a.x=c,a.y=v):(a.x+=c,a.y+=v),a===t&&t.markRedraw(),!0}function bB(t,e){return t[f2[e][0]]!=null||t[f2[e][1]]!=null&&t[f2[e][2]]!=null}function L7(t){var e=t.layoutMode||t.constructor.layoutMode;return Tt(e)?e:e?{type:e}:null}function aa(t,e,r){var i=r&&r.ignoreSize;!X(i)&&(i=[i,i]);var n=o(f2[0],0),a=o(f2[1],1);u(f2[0],t,n),u(f2[1],t,a);function o(f,h){var c={},v=0,d={},p=0,g=2;if(l9(f,function(_){d[_]=t[_]}),l9(f,function(_){s(e,_)&&(c[_]=d[_]=e[_]),l(c,_)&&v++,l(d,_)&&p++}),i[h])return l(e,f[1])?d[f[2]]=null:l(e,f[2])&&(d[f[1]]=null),d;if(p===g||!v)return d;if(v>=g)return c;for(var m=0;m=0;l--)s=mt(s,n[l],!0);i.defaultOption=s}return i.defaultOption},e.prototype.getReferringComponents=function(r,i){var n=r+"Index",a=r+"Id";return o3(this.ecModel,r,{index:this.get(n,!0),id:this.get(a,!0)},i)},e.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(Jt);dT(Bt,Jt);W0(Bt);uB(Bt);fB(Bt,AB);function AB(t){var e=[];return E(Bt.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=j(e,function(r){return wi(r).main}),t!=="dataset"&&kt(e,"dataset")<=0&&e.unshift("dataset"),e}var vA="";typeof navigator<"u"&&(vA=navigator.platform||"");var lo="rgba(0, 0, 0, 0.2)";const CB={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:lo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:lo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:lo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:lo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:lo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:lo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:vA.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 dA=yt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),G1="original",Ir="arrayRows",V1="objectRows",Ni="keyedColumns",$n="typedArray",pA="unknown",Di="column",B4="row",wr={Must:1,Might:2,Not:3},gA=$t();function DB(t){gA(t).datasetMap=yt()}function mA(t,e,r){var i={},n=Nc(e);if(!n||!t)return i;var a=[],o=[],s=e.ecModel,l=gA(s).datasetMap,u=n.uid+"_"+r.seriesLayoutBy,f,h;t=t.slice(),E(t,function(p,g){var m=Tt(p)?p:t[g]={name:p};m.type==="ordinal"&&f==null&&(f=g,h=d(m)),i[m.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});E(t,function(p,g){var m=p.name,y=d(p);if(f==null){var _=c.valueWayDim;v(i[m],_,y),v(o,_,y),c.valueWayDim+=y}else if(f===g)v(i[m],0,y),v(a,0,y);else{var _=c.categoryWayDim;v(i[m],_,y),v(o,_,y),c.categoryWayDim+=y}});function v(p,g,m){for(var y=0;ye)return t[i];return t[r-1]}function xA(t,e,r,i,n,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!i?r:PB(i,o);if(f=f||r,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function RB(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Q3,l6,ng,ag="\0_ec_inner",NB=1,Bc=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Jt(a),this._locale=new Jt(o),this._optionManager=s},e.prototype.setOption=function(r,i,n){var a=lg(i);this._optionManager.setOption(r,n,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,i){return this._resetOption(r,lg(i))},e.prototype._resetOption=function(r,i){var n=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?ng(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&E(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=yt(),u=i&&i.replaceMergeMainTypeMap;DB(this),E(r,function(h,c){h!=null&&(Bt.hasClass(c)?c&&(s.push(c),l.set(c,!0)):n[c]=n[c]==null?At(h):mt(n[c],h,!0))}),u&&u.each(function(h,c){Bt.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),Bt.topologicalTravel(s,Bt.getAllClassMainTypes(),f,this);function f(h){var c=LB(this,h,de(r[h])),v=a.get(h),d=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",p=uT(v,c,d);tN(p,h,Bt),n[h]=null,a.set(h,null),o.set(h,0);var g=[],m=[],y=0,_;E(p,function(x,w){var S=x.existing,b=x.newOption;if(!b)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var T=h==="series",A=Bt.getClass(h,x.keyInfo.subType,!T);if(!A)return;if(h==="tooltip"){if(_)return;_=!0}if(S&&S.constructor===A)S.name=x.keyInfo.name,S.mergeOption(b,this),S.optionUpdated(b,!1);else{var D=H({componentIndex:w},x.keyInfo);S=new A(b,this,this,D),H(S,D),x.brandNew&&(S.__requireNewView=!0),S.init(b,this,this),S.optionUpdated(null,!0)}}S?(g.push(S.option),m.push(S),y++):(g.push(void 0),m.push(void 0))},this),n[h]=g,a.set(h,m),o.set(h,y),h==="series"&&Q3(this)}this._seriesIndices||Q3(this)},e.prototype.getOption=function(){var r=At(this.option);return E(r,function(i,n){if(Bt.hasClass(n)){for(var a=de(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!A7(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[n]=a}}),delete r[ag],r},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,i){var n=this._componentsMap.get(r);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function UB(t,e){return t.join(",")===e.join(",")}var H1=E,I7=Tt,ug=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ll(t){var e=t&&t.itemStyle;if(e)for(var r=0,i=ug.length;r=0;g--){var m=t[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&c>=0&&y>0||l==="samesign"&&c<=0&&y<0){c=UR(c,y),p=y;break}}}return i[0]=c,i[1]=p,i})})}var s5=function(){function t(e){this.data=e.data||(e.sourceFormat===Ni?{}:[]),this.sourceFormat=e.sourceFormat||pA,this.seriesLayoutBy=e.seriesLayoutBy||Di,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var i=0;ip&&(p=_)}v[0]=d,v[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};gg=(e={},e[Ir+"_"+Di]={pure:!0,appendData:a},e[Ir+"_"+B4]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[V1]={pure:!0,appendData:a},e[Ni]={pure:!0,appendData:function(o){var s=this._data;E(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},e[G1]={appendData:a},e[$n]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},t.prototype.getRawValue=function(e,r){return o4(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,i){},t}();function xg(t){var e,r;return Tt(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function h7(t){return new ok(t)}var ok=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,i=e&&e.skip;if(this._dirty&&r){var n=this.context;n.data=n.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=e&&e.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(!i&&(h||v1&&i>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},lk=function(){function t(e,r){if(!te(r)){var i="";se(i)}this._opFn=IA[e],this._rvalFloat=on(r)}return t.prototype.evaluate=function(e){return te(e)?this._opFn(e,this._rvalFloat):this._opFn(on(e),this._rvalFloat)},t}(),PA=function(){function t(e,r){var i=e==="desc";this._resultLT=i?1:-1,r==null&&(r=i?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var i=te(e)?e:on(e),n=te(r)?r:on(r),a=isNaN(i),o=isNaN(n);if(a&&(i=this._incomparable),o&&(n=this._incomparable),a&&o){var s=ht(e),l=ht(r);s&&(i=l?e:0),l&&(n=s?r:0)}return in?-this._resultLT:0},t}(),uk=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=on(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var i=typeof e;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(r=on(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function fk(t,e){return t==="eq"||t==="ne"?new uk(t==="eq",e):gt(IA,t)?new lk(t,e):null}var hk=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return Jn(e,r)},t}();function ck(t,e){var r=new hk,i=t.data,n=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Di&&se(o);var s=[],l={},u=t.dimensionsDefine;if(u)E(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";gt(l,m)&&se(_),l[m]=y}});else for(var f=0;f65535?xk:Sk}function uo(){return[1/0,-1/0]}function wk(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function bg(t,e,r,i,n){var a=OA[r||"float"];if(n){var o=t[e],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=j(o,function(y){return y.property}),f=0;fm[1]&&(m[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,i=r[e];if(i!=null&&ie)a=o-1;else return o}return-1},t.prototype.indicesOfNearest=function(e,r,i){var n=this._chunks,a=n[e],o=[];if(!a)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=f))}return o.length=u,o},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var i=r.constructor,n=this._count;if(i===Array){e=new i(n);for(var a=0;a=h&&y<=c||isNaN(y))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var g=v[n[0]],_=v[n[1]],x=e[n[1]][0],w=e[n[1]][1],m=0;m=h&&y<=c||isNaN(y))&&(S>=x&&S<=w||isNaN(S))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var m=0;m=h&&y<=c||isNaN(y))&&(l[u++]=b)}else for(var m=0;me[D][1])&&(T=!1)}T&&(l[u++]=r.getRawIndex(m))}return um[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(e,r){var i=this.clone([e],!0),n=i._chunks,a=n[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),f,h,c,v=new(f6(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;df&&(f=h,c=x)}C>0&&Cf-d&&(l=f-d,s.length=l);for(var p=0;ph[1]&&(h[1]=m),c[v++]=y}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var i=e.length,n=this._chunks,a=0,o=this.count();al&&(l=h)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var i=[],n=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,i,n,a){return Jn(r[a],this._dimensions[a])}Rl={arrayRows:e,objectRows:function(r,i,n,a){return Jn(r[i],this._dimensions[a])},keyedColumns:e,original:function(r,i,n,a){var o=r&&(r.value==null?r:r.value);return Jn(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,i,n,a){return r[a]}}}(),t}(),BA=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length,n,a;if(j3(e)){var o=e,s=void 0,l=void 0,u=void 0;if(i){var f=r[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=s1(s)?$n:G1,a=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=It(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=It(h.sourceHeader,c.sourceHeader),p=It(h.dimensions,c.dimensions),g=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||p;n=g?[Lf(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var m=e;if(i){var y=this._applyTransform(r);n=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);n=[Lf(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,i=r.get("transform",!0),n=r.get("fromTransformResult",!0);if(n!=null){var a="";e.length!==1&&Ag(a)}var o,s=[],l=[];return E(e,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&Ag(h),s.push(f),l.push(u._getVersionSign())}),i?o=yk(i,s,{datasetIndex:r.componentIndex}):n!=null&&(o=[JB(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!t.noHeader;return E(t.blocks,function(n){var a=GA(n);a>=e&&(e=a+ +(i&&(!a||Pf(n)&&!n.noHeader)))}),e}return 0}function Ak(t,e,r,i){var n=e.noHeader,a=Dk(GA(e)),o=[],s=e.blocks||[];Wr(!s||X(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(gt(u,l)){var f=new PA(u[l],null);s.sort(function(d,p){return f.evaluate(d.sortParam,p.sortParam)})}else l==="seriesDesc"&&s.reverse()}E(s,function(d,p){var g=e.valueFormatter,m=zA(d)(g?H(H({},t),{valueFormatter:g}):t,d,p>0?a.html:0,i);m!=null&&o.push(m)});var h=t.renderMode==="richText"?o.join(a.richText):Rf(o.join(""),n?r:a.html);if(n)return h;var c=Df(e.header,"ordinal",t.useUTC),v=FA(i,t.renderMode).nameStyle;return t.renderMode==="richText"?VA(t,c,v)+a.richText+h:Rf('
'+Je(c)+"
"+h,r)}function Ck(t,e,r,i){var n=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(x){return x=X(x)?x:[x],j(x,function(w,S){return Df(w,X(v)?v[S]:v,u)})};if(!(a&&o)){var h=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),c=a?"":Df(l,"ordinal",u),v=e.valueType,d=o?[]:f(e.value,e.dataIndex),p=!s||!a,g=!s&&a,m=FA(i,n),y=m.nameStyle,_=m.valueStyle;return n==="richText"?(s?"":h)+(a?"":VA(t,c,y))+(o?"":Lk(t,d,p,g,_)):Rf((s?"":h)+(a?"":Ek(c,!s,y))+(o?"":Mk(d,p,g,_)),r)}}function Cg(t,e,r,i,n,a){if(t){var o=zA(t),s={useUTC:n,renderMode:r,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function Dk(t){return{html:bk[t],richText:Tk[t]}}function Rf(t,e){var r='
',i="margin: "+e+"px 0 0";return'
'+t+r+"
"}function Ek(t,e,r){var i=e?"margin-left:2px":"";return''+Je(t)+""}function Mk(t,e,r,i){var n=r?"10px":"20px",a=e?"float:right;margin-left:"+n:"";return t=X(t)?t:[t],''+j(t,function(o){return Je(o)}).join("  ")+""}function VA(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function Lk(t,e,r,i,n){var a=[n],o=i?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(X(e)?e.join(" "):e,a)}function HA(t,e){var r=t.getData().getItemVisual(e,"style"),i=r[t.visualDrawType];return R2(i)}function UA(t,e){var r=t.get("padding");return r!=null?r:e==="richText"?[8,10]:10}var Nl=function(){function t(){this.richTextStyles={},this._nextStyleNameId=aT()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,i){var n=i==="richText"?this._generateStyleName():null,a=fA({color:r,type:e,renderMode:i,markerId:n});return ht(a)?a:(this.richTextStyles[n]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var i={};X(r)?E(r,function(a){return H(i,a)}):H(i,r);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+e+"}"},t}();function WA(t){var e=t.series,r=t.dataIndex,i=t.multipleSeries,n=e.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=X(s),u=HA(e,r),f,h,c,v;if(o>1||l&&!o){var d=Ik(s,e,r,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(a[0]);v=f=o4(n,r,a[0]),h=p.type}else v=f=l?s[0]:s;var g=hc(e),m=g&&e.name||"",y=n.getName(r),_=i?m:y;return vr("section",{header:m,noHeader:i||!g,sortParam:v,blocks:[vr("nameValue",{markerType:"item",markerColor:u,name:_,noName:!K1(_),value:f,valueType:h,dataIndex:r})].concat(c||[])})}function Ik(t,e,r,i,n){var a=e.getData(),o=ni(t,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?E(i,function(h){f(o4(a,r,h),h)}):E(t,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(vr("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Tn=$t();function q3(t,e){return t.getName(e)||t.getId(e)}var u9="__universalTransitionEnabled",Kt=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,i,n){this.seriesIndex=this.componentIndex,this.dataTask=h7({count:Rk,reset:Nk}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,n);var a=Tn(this).sourceManager=new BA(this);a.prepareSource();var o=this.getInitialData(r,n);Eg(o,this),this.dataTask.context.data=o,Tn(this).dataBeforeProcessed=o,Dg(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,i){var n=L7(this),a=n?O4(r):{},o=this.subType;Bt.hasClass(o)&&(o+="Series"),mt(r,i.getTheme().get(this.subType)),mt(r,this.getDefaultOption()),M2(r,"label",["show"]),this.fillDataTextStyle(r.data),n&&aa(r,a,n)},e.prototype.mergeOption=function(r,i){r=mt(this.option,r,!0),this.fillDataTextStyle(r.data);var n=L7(this);n&&aa(this.option,r,n);var a=Tn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,i);Eg(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Tn(this).dataBeforeProcessed=o,Dg(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!s1(r))for(var i=["show"],n=0;nthis.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,i,n){var a=this.ecModel,o=Oc.prototype.getColorFromPalette.call(this,r,i,n);return o||(o=a.getColorFromPalette(r,i,n)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,i){this._innerSelect(this.getData(i),r)},e.prototype.unselect=function(r,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},e.prototype.isSelected=function(r,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[q3(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[u9])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Tt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(r,i)}},e.registerClass=function(r){return Bt.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Bt);Xe(Kt,l5);Xe(Kt,Oc);dT(Kt,Bt);function Dg(t){var e=t.name;hc(t)||(t.name=Pk(t)||e)}function Pk(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),i=[];return E(r,function(n){var a=e.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function Rk(t){return t.model.getRawData().count()}function Nk(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Ok}function Ok(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Eg(t,e){E(r4(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Lt(Bk,e))})}function Bk(t,e){var r=Nf(t);return r&&r.setOutputEnd((e||this).count()),e}function Nf(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var i=r.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(t.uid))}return i}}var ge=function(){function t(){this.group=new Dt,this.uid=R4("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,i,n){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,i,n){},t.prototype.updateLayout=function(e,r,i,n){},t.prototype.updateVisual=function(e,r,i,n){},t.prototype.toggleBlurSeries=function(e,r,i){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();vc(ge);W0(ge);function F4(){var t=$t();return function(e){var r=t(e),i=e.pipelineContext,n=!!r.large,a=!!r.progressiveRender,o=r.large=!!(i&&i.large),s=r.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var XA=$t(),kk=F4(),Yt=function(){function t(){this.group=new Dt,this.uid=R4("viewChart"),this.renderTask=h7({plan:Fk,reset:zk}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,i,n){},t.prototype.highlight=function(e,r,i,n){var a=e.getData(n&&n.dataType);a&&Lg(a,n,"emphasis")},t.prototype.downplay=function(e,r,i,n){var a=e.getData(n&&n.dataType);a&&Lg(a,n,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,i,n){this.render(e,r,i,n)},t.prototype.updateLayout=function(e,r,i,n){this.render(e,r,i,n)},t.prototype.updateVisual=function(e,r,i,n){this.render(e,r,i,n)},t.prototype.eachRendered=function(e){ua(this.group,e)},t.markUpdateMethod=function(e,r){XA(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function Mg(t,e,r){t&&D7(t)&&(e==="emphasis"?sn:ln)(t,r)}function Lg(t,e,r){var i=L2(t,e),n=e&&e.highlightKey!=null?gO(e.highlightKey):null;i!=null?E(de(i),function(a){Mg(t.getItemGraphicEl(a),r,n)}):t.eachItemGraphicEl(function(a){Mg(a,r,n)})}vc(Yt);W0(Yt);function Fk(t){return kk(t.model)}function zk(t){var e=t.model,r=t.ecModel,i=t.api,n=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=n&&XA(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,i,n),Gk[l]}var Gk={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},G9="\0__throttleOriginMethod",Ig="\0__throttleRate",Pg="\0__throttleType";function Vc(t,e,r){var i,n=0,a=0,o=null,s,l,u,f;e=e||0;function h(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var c=function(){for(var v=[],d=0;d=0?h():o=setTimeout(h,-s),n=i};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function z4(t,e,r,i){var n=t[e];if(n){var a=n[G9]||n,o=n[Pg],s=n[Ig];if(s!==r||o!==i){if(r==null||!i)return t[e]=a;n=t[e]=Vc(a,r,i==="debounce"),n[G9]=a,n[Pg]=i,n[Ig]=r}return n}}function P7(t,e){var r=t[e];r&&r[G9]&&(r.clear&&r.clear(),t[e]=r[G9])}var Rg=$t(),Ng={itemStyle:I2($T,!0),lineStyle:I2(KT,!0)},Vk={lineStyle:"stroke",itemStyle:"fill"};function YA(t,e){var r=t.visualStyleMapper||Ng[e];return r||(console.warn("Unknown style type '"+e+"'."),Ng.itemStyle)}function ZA(t,e){var r=t.visualDrawType||Vk[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var Hk={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),i=t.visualStyleAccessPath||"itemStyle",n=t.getModel(i),a=YA(t,i),o=a(n),s=n.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=ZA(t,i),u=o[l],f=wt(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=c,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||wt(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||wt(o.stroke)?c:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=t.getDataParams(d),g=H({},o);g[l]=f(p),v.setItemVisual(d,"style",g)}}}},h6=new Jt,Uk={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),i=t.visualStyleAccessPath||"itemStyle",n=YA(t,i),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){h6.option=l[i];var u=n(h6),f=o.ensureUniqueItemVisual(s,"style");H(f,u),h6.option.decal&&(o.setItemVisual(s,"decal",h6.option.decal),h6.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Wk={performRawSeries:!0,overallReset:function(t){var e=yt();t.eachSeries(function(r){var i=r.getColorBy();if(!r.isColorBySeries()){var n=r.type+"-"+i,a=e.get(n);a||(a={},e.set(n,a)),Rg(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var i=r.getRawData(),n={},a=r.getData(),o=Rg(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=ZA(r,s);a.each(function(u){var f=a.getRawIndex(u);n[f]=u}),i.each(function(u){var f=n[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=i.getName(u)||u+"",d=i.count();c[l]=r.getColorFromPalette(v,o,d)}})}})}},K3=Math.PI;function Xk(t,e){e=e||{},xt(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Dt,i=new Xt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(i);var n=new Ht({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Xt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new K0({shape:{startAngle:-K3/2,endAngle:-K3/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:K3*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:K3*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var QA=function(){function t(e,r,i,n){this._stageTaskMap=yt(),this.ecInstance=e,this.api=r,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),n=i.context,a=!r&&i.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var i=this._pipelineMap.get(e.uid),n=e.getData(),a=n.count(),o=i.progressiveEnabled&&r.incrementalPrepareRender&&a>=i.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,i=r._pipelineMap=yt();e.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(n,n.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),i=this.api;E(this._allHandlers,function(n){var a=e.get(n.uid)||e.set(n.uid,{}),o="";Wr(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,r,i),n.overallReset&&this._createOverallStageTask(n,a,r,i)},this)},t.prototype.prepareView=function(e,r,i,n){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=i,o.api=n,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,i){this._performStageTasks(this._visualHandlers,e,r,i)},t.prototype._performStageTasks=function(e,r,i,n){n=n||{};var a=!1,o=this;E(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,d=c.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,i);var p=o.getPerformArgs(c,n.block);d.each(function(g){g.perform(p)}),c.perform(p)&&(a=!0)}else h&&h.each(function(g,m){s(n,g)&&g.dirty();var y=o.getPerformArgs(g,n.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,i),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(i){r=i.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,i,n){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=yt(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(f):l?i.eachRawSeriesByType(l,f):u&&u(i,n).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||h7({plan:qk,reset:Kk,count:Jk}));v.context={model:h,ecModel:i,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,v)}},t.prototype._createOverallStageTask=function(e,r,i,n){var a=this,o=r.overallTask=r.overallTask||h7({reset:Yk});o.context={ecModel:i,api:n,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=yt(),u=e.seriesType,f=e.getTargetSeries,h=!0,c=!1,v="";Wr(!e.createOnAllSeries,v),u?i.eachRawSeriesByType(u,d):f?f(i,n).each(d):(h=!1,E(i.getSeries(),d));function d(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(c=!0,h7({reset:Zk,onDirty:jk})));m.context={model:p,overallProgress:h},m.agent=o,m.__block=h,a._pipe(p,m)}c&&o.dirty()},t.prototype._pipe=function(e,r){var i=e.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=r),n.tail&&n.tail.pipe(r),n.tail=r,r.__idxInPipeline=n.count++,r.__pipeline=n},t.wrapStageHandler=function(e,r){return wt(e)&&(e={overallReset:e,seriesType:tF(e)}),e.uid=R4("stageHandler"),r&&(e.visualType=r),e},t}();function Yk(t){t.overallReset(t.ecModel,t.api,t.payload)}function Zk(t){return t.overallProgress&&Qk}function Qk(){this.agent.dirty(),this.getDownstream().dirty()}function jk(){this.agent&&this.agent.dirty()}function qk(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Kk(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=de(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?j(e,function(r,i){return jA(i)}):$k}var $k=jA(0);function jA(t){return function(e,r){var i=r.data,n=r.resetDefines[t];if(n&&n.dataEach)for(var a=e.start;a0&&v===u.length-c.length){var d=u.slice(0,v);d!=="data"&&(r.mainType=d,r[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(i[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:r,dataQuery:i,otherQuery:n}},t.prototype.filter=function(e,r){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,n,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Of=["symbol","symbolSize","symbolRotate","symbolOffset"],Fg=Of.concat(["symbolKeepAspect"]),iF={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o=0&&c2(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function Bf(t,e,r){for(var i=e.type==="radial"?yF(t,e,r):mF(t,e,r),n=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:te(t)?[t]:X(t)?t:null}function Uc(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&xF(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(r){var n=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;n&&n!==1&&(r=j(r,function(a){return a/n}),i/=n)}return[r,i]}var SF=new Ri(!0);function U9(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function zg(t){return typeof t=="string"&&t!=="none"}function W9(t){var e=t.fill;return e!=null&&e!=="none"}function Gg(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function Vg(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function kf(t,e,r){var i=dc(e.image,e.__image,r);if(X0(i)){var n=t.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*qs),a.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(a)}return n}}function wF(t,e,r,i){var n,a=U9(r),o=W9(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||SF,h=e.__dirty;if(!i){var c=r.fill,v=r.stroke,d=o&&!!c.colorStops,p=a&&!!v.colorStops,g=o&&!!c.image,m=a&&!!v.image,y=void 0,_=void 0,x=void 0,w=void 0,S=void 0;(d||p)&&(S=e.getBoundingRect()),d&&(y=h?Bf(t,c,S):e.__canvasFillGradient,e.__canvasFillGradient=y),p&&(_=h?Bf(t,v,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(x=h||!e.__canvasFillPattern?kf(t,c,e):e.__canvasFillPattern,e.__canvasFillPattern=x),m&&(w=h||!e.__canvasStrokePattern?kf(t,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),d?t.fillStyle=y:g&&(x?t.fillStyle=x:o=!1),p?t.strokeStyle=_:m&&(w?t.strokeStyle=w:a=!1)}var b=e.getGlobalScale();f.setScale(b[0],b[1],e.segmentIgnoreThreshold);var T,A;t.setLineDash&&r.lineDash&&(n=Uc(e),T=n[0],A=n[1]);var D=!0;(u||h&Ro)&&(f.setDPR(t.dpr),l?f.setContext(null):(f.setContext(t),D=!1),f.reset(),e.buildPath(f,e.shape,i),f.toStatic(),e.pathUpdated()),D&&f.rebuildPath(t,l?s:1),T&&(t.setLineDash(T),t.lineDashOffset=A),i||(r.strokeFirst?(a&&Vg(t,r),o&&Gg(t,r)):(o&&Gg(t,r),a&&Vg(t,r))),T&&t.setLineDash([])}function bF(t,e,r){var i=e.__image=dc(r.image,e.__image,e,e.onload);if(!(!i||!X0(i))){var n=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),r.sWidth&&r.sHeight){var u=r.sx||0,f=r.sy||0;t.drawImage(i,u,f,r.sWidth,r.sHeight,n,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,f=r.sy,h=o-u,c=s-f;t.drawImage(i,u,f,h,c,n,a,o,s)}else t.drawImage(i,n,a,o,s)}}function TF(t,e,r){var i,n=r.text;if(n!=null&&(n+=""),n){t.font=r.font||ea,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(i=Uc(e),a=i[0],o=i[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(U9(r)&&t.strokeText(n,r.x,r.y),W9(r)&&t.fillText(n,r.x,r.y)):(W9(r)&&t.fillText(n,r.x,r.y),U9(r)&&t.strokeText(n,r.x,r.y)),a&&t.setLineDash([])}}var Hg=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ug=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function eC(t,e,r,i,n){var a=!1;if(!i&&(r=r||{},e===r))return!1;if(i||e.opacity!==r.opacity){n1(t,n),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?x2.opacity:o}(i||e.blend!==r.blend)&&(a||(n1(t,n),a=!0),t.globalCompositeOperation=e.blend||x2.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,i,n){if(!this[Dr]){if(this._disposed){this.id;return}var a,o,s;if(Tt(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Dr]=!0,!this._model||i){var l=new zB(this._api),u=this._theme,f=this._model=new Bc;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},zf);var h={seriesTransition:s,optionChanged:!0};if(n)this[Jr]={silent:a,updateParams:h},this[Dr]=!1,this.getZr().wakeUp();else{try{ho(this),An.update.call(this,null,h)}catch(c){throw this[Jr]=null,this[Dr]=!1,c}this._ssr||this._zr.flush(),this[Jr]=null,this[Dr]=!1,c6.call(this,a),v6.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Vt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var i=this._zr.painter;return i.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(Vt.svgSupported){var r=this._zr,i=r.storage.getDisplayList();return E(i,function(n){n.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var i=r.excludeComponents,n=this._model,a=[],o=this;E(i,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return E(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var i=r.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(nm[n]){var l=s,u=s,f=-s,h=-s,c=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();E(v7,function(_,x){if(_.group===n){var w=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(At(r)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),f=o(S.right,f),h=o(S.bottom,h),c.push({dom:w,left:S.left,top:S.top})}}),l*=v,u*=v,f*=v,h*=v;var d=f-l,p=h-u,g=ra.createCanvas(),m=cf(g,{renderer:i?"svg":"canvas"});if(m.resize({width:d,height:p}),i){var y="";return E(c,function(_){var x=_.left-l,w=_.top-u;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 Xt({shape:{x:0,y:0,width:d,height:p},style:{fill:r.connectedBackgroundColor}})),E(c,function(_){var x=new pr({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});m.add(x)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,i){return zl(this,"convertToPixel",r,i)},e.prototype.convertFromPixel=function(r,i){return zl(this,"convertFromPixel",r,i)},e.prototype.containPixel=function(r,i){if(this._disposed){this.id;return}var n=this._model,a,o=o7(n,r);return E(o,function(s,l){l.indexOf("Models")>=0&&E(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(i);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(i,u))}},this)},this),!!a},e.prototype.getVisual=function(r,i){var n=this._model,a=o7(n,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?Hc(s,l,i):c3(s,i)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;E(QF,function(i){var n=function(a){var o=r.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&h2(s,function(d){var p=Et(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=H({},p.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var c=f&&h!=null&&o.getComponent(f,h),v=c&&r[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];l.event=a,l.type=i,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},r.trigger(i,l)}};n.zrEventfulCallAtLast=!0,r._zr.on(i,n,r)}),E(c7,function(i,n){r._messageCenter.on(n,function(a){this.trigger(n,a)},r)}),E(["selectchanged"],function(i){r._messageCenter.on(i,function(n){this.trigger(i,n)},r)}),aF(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&hT(this.getDom(),Yc,"");var i=this,n=i._api,a=i._model;E(i._componentsViews,function(o){o.dispose(a,n)}),E(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete v7[i.id]},e.prototype.resize=function(r){if(!this[Dr]){if(this._disposed){this.id;return}this._zr.resize(r);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=r&&r.silent;this[Jr]&&(a==null&&(a=this[Jr].silent),n=!0,this[Jr]=null),this[Dr]=!0;try{n&&ho(this),An.update.call(this,{type:"resize",animation:H({duration:0},r&&r.animation)})}catch(o){throw this[Dr]=!1,o}this[Dr]=!1,c6.call(this,a),v6.call(this,a)}}},e.prototype.showLoading=function(r,i){if(this._disposed){this.id;return}if(Tt(r)&&(i=r,r=""),r=r||"default",this.hideLoading(),!!Gf[r]){var n=Gf[r](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var i=H({},r);return i.type=c7[r.type],i},e.prototype.dispatchAction=function(r,i){if(this._disposed){this.id;return}if(Tt(i)||(i={silent:!!i}),!!X9[r.type]&&this._model){if(this[Dr]){this._pendingActions.push(r);return}var n=i.silent;Vl.call(this,r,n);var a=i.flush;a?this._zr.flush():a!==!1&&Vt.browser.weChat&&this._throttledZrFlush(),c6.call(this,n),v6.call(this,n)}},e.prototype.updateLabelLayout=function(){Q1.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var i=r.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ho=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Fl(h,!0),Fl(h,!1),c.plan()},Fl=function(h,c){for(var v=h._model,d=h._scheduler,p=c?h._componentsViews:h._chartsViews,g=c?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_c.get("hoverLayerThreshold")&&!Vt.node&&!Vt.worker&&c.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=h._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(h,c){if(!h.preventAutoZ){var v=h.get("z")||0,d=h.get("zlevel")||0;c.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(h,c,v,d){var p=h.getTextContent(),g=h.getTextGuideLine(),m=h.isGroup;if(m)for(var y=h.childrenRef(),_=0;_0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Yo(m))return;if(m instanceof zt&&mO(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=g;var _=m.getTextContent(),x=m.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}m.__dirty&&n(m)}})}rm=function(h){return new(function(c){F(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 p=d.__ecComponentInfo;if(p!=null)return h._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){sn(d,p),p1(h)},v.prototype.leaveEmphasis=function(d,p){ln(d,p),p1(h)},v.prototype.enterBlur=function(d){ET(d),p1(h)},v.prototype.leaveBlur=function(d){_c(d),p1(h)},v.prototype.enterSelect=function(d){MT(d),p1(h)},v.prototype.leaveSelect=function(d){LT(d),p1(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}(SA))(h)},gC=function(h){function c(v,d){for(var p=0;p=0)){am.push(r);var a=QA.wrapStageHandler(r,n);a.__prio=e,a.__raw=r,t.push(a)}}function AC(t,e){Gf[t]=e}function CC(t,e,r){var i=sC("registerMap");i&&i(t,e,r)}function Vf(t){var e=sC("getMap");return e&&e(t)}var $F=mk;Z2(Wc,Hk);Z2(h5,Uk);Z2(h5,Wk);Z2(Wc,iF);Z2(h5,nF);Z2(fC,PF);c5(bA);xC(BF,KB);AC("default",Xk);Oi({type:S2,event:S2,update:S2},He);Oi({type:n9,event:n9,update:n9},He);Oi({type:s7,event:s7,update:s7},He);Oi({type:a9,event:a9,update:a9},He);Oi({type:l7,event:l7,update:l7},He);_C("light",eF);_C("dark",$A);var om=[],JF={registerPreprocessor:c5,registerProcessor:xC,registerPostInit:SC,registerPostUpdate:wC,registerUpdateLifecycle:Zc,registerAction:Oi,registerCoordinateSystem:KF,registerLayout:TC,registerVisual:Z2,registerTransform:$F,registerLoading:AC,registerMap:CC,registerImpl:RF,PRIORITY:XF,ComponentModel:Bt,ComponentView:ge,SeriesModel:Kt,ChartView:Yt,registerComponentModel:function(t){Bt.registerClass(t)},registerComponentView:function(t){ge.registerClass(t)},registerSeriesModel:function(t){Kt.registerClass(t)},registerChartView:function(t){Yt.registerClass(t)},registerSubTypeDefaulter:function(t,e){Bt.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){FR(t,e)}};function Ct(t){if(X(t)){E(t,function(e){Ct(e)});return}kt(om,t)>=0||(om.push(t),wt(t)&&(t={install:t}),t.install(JF))}function d6(t){return t==null?0:t.length||1}function sm(t){return t}var un=function(){function t(e,r,i,n,a,o){this._old=e,this._new=r,this._oldKeyGetter=i||sm,this._newKeyGetter=n||sm,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,i={},n=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(r,i,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(f,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,i={},n={},a=[],o=[];this._initIndexMap(e,i,a,"_oldKeyGetter"),this._initIndexMap(r,n,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var p6=Tt,Cn=j,az=typeof Int32Array>"u"?Array:Int32Array,oz="e\0\0",lm=-1,sz=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],lz=["_approximateExtent"],um,rs,g6,m6,Wl,is,Xl,Le=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i,n=!1;EC(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,i=e),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=r)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===G1;if(l&&!n.pure)for(var u=[],f=e;f0},t.prototype.ensureUniqueItemVisual=function(e,r){var i=this._itemVisuals,n=i[e];n||(n=i[e]={});var a=n[r];return a==null&&(a=this.getVisual(r),X(a)?a=a.slice():p6(a)&&(a=H({},a)),n[r]=a),a},t.prototype.setItemVisual=function(e,r,i){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,p6(r)?H(n,r):n[r]=i},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){p6(e)?H(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,i){this._itemLayouts[e]=i?H(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var i=this.hostModel&&this.hostModel.seriesIndex;yf(i,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){E(this._graphicEls,function(i,n){i&&e&&e.call(r,i,n)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Cn(this.dimensions,this._getDimInfo,this),this.hostModel)),Wl(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var i=this[e];wt(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=i.apply(this,arguments);return r.apply(this,[n].concat(rc(arguments)))})},t.internalField=function(){um=function(e){var r=e._invertedIndicesMap;E(r,function(i,n){var a=e._dimInfos[n],o=a.ordinalMeta,s=e._store;if(o){i=r[n]=new az(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[r]=l}}}(),t}();function V4(t,e){return H4(t,e).dimensions}function H4(t,e){kc(t)||(t=Fc(t)),e=e||{};var r=e.coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],n=yt(),a=[],o=fz(t,r,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&IC(o),l=i===t.dimensionsDefine,u=l?LC(t):MC(i),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(t,o));for(var h=yt(f),c=new NA(o),v=0;v0&&(i.name=n+(a-1)),a++,e.set(n,a)}}function fz(t,e,r,i){var n=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,i||0);return E(e,function(a){var o;Tt(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function hz(t,e,r){if(r||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var cz=function(){function t(e){this.coordSysDims=[],this.axisMap=yt(),this.categoryAxisMap=yt(),this.coordSysName=e}return t}();function vz(t){var e=t.get("coordinateSystem"),r=new cz(e),i=dz[e];if(i)return i(t,r,r.axisMap,r.categoryAxisMap),r}var dz={cartesian2d:function(t,e,r,i){var n=t.getReferringComponents("xAxis",je).models[0],a=t.getReferringComponents("yAxis",je).models[0];e.coordSysDims=["x","y"],r.set("x",n),r.set("y",a),co(n)&&(i.set("x",n),e.firstCategoryDimIndex=0),co(a)&&(i.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,i){var n=t.getReferringComponents("singleAxis",je).models[0];e.coordSysDims=["single"],r.set("single",n),co(n)&&(i.set("single",n),e.firstCategoryDimIndex=0)},polar:function(t,e,r,i){var n=t.getReferringComponents("polar",je).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),co(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),co(o)&&(i.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,i){var n=t.ecModel,a=n.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();E(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];r.set(f,u),co(u)&&(i.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function co(t){return t.get("type")==="category"}function PC(t,e,r){r=r||{};var i=r.byIndex,n=r.stackedCoordDimension,a,o,s;pz(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,f,h,c;if(E(a,function(y,_){ht(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!i&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!n||n===y.coordDim)&&(f=y))}),f&&!i&&!u&&(i=!0),f){h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;E(a,function(y){y.coordDim===v&&p++});var g={name:h,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:c,coordDim:c,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(c,d),m.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:c,stackResultDimension:h}}function pz(t){return!EC(t.schema)}function fn(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function jc(t,e){return fn(t,e)?t.getCalculationInfo("stackResultDimension"):e}function gz(t,e){var r=t.get("coordinateSystem"),i=k4.get(r),n;return e&&e.coordSysDims&&(n=j(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Z9(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function mz(t,e,r){var i,n;return r&&E(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(t[i].otherDims.itemName=0),i}function Bi(t,e,r){r=r||{};var i=e.getSourceManager(),n,a=!1;t?(a=!0,n=Fc(t)):(n=i.getSource(),a=n.sourceFormat===G1);var o=vz(e),s=gz(e,o),l=r.useEncodeDefaulter,u=wt(l)?l:l?Lt(mA,s,e):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=H4(n,f),c=mz(h.dimensions,r.createInvertedIndices,o),v=a?null:i.getSharedDataStore(h),d=PC(e,{schema:h,store:v}),p=new Le(h,e);p.setCalculationInfo(d);var g=c!=null&&yz(n)?function(m,y,_,x){return x===c?_:this.defaultDimValueGetter(m,y,_,x)}:null;return p.hasItemOption=!1,p.initData(a?n:v,null,g),p}function yz(t){if(t.sourceFormat===G1){var e=_z(t.data||[]);return!X(E4(e))}}function _z(t){for(var e=0;er[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(r)||(i[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();W0(ki);var xz=0,Q9=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++xz}return t.createByAxisModel=function(e){var r=e.option,i=r.data,n=i&&j(i,Sz);return new t({categories:n,needCollect:!n,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,i=this._needCollect;if(!ht(e)&&!i)return e;if(i&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var n=this._getOrCreateMap();return r=n.get(e),r==null&&(i?(r=this.categories.length,this.categories[r]=e,n.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=yt(this.categories))},t}();function Sz(t){return Tt(t)&&t.value!=null?t.value:t+""}function Hf(t){return t.type==="interval"||t.type==="log"}function wz(t,e,r,i){var n={},a=t[1]-t[0],o=n.interval=iT(a/e);r!=null&&oi&&(o=n.interval=i);var s=n.intervalPrecision=RC(o),l=n.niceTickExtent=[Ae(Math.ceil(t[0]/o)*o,s),Ae(Math.floor(t[1]/o)*o,s)];return bz(l,t),n}function Yl(t){var e=Math.pow(10,fc(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ae(r*e)}function RC(t){return Si(t)+2}function fm(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function bz(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),fm(t,0,e),fm(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function v5(t,e){return t>=e[0]&&t<=e[1]}function d5(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function p5(t,e){return t*(e[1]-e[0])+e[0]}var g5=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new Q9({})),X(n)&&(n=new Q9({categories:j(n,function(a){return Tt(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return e.prototype.parse=function(r){return r==null?NaN:ht(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),v5(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),d5(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(p5(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],i=this._extent,n=i[0];n<=i[1];)r.push({value:n}),n++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=r.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(ki);ki.registerClass(g5);var Fa=Ae,hn=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return v5(r,this._extent)},e.prototype.normalize=function(r){return d5(r,this._extent)},e.prototype.scale=function(r){return p5(r,this._extent)},e.prototype.setExtent=function(r,i){var n=this._extent;isNaN(r)||(n[0]=parseFloat(r)),isNaN(i)||(n[1]=parseFloat(i))},e.prototype.unionExtent=function(r){var i=this._extent;r[0]i[1]&&(i[1]=r[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=RC(r)},e.prototype.getTicks=function(r){var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;n[0]l)return[];var f=s.length?s[s.length-1].value:a[1];return n[1]>f&&(r?s.push({value:Fa(f+i,o)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(r){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),o=1;oa[0]&&v0&&(a=a===null?s:Math.min(a,s))}r[i]=a}}return r}function BC(t){var e=Cz(t),r=[];return E(t,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=i.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=ot(i.get("barWidth"),s),p=ot(i.get("barMaxWidth"),s),g=ot(i.get("barMinWidth")||(VC(i)?.5:1),s),m=i.get("barGap"),y=i.get("barCategoryGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:Kc(a),stackId:qc(i)})}),kC(r)}function kC(t){var e={};E(t,function(i,n){var a=i.axisKey,o=i.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=i.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=i.barMaxWidth;h&&(l[u].maxWidth=h);var c=i.barMinWidth;c&&(l[u].minWidth=c);var v=i.barGap;v!=null&&(s.gap=v);var d=i.barCategoryGap;d!=null&&(s.categoryGap=d)});var r={};return E(e,function(i,n){r[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=Ut(a).length;s=Math.max(35-l*4,15)+"%"}var u=ot(s,o),f=ot(i.gap,1),h=i.remainedWidth,c=i.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),E(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var x=m.width;y&&(x=Math.min(x,y)),_&&(x=Math.max(x,_)),m.width=x,h-=x+f*x,c--}else{var x=v;y&&yx&&(x=_),x!==v&&(m.width=x,h-=x+f*x,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var d=0,p;E(a,function(m,y){m.width||(m.width=v),p=m,d+=m.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;E(a,function(m,y){r[n][y]=r[n][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+f)})}),r}function Dz(t,e,r){if(t&&e){var i=t[Kc(e)];return i!=null&&r!=null?i[qc(r)]:i}}function FC(t,e){var r=OC(t,e),i=BC(r);E(r,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=qc(n),u=i[Kc(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function zC(t){return{seriesType:t,plan:F4(),reset:function(e){if(GC(e)){var r=e.getData(),i=e.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(n.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),h=fn(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=Ez(n,a),d=VC(e),p=e.get("barMinHeight")||0,g=f&&r.getDimensionIndex(f),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(_,x){for(var w=_.count,S=d&&bi(w*3),b=d&&l&&bi(w*3),T=d&&bi(w),A=i.master.getRect(),D=c?A.width:A.height,C,M=x.getStore(),L=0;(C=_.next())!=null;){var I=M.get(h?g:o,C),P=M.get(s,C),R=v,B=void 0;h&&(B=+I-M.get(o,C));var O=void 0,z=void 0,G=void 0,U=void 0;if(c){var Z=i.dataToPoint([I,P]);if(h){var $=i.dataToPoint([B,P]);R=$[0]}O=R,z=Z[1]+y,G=Z[0]-R,U=m,Math.abs(G)0?r:1:r))}var Mz=function(t,e,r,i){for(;r>>1;t[n][1]n&&(this._approxInterval=n);var s=ns.length,l=Math.min(Mz(ns,this._approxInterval,0,s),s-1);this._interval=ns[l][1],this._minLevelUnit=ns[Math.max(l-1,0)][0]},e.prototype.parse=function(r){return te(r)?r:+B1(r)},e.prototype.contain=function(r){return v5(this.parse(r),this._extent)},e.prototype.normalize=function(r){return d5(this.parse(r),this._extent)},e.prototype.scale=function(r){return p5(r,this._extent)},e.type="time",e}(hn),ns=[["second",Ec],["minute",Mc],["hour",f7],["quarter-day",f7*6],["half-day",f7*12],["day",L1*1.2],["half-week",L1*3.5],["week",L1*7],["month",L1*31],["quarter",L1*95],["half-year",Jp/2],["year",Jp]];function Lz(t,e,r,i){var n=B1(e),a=B1(r),o=function(d){return eg(n,d,i)===eg(a,d,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function Iz(t,e){return t/=L1,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Pz(t){var e=30*L1;return t/=e,t>6?6:t>3?3:t>2?2:1}function Rz(t){return t/=f7,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function hm(t,e){return t/=e?Mc:Ec,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Nz(t){return iT(t)}function Oz(t,e,r){var i=new Date(t);switch(Qo(e)){case"year":case"month":i[iA(r)](0);case"day":i[nA(r)](1);case"hour":i[aA(r)](0);case"minute":i[oA(r)](0);case"second":i[sA(r)](0),i[lA(r)](0)}return i.getTime()}function Bz(t,e,r,i){var n=1e4,a=eA,o=0;function s(D,C,M,L,I,P,R){for(var B=new Date(C),O=C,z=B[L]();O1&&P===0&&M.unshift({value:M[0].value-O})}}for(var P=0;P=i[0]&&y<=i[1]&&h++)}var _=(i[1]-i[0])/e;if(h>_*1.5&&c>_/1.5||(u.push(g),h>_||t===a[v]))break}f=[]}}}for(var x=ce(j(u,function(D){return ce(D,function(C){return C.value>=i[0]&&C.value<=i[1]&&!C.notAdd})}),function(D){return D.length>0}),w=[],S=x.length-1,v=0;v0;)a*=10;var s=[Ae(zz(i[0]/a)*a),Ae(Fz(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){d7.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=U1(r)/U1(this.base),v5(r,this._extent)},e.prototype.normalize=function(r){return r=U1(r)/U1(this.base),d5(r,this._extent)},e.prototype.scale=function(r){return r=p5(r,this._extent),as(this.base,r)},e.type="log",e}(ki),HC=Jc.prototype;HC.getMinorTicks=d7.getMinorTicks;HC.getLabel=d7.getLabel;function os(t,e){return kz(t,Si(e))}ki.registerClass(Jc);var Gz=function(){function t(e,r,i){this._prepareParams(e,r,i)}return t.prototype._prepareParams=function(e,r,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},t.prototype.modifyDataMinMax=function(e,r){this[Hz[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var i=Vz[e];this[i]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Vz={min:"_determinedMin",max:"_determinedMax"},Hz={min:"_dataMin",max:"_dataMax"};function UC(t,e,r){var i=t.rawExtentInfo;return i||(i=new Gz(t,e,r),t.rawExtentInfo=i,i)}function ss(t,e){return e==null?null:x7(e)?NaN:t.parse(e)}function WC(t,e){var r=t.type,i=UC(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var n=i.min,a=i.max,o=e.ecModel;if(o&&r==="time"){var s=OC("bar",o),l=!1;if(E(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=BC(s),f=Uz(n,a,e,u);n=f.min,a=f.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function Uz(t,e,r,i){var n=r.axis.getExtent(),a=n[1]-n[0],o=Dz(i,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;E(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;E(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-t,h=1-(s+l)/a,c=f/h-f;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function N2(t,e){var r=e,i=WC(t,r),n=i.extent,a=r.get("splitNumber");t instanceof Jc&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setExtent(n[0],n[1]),t.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function v3(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new g5({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new $c({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(ki.getClass(e)||hn)}}function Wz(t){var e=t.scale.getExtent(),r=e[0],i=e[1];return!(r>0&&i>0||r<0&&i<0)}function U4(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(i){return function(n,a){return t.scale.getFormattedLabel(n,a,i)}}(e):ht(e)?function(i){return function(n){var a=t.scale.getLabel(n),o=i.replace("{value}",a!=null?a:"");return o}}(e):wt(e)?function(i){return function(n,a){return r!=null&&(a=n.value-r),i(tv(t,n),a,n.level!=null?{level:n.level}:null)}}(e):function(i){return t.scale.getLabel(i)}}function tv(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function Xz(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var i,n,a=r.getExtent();r instanceof g5?n=r.count():(i=r.getTicks(),n=i.length);var o=t.getLabelModel(),s=U4(t),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;ft[1]&&(t[1]=n[1])})}var W4=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function Qz(t){return Bi(null,t)}var rv={isDimensionStacked:fn,enableDataStack:PC,getStackedDimension:jc};function iv(t,e){var r=e;e instanceof Jt||(r=new Jt(e));var i=v3(r);return i.setExtent(t[0],t[1]),N2(i,r),i}function jz(t){Xe(t,W4)}function Zl(t,e){return e=e||{},fe(t,null,null,e.state!=="normal")}var qz=1e-8;function vm(t,e){return Math.abs(t-e)n&&(i=o,n=l)}if(i)return $z(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var i=this._rect;if(i&&!r)return i;var n=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return E(o,function(s){s.type==="polygon"?dm(s.exterior,n,a,r):E(s.points,function(l){dm(l,n,a,r)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new Nt(n[0],n[1],a[0]-n[0],a[1]-n[1]),r||(this._rect=i),i},e.prototype.contain=function(r){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(r[0],r[1]))return!1;t:for(var a=0,o=n.length;a>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=a,n=s,a=l,i.push([s/r,l/r])}return i}function Wf(t,e){return t=tG(t),j(ce(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var i=r.properties,n=r.geometry,a=[];switch(n.type){case"Polygon":var o=n.coordinates;a.push(new pm(o[0],o.slice(1)));break;case"MultiPolygon":E(n.coordinates,function(l){l[0]&&a.push(new pm(l[0],l.slice(1)))});break;case"LineString":a.push(new gm([n.coordinates]));break;case"MultiLineString":a.push(new gm(n.coordinates))}var s=new ZC(i[e||"name"],a,i.cp);return s.properties=i,s})}var O7=$t();function jC(t,e){var r=j(e,function(i){return t.scale.parse(i)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function eG(t){var e=t.getLabelModel().get("customValues");if(e){var r=U4(t);return{labels:jC(t,e).map(function(i){var n={value:i};return{formattedLabel:r(n),rawLabel:t.scale.getLabel(n),tickValue:i}})}}return t.type==="category"?iG(t):aG(t)}function rG(t,e){var r=t.getTickModel().get("customValues");return r?{ticks:jC(t,r)}:t.type==="category"?nG(t,e):{ticks:j(t.scale.getTicks(),function(i){return i.value})}}function iG(t){var e=t.getLabelModel(),r=qC(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function qC(t,e){var r=KC(t,"labels"),i=ev(e),n=$C(r,i);if(n)return n;var a,o;return wt(i)?a=eD(t,i):(o=i==="auto"?oG(t):i,a=tD(t,o)),JC(r,i,{labels:a,labelCategoryInterval:o})}function nG(t,e){var r=KC(t,"ticks"),i=ev(e),n=$C(r,i);if(n)return n;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),wt(i))a=eD(t,i,!0);else if(i==="auto"){var s=qC(t,t.getLabelModel());o=s.labelCategoryInterval,a=j(s.labels,function(l){return l.tickValue})}else o=i,a=tD(t,o,!0);return JC(r,i,{ticks:a,tickCategoryInterval:o})}function aG(t){var e=t.scale.getTicks(),r=U4(t);return{labels:j(e,function(i,n){return{level:i.level,formattedLabel:r(i,n),rawLabel:t.scale.getLabel(i),tickValue:i.value}})}}function KC(t,e){return O7(t)[e]||(O7(t)[e]=[])}function $C(t,e){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),f=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),c=0,v=0;l<=a[1];l+=s){var d=0,p=0,g=a3(r({value:l}),e.font,"center","top");d=g.width*1.3,p=g.height*1.3,c=Math.max(c,d,7),v=Math.max(v,p,7)}var m=c/f,y=v/h;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=O7(t.model),w=t.getExtent(),S=x.lastAutoInterval,b=x.lastTickCount;return S!=null&&b!=null&&Math.abs(S-_)<=1&&Math.abs(b-o)<=1&&S>_&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?_=S:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtent0=w[0],x.axisExtent1=w[1]),_}function lG(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function tD(t,e,r){var i=U4(t),n=t.scale,a=n.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=XC(t),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);v&&d-l!==a[1]&&p(a[1]);function p(g){var m={value:g};s.push(r?g:{formattedLabel:i(m),rawLabel:n.getLabel(m),tickValue:g})}return s}function eD(t,e,r){var i=t.scale,n=U4(t),a=[];return E(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),a}var mm=[0,1],Kr=function(){function t(e,r,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=i||[0,0]}return t.prototype.contain=function(e){var r=this._extent,i=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return e>=i&&e<=n},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return eT(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var i=this._extent;i[0]=e,i[1]=r},t.prototype.dataToCoord=function(e,r){var i=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(i=i.slice(),ym(i,n.count())),oe(e,mm,i,r)},t.prototype.coordToData=function(e,r){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),ym(i,n.count()));var a=oe(e,i,mm,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),i=rG(this,r),n=i.ticks,a=j(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return uG(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var i=this.scale.getMinorTicks(r),n=j(i,function(a){return j(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},t.prototype.getViewLabels=function(){return eG(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),i=r[1]-r[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/i},t.prototype.calculateCategoryInterval=function(){return sG(this)},t}();function ym(t,e){var r=t[1]-t[0],i=e,n=r/i/2;t[0]+=n,t[1]-=n}function uG(t,e,r,i){var n=e.length;if(!t.onBand||r||!n)return;var a=t.getExtent(),o,s;if(n===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;E(e,function(v){v.coord-=u/2});var f=t.scale.getExtent();s=1+f[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s},e.push(o)}var h=a[0]>a[1];c(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&c(a[0],e[0].coord)&&e.unshift({coord:a[0]}),c(a[1],o.coord)&&(i?o.coord=a[1]:e.pop()),i&&c(o.coord,a[1])&&e.push({coord:a[1]});function c(v,d){return v=Ae(v),d=Ae(d),h?v>d:vn&&(n+=y6);var v=Math.atan2(s,o);if(v<0&&(v+=y6),v>=i&&v<=n||v+y6>=i&&v+y6<=n)return l[0]=f,l[1]=h,u-r;var d=r*Math.cos(i)+t,p=r*Math.sin(i)+e,g=r*Math.cos(n)+t,m=r*Math.sin(n)+e,y=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=d,l[1]=p,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function q9(t,e,r,i,n,a,o,s){var l=n-t,u=a-e,f=r-t,h=i-e,c=Math.sqrt(f*f+h*h);f/=c,h/=c;var v=l*f+u*h,d=v/c;s&&(d=Math.min(Math.max(d,0),1)),d*=c;var p=o[0]=t+d*f,g=o[1]=e+d*h;return Math.sqrt((p-n)*(p-n)+(g-a)*(g-a))}function rD(t,e,r,i,n,a,o){r<0&&(t=t+r,r=-r),i<0&&(e=e+i,i=-i);var s=t+r,l=e+i,u=o[0]=Math.min(Math.max(n,t),s),f=o[1]=Math.min(Math.max(a,e),l);return Math.sqrt((u-n)*(u-n)+(f-a)*(f-a))}var j1=[];function pG(t,e,r){var i=rD(e.x,e.y,e.width,e.height,t.x,t.y,j1);return r.set(j1[0],j1[1]),i}function gG(t,e,r){for(var i=0,n=0,a=0,o=0,s,l,u=1/0,f=e.data,h=t.x,c=t.y,v=0;v0){e=e/180*Math.PI,$1.fromArray(t[0]),xe.fromArray(t[1]),Ge.fromArray(t[2]),Rt.sub(Ti,$1,xe),Rt.sub(xi,Ge,xe);var r=Ti.len(),i=xi.len();if(!(r<.001||i<.001)){Ti.scale(1/r),xi.scale(1/i);var n=Ti.dot(xi),a=Math.cos(e);if(a1&&Rt.copy(Fr,Ge),Fr.toArray(t[1])}}}}function mG(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,$1.fromArray(t[0]),xe.fromArray(t[1]),Ge.fromArray(t[2]),Rt.sub(Ti,xe,$1),Rt.sub(xi,Ge,xe);var i=Ti.len(),n=xi.len();if(!(i<.001||n<.001)){Ti.scale(1/i),xi.scale(1/n);var a=Ti.dot(e),o=Math.cos(r);if(a=l)Rt.copy(Fr,Ge);else{Fr.scaleAndAdd(xi,s/Math.tan(Math.PI/2-f));var h=Ge.x!==xe.x?(Fr.x-xe.x)/(Ge.x-xe.x):(Fr.y-xe.y)/(Ge.y-xe.y);if(isNaN(h))return;h<0?Rt.copy(Fr,xe):h>1&&Rt.copy(Fr,Ge)}Fr.toArray(t[1])}}}}function ql(t,e,r,i){var n=r==="normal",a=n?t:t.ensureState(r);a.ignore=e;var o=i.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();n?t.useStyle(s):a.style=s}function yG(t,e){var r=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),r>0&&i.length>=3){var n=zn(i[0],i[1]),a=zn(i[1],i[2]);if(!n||!a){t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]);return}var o=Math.min(n,a)*r,s=$s([],i[1],i[0],o/n),l=$s([],i[1],i[2],o/a),u=$s([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var f=1;f0&&a&&w(-f/o,0,o);var p=t[0],g=t[o-1],m,y;_(),m<0&&S(-m,.8),y<0&&S(y,.8),_(),x(m,y,1),x(y,m,-1),_(),m<0&&b(-m),y<0&&b(y);function _(){m=p.rect[e]-i,y=n-g.rect[e]-g.rect[r]}function x(T,A,D){if(T<0){var C=Math.min(A,-T);if(C>0){w(C*D,0,o);var M=C+T;M<0&&S(-M*D,1)}else S(-T*D,1)}}function w(T,A,D){T!==0&&(u=!0);for(var C=A;C0)for(var M=0;M0;M--){var R=D[M-1]*P;w(-R,M,o)}}}function b(T){var A=T<0?-1:1;T=Math.abs(T);for(var D=Math.ceil(T/(o-1)),C=0;C0?w(D,0,C+1):w(-D,o-C-1,o),T-=D,T<=0)return}return u}function _G(t,e,r,i){return aD(t,"x","width",e,r,i)}function oD(t,e,r,i){return aD(t,"y","height",e,r,i)}function sD(t){var e=[];t.sort(function(p,g){return g.priority-p.priority});var r=new Nt(0,0,0,0);function i(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var n=0;n=0&&i.attr(a.oldLayoutSelect),kt(c,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),re(i,u,r,l)}else if(i.attr(u),!P4(i).valueAnimation){var h=It(i.style.opacity,1);i.style.opacity=0,Ce(i,{style:{opacity:h}},r,l)}if(a.oldLayout=u,i.states.select){var v=a.oldLayoutSelect={};ls(v,u,us),ls(v,i.states.select,us)}if(i.states.emphasis){var d=a.oldLayoutEmphasis={};ls(d,u,us),ls(d,i.states.emphasis,us)}qT(i,l,f,r,r)}if(n&&!n.ignore&&!n.invisible){var a=wG(n),o=a.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),re(n,{shape:p},r)):(n.setShape(p),n.style.strokePercent=0,Ce(n,{style:{strokePercent:1}},r)),a.oldLayout=p}},t}(),$l=$t();function lD(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,i){var n=$l(r).labelManager;n||(n=$l(r).labelManager=new bG),n.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,i){var n=$l(r).labelManager;i.updatedSeries.forEach(function(a){n.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),n.updateLayoutConfig(r),n.layout(r),n.processLabelsOverall()})}var Jl=Math.sin,tu=Math.cos,uD=Math.PI,Ga=Math.PI*2,TG=180/uD,fD=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,i,n,a,o){this._add("C",e,r,i,n,a,o)},t.prototype.quadraticCurveTo=function(e,r,i,n){this._add("Q",e,r,i,n)},t.prototype.arc=function(e,r,i,n,a,o){this.ellipse(e,r,i,i,0,n,a,o)},t.prototype.ellipse=function(e,r,i,n,a,o,s,l){var u=s-o,f=!l,h=Math.abs(u),c=Wn(h-Ga)||(f?u>=Ga:-u>=Ga),v=u>0?u%Ga:u%Ga+Ga,d=!1;c?d=!0:Wn(h)?d=!1:d=v>=uD==!!f;var p=e+i*tu(o),g=r+n*Jl(o);this._start&&this._add("M",p,g);var m=Math.round(a*TG);if(c){var y=1/this._p,_=(f?1:-1)*(Ga-y);this._add("A",i,n,m,1,+f,e+i*tu(o+_),r+n*Jl(o+_)),y>.01&&this._add("A",i,n,m,0,+f,p,g)}else{var x=e+i*tu(s),w=r+n*Jl(s);this._add("A",i,n,m,+d,+f,x,w)}},t.prototype.rect=function(e,r,i,n){this._add("M",e,r),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,i,n,a,o,s,l,u){for(var f=[],h=this._p,c=1;c"}function RG(t){return""}function sv(t,e){e=e||{};var r=e.newline?"\n":"";function i(n){var a=n.children,o=n.tag,s=n.attrs,l=n.text;return PG(o,s)+(o!=="style"?Je(l):l||"")+(a?""+r+j(a,function(u){return i(u)}).join(r)+r:"")+RG(o)}return i(t)}function NG(t,e,r){r=r||{};var i=r.newline?"\n":"",n=" {"+i,a=i+"}",o=j(Ut(t),function(l){return l+n+j(Ut(t[l]),function(u){return u+":"+t[l][u]+";"}).join(i)+a}).join(i),s=j(Ut(e),function(l){return"@keyframes "+l+n+j(Ut(e[l]),function(u){return u+n+j(Ut(e[l][u]),function(f){var h=e[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(i)+a}).join(i)+a}).join(i);return!o&&!s?"":[""].join(i)}function Yf(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function wm(t,e,r,i){return or("svg","root",{width:t,height:e,xmlns:hD,"xmlns:xlink":cD,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+t+" "+e:!1},r)}var OG=0;function dD(){return OG++}var bm={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ka="transform-origin";function BG(t,e,r){var i=H({},t.shape);H(i,e),t.buildPath(r,i);var n=new fD;return n.reset(Yb(t)),r.rebuildPath(n,1),n.generateStr(),n.getStr()}function kG(t,e){var r=e.originX,i=e.originY;(r||i)&&(t[Ka]=r+"px "+i+"px")}var FG={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function pD(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function zG(t,e,r){var i=t.shape.paths,n={},a,o;if(E(i,function(l){var u=Yf(r.zrId);u.animation=!0,m5(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,c=Ut(f),v=c.length;if(v){o=c[v-1];var d=f[o];for(var p in d){var g=d[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var m in h){var y=h[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){e.d=!1;var s=pD(n,r);return a.replace(o,s)}}function Tm(t){return ht(t)?bm[t]?"cubic-bezier("+bm[t]+")":sc(t)?t:"":""}function m5(t,e,r,i){var n=t.animators,a=n.length,o=[];if(t instanceof wc){var s=zG(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Y=pD(b,r);return Y+" "+y[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var m=r.zrId+"-cls-"+dD();r.cssNodes["."+m]={animation:o.join(",")},e.class=m}}function GG(t,e,r){if(!t.ignore)if(t.isSilent()){var i={"pointer-events":"none"};Am(i,e,r)}else{var n=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=n.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=ef(l))}var u=n.lineWidth;if(u){var f=!n.strokeNoScale&&t.transform?t.transform[0]:1;u=u/f}var i={cursor:"pointer"};a&&(i.fill=a),n.stroke&&(i.stroke=n.stroke),u&&(i["stroke-width"]=u),Am(i,e,r)}}function Am(t,e,r,i){var n=JSON.stringify(t),a=r.cssStyleCache[n];a||(a=r.zrId+"-cls-"+dD(),r.cssStyleCache[n]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var B7=Math.round;function gD(t){return t&&ht(t.src)}function mD(t){return t&&wt(t.toDataURL)}function lv(t,e,r,i){MG(function(n,a){var o=n==="fill"||n==="stroke";o&&Xb(a)?_D(e,t,n,i):o&&lc(a)?xD(r,t,n,i):o&&a==="none"?t[n]="transparent":t[n]=a},e,r,!1),ZG(r,t,i)}function uv(t,e){var r=zR(e);r&&(r.each(function(i,n){i!=null&&(t[(Sm+n).toLowerCase()]=i+"")}),e.isSilent()&&(t[Sm+"silent"]="true"))}function Cm(t){return Wn(t[0]-1)&&Wn(t[1])&&Wn(t[2])&&Wn(t[3]-1)}function VG(t){return Wn(t[4])&&Wn(t[5])}function fv(t,e,r){if(e&&!(VG(e)&&Cm(e))){var i=1e4;t.transform=Cm(e)?"translate("+B7(e[4]*i)/i+" "+B7(e[5]*i)/i+")":lR(e)}}function Dm(t,e,r){for(var i=t.points,n=[],a=0;a"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Wr(c,g),Wr(v,g)}else if(c==null||v==null){var m=function(D,C){if(D){var M=D.elm,L=c||C.width,I=v||C.height;D.tag==="pattern"&&(u?(I=1,L/=a.width):f&&(L=1,I/=a.height)),D.attrs.width=L,D.attrs.height=I,M&&(M.setAttribute("width",L),M.setAttribute("height",I))}},y=dc(d,null,t,function(D){l||m(S,D),m(h,D)});y&&y.width&&y.height&&(c=c||y.width,v=v||y.height)}h=or("image","img",{href:d,width:c,height:v}),o.width=c,o.height=v}else n.svgElement&&(h=At(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(h){var _,x;l?_=x=1:u?(x=1,_=o.width/a.width):f?(_=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var w=Zb(n);w&&(o.patternTransform=w);var S=or("pattern","",o,[h]),b=sv(S),T=i.patternCache,A=T[b];A||(A=i.zrId+"-p"+i.patternIdx++,T[b]=A,o.id=A,S=i.defs[A]=or("pattern",A,o,[h])),e[r]=G0(A)}}function QG(t,e,r){var i=r.clipPathCache,n=r.defs,a=i[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};i[t.id]=a,n[a]=or("clipPath",a,o,[yD(t,r)])}e["clip-path"]=G0(a)}function Lm(t){return document.createTextNode(t)}function n2(t,e,r){t.insertBefore(e,r)}function Im(t,e){t.removeChild(e)}function Pm(t,e){t.appendChild(e)}function SD(t){return t.parentNode}function wD(t){return t.nextSibling}function eu(t,e){t.textContent=e}var Rm=58,jG=120,qG=or("","");function Zf(t){return t===void 0}function mi(t){return t!==void 0}function KG(t,e,r){for(var i={},n=e;n<=r;++n){var a=t[n].key;a!==void 0&&(i[a]=n)}return i}function Y6(t,e){var r=t.key===e.key,i=t.tag===e.tag;return i&&r}function k7(t){var e,r=t.children,i=t.tag;if(mi(i)){var n=t.elm=vD(i);if(hv(qG,t),X(r))for(e=0;ea?(d=r[l+1]==null?null:r[l+1].elm,bD(t,d,r,n,l)):$9(t,e,i,a))}function Oo(t,e){var r=e.elm=t.elm,i=t.children,n=e.children;t!==e&&(hv(t,e),Zf(e.text)?mi(i)&&mi(n)?i!==n&&$G(r,i,n):mi(n)?(mi(t.text)&&eu(r,""),bD(r,null,n,0,n.length-1)):mi(i)?$9(r,i,0,i.length-1):mi(t.text)&&eu(r,""):t.text!==e.text&&(mi(i)&&$9(r,i,0,i.length-1),eu(r,e.text)))}function JG(t,e){if(Y6(t,e))Oo(t,e);else{var r=t.elm,i=SD(r);k7(e),i!==null&&(n2(i,e.elm,wD(r)),$9(i,[t],0,0))}return e}var tV=0,eV=function(){function t(e,r,i){if(this.type="svg",this.refreshHover=Nm(),this.configLayer=Nm(),this.storage=r,this._opts=i=H({},i),this.root=e,this._id="zr"+tV++,this._oldVNode=wm(i.width,i.height),e&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=vD("svg");hv(null,this._oldVNode),n.appendChild(a),e.appendChild(n)}this.resize(i.width,i.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",JG(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return Mm(e,Yf(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),i=this._width,n=this._height,a=Yf(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis;var o=[],s=this._bgVNode=rV(i,n,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=or("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=j(Ut(a.defs),function(c){return a.defs[c]});if(u.length&&o.push(or("defs","defs",{},u)),e.animation){var f=NG(a.cssNodes,a.cssAnims,{newline:!0});if(f){var h=or("style","stl",{},[],f);o.push(h)}}return wm(i,n,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},sv(this.renderToVNode({animation:It(e.cssAnimation,!0),emphasis:It(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:It(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,i){for(var n=e.length,a=[],o=0,s,l,u=0,f=0;f=0&&!(c&&l&&c[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=a[o-1];for(var m=p+1;m=s)}}for(var h=this.__startIndex;h15)break}}I.prevElClipPaths&&m.restore()};if(y)if(y.length===0)T=g.__endIndex;else for(var D=v.dpr,C=0;C0&&e>n[0]){for(l=0;le);l++);s=i[n[l]]}if(n.splice(l+1,0,e),i[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var i=this._zlevelList,n=0;n0?fs:0),this._needsManuallyCompositing),f.__builtin__||Jh("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,r(l),a=f),n.__dirty&f1&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,E(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var i=this._layerConfig;i[e]?mt(i[e],r,!0):i[e]=r;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Kt);function u4(t,e){var r=t.mapDimensionsAll("defaultedLabel"),i=r.length;if(i===1){var n=o4(t,e,r[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o=0&&i.push(e[a])}return i.join(" ")}var d3=function(t){F(e,t);function e(r,i,n,a){var o=t.call(this)||this;return o.updateData(r,i,n,a),o}return e.prototype._createSymbol=function(r,i,n,a,o){this.removeAll();var s=Ue(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=uV,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){sn(this.childAt(0))},e.prototype.downplay=function(){ln(this.childAt(0))},e.prototype.setZ=function(r,i){var n=this.childAt(0);n.zlevel=r,n.z=i},e.prototype.setDraggable=function(r,i){var n=this.childAt(0);n.draggable=r,n.cursor=!i&&r?"move":n.cursor},e.prototype.updateData=function(r,i,n,a){this.silent=!1;var o=r.getItemVisual(i,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,i),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var h=r.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,r,i,l,h)}else{var c=this.childAt(0);c.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?c.attr(v):re(c,v,s,i),oi(c)}if(this._updateCommon(r,i,l,n,a),u){var c=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Ce(c,v,s,i)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,i,n,a,o){var s=this.childAt(0),l=r.hostModel,u,f,h,c,v,d,p,g,m;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,d=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(i),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=cr(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var x=r.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var w=Y2(r.getItemVisual(i,"symbolOffset"),n);w&&(s.x=w[0],s.y=w[1]),m&&s.attr("cursor",m);var S=r.getItemVisual(i,"style"),b=S.fill;if(s instanceof pr){var T=s.style;s.useStyle(H({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(H({},S)):s.useStyle(S),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var A=r.getItemVisual(i,"liftZ"),D=this._z2;A!=null?D==null&&(this._z2=s.z2,s.z2+=A):D!=null&&(s.z2=D,this._z2=null);var C=o&&o.useNameLabel;Ar(s,p,{labelFetcher:l,labelDataIndex:i,defaultText:M,inheritColor:b,defaultOpacity:S.opacity});function M(P){return C?r.getName(P):u4(r,P)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var I=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*I,L.scaleY=this._sizeY*I,this.setSymbolScale(1),ke(this,c,v,d)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,i,n){var a=this.childAt(0),o=Et(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&na(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();na(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,i){return G4(r.getItemVisual(i,"symbolSize"))},e}(Dt);function uV(t,e){this.parent.drift(t,e)}function iu(t,e,r,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(r))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function km(t){return t!=null&&!Tt(t)&&(t={isIgnore:t}),t||{}}function Fm(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:cr(e),cursorStyle:e.get("cursor")}}var p3=function(){function t(e){this.group=new Dt,this._SymbolCtor=e||d3}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=km(r);var i=this.group,n=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=Fm(e),u={disableAnimation:s},f=r.getSymbolPoint||function(h){return e.getItemLayout(h)};a||i.removeAll(),e.diff(a).add(function(h){var c=f(h);if(iu(e,c,h,r)){var v=new o(e,h,l,u);v.setPosition(c),e.setItemGraphicEl(h,v),i.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),d=f(h);if(!iu(e,d,h,r)){i.remove(v);return}var p=e.getItemVisual(h,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)i.remove(v),v=new o(e,h,l,u),v.setPosition(d);else{v.updateData(e,h,l,u);var m={x:d[0],y:d[1]};s?v.attr(m):re(v,m,n)}i.add(v),e.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){i.remove(c)},n)}).execute(),this._getSymbolPoint=f,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(i,n){var a=e._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Fm(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,i){this._progressiveEls=[],i=km(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=i[0]:i[1]<0&&(r=i[1]),r}function DD(t,e,r,i){var n=NaN;t.stacked&&(n=r.get(r.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,i),o[1-a]=n,e.dataToPoint(o)}function hV(t,e){var r=[];return e.diff(t).add(function(i){r.push({cmd:"+",idx:i})}).update(function(i,n){r.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){r.push({cmd:"-",idx:i})}).execute(),r}function cV(t,e,r,i,n,a,o,s){for(var l=hV(t,e),u=[],f=[],h=[],c=[],v=[],d=[],p=[],g=CD(n,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_=n||p<0)break;if(T2(m,y)){if(l){p+=a;continue}break}if(p===r)t[a>0?"moveTo":"lineTo"](m,y),h=m,c=y;else{var _=m-u,x=y-f;if(_*_+x*x<.5){p+=a;continue}if(o>0){for(var w=p+a,S=e[w*2],b=e[w*2+1];S===m&&b===y&&g=i||T2(S,b))v=m,d=y;else{D=S-u,C=b-f;var I=m-u,P=S-m,R=y-f,B=b-y,O=void 0,z=void 0;if(s==="x"){O=Math.abs(I),z=Math.abs(P);var G=D>0?1:-1;v=m-G*O*o,d=y,M=m+G*z*o,L=y}else if(s==="y"){O=Math.abs(R),z=Math.abs(B);var U=C>0?1:-1;v=m,d=y-U*O*o,M=m,L=y+U*z*o}else O=Math.sqrt(I*I+R*R),z=Math.sqrt(P*P+B*B),A=z/(z+O),v=m-D*o*(1-A),d=y-C*o*(1-A),M=m+D*o*A,L=y+C*o*A,M=Dn(M,En(S,m)),L=Dn(L,En(b,y)),M=En(M,Dn(S,m)),L=En(L,Dn(b,y)),D=M-m,C=L-y,v=m-D*O/z,d=y-C*O/z,v=Dn(v,En(u,m)),d=Dn(d,En(f,y)),v=En(v,Dn(u,m)),d=En(d,Dn(f,y)),D=m-v,C=y-d,M=m+D*z/O,L=y+C*z/O}t.bezierCurveTo(h,c,v,d,m,y),h=M,c=L}else t.lineTo(m,y)}u=m,f=y,p+=a}return g}var ED=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),vV=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ED},e.prototype.buildPath=function(r,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&T2(n[o*2-2],n[o*2-1]);o--);for(;a=0){var x=u?(d-l)*_+l:(v-s)*_+s;return u?[r,x]:[x,r]}s=v,l=d;break;case o.C:v=a[h++],d=a[h++],p=a[h++],g=a[h++],m=a[h++],y=a[h++];var w=u?A9(s,v,p,m,r,f):A9(l,d,g,y,r,f);if(w>0)for(var S=0;S=0){var x=u?ir(l,d,g,y,b):ir(s,v,p,m,b);return u?[r,x]:[x,r]}}s=m,l=y;break}}},e}(zt),dV=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ED),MD=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new dV},e.prototype.buildPath=function(r,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&T2(n[s*2-2],n[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):n&&r.push(o(n,l,0),o(n,l,e));break}else n&&(r.push(o(n,l,0)),n=null),r.push(l),a=l}return r}function mV(t,e,r){var i=t.getVisual("visualMeta");if(!(!i||!i.length||!t.count())&&e.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=t.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=e.getAxis(n),u=j(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=gV(u,n==="x"?r.getWidth():r.getHeight()),v=c.length;if(!v&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var d=10,p=c[0].coord-d,g=c[v-1].coord+d,m=g-p;if(m<.001)return"transparent";E(c,function(_){_.offset=(_.coord-p)/m}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var y=new ei(0,0,0,0,c,!0);return y[n]=p,y[n+"2"]=g,y}}}function yV(t,e,r){var i=t.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(n&&_V(a,e))){var o=e.mapDimension(a.dim),s={};return E(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function _V(t,e){var r=t.getExtent(),i=Math.abs(r[1]-r[0])/t.scale.count();isNaN(i)&&(i=0);for(var n=e.count(),a=Math.max(1,Math.round(n/5)),o=0;oi)return!1;return!0}function xV(t,e){return isNaN(t)||isNaN(e)}function SV(t){for(var e=t.length/2;e>0&&xV(t[e*2-2],t[e*2-1]);e--);return e-1}function Um(t,e){return[t[e*2],t[e*2+1]]}function wV(t,e,r){for(var i=t.length/2,n=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function PD(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var G=p.getState("emphasis").style;G.lineWidth=+p.style.lineWidth+1}Et(p).seriesIndex=r.seriesIndex,ke(p,B,O,z);var U=Hm(r.get("smooth")),Z=r.get("smoothMonotone");if(p.setShape({smooth:U,smoothMonotone:Z,connectNulls:T}),g){var $=l.getCalculationInfo("stackedOnSeries"),W=0;g.useStyle(xt(f.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),$&&(W=Hm($.get("smooth"))),g.setShape({smooth:U,stackedOnSmooth:W,smoothMonotone:Z,connectNulls:T}),Tr(g,r,"areaStyle"),Et(g).seriesIndex=r.seriesIndex,ke(g,B,O,z)}var V=function(K){a._changePolyState(K)};l.eachItemGraphicEl(function(K){K&&(K.onHoverStateChange=V)}),this._polyline.onHoverStateChange=V,this._data=l,this._coordSys=o,this._stackedOnPoints=S,this._points=h,this._step=C,this._valueOrigin=x,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,i){Et(i).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,i,n,a){var o=r.getData(),s=L2(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=r.get("zlevel")||0,v=r.get("z")||0;u=new d3(o,s),u.x=f,u.y=h,u.setZ(c,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Yt.prototype.highlight.call(this,r,i,n,a)},e.prototype.downplay=function(r,i,n,a){var o=r.getData(),s=L2(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Yt.prototype.downplay.call(this,r,i,n,a)},e.prototype._changePolyState=function(r){var i=this._polygon;P9(this._polyline,r),i&&P9(i,r)},e.prototype._newPolyline=function(r){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new vV({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(r,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new MD({shape:{points:r,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(r,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,f=u.get("animationDuration");wt(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=wt(h)?h(null):h;r.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],m=void 0,y=void 0,_=void 0;if(n)if(o){var x=n,w=i.pointToCoord(g);a?(m=x.startAngle,y=x.endAngle,_=-w[1]/180*Math.PI):(m=x.r0,y=x.r,_=w[0])}else{var S=n;a?(m=S.x,y=S.x+S.width,_=v.x):(m=S.y+S.height,y=S.y,_=v.y)}var b=y===m?0:(_-m)/(y-m);l&&(b=1-b);var T=wt(h)?h(d):f*b+c,A=p.getSymbolPath(),D=A.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:T}),A.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,i,n){var a=r.getModel("endLabel");if(PD(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ht({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=SV(l);f>=0&&(Ar(s,cr(r,"endLabel"),{inheritColor:n,labelFetcher:r,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?AD(o,v):u4(o,h)},enableTextSetter:!0},bV(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,i,n,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=n.getLayout("points"),c=n.hostModel,v=c.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=i.shape,x=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,w=(m?p:0)*(y?-1:1),S=(m?0:-p)*(y?-1:1),b=m?"x":"y",T=wV(h,x,b),A=T.range,D=A[1]-A[0],C=void 0;if(D>=1){if(D>1&&!v){var M=Um(h,A[0]);u.attr({x:M[0]+w,y:M[1]+S}),o&&(C=c.getRawValue(A[0]))}else{var M=f.getPointOn(x,b);M&&u.attr({x:M[0]+w,y:M[1]+S});var L=c.getRawValue(A[0]),I=c.getRawValue(A[1]);o&&(C=cT(n,d,L,I,T.t))}a.lastFrameIndex=A[0]}else{var P=r===1||a.lastFrameIndex>0?A[0]:0,M=Um(h,P);o&&(C=c.getRawValue(P)),u.attr({x:M[0]+w,y:M[1]+S})}if(o){var R=P4(u);typeof R.setLabelText=="function"&&R.setLabelText(C)}}},e.prototype._doUpdateAnimation=function(r,i,n,a,o,s,l){var u=this._polyline,f=this._polygon,h=r.hostModel,c=cV(this._data,r,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,p=c.next,g=c.stackedOnNext;if(o&&(v=Mn(c.current,n,o,l),d=Mn(c.stackedOnCurrent,n,o,l),p=Mn(c.next,n,o,l),g=Mn(c.stackedOnNext,n,o,l)),Vm(v,p)>3e3||f&&Vm(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=c.current,u.shape.points=v;var m={shape:{points:p}};c.current!==v&&(m.shape.__points=c.next),u.stopAnimation(),re(u,m,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),re(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],_=c.status,x=0;x<_.length;x++){var w=_[x].cmd;if(w==="="){var S=r.getItemGraphicEl(_[x].idx1);S&&y.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var b=u.shape.__points,T=0;Te&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;re&&(e=a,r=n)}return isFinite(r)?r:NaN},nearest:function(t){return t[0]}},CV=function(t){return Math.round(t.length/2)};function RD(t){return{seriesType:t,reset:function(e,r,i){var n=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=i.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"&&e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v));var d=void 0;ht(a)?d=AV[a]:wt(a)&&(d=a),d&&e.setData(n.downSample(n.mapDimension(u.dim),1/v,d,CV))}}}}}function DV(t){t.registerChartView(TV),t.registerSeriesModel(lV),t.registerLayout(m3("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",i)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,RD("line"))}var F7=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,i){return Bi(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(n)E(a.getAxes(),function(c,v){if(c.type==="category"&&i!=null){var d=c.getTicksCoords(),p=c.getTickModel().get("alignWithLabel"),g=o[v],m=i[v]==="x1"||i[v]==="y1";if(m&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,x=1,w=0;wg){_=(S+y)/2;break}w===1&&(x=b-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=c.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Kt);Kt.registerClass(F7);var EV=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Bi(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>r&&(r=i),r},e.prototype.brushSelector=function(r,i,n){return n.rect(i.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=fa(F7.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(F7),MV=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),J9=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.type="sausage",i}return e.prototype.getDefaultShape=function(){return new MV},e.prototype.buildPath=function(r,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,f=i.startAngle,h=i.endAngle,c=i.clockwise,v=Math.PI*2,d=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(r,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,i,n,a){if(this._isOrderChangedWithinSameData(r,i,n)){var o=this._dataSort(r,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,i,n){var a=i.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,i){this._clear(this._model),this._removeOnRenderedListener(i)},e.prototype.dispose=function(r,i){this._removeOnRenderedListener(i)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var i=this.group,n=this._data;r&&r.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){E7(a,r,Et(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Yt),Wm={cartesian2d:function(t,e){var r=e.width<0?-1:1,i=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var n=t.x+t.width,a=t.y+t.height,o=au(e.x,t.x),s=ou(e.x+e.width,n),l=au(e.y,t.y),u=ou(e.y+e.height,a),f=sn?s:o,e.y=h&&l>a?u:l,e.width=f?0:s-o,e.height=h?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),f||h},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var i=e.r;e.r=e.r0,e.r0=i}var n=ou(e.r,t.r),a=au(e.r0,t.r0);e.r=n,e.r0=a;var o=n-a<0;if(r<0){var i=e.r;e.r=e.r0,e.r0=i}return o}},Xm={cartesian2d:function(t,e,r,i,n,a,o,s,l){var u=new Xt({shape:H({},i),z2:1});if(u.__dataIndex=r,u.name="item",a){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(t,e,r,i,n,a,o,s,l){var u=!n&&l?J9:Yr,f=new u({shape:i,z2:1});f.name="item";var h=ND(n);if(f.calculateTextPosition=LV(h,{isRoundCap:u===J9}),a){var c=f.shape,v=n?"r":"endAngle",d={};c[v]=n?i.r0:i.startAngle,d[v]=i[v],(s?re:Ce)(f,{shape:d},a)}return f}};function NV(t,e){var r=t.get("realtimeSort",!0),i=e.getBaseAxis();if(r&&i.type==="category"&&e.type==="cartesian2d")return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function Ym(t,e,r,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?re:Ce)(r,{shape:l},e,n,null);var f=e?t.baseAxis.model:null;(o?re:Ce)(r,{shape:u},f,n)}function Zm(t,e){for(var r=0;r0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(t,e,r){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function kV(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function ND(t){return function(e){var r=e?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+r;default:return i}}}(t)}function jm(t,e,r,i,n,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=t.shape,h=d2(i.getModel("itemStyle"),f,!0);H(f,h),t.setShape(f)}}else{var u=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var c=i.getShallow("cursor");c&&t.attr("cursor",c);var v=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=cr(i);Ar(t,d,{labelFetcher:a,labelDataIndex:r,defaultText:u4(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=t.getTextContent();if(s&&p){var g=i.get(["label","position"]);t.textConfig.inside=g==="middle"?!0:null,IV(t,g==="outside"?v:g,ND(o),i.get(["label","rotate"]))}jT(p,d,a.getRawValue(r),function(y){return AD(e,y)});var m=i.getModel(["emphasis"]);ke(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),Tr(t,i),kV(n)&&(t.style.fill="none",t.style.stroke="none",E(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function FV(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var i=t.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,a)}var zV=function(){function t(){}return t}(),qm=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.type="largeBar",i}return e.prototype.getDefaultShape=function(){return new zV},e.prototype.buildPath=function(r,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?r:null},30,!1);function GV(t,e,r){for(var i=t.baseDimIdx,n=1-i,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,f=0,h=a.length/3;f=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[f]}return-1}function OD(t,e,r){if(Q2(r,"cartesian2d")){var i=e,n=r.getArea();return{x:t?i.x:n.x,y:t?n.y:i.y,width:t?i.width:n.width,height:t?n.height:i.height}}else{var n=r.getArea(),a=e;return{cx:n.cx,cy:n.cy,r0:t?n.r0:a.r0,r:t?n.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function VV(t,e,r){var i=t.type==="polar"?Yr:Xt;return new i({shape:OD(e,r,t),silent:!0,z2:0})}function HV(t){t.registerChartView(RV),t.registerSeriesModel(EV),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Lt(FC,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,zC("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,RD("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var i=e.componentType||"series";r.eachComponent({mainType:i,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var Jm=Math.PI*2,ds=Math.PI/180;function BD(t,e){return Re(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function kD(t,e){var r=BD(t,e),i=t.get("center"),n=t.get("radius");X(n)||(n=[0,n]);var a=ot(r.width,e.getWidth()),o=ot(r.height,e.getHeight()),s=Math.min(a,o),l=ot(n[0],s/2),u=ot(n[1],s/2),f,h,c=t.coordinateSystem;if(c){var v=c.dataToPoint(i);f=v[0]||0,h=v[1]||0}else X(i)||(i=[i,i]),f=ot(i[0],a)+r.x,h=ot(i[1],o)+r.y;return{cx:f,cy:h,r0:l,r:u}}function UV(t,e,r){e.eachSeriesByType(t,function(i){var n=i.getData(),a=n.mapDimension("value"),o=BD(i,r),s=kD(i,r),l=s.cx,u=s.cy,f=s.r,h=s.r0,c=-i.get("startAngle")*ds,v=i.get("endAngle"),d=i.get("padAngle")*ds;v=v==="auto"?c-Jm:-v*ds;var p=i.get("minAngle")*ds,g=p+d,m=0;n.each(a,function(B){!isNaN(B)&&m++});var y=n.getSum(a),_=Math.PI/(y||m)*2,x=i.get("clockwise"),w=i.get("roseType"),S=i.get("stillShowZeroSum"),b=n.getDataExtent(a);b[0]=0;var T=x?1:-1,A=[c,v],D=T*d/2;pc(A,!x),c=A[0],v=A[1];var C=FD(i);C.startAngle=c,C.endAngle=v,C.clockwise=x;var M=Math.abs(v-c),L=M,I=0,P=c;if(n.setLayout({viewRect:o,r:f}),n.each(a,function(B,O){var z;if(isNaN(B)){n.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:h,r:w?NaN:f});return}w!=="area"?z=y===0&&S?_:B*_:z=M/m,zz?(U=P+T*z/2,Z=U):(U=P+D,Z=G-D),n.setItemLayout(O,{angle:z,startAngle:U,endAngle:Z,clockwise:x,cx:l,cy:u,r0:h,r:w?oe(B,b,[h,f]):f}),P=G}),Lr?m:g,w=Math.abs(_.label.y-r);if(w>=x.maxY){var S=_.label.x-e-_.len2*n,b=i+_.len,T=Math.abs(S)t.unconstrainedWidth?null:v:null;i.setStyle("width",d)}var p=i.getBoundingRect();a.width=p.width;var g=(i.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-h)/2}}}function su(t){return t.position==="center"}function YV(t){var e=t.getData(),r=[],i,n,a=!1,o=(t.get("minShowLabelAngle")||0)*WV,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,c=s.height;function v(S){S.ignore=!0}function d(S){if(!S.ignore)return!0;for(var b in S.states)if(S.states[b].ignore===!1)return!0;return!1}e.each(function(S){var b=e.getItemGraphicEl(S),T=b.shape,A=b.getTextContent(),D=b.getTextGuideLine(),C=e.getItemModel(S),M=C.getModel("label"),L=M.get("position")||C.get(["emphasis","label","position"]),I=M.get("distanceToLabelLine"),P=M.get("alignTo"),R=ot(M.get("edgeDistance"),u),B=M.get("bleedMargin"),O=C.getModel("labelLine"),z=O.get("length");z=ot(z,u);var G=O.get("length2");if(G=ot(G,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":Z>0?"left":"right"}var bt=Math.PI,Pt=0,ae=M.get("rotate");if(te(ae))Pt=ae*(bt/180);else if(L==="center")Pt=0;else if(ae==="radial"||ae===!0){var Ie=Z<0?-U+bt:-U;Pt=Ie}else if(ae==="tangential"&&L!=="outside"&&L!=="outer"){var Se=Math.atan2(Z,$);Se<0&&(Se=bt*2+Se);var De=$>0;De&&(Se=bt+Se),Pt=Se-bt}if(a=!!Pt,A.x=W,A.y=V,A.rotation=Pt,A.setStyle({verticalAlign:"middle"}),q){A.setStyle({align:Y});var Ne=A.states.select;Ne&&(Ne.x+=A.x,Ne.y+=A.y)}else{var Qt=A.getBoundingRect().clone();Qt.applyTransform(A.getComputedTransform());var Te=(A.style.margin||0)+2.1;Qt.y-=Te/2,Qt.height+=Te,r.push({label:A,labelLine:D,position:L,len:z,len2:G,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new Rt(Z,$),linePoints:K,textAlign:Y,labelDistance:I,labelAlignTo:P,edgeDistance:R,bleedMargin:B,rect:Qt,unconstrainedWidth:Qt.width,labelStyleWidth:A.style.width})}b.setTextConfig({inside:q})}}),!a&&t.get("avoidLabelOverlap")&&XV(r,i,n,l,u,c,f,h);for(var p=0;p0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=a.r0}},e.type="pie",e}(Yt);function X4(t,e,r){e=X(e)&&{coordDimensions:e}||H({encodeDefine:t.getEncode()},e);var i=t.getSource(),n=H4(i,e).dimensions,a=new Le(n,t);return a.initData(i,r),a}var _3=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var i=this._getDataWithEncodedVisual();return i.getItemVisual(e,r)},t}(),jV=$t(),qV=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new _3(ct(this.getData,this),ct(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return X4(this,{coordDimensions:["value"],encodeDefaulter:Lt(Rc,this)})},e.prototype.getDataParams=function(r){var i=this.getData(),n=jV(i),a=n.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=n.seats=HR(o,i.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){M2(r,"labelLine",["show"]);var i=r.labelLine,n=r.emphasis.labelLine;i.show=i.show&&r.label.show,n.show=n.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Kt);function KV(t){return{seriesType:t,reset:function(e,r){var i=e.getData();i.filterSelf(function(n){var a=i.mapDimension("value"),o=i.get(a,n);return!(te(o)&&!isNaN(o)&&o<0)})}}}function $V(t){t.registerChartView(QV),t.registerSeriesModel(qV),tC("pie",t.registerAction),t.registerLayout(Lt(UV,"pie")),t.registerProcessor(y3("pie")),t.registerProcessor(KV("pie"))}var JV=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,i){return Bi(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r==null?this.option.large?5e3:this.get("progressive"):r},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r==null?this.option.large?1e4:this.get("progressiveThreshold"):r},e.prototype.brushSelector=function(r,i,n){return n.point(i.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Kt),GD=4,tH=function(){function t(){}return t}(),eH=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.getDefaultShape=function(){return new tH},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,i){var n=i.points,a=i.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var f=u*2,h=a[f]-s/2,c=a[f+1]-l/2;if(r>=h&&i>=c&&r<=h+s&&i<=c+l)return u}return-1},e.prototype.contain=function(r,i){var n=this.transformCoordToLocal(r,i),a=this.getBoundingRect();if(r=n[0],i=n[1],a.contain(r,i)){var o=this.hoverDataIdx=this.findDataIndex(r,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var i=this.shape,n=i.points,a=i.size,o=a[0],s=a[1],l=1/0,u=1/0,f=-1/0,h=-1/0,c=0;c=0&&(u.dataIndex=h+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),iH=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,i,n){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,i,n){this._symbolDraw.incrementalUpdate(r,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=r.end===i.getData().count()},e.prototype.updateTransform=function(r,i,n){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=m3("").reset(r,i,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var i=r.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,i){var n=this._symbolDraw,a=i.pipelineContext,o=a.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new rH:new p3,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(r,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Yt),nH=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Bt),jf=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",je).models[0]},e.type="cartesian2dAxis",e}(Bt);Xe(jf,W4);var VD={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},aH=mt({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},VD),cv=mt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},VD),oH=mt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},cv),sH=xt({logBase:10},cv);const HD={category:aH,value:cv,time:oH,log:sH};var lH={value:1,category:1,time:1,log:1};function f4(t,e,r,i){E(lH,function(n,a){var o=mt(mt({},HD[a],!0),i,!0),s=function(l){F(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=L7(this),v=c?O4(f):{},d=h.getTheme();mt(f,d.get(a+"Axis")),mt(f,this.getDefaultOption()),f.type=ey(f),c&&aa(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Q9.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",ey)}function ey(t){return t.type||(t.data?"category":"value")}var vv=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return j(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ce(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),qf=["x","y"];function ry(t){return t.type==="interval"||t.type==="time"}var uH=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=qf,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!ry(r)||!ry(i))){var n=r.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-n[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=W2([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.toLocalCoord(r[0]))&&n.contain(n.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,i){var n=this.dataToPoint(r),a=this.dataToPoint(i),o=this.getArea(),s=new Nt(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,i,n){n=n||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ur(n,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},e.prototype.clampData=function(r,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(r[0]),u=a.parse(r[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},e.prototype.pointToData=function(r,i){var n=[];if(this._invTransform)return ur(n,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(r[0]),i),n[1]=o.coordToData(o.toLocalCoord(r[1]),i),n},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-r,o=Math.min(n[0],n[1])-r,s=Math.max(i[0],i[1])-a+r,l=Math.max(n[0],n[1])-o+r;return new Nt(a,o,s,l)},e}(vv),fH=function(t){F(e,t);function e(r,i,n,a,o){var s=t.call(this,r,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),r&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(r,i){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(Kr);function Kf(t,e,r){r=r||{};var i=t.coordinateSystem,n=e.axis,a={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,f=i.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=e.get("offset")||0,d=u==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(p,d[1]),d[0])}a.position=[u==="y"?d[c[l]]:h[0],u==="x"?d[c[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?d[c[s]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),_r(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function iy(t){return t.get("coordinateSystem")==="cartesian2d"}function ny(t){var e={xAxisModel:null,yAxisModel:null};return E(e,function(r,i){var n=i.replace(/Model$/,""),a=t.getReferringComponents(n,je).models[0];e[i]=a}),e}var lu=Math.log;function UD(t,e,r){var i=hn.prototype,n=i.getTicks.call(r),a=i.getTicks.call(r,!0),o=n.length-1,s=i.getInterval.call(r),l=WC(t,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(t.type==="log"){var c=lu(t.base);u=[lu(u[0])/c,lu(u[1])/c]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=i.getExtent.call(t);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var d=i.getInterval.call(t),p=u[0],g=u[1];if(f&&h)d=(g-p)/o;else if(f)for(g=u[0]+d*o;gu[0]&&isFinite(p)&&isFinite(u[0]);)d=Yl(d),p=u[1]-d*o;else{var m=t.getTicks().length-1;m>o&&(d=Yl(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=Ae(g-y),p<0&&u[0]>=0?(p=0,g=Ae(y)):g>0&&u[1]<=0&&(g=0,p=-Ae(y))}var _=(n[0].value-a[0].value)/s,x=(n[o].value-a[o].value)/s;i.setExtent.call(t,p+d*_,g+d*x),i.setInterval.call(t,d),(_||x)&&i.setNiceExtent.call(t,p+d,g-d)}var hH=function(){function t(e,r,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=qf,this._initCartesian(e,r,i),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var i=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=Ut(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var c=+l[h],v=o[c],d=v.model,p=v.scale;Hf(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(N2(p,d),Hf(p)&&(s=v))}f.length&&(s||(s=f.pop(),N2(s.scale,s.model)),E(f,function(g){UD(g.scale,g.model,s.scale)}))}}n(i.x),n(i.y);var a={};E(i.x,function(o){ay(i,"y",o,a)}),E(i.y,function(o){ay(i,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,i){var n=e.getBoxLayoutParams(),a=!i&&e.get("containLabel"),o=Re(n,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(E(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=Xz(u);if(f){var h=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,u.position==="top"?o.y+=f.height+c:u.position==="left"&&(o.x+=f.width+c)}}}),l()),E(this._coordsList,function(u){u.calcAffineTransform()});function l(){E(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(h[c],h[1-c]),cH(u,f?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var i=this._axesMap[e];if(i!=null)return i[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var i="x"+e+"y"+r;return this._coordsMap[i]}Tt(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,a=this._coordsList;n0?"top":"bottom",a="center"):T7(n-Xn)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),sy={axisLine:function(t,e,r,i){var n=e.get(["axisLine","show"]);if(n==="auto"&&t.handleAutoShown&&(n=t.handleAutoShown("axisLine")),!!n){var a=e.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(ur(s,s,o),ur(l,l,o));var f=H({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new ar({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});a4(h.shape,h.style.lineWidth),h.anid="line",r.add(h);var c=e.get(["axisLine","symbol"]);if(c!=null){var v=e.get(["axisLine","symbolSize"]);ht(c)&&(c=[c,c]),(ht(v)||te(v))&&(v=[v,v]);var d=Y2(e.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];E([{rotate:t.rotation+Math.PI/2,offset:d[0],r:0},{rotate:t.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(c[y]!=="none"&&c[y]!=null){var _=Ue(c[y],-p/2,-g/2,p,g,f.stroke,!0),x=m.r+m.offset,w=u?l:s;_.attr({rotation:m.rotate,x:w[0]+x*Math.cos(t.rotation),y:w[1]-x*Math.sin(t.rotation),silent:!0,z2:11}),r.add(_)}})}}},axisTickLabel:function(t,e,r,i){var n=pH(r,i,e,t),a=mH(r,i,e,t);if(dH(e,a,n),gH(r,i,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=nD(j(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));sD(o)}},axisName:function(t,e,r,i){var n=_r(t.axisName,e.get("name"));if(n){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,uy(a)?t.labelOffset+o*l:0],c,v=e.get("nameRotate");v!=null&&(v=v*Xn/180);var d;uy(a)?c=Hr.innerTextLayout(t.rotation,v!=null?v:t.rotation,o):(c=vH(t.rotation,a,v||0,u),d=t.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,y=_r(t.nameTruncateMaxWidth,g.maxWidth,d),_=new Ht({x:h[0],y:h[1],rotation:c.rotation,silent:Hr.isLabelSilent(e),style:fe(s,{text:n,font:p,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(I4({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var x=Hr.makeAxisEventDataBase(e);x.targetType="axisName",x.name=n,Et(_).eventData=x}i.add(_),_.updateTransform(),r.add(_),_.decomposeTransform()}}};function vH(t,e,r,i){var n=rT(r-t),a,o,s=i[0]>i[1],l=e==="start"&&!s||e!=="start"&&s;return T7(n-Xn/2)?(o=l?"bottom":"top",a="center"):T7(n-Xn*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",nXn/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function dH(t,e,r){if(!XC(t.axis)){var i=t.get(["axisLabel","showMinLabel"]),n=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=r[0],f=r[1],h=r[r.length-1],c=r[r.length-2];i===!1?(g1(a),g1(u)):ly(a,o)&&(i?(g1(o),g1(f)):(g1(a),g1(u))),n===!1?(g1(s),g1(h)):ly(l,s)&&(n?(g1(l),g1(c)):(g1(s),g1(h)))}}function g1(t){t&&(t.ignore=!0)}function ly(t,e){var r=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!r||!i)){var n=z0([]);return U2(n,n,-t.rotation),r.applyTransform($i([],n,t.getLocalTransform())),i.applyTransform($i([],n,e.getLocalTransform())),r.intersect(i)}}function uy(t){return t==="middle"||t==="center"}function WD(t,e,r,i,n){for(var a=[],o=[],s=[],l=0;l=0||t===e}function bH(t){var e=dv(t);if(e){var r=e.axisPointerModel,i=e.axis.scale,n=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=i.parse(o));var s=$f(r);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=xt({color:d.color},l));var g=mt(At(d),{boundaryGap:r,splitNumber:i,scale:n,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:p,triggerEvent:c},!1);if(ht(f)){var m=g.name;g.name=f.replace("{value}",m!=null?m:"")}else wt(f)&&(g.name=f(g.name,g));var y=new Jt(g,null,this.ecModel);return Xe(y,W4.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:mt({lineStyle:{color:"#bbb"}},_6.axisLine),axisLabel:ps(_6.axisLabel,!1),axisTick:ps(_6.axisTick,!1),splitLine:ps(_6.splitLine,!0),splitArea:ps(_6.splitArea,!0),indicator:[]},e}(Bt),BH=["axisLine","axisTickLabel","axisName"],kH=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){var a=this.group;a.removeAll(),this._buildAxes(r),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r){var i=r.coordinateSystem,n=i.getIndicatorAxes(),a=j(n,function(o){var s=o.model.get("showName")?o.name:"",l=new Hr(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});E(a,function(o){E(BH,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(r){var i=r.coordinateSystem,n=i.getIndicatorAxes();if(!n.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),c=l.get("color"),v=u.get("color"),d=X(c)?c:[c],p=X(v)?v:[v],g=[],m=[];function y(P,R,B){var O=B%R.length;return P[O]=P[O]||[],O}if(a==="circle")for(var _=n[0].getTicksCoords(),x=i.cx,w=i.cy,S=0;S<_.length;S++){if(f){var b=y(g,d,S);g[b].push(new gn({shape:{cx:x,cy:w,r:_[S].coord}}))}if(h&&S<_.length-1){var b=y(m,p,S);m[b].push(new l3({shape:{cx:x,cy:w,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,A=j(n,function(P,R){var B=P.getTicksCoords();return T=T==null?B.length-1:Math.min(B.length-1,T),j(B,function(O){return i.coordToPoint(O.coord,R)})}),D=[],S=0;S<=T;S++){for(var C=[],M=0;M3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;hu(this,"zoom","zoomOnMouseWheel",r,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(a),c=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);hu(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(r){if(!py(this._zr,"globalPan")){var i=r.pinchScale>1?1.1:1/1.1;hu(this,"zoom",null,r,{scale:i,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e}(z1);function hu(t,e,r,i,n){t.pointerChecker&&t.pointerChecker(i,n.originX,n.originY)&&(an(i.event),qD(t,e,r,i,n))}function qD(t,e,r,i,n){n.isAvailableBehavior=ct(h9,null,r,i),t.trigger(e,n)}function h9(t,e,r){var i=r[t];return!t||i&&(!ht(i)||e.event[i+"Key"])}function gv(t,e,r){var i=t.target;i.x+=e,i.y+=r,i.dirty()}function mv(t,e,r,i){var n=t.target,a=t.zoomLimit,o=t.zoom=t.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/t.zoom;t.zoom=o,n.x-=(r-n.x)*(u-1),n.y-=(i-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var WH={axisPointer:1,tooltip:1,brush:1};function y5(t,e,r){var i=e.getComponentByElement(t.topTarget),n=i&&i.coordinateSystem;return i&&i!==r&&!WH.hasOwnProperty(i.mainType)&&n&&n.model!==r}function KD(t){if(ht(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}var r=t;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var cu,t0={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},gy=Ut(t0),e0={"alignment-baseline":"textBaseline","stop-color":"stopColor"},my=Ut(e0),XH=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(e,r){r=r||{};var i=KD(e);this._defsUsePending=[];var n=new Dt;this._root=n;var a=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||r.width),l=parseFloat(i.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),u1(i,n,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,n,a,null,!1,!1),u=u.nextSibling;QH(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var c=_5(o);c.length>=4&&(f={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(f&&s!=null&&l!=null&&(h=JD(f,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var v=n;n=new Dt,n.add(v),v.scaleX=v.scaleY=h.scale,v.x=h.x,v.y=h.y}return!r.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new Xt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:a}},t.prototype._parseNode=function(e,r,i,n,a,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var f=cu[s];if(f&>(cu,s)){l=f.call(this,e,r);var h=e.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:l};i.push(c),s==="g"&&(u=c)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});r.add(l)}}var v=yy[s];if(v&>(yy,s)){var d=v.call(this,e),p=e.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,i,u,a,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},t.prototype._parseText=function(e,r){var i=new n4({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});m1(r,i),u1(e,i,this._defsUsePending,!1,!1),YH(i,r);var n=i.style,a=n.fontSize;a&&a<9&&(n.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=i.getBoundingRect();return this._textX+=s.width,r.add(i),i},t.internalField=function(){cu={g:function(e,r){var i=new Dt;return m1(r,i),u1(e,i,this._defsUsePending,!1,!1),i},rect:function(e,r){var i=new Xt;return m1(r,i),u1(e,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(e,r){var i=new gn;return m1(r,i),u1(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),i.silent=!0,i},line:function(e,r){var i=new ar;return m1(r,i),u1(e,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(e,r){var i=new q0;return m1(r,i),u1(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(e,r){var i=e.getAttribute("points"),n;i&&(n=Sy(i));var a=new Zr({shape:{points:n||[]},silent:!0});return m1(r,a),u1(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var i=e.getAttribute("points"),n;i&&(n=Sy(i));var a=new qr({shape:{points:n||[]},silent:!0});return m1(r,a),u1(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var i=new pr;return m1(r,i),u1(e,i,this._defsUsePending,!1,!1),i.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),i.silent=!0,i},text:function(e,r){var i=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var s=new Dt;return m1(r,s),u1(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var i=e.getAttribute("x"),n=e.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),n!=null&&(this._textY=parseFloat(n));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Dt;return m1(r,s),u1(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var i=e.getAttribute("d")||"",n=kT(i);return m1(r,n),u1(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),t}(),yy={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),n=parseInt(t.getAttribute("y2")||"0",10),a=new ei(e,r,i,n);return _y(t,a),xy(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),n=new VT(e,r,i);return _y(t,n),xy(t,n),n}};function _y(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function xy(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var i=r.getAttribute("offset"),n=void 0;i&&i.indexOf("%")>0?n=parseInt(i,10)/100:i?n=parseFloat(i):n=0;var a={};$D(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}r=r.nextSibling}}function m1(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),xt(e.__inheritedStyle,t.__inheritedStyle))}function Sy(t){for(var e=_5(t),r=[],i=0;i0;a-=2){var o=i[a],s=i[a-1],l=_5(o);switch(n=n||a1(),s){case"translate":Ii(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":oc(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":U2(n,n,-parseFloat(l[0])*vu,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*vu);$i(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*vu);$i(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var by=/([^\s:;]+)\s*:\s*([^:;]+)/g;function $D(t,e,r){var i=t.getAttribute("style");if(i){by.lastIndex=0;for(var n;(n=by.exec(i))!=null;){var a=n[1],o=gt(t0,a)?t0[a]:null;o&&(e[o]=n[2]);var s=gt(e0,a)?e0[a]:null;s&&(r[s]=n[2])}}}function $H(t,e,r){for(var i=0;i0,g={api:i,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:c};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,r,i),this._updateMapSelectHandler(e,u,i,n)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=yt(),i=yt(),n=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(v,d){return d&&(v=d(v)),v&&[v[0]*a.scaleX+a.x,v[1]*a.scaleY+a.y]}function h(v){for(var d=[],p=!u&&l&&l.project,g=0;g=0)&&(c=n);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Ar(e,cr(i),{labelFetcher:c,labelDataIndex:h,defaultText:r},v);var d=e.getTextContent();if(d&&(eE(d).ignore=d.ignore,e.textConfig&&o)){var p=e.getBoundingRect().clone();e.textConfig.layoutRect=p,e.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Ey(t,e,r,i,n,a){t.data?t.data.setItemGraphicEl(a,e):Et(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:r,region:i&&i.option||{}}}function My(t,e,r,i,n){t.data||I4({el:e,componentModel:n,itemName:r,itemTooltipOption:i.get("tooltip")})}function Ly(t,e,r,i,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var a=i.getModel("emphasis"),o=a.get("focus");return ke(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&pO(e,n,r),o}function Iy(t,e,r){var i=[],n;function a(){n=[]}function o(){n.length&&(i.push(n),n=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),E(t,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Kt);function mU(t,e){var r={};return E(t,function(i){i.each(i.mapDimension("value"),function(n,a){var o="ec-"+i.getName(a);r[o]=r[o]||[],isNaN(n)||r[o].push(n)})}),t[0].map(t[0].mapDimension("value"),function(i,n){for(var a="ec-"+t[0].getName(n),o=0,s=1/0,l=-1/0,u=r[a].length,f=0;f1?(x.width=_,x.height=_/g):(x.height=_,x.width=_*g),x.y=y[1]-x.height/2,x.x=y[0]-x.width/2;else{var w=t.getBoxLayoutParams();w.aspect=g,x=Re(w,{width:d,height:p})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}function SU(t,e){E(e.get("geoCoord"),function(r,i){t.addGeoCoord(i,r)})}var wU=function(){function t(){this.dimensions=iE}return t.prototype.create=function(e,r){var i=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Oy(l+s,l,H({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=By,u.resize(o,r)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),E(a,function(o,s){var l=j(o,function(f){return f.get("nameMap")}),u=new Oy(s,s,H({nameMap:tc(l)},n(o[0])));u.zoomLimit=_r.apply(null,j(o,function(f){return f.get("scaleLimit")})),i.push(u),u.resize=By,u.resize(o[0],r),E(o,function(f){f.coordinateSystem=u,SU(u,f)})}),i},t.prototype.getFilledRegions=function(e,r,i,n){for(var a=(e||[]).slice(),o=yt(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function EU(t,e){var r=t.isExpand?t.children:[],i=t.parentNode.children,n=t.hierNode.i?i[t.hierNode.i-1]:null;if(r.length){IU(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;n?(t.hierNode.prelim=n.hierNode.prelim+e(t,n),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else n&&(t.hierNode.prelim=n.hierNode.prelim+e(t,n));t.parentNode.hierNode.defaultAncestor=PU(t,n,t.parentNode.hierNode.defaultAncestor||i[0],e)}function MU(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Fy(t){return arguments.length?t:OU}function Z6(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function LU(t,e){return Re(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function IU(t){for(var e=t.children,r=e.length,i=0,n=0;--r>=0;){var a=e[r];a.hierNode.prelim+=i,a.hierNode.modifier+=i,n+=a.hierNode.change,i+=a.hierNode.shift+n}}function PU(t,e,r,i){if(e){for(var n=t,a=t,o=a.parentNode.children[0],s=e,l=n.hierNode.modifier,u=a.hierNode.modifier,f=o.hierNode.modifier,h=s.hierNode.modifier;s=du(s),a=pu(a),s&&a;){n=du(n),o=pu(o),n.hierNode.ancestor=t;var c=s.hierNode.prelim+h-a.hierNode.prelim-u+i(s,a);c>0&&(NU(RU(s,t,r),t,c),u+=c,l+=c),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!du(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=h-l),a&&!pu(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-f,r=t)}return r}function du(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function pu(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function RU(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function NU(t,e,r){var i=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=i}function OU(t,e){return t.parentNode===e.parentNode?1:2}var BU=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),kU=function(t){F(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new BU},e.prototype.buildPath=function(r,i){var n=i.childPoints,a=n.length,o=i.parentPoint,s=n[0],l=n[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=i.orient,f=u==="TB"||u==="BT"?0:1,h=1-f,c=ot(i.forkPosition,1),v=[];v[f]=o[f],v[h]=o[h]+(l[h]-o[h])*c,r.moveTo(o[0],o[1]),r.lineTo(v[0],v[1]),r.moveTo(s[0],s[1]),v[f]=s[f],r.lineTo(v[0],v[1]),v[f]=l[f],r.lineTo(v[0],v[1]),r.lineTo(l[0],l[1]);for(var d=1;dy.x,w||(x=x-Math.PI));var b=w?"left":"right",T=s.getModel("label"),A=T.get("rotate"),D=A*(Math.PI/180),C=g.getTextContent();C&&(g.setTextConfig({position:T.get("position")||b,rotation:A==null?-x:D,origin:"center"}),C.setStyle("verticalAlign","middle"))}var M=s.get(["emphasis","focus"]),L=M==="relative"?r4(o.getAncestorsIndices(),o.getDescendantIndices()):M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():null;L&&(Et(r).focus=L),zU(n,o,f,r,d,v,p,i),r.__edge&&(r.onHoverStateChange=function(I){if(I!=="blur"){var P=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);P&&P.hoverState===s3||P9(r.__edge,I)}})}function zU(t,e,r,i,n,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),f=t.get("layout"),h=t.getOrient(),c=t.get(["lineStyle","curveness"]),v=t.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=i.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(p||(p=i.__edge=new u3({shape:eh(f,h,c,n,n)})),re(p,{shape:eh(f,h,c,a,o)},t));else if(u==="polyline"&&f==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,m=[],y=0;yr&&(r=n.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,i=this.children,n=i.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,i=r.data.getItemModel(this.dataIndex);return i.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var i=r.getData().tree.root,n=t.targetNode;if(ht(n)&&(n=i.getNodeById(n)),n&&i.contains(n))return{node:n};var a=t.targetNodeId;if(a!=null&&(n=i.getNodeById(a)))return{node:n}}}function uE(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function bv(t,e){var r=uE(t);return kt(r,e)>=0}function x5(t,e){for(var r=[];t;){var i=t.dataIndex;r.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return r.reverse(),r}var QU=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var i={name:r.name,children:r.data},n=r.leaves||{},a=new Jt(n,this,this.ecModel),o=wv.createTree(i,this,s);function s(h){h.wrapMethod("getItemModel",function(c,v){var d=o.getNodeByDataIndex(v);return d&&d.children.length&&d.isExpand||(c.parentModel=a),c})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=r.expandAndCollapse,f=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var c=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=c&&c.collapsed!=null?!c.collapsed:h.depth<=f}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,i,n){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return vr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(r);return i.treeAncestors=x5(n,this),i.collapsed=!n.isExpand,i},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Kt);function jU(t,e,r){for(var i=[t],n=[],a;a=i.pop();)if(n.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(n[a])}}function qU(t,e){t.eachSeriesByType("tree",function(r){KU(r,e)})}function KU(t,e){var r=LU(t,e);t.layoutInfo=r;var i=t.get("layout"),n=0,a=0,o=null;i==="radial"?(n=2*Math.PI,a=Math.min(r.height,r.width)/2,o=Fy(function(_,x){return(_.parentNode===x.parentNode?1:2)/_.depth})):(n=r.width,a=r.height,o=Fy());var s=t.getData().tree.root,l=s.children[0];if(l){DU(s),jU(l,EU,o),s.hierNode.modifier=-l.hierNode.prelim,S6(l,MU);var u=l,f=l,h=l;S6(l,function(_){var x=_.getLayout().x;xf.getLayout().x&&(f=_),_.depth>h.depth&&(h=_)});var c=u===f?1:o(u,f)/2,v=c-u.getLayout().x,d=0,p=0,g=0,m=0;if(i==="radial")d=n/(f.getLayout().x+c+v),p=a/(h.depth-1||1),S6(l,function(_){g=(_.getLayout().x+v)*d,m=(_.depth-1)*p;var x=Z6(g,m);_.setLayout({x:x.x,y:x.y,rawX:g,rawY:m},!0)});else{var y=t.getOrient();y==="RL"||y==="LR"?(p=a/(f.getLayout().x+c+v),d=n/(h.depth-1||1),S6(l,function(_){m=(_.getLayout().x+v)*p,g=y==="LR"?(_.depth-1)*d:n-(_.depth-1)*d,_.setLayout({x:g,y:m},!0)})):(y==="TB"||y==="BT")&&(d=n/(f.getLayout().x+c+v),p=a/(h.depth-1||1),S6(l,function(_){g=(_.getLayout().x+v)*d,m=y==="TB"?(_.depth-1)*p:a-(_.depth-1)*p,_.setLayout({x:g,y:m},!0)}))}}}function $U(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),i=r.tree;i.eachNode(function(n){var a=n.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(n.dataIndex,"style");H(s,o)})})}function JU(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=e.dataIndex,a=i.getData().tree,o=a.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,i){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=n.coordinateSystem,o=_v(a,e,void 0,i);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function tW(t){t.registerChartView(FU),t.registerSeriesModel(QU),t.registerLayout(qU),t.registerVisual($U),JU(t)}var Uy=["treemapZoomToNode","treemapRender","treemapMove"];function eW(t){for(var e=0;e1;)a=a.parentNode;var o=Mf(t.ecModel,a.name||a.dataIndex+"",i);n.setVisual("decal",o)})}var rW=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,i){var n={name:r.name,children:r.data};hE(n);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new Jt({itemStyle:o},this,i);a=r.levels=iW(a,i);var l=j(a||[],function(h){return new Jt(h,s,i)},this),u=wv.createTree(n,this,f);function f(h){h.wrapMethod("getItemModel",function(c,v){var d=u.getNodeByDataIndex(v),p=d?l[d.depth]:null;return c.parentModel=p||s,c})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,i,n){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return vr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(r);return i.treeAncestors=x5(n,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},H(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var i=this._idIndexMap;i||(i=this._idIndexMap=yt(),this._idIndexMapCount=0);var n=i.get(r);return n==null&&i.set(r,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var i=this.getRawData().tree.root;(!r||r!==i&&!i.contains(r))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){fE(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Kt);function hE(t){var e=0;E(t.children,function(i){hE(i);var n=i.value;X(n)&&(n=n[0]),e+=n});var r=t.value;X(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),X(t.value)?t.value[0]=r:t.value=r}function iW(t,e){var r=de(e.get("color")),i=de(e.get(["aria","decal","decals"]));if(r){t=t||[];var n,a;E(t,function(s){var l=new Jt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return n||(o.color=r.slice()),!a&&i&&(o.decal=i.slice()),t}}var nW=8,Wy=8,gu=5,aW=function(){function t(e){this.group=new Dt,e.add(this.group)}return t.prototype.render=function(e,r,i,n){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!i)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),h={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:r.getWidth(),height:r.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,h,u),this._renderContent(e,h,s,l,u,f,n),o5(o,h.pos,h.box)}},t.prototype._prepare=function(e,r,i){for(var n=e;n;n=n.parentNode){var a=tr(n.getModel().get("name"),""),o=i.getTextRect(a),s=Math.max(o.width+nW*2,r.emptyItemWidth);r.totalWidth+=s+Wy,r.renderList.push({node:n,text:a,width:s})}},t.prototype._renderContent=function(e,r,i,n,a,o,s){for(var l=0,u=r.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=wB(r.pos,r.box),c=r.totalWidth,v=r.renderList,d=n.getModel("itemStyle").getItemStyle(),p=v.length-1;p>=0;p--){var g=v[p],m=g.node,y=g.width,_=g.text;c>h.width&&(c-=y-u,y=u,_=null);var x=new Zr({shape:{points:oW(l,0,y,f,p===v.length-1,p===0)},style:xt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ht({style:fe(a,{text:_})}),textConfig:{position:"inside"},z2:M4*1e4,onclick:Lt(s,m)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=fe(o,{text:_}),x.ensureState("emphasis").style=d,ke(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),sW(x,e,m),l+=y+Wy}},t.prototype.remove=function(){this.group.removeAll()},t}();function oW(t,e,r,i,n,a){var o=[[n?t:t-gu,e],[t+r,e],[t+r,e+i],[n?t:t-gu,e+i]];return!a&&o.splice(2,0,[t+r+gu,e+i/2]),!n&&o.push([t,e+i/2]),o}function sW(t,e,r){Et(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&x5(r,e)}}var lW=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,i,n,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:i,delay:n,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,i=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,a=this._storage.length;nYy||Math.abs(r.dy)>Yy)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+r.dx,y:n.y+r.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(r){var i=r.originX,n=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Nt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var h=f.zoom=f.zoom||1;if(h*=a,u){var c=u.min||0,v=u.max||1/0;h=Math.max(Math.min(v,h),c)}var d=h/f.zoom;f.zoom=h;var p=this.seriesModel.layoutInfo;i-=p.x,n-=p.y;var g=a1();Ii(g,g,[-i,-n]),oc(g,g,[d,d]),Ii(g,g,[i,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(r){var i=this;r.on("click",function(n){if(i._state==="ready"){var a=i.seriesModel.get("nodeClick",!0);if(a){var o=i.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)i._rootToNode(o);else if(a==="zoomToNode")i._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&z9(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(r,i,n){var a=this;n||(n=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),n||(n={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new aW(this.group))).render(r,i,n.node,function(o){a._state!=="animating"&&(bv(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=w6(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,i){var n,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,i),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(Yt);function w6(){return{nodeGroup:[],background:[],content:[]}}function dW(t,e,r,i,n,a,o,s,l,u){if(!o)return;var f=o.getLayout(),h=t.getData(),c=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var v=f.width,d=f.height,p=f.borderWidth,g=f.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),_=o.viewChildren,x=f.upperHeight,w=_&&_.length,S=c.getModel("itemStyle"),b=c.getModel(["emphasis","itemStyle"]),T=c.getModel(["blur","itemStyle"]),A=c.getModel(["select","itemStyle"]),D=S.get("borderRadius")||0,C=W("nodeGroup",rh);if(!C)return;if(l.add(C),C.x=f.x||0,C.y=f.y||0,C.markRedraw(),r0(C).nodeWidth=v,r0(C).nodeHeight=d,f.isAboveViewRoot)return C;var M=W("background",Xy,u,hW);M&&z(C,M,w&&f.upperLabelHeight);var L=c.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled"),B=I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():I;if(w)D7(C)&&u2(C,!1),M&&(u2(M,!R),h.setItemGraphicEl(o.dataIndex,M),Sf(M,B,P));else{var O=W("content",Xy,u,cW);O&&G(C,O),M.disableMorphing=!0,M&&D7(M)&&u2(M,!1),u2(C,!R),h.setItemGraphicEl(o.dataIndex,C),Sf(C,B,P)}return C;function z(Y,q,et){var nt=Et(q);if(nt.dataIndex=o.dataIndex,nt.seriesIndex=t.seriesIndex,q.setShape({x:0,y:0,width:v,height:d,r:D}),g)U(q);else{q.invisible=!1;var J=o.getVisual("style"),ut=J.stroke,_t=jy(S);_t.fill=ut;var St=Ja(b);St.fill=b.get("borderColor");var bt=Ja(T);bt.fill=T.get("borderColor");var Pt=Ja(A);if(Pt.fill=A.get("borderColor"),et){var ae=v-2*p;Z(q,ut,J.opacity,{x:p,y:0,width:ae,height:x})}else q.removeTextContent();q.setStyle(_t),q.ensureState("emphasis").style=St,q.ensureState("blur").style=bt,q.ensureState("select").style=Pt,P2(q)}Y.add(q)}function G(Y,q){var et=Et(q);et.dataIndex=o.dataIndex,et.seriesIndex=t.seriesIndex;var nt=Math.max(v-2*p,0),J=Math.max(d-2*p,0);if(q.culling=!0,q.setShape({x:p,y:p,width:nt,height:J,r:D}),g)U(q);else{q.invisible=!1;var ut=o.getVisual("style"),_t=ut.fill,St=jy(S);St.fill=_t,St.decal=ut.decal;var bt=Ja(b),Pt=Ja(T),ae=Ja(A);Z(q,_t,ut.opacity,null),q.setStyle(St),q.ensureState("emphasis").style=bt,q.ensureState("blur").style=Pt,q.ensureState("select").style=ae,P2(q)}Y.add(q)}function U(Y){!Y.invisible&&a.push(Y)}function Z(Y,q,et,nt){var J=c.getModel(nt?Qy:Zy),ut=tr(c.get("name"),null),_t=J.getShallow("show");Ar(Y,cr(c,nt?Qy:Zy),{defaultText:_t?ut:null,inheritColor:q,defaultOpacity:et,labelFetcher:t,labelDataIndex:o.dataIndex});var St=Y.getTextContent();if(St){var bt=St.style,Pt=ic(bt.padding||0);nt&&(Y.setTextConfig({layoutRect:nt}),St.disableLabelLayout=!0),St.beforeUpdate=function(){var Ie=Math.max((nt?nt.width:Y.shape.width)-Pt[1]-Pt[3],0),Se=Math.max((nt?nt.height:Y.shape.height)-Pt[0]-Pt[2],0);(bt.width!==Ie||bt.height!==Se)&&St.setStyle({width:Ie,height:Se})},bt.truncateMinChar=2,bt.lineOverflow="truncate",$(bt,nt,f);var ae=St.getState("emphasis");$(ae?ae.style:null,nt,f)}}function $(Y,q,et){var nt=Y?Y.text:null;if(!q&&et.isLeafRoot&&nt!=null){var J=t.get("drillDownIcon",!0);Y.text=J?J+" "+nt:nt}}function W(Y,q,et,nt){var J=y!=null&&r[Y][y],ut=n[Y];return J?(r[Y][y]=null,V(ut,J)):g||(J=new q,J instanceof k1&&(J.z2=pW(et,nt)),K(ut,J)),e[Y][m]=J}function V(Y,q){var et=Y[m]={};q instanceof rh?(et.oldX=q.x,et.oldY=q.y):et.oldShape=H({},q.shape)}function K(Y,q){var et=Y[m]={},nt=o.parentNode,J=q instanceof Dt;if(nt&&(!i||i.direction==="drillDown")){var ut=0,_t=0,St=n.background[nt.getRawIndex()];!i&&St&&St.oldShape&&(ut=St.oldShape.width,_t=St.oldShape.height),J?(et.oldX=0,et.oldY=_t):et.oldShape={x:ut,y:_t,width:0,height:0}}et.fadein=!J}}function pW(t,e){return t*fW+e}var V7=E,gW=Tt,i0=-1,fr=function(){function t(e){var r=e.mappingMethod,i=e.type,n=this.option=At(e);this.type=i,this.mappingMethod=r,this._normalizeData=_W[r];var a=t.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(mu(n),mW(n)):r==="category"?n.categories?yW(n):mu(n,!0):(Wr(r!=="linear"||n.dataExtent),mu(n))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return ct(this._normalizeData,this)},t.listVisualTypes=function(){return Ut(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,i){Tt(e)?E(e,r,i):r.call(i,e)},t.mapVisual=function(e,r,i){var n,a=X(e)?[]:Tt(e)?{}:(n=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(i,o,s);n?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},i;return e&&V7(t.visualHandlers,function(n,a){e.hasOwnProperty(a)&&(r[a]=e[a],i=!0)}),i?r:null},t.prepareVisualTypes=function(e){if(X(e))e=e.slice();else if(gW(e)){var r=[];V7(e,function(i,n){r.push(n)}),e=r}else return[];return e.sort(function(i,n){return n==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,i){for(var n,a=1/0,o=0,s=r.length;o=0;a--)i[a]==null&&(delete r[e[a]],e.pop())}function mu(t,e){var r=t.visual,i=[];Tt(r)?V7(r,function(a){i.push(a)}):r!=null&&i.push(r);var n={color:1,symbol:1};!e&&i.length===1&&!n.hasOwnProperty(t.type)&&(i[1]=i[0]),cE(t,i)}function ms(t){return{applyVisual:function(e,r,i){var n=this.mapValueToVisual(e);i("color",t(r("color"),n))},_normalizedToVisual:ih([0,1])}}function qy(t){var e=this.option.visual;return e[Math.round(oe(t,[0,1],[0,e.length-1],!0))]||{}}function b6(t){return function(e,r,i){i(t,this.mapValueToVisual(e))}}function Q6(t){var e=this.option.visual;return e[this.option.loop&&t!==i0?t%e.length:t]}function t2(){return this.option.visual[0]}function ih(t){return{linear:function(e){return oe(e,t,this.option.visual,!0)},category:Q6,piecewise:function(e,r){var i=nh.call(this,r);return i==null&&(i=oe(e,t,this.option.visual,!0)),i},fixed:t2}}function nh(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var i=fr.findPieceIndex(t,r),n=r[i];if(n&&n.visual)return n.visual[this.type]}}function cE(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=j(e,function(r){var i=Vr(r);return i||[0,0,0,1]})),e}var _W={linear:function(t){return oe(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=fr.findPieceIndex(t,e,!0);if(r!=null)return oe(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e==null?i0:e},fixed:He};function ys(t,e,r){return t?e<=r:e=r.length||p===r[p.depth]){var m=AW(n,l,p,g,d,i);dE(p,m,r,i)}})}}}function wW(t,e,r){var i=H({},e),n=r.designatedVisualItemStyle;return E(["color","colorAlpha","colorSaturation"],function(a){n[a]=e[a];var o=t.get(a);n[a]=null,o!=null&&(i[a]=o)}),i}function Ky(t){var e=yu(t,"color");if(e){var r=yu(t,"colorAlpha"),i=yu(t,"colorSaturation");return i&&(e=i7(e,null,null,i)),r&&(e=C9(e,r)),e}}function bW(t,e){return e!=null?i7(e,null,null,t):null}function yu(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function TW(t,e,r,i,n,a){if(!(!a||!a.length)){var o=_u(e,"color")||n.color!=null&&n.color!=="none"&&(_u(e,"colorAlpha")||_u(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var c=new fr(h);return vE(c).drColorMappingBy=f,c}}}function _u(t,e){var r=t.get(e);return X(r)&&r.length?{name:e,range:r}:null}function AW(t,e,r,i,n,a){var o=H({},e);if(n){var s=n.type,l=s==="color"&&vE(n).drColorMappingBy,u=l==="index"?i:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var H7=Math.max,n0=Math.min,$y=_r,Tv=E,pE=["itemStyle","borderWidth"],CW=["itemStyle","gapWidth"],DW=["upperLabel","show"],EW=["upperLabel","height"];const MW={seriesType:"treemap",reset:function(t,e,r,i){var n=r.getWidth(),a=r.getHeight(),o=t.option,s=Re(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=ot($y(s.width,l[0]),n),f=ot($y(s.height,l[1]),a),h=i&&i.type,c=["treemapZoomToNode","treemapRootToNode"],v=G7(i,c,t),d=h==="treemapRender"||h==="treemapMove"?i.rootRect:null,p=t.getViewRoot(),g=uE(p);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?OW(t,v,p,u,f):d?[d.width,d.height]:[u,f],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(x),gE(p,_,!1,0),x=p.getLayout(),Tv(g,function(S,b){var T=(g[b+1]||p).getValue();S.setLayout(H({dataExtent:[T,T],borderWidth:0,upperHeight:0},x))})}var w=t.getData().tree.root;w.setLayout(BW(s,d,v),!0),t.setLayoutInfo(s),mE(w,new Nt(-s.x,-s.y,n,a),g,p,0)}};function gE(t,e,r,i){var n,a;if(!t.isRemoved()){var o=t.getLayout();n=o.width,a=o.height;var s=t.getModel(),l=s.get(pE),u=s.get(CW)/2,f=yE(s),h=Math.max(l,f),c=l-u,v=h-u;t.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),n=H7(n-2*c,0),a=H7(a-c-v,0);var d=n*a,p=LW(t,s,d,e,r,i);if(p.length){var g={x:c,y:v,width:n,height:a},m=n0(n,a),y=1/0,_=[];_.area=0;for(var x=0,w=p.length;x=0;l--){var u=n[i==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:i,dataExtent:s}}function NW(t,e,r){for(var i=0,n=1/0,a=0,o=void 0,s=t.length;ai&&(i=o));var l=t.area*t.area,u=e*e*r;return l?H7(u*i/l,l/(u*n)):1/0}function Jy(t,e,r,i,n){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],f=e?t.area/e:0;(n||f>r[l[o]])&&(f=r[l[o]]);for(var h=0,c=t.length;hhp&&(u=hp),a=s}ui&&(i=e);var a=i%2?i+2:i+3;n=[];for(var o=0;o0&&(w[0]=-w[0],w[1]=-w[1]);var b=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var T=-Math.atan2(x[1],x[0]);h[0].8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":a.x=-c[0]*m+f[0],a.y=-c[1]*y+f[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*b+f[0],a.y=f[1]+A,d=x[0]<0?"right":"left",a.originX=-m*b,a.originY=-A;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+A,d="center",a.originY=-A;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*b+h[0],a.y=h[1]+A,d=x[0]>=0?"right":"left",a.originX=m*b,a.originY=-A;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||p,align:a.__align||d})}},e}(Dt),Mv=function(){function t(e){this.group=new Dt,this._LineCtor=e||Ev}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=e,a||n.removeAll();var o=a_(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,i){r.updateLayout(e,i)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=a_(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function i(s){!s.isGroup&&!tX(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function a_(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:cr(e)}}function o_(t){return isNaN(t[0])||isNaN(t[1])}function Tu(t){return t&&!o_(t[0])&&!o_(t[1])}var Au=[],Cu=[],Du=[],go=mr,Eu=y2,s_=Math.abs;function l_(t,e,r){for(var i=t[0],n=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,f=.1;f<=.9;f+=.1){Au[0]=go(i[0],n[0],a[0],f),Au[1]=go(i[1],n[1],a[1],f);var h=s_(Eu(Au,e)-l);h=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Mu(t,e){var r=[],i=S7,n=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[Ki(u[0]),Ki(u[1])],u[2]&&u.__original.push(Ki(u[2])));var c=u.__original;if(u[2]!=null){if(Or(n[0],c[0]),Or(n[1],c[2]),Or(n[2],c[1]),f&&f!=="none"){var v=q6(s.node1),d=l_(n,c[0],v*e);i(n[0][0],n[1][0],n[2][0],d,r),n[0][0]=r[3],n[1][0]=r[4],i(n[0][1],n[1][1],n[2][1],d,r),n[0][1]=r[3],n[1][1]=r[4]}if(h&&h!=="none"){var v=q6(s.node2),d=l_(n,c[1],v*e);i(n[0][0],n[1][0],n[2][0],d,r),n[1][0]=r[1],n[2][0]=r[2],i(n[0][1],n[1][1],n[2][1],d,r),n[1][1]=r[1],n[2][1]=r[2]}Or(u[0],n[0]),Or(u[1],n[2]),Or(u[2],n[1])}else{if(Or(a[0],c[0]),Or(a[1],c[1]),s2(o,a[1],a[0]),C4(o,o),f&&f!=="none"){var v=q6(s.node1);X8(a[0],a[0],o,v*e)}if(h&&h!=="none"){var v=q6(s.node2);X8(a[1],a[1],o,-v*e)}Or(u[0],a[0]),Or(u[1],a[1])}})}function u_(t){return t.type==="view"}var eX=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,i){var n=new p3,a=new Mv,o=this.group;this._controller=new x3(i.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(a.group),this._symbolDraw=n,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(r,i,n){var a=this,o=r.coordinateSystem;this._model=r;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(u_(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):re(u,f,r)}Mu(r.getGraph(),j6(r));var h=r.getData();s.updateData(h);var c=r.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(r,i,n),clearTimeout(this._layoutTimeout);var v=r.forceLayout,d=r.get(["force","layoutAnimation"]);v&&this._startForceLayoutIteration(v,d);var p=r.get("layout");h.graph.eachNode(function(_){var x=_.dataIndex,w=_.getGraphicEl(),S=_.getModel();if(w){w.off("drag").off("dragend");var b=S.get("draggable");b&&w.on("drag",function(A){switch(p){case"force":v.warmUp(),!a._layouting&&a._startForceLayoutIteration(v,d),v.setFixed(x),h.setItemLayout(x,[w.x,w.y]);break;case"circular":h.setItemLayout(x,[w.x,w.y]),_.setLayout({fixed:!0},!0),Dv(r,"symbolSize",_,[A.offsetX,A.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(x,[w.x,w.y]),Cv(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){v&&v.setUnfixed(x)}),w.setDraggable(b,!!S.get("cursor"));var T=S.get(["emphasis","focus"]);T==="adjacency"&&(Et(w).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var x=_.getGraphicEl(),w=_.getModel().get(["emphasis","focus"]);x&&w==="adjacency"&&(Et(x).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),m=h.getLayout("cx"),y=h.getLayout("cy");h.graph.eachNode(function(_){wE(_,g,m,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,i){var n=this;(function a(){r.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(i?n._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(r,i,n){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,h){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(f,h)&&!y5(u,n,r)}),!u_(r.coordinateSystem)){o.disable();return}o.enable(r.get("roam")),s.zoomLimit=r.get("scaleLimit"),s.zoom=r.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){gv(s,u.dx,u.dy),n.dispatchAction({seriesId:r.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){mv(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:r.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),Mu(r.getGraph(),j6(r)),a._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,i=r.getData(),n=j6(r);i.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(n)})},e.prototype.updateLayout=function(r){Mu(r.getGraph(),j6(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Yt);function mo(t){return"_EC_"+t}var TE=function(){function t(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(e,r){e=e==null?""+r:""+e;var i=this._nodesMap;if(!i[mo(e)]){var n=new e2(e,r);return n.hostGraph=this,this.nodes.push(n),i[mo(e)]=n,n}},t.prototype.getNodeByIndex=function(e){var r=this.data.getRawIndex(e);return this.nodes[r]},t.prototype.getNodeById=function(e){return this._nodesMap[mo(e)]},t.prototype.addEdge=function(e,r,i){var n=this._nodesMap,a=this._edgesMap;if(te(e)&&(e=this.nodes[e]),te(r)&&(r=this.nodes[r]),e instanceof e2||(e=n[mo(e)]),r instanceof e2||(r=n[mo(r)]),!(!e||!r)){var o=e.id+"-"+r.id,s=new AE(e,r,i);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),r.inEdges.push(s)),e.edges.push(s),e!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},t.prototype.getEdgeByIndex=function(e){var r=this.edgeData.getRawIndex(e);return this.edges[r]},t.prototype.getEdge=function(e,r){e instanceof e2&&(e=e.id),r instanceof e2&&(r=r.id);var i=this._edgesMap;return this._directed?i[e+"-"+r]:i[e+"-"+r]||i[r+"-"+e]},t.prototype.eachNode=function(e,r){for(var i=this.nodes,n=i.length,a=0;a=0&&e.call(r,i[a],a)},t.prototype.eachEdge=function(e,r){for(var i=this.edges,n=i.length,a=0;a=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&e.call(r,i[a],a)},t.prototype.breadthFirstTraverse=function(e,r,i,n){if(r instanceof e2||(r=this._nodesMap[mo(r)]),!!r){for(var a=i==="out"?"outEdges":i==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=n.length;a=0&&this[t][e].setItemVisual(this.dataIndex,r,i)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Xe(e2,CE("hostGraph","data"));Xe(AE,CE("hostGraph","edgeData"));function DE(t,e,r,i,n){for(var a=new TE(i),o=0;o "+c)),u++)}var v=r.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=Bi(t,r);else{var p=k4.get(v),g=p?p.dimensions||[]:[];kt(g,"value")<0&&g.concat(["value"]);var m=H4(t,{coordDimensions:g,encodeDefine:r.getEncode()}).dimensions;d=new Le(m,r),d.initData(t)}var y=new Le(["value"],r);return y.initData(l,s),n&&n(d,y),xv({mainData:d,struct:a,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var rX=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var i=this;function n(){return i._categoriesData}this.legendVisualProvider=new _3(n,n),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),M2(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,i){var n=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&n){UW(this);var s=DE(a,n,this,!0,l);return E(s.edges,function(u){WW(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),m=p[g];return m&&(m.parentModel=d.parentModel,d.parentModel=m),d});var h=Jt.prototype.getModel;function c(d,p){var g=h.call(this,d,p);return g.resolveParentPath=v,g}f.wrapMethod("getItemModel",function(d){return d.resolveParentPath=v,d.getModel=c,d});function v(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,i,n){if(n==="edge"){var a=this.getData(),o=this.getDataParams(r,n),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),vr("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var h=WA({series:this,dataIndex:r,multipleSeries:i});return h},e.prototype._updateCategoriesData=function(){var r=j(this.option.categories||[],function(n){return n.value!=null?n:H({value:0},n)}),i=new Le(["value"],this);i.initData(r),this._categoriesData=i,this._categoriesModels=i.mapArray(function(n){return i.getItemModel(n)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Kt),iX={type:"graphRoam",event:"graphRoam",update:"none"};function nX(t){t.registerChartView(eX),t.registerSeriesModel(rX),t.registerProcessor(FW),t.registerVisual(zW),t.registerVisual(GW),t.registerLayout(XW),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,ZW),t.registerLayout(jW),t.registerCoordinateSystem("graphView",{dimensions:S3.dimensions,create:KW}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},He),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},He),t.registerAction(iX,function(e,r,i){r.eachComponent({mainType:"series",query:e},function(n){var a=n.coordinateSystem,o=_v(a,e,void 0,i);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var aX=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),oX=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.type="pointer",i}return e.prototype.getDefaultShape=function(){return new aX},e.prototype.buildPath=function(r,i){var n=Math.cos,a=Math.sin,o=i.r,s=i.width,l=i.angle,u=i.x-n(l)*s*(s>=o/3?1:2),f=i.y-a(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,r.moveTo(u,f),r.lineTo(i.x+n(l)*s,i.y+a(l)*s),r.lineTo(i.x+n(i.angle)*o,i.y+a(i.angle)*o),r.lineTo(i.x-n(l)*s,i.y-a(l)*s),r.lineTo(u,f)},e}(zt);function sX(t,e){var r=t.get("center"),i=e.getWidth(),n=e.getHeight(),a=Math.min(i,n),o=ot(r[0],e.getWidth()),s=ot(r[1],e.getHeight()),l=ot(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function xs(t,e){var r=t==null?"":t+"";return e&&(ht(e)?r=e.replace("{value}",r):wt(e)&&(r=e(t))),r}var lX=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=sX(r,n);this._renderMain(r,i,n,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,i,n,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,f=-r.get("endAngle")/180*Math.PI,h=r.getModel("axisLine"),c=h.get("roundCap"),v=c?J9:Yr,d=h.get("show"),p=h.getModel("lineStyle"),g=p.get("width"),m=[u,f];pc(m,!l),u=m[0],f=m[1];for(var y=f-u,_=u,x=[],w=0;d&&w=A&&(D===0?0:a[D-1][0])Math.PI/2&&(W+=Math.PI)):$==="tangential"?W=-T-Math.PI/2:te($)&&(W=$*Math.PI/180),W===0?h.add(new Ht({style:fe(_,{text:z,x:U,y:Z,verticalAlign:P<-.8?"top":P>.8?"bottom":"middle",align:I<-.4?"left":I>.4?"right":"center"},{inheritColor:G}),silent:!0})):h.add(new Ht({style:fe(_,{text:z,x:U,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:U,originY:Z,rotation:W}))}if(y.get("show")&&R!==x){var B=y.get("distance");B=B?B+f:f;for(var V=0;V<=w;V++){I=Math.cos(T),P=Math.sin(T);var K=new ar({shape:{x1:I*(d-B)+c,y1:P*(d-B)+v,x2:I*(d-b-B)+c,y2:P*(d-b-B)+v},silent:!0,style:M});M.stroke==="auto"&&K.setStyle({stroke:a((R+V/w)/x)}),h.add(K),T+=D}T-=D}else T+=A}},e.prototype._renderPointer=function(r,i,n,a,o,s,l,u,f){var h=this.group,c=this._data,v=this._progressEls,d=[],p=r.get(["pointer","show"]),g=r.getModel("progress"),m=g.get("show"),y=r.getData(),_=y.mapDimension("value"),x=+r.get("min"),w=+r.get("max"),S=[x,w],b=[s,l];function T(D,C){var M=y.getItemModel(D),L=M.getModel("pointer"),I=ot(L.get("width"),o.r),P=ot(L.get("length"),o.r),R=r.get(["pointer","icon"]),B=L.get("offsetCenter"),O=ot(B[0],o.r),z=ot(B[1],o.r),G=L.get("keepAspect"),U;return R?U=Ue(R,O-I/2,z-P,I,P,null,G):U=new oX({shape:{angle:-Math.PI/2,width:I,r:P,x:O,y:z}}),U.rotation=-(C+Math.PI/2),U.x=o.cx,U.y=o.cy,U}function A(D,C){var M=g.get("roundCap"),L=M?J9:Yr,I=g.get("overlap"),P=I?g.get("width"):f/y.count(),R=I?o.r-P:o.r-(D+1)*P,B=I?o.r:o.r-D*P,O=new L({shape:{startAngle:s,endAngle:C,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:B}});return I&&(O.z2=w-y.get(_,D)%w),O}(m||p)&&(y.diff(c).add(function(D){var C=y.get(_,D);if(p){var M=T(D,s);Ce(M,{rotation:-((isNaN(+C)?b[0]:oe(C,S,b,!0))+Math.PI/2)},r),h.add(M),y.setItemGraphicEl(D,M)}if(m){var L=A(D,s),I=g.get("clip");Ce(L,{shape:{endAngle:oe(C,S,b,I)}},r),h.add(L),yf(r.seriesIndex,y.dataType,D,L),d[D]=L}}).update(function(D,C){var M=y.get(_,D);if(p){var L=c.getItemGraphicEl(C),I=L?L.rotation:s,P=T(D,I);P.rotation=I,re(P,{rotation:-((isNaN(+M)?b[0]:oe(M,S,b,!0))+Math.PI/2)},r),h.add(P),y.setItemGraphicEl(D,P)}if(m){var R=v[C],B=R?R.shape.endAngle:s,O=A(D,B),z=g.get("clip");re(O,{shape:{endAngle:oe(M,S,b,z)}},r),h.add(O),yf(r.seriesIndex,y.dataType,D,O),d[D]=O}}).execute(),y.each(function(D){var C=y.getItemModel(D),M=C.getModel("emphasis"),L=M.get("focus"),I=M.get("blurScope"),P=M.get("disabled");if(p){var R=y.getItemGraphicEl(D),B=y.getItemVisual(D,"style"),O=B.fill;if(R instanceof pr){var z=R.style;R.useStyle(H({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},B))}else R.useStyle(B),R.type!=="pointer"&&R.setColor(O);R.setStyle(C.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",a(oe(y.get(_,D),S,[0,1],!0))),R.z2EmphasisLift=0,Tr(R,C),ke(R,L,I,P)}if(m){var G=d[D];G.useStyle(y.getItemVisual(D,"style")),G.setStyle(C.getModel(["progress","itemStyle"]).getItemStyle()),G.z2EmphasisLift=0,Tr(G,C),ke(G,L,I,P)}}),this._progressEls=d)},e.prototype._renderAnchor=function(r,i){var n=r.getModel("anchor"),a=n.get("show");if(a){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=Ue(s,i.cx-o/2+ot(l[0],i.r),i.cy-o/2+ot(l[1],i.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(r,i,n,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),f=+r.get("min"),h=+r.get("max"),c=new Dt,v=[],d=[],p=r.isAnimationEnabled(),g=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){v[m]=new Ht({silent:!0}),d[m]=new Ht({silent:!0})}).update(function(m,y){v[m]=s._titleEls[y],d[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),x=new Dt,w=a(oe(_,[f,h],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var b=S.get("offsetCenter"),T=o.cx+ot(b[0],o.r),A=o.cy+ot(b[1],o.r),D=v[m];D.attr({z2:g?0:2,style:fe(S,{x:T,y:A,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:w})}),x.add(D)}var C=y.getModel("detail");if(C.get("show")){var M=C.get("offsetCenter"),L=o.cx+ot(M[0],o.r),I=o.cy+ot(M[1],o.r),P=ot(C.get("width"),o.r),R=ot(C.get("height"),o.r),B=r.get(["progress","show"])?l.getItemVisual(m,"style").fill:w,D=d[m],O=C.get("formatter");D.attr({z2:g?0:2,style:fe(C,{x:L,y:I,text:xs(_,O),width:isNaN(P)?null:P,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:B})}),jT(D,{normal:C},_,function(G){return xs(G,O)}),p&&qT(D,m,l,r,{getFormattedLabel:function(G,U,Z,$,W,V){return xs(V?V.interpolatedValue:_,O)}}),x.add(D)}c.add(x)}),this.group.add(c),this._titleEls=v,this._detailEls=d},e.type="gauge",e}(Yt),uX=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,i){return X4(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Kt);function fX(t){t.registerChartView(lX),t.registerSeriesModel(uX)}var hX=["itemStyle","opacity"],cX=function(t){F(e,t);function e(r,i){var n=t.call(this)||this,a=n,o=new qr,s=new Ht;return a.setTextContent(s),n.setTextGuideLine(o),n.updateData(r,i,!0),n}return e.prototype.updateData=function(r,i,n){var a=this,o=r.hostModel,s=r.getItemModel(i),l=r.getItemLayout(i),u=s.getModel("emphasis"),f=s.get(hX);f=f==null?1:f,n||oi(a),a.useStyle(r.getItemVisual(i,"style")),a.style.lineJoin="round",n?(a.setShape({points:l.points}),a.style.opacity=0,Ce(a,{style:{opacity:f}},o,i)):re(a,{style:{opacity:f},shape:{points:l.points}},o,i),Tr(a,s),this._updateLabel(r,i),ke(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,i){var n=this,a=this.getTextGuideLine(),o=n.getTextContent(),s=r.hostModel,l=r.getItemModel(i),u=r.getItemLayout(i),f=u.label,h=r.getItemVisual(i,"style"),c=h.fill;Ar(o,cr(l),{labelFetcher:r.hostModel,labelDataIndex:i,defaultOpacity:h.opacity,defaultText:r.getName(i)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:c,outsideFill:c});var v=f.linePoints;a.setShape({points:v}),n.textGuideLineConfig={anchor:v?new Rt(v[0][0],v[0][1]):null},re(o,{style:{x:f.x,y:f.y}},s,i),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),nv(n,av(l),{stroke:c})},e}(Zr),vX=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,i,n){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new cX(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(a,l),s.add(f),a.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);E7(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Yt),dX=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new _3(ct(this.getData,this),ct(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,i){return X4(this,{coordDimensions:["value"],encodeDefaulter:Lt(Rc,this)})},e.prototype._defaultLabelLine=function(r){M2(r,"labelLine",["show"]);var i=r.labelLine,n=r.emphasis.labelLine;i.show=i.show&&r.label.show,n.show=n.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var i=this.getData(),n=t.prototype.getDataParams.call(this,r),a=i.mapDimension("value"),o=i.getSum(a);return n.percent=o?+(i.get(a,r)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Kt);function pX(t,e){return Re(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function gX(t,e){for(var r=t.mapDimension("value"),i=t.mapArray(r,function(l){return l}),n=[],a=e==="ascending",o=0,s=t.count();oPX)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!Iu(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=r.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function Iu(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var OX=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var i=this.option;r&&mt(i,r,!0),this._initDimensions()},e.prototype.contains=function(r,i){var n=r.get("parallelIndex");return n!=null&&i.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(r){E(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){r.hasOwnProperty(i)&&(this.option[i]=r[i])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],i=this.parallelAxisIndex=[],n=ce(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);E(n,function(a){r.push("dim"+a.get("dim")),i.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Bt),BX=function(t){F(e,t);function e(r,i,n,a,o){var s=t.call(this,r,i,n)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Kr);function q2(t,e,r,i,n,a){t=t||0;var o=r[1]-r[0];if(n!=null&&(n=yo(n,[0,o])),a!=null&&(a=Math.max(a,n!=null?n:0)),i==="all"){var s=Math.abs(e[1]-e[0]);s=yo(s,[0,o]),n=a=yo(s,[n,a]),i=0}e[0]=yo(e[0],r),e[1]=yo(e[1],r);var l=Pu(e,i);e[i]+=t;var u=n||0,f=r.slice();l.sign<0?f[0]+=u:f[1]-=u,e[i]=yo(e[i],f);var h;return h=Pu(e,i),n!=null&&(h.sign!==l.sign||h.spana&&(e[1-i]=e[i]+h.sign*a),e}function Pu(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function yo(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var Ru=E,ME=Math.min,LE=Math.max,c_=Math.floor,kX=Math.ceil,v_=Ae,FX=Math.PI,zX=function(){function t(e,r,i){this.type="parallel",this._axesMap=yt(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,i)}return t.prototype._init=function(e,r,i){var n=e.dimensions,a=e.parallelAxisIndex;Ru(n,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),f=this._axesMap.set(o,new BX(o,v3(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),i=r.axisBase,n=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=i&&o<=i+r.axisLength&&s>=n&&s<=n+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(i){if(e.contains(i,r)){var n=i.getData();Ru(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(n,n.mapDimension(a)),N2(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){this._rect=Re(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,i=["x","y"],n=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[n[o]],l=[0,s],u=this.dimensions.length,f=Ss(e.get("axisExpandWidth"),l),h=Ss(e.get("axisExpandCount")||0,[0,u]),c=e.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,v=e.get("axisExpandWindow"),d;if(v)d=Ss(v[1]-v[0],l),v[1]=v[0]+d;else{d=Ss(f*(h-1),l);var p=e.get("axisExpandCenter")||c_(u/2);v=[f*p-d/2],v[1]=v[0]+d}var g=(s-d)/(u-h);g<3&&(g=0);var m=[c_(v_(v[0]/f,1))+1,kX(v_(v[1]/f,1))-1],y=g/f*v[0];return{layout:a,pixelDimIndex:o,layoutBase:r[i[o]],layoutLength:s,axisBase:r[i[1-o]],axisLength:r[n[1-o]],axisExpandable:c,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;r.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Ru(i,function(o,s){var l=(n.axisExpandable?VX:GX)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:FX/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],c=f[a],v=a1();U2(v,v,c),Ii(v,v,h),this._axesLayout[o]={position:h,rotation:c,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,i,n){i==null&&(i=0),n==null&&(n=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];E(o,function(g){s.push(e.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),f=i;fa*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=r.axisExpandWidth/f,l?q2(l,n,o,"all"):u="none";else{var v=n[1]-n[0],d=o[1]*s/v;n=[LE(0,d-v/2)],n[1]=ME(o[1],n[0]+v),n[0]=n[1]-v}return{axisExpandWindow:n,behavior:u}},t}();function Ss(t,e){return ME(LE(t,e[0]),e[1])}function GX(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function VX(t,e){var r=e.layoutLength,i=e.axisExpandWidth,n=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,f;return t=0;n--)I1(i[n])},e.prototype.getActiveState=function(r){var i=this.activeIntervals;if(!i.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(i.length===1){var n=i[0];if(n[0]<=r&&r<=n[1])return"active"}else for(var a=0,o=i.length;aYX}function BE(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function kE(t,e,r,i){var n=new Dt;return n.add(new Xt({name:"main",style:Nv(r),silent:!0,draggable:!0,cursor:"move",drift:Lt(g_,t,e,n,["n","s","w","e"]),ondragend:Lt(B2,e,{isEnd:!0})})),E(i,function(a){n.add(new Xt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Lt(g_,t,e,n,a),ondragend:Lt(B2,e,{isEnd:!0})}))}),n}function FE(t,e,r,i){var n=i.brushStyle.lineWidth||0,a=h4(n,ZX),o=r[0][0],s=r[1][0],l=o-n/2,u=s-n/2,f=r[0][1],h=r[1][1],c=f-a+n/2,v=h-a+n/2,d=f-o,p=h-s,g=d+n,m=p+n;Vi(t,e,"main",o,s,d,p),i.transformable&&(Vi(t,e,"w",l,u,a,m),Vi(t,e,"e",c,u,a,m),Vi(t,e,"n",l,u,g,a),Vi(t,e,"s",l,v,g,a),Vi(t,e,"nw",l,u,a,a),Vi(t,e,"ne",c,u,a,a),Vi(t,e,"sw",l,v,a,a),Vi(t,e,"se",c,v,a,a))}function fh(t,e){var r=e.__brushOption,i=r.transformable,n=e.childAt(0);n.useStyle(Nv(r)),n.attr({silent:!i,cursor:i?"move":"default"}),E([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?hh(t,a[0]):JX(t,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?jX[s]+"-resize":null})})}function Vi(t,e,r,i,n,a,o){var s=e.childOfName(r);s&&s.setShape(eY(Ov(t,e,[[i,n],[i+a,n+o]])))}function Nv(t){return xt({strokeNoScale:!0},t.brushStyle)}function zE(t,e,r,i){var n=[W7(t,r),W7(e,i)],a=[h4(t,r),h4(e,i)];return[[n[0],a[0]],[n[1],a[1]]]}function $X(t){return w2(t.group)}function hh(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=J0(r[e],$X(t));return i[n]}function JX(t,e){var r=[hh(t,e[0]),hh(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function g_(t,e,r,i,n,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=GE(e,n,a);E(i,function(u){var f=QX[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=t.fromRectRange(zE(s[0][0],s[1][0],s[0][1],s[1][1])),Iv(e,r),B2(e,{isEnd:!1})}function tY(t,e,r,i){var n=e.__brushOption.range,a=GE(t,r,i);E(n,function(o){o[0]+=a[0],o[1]+=a[1]}),Iv(t,e),B2(t,{isEnd:!1})}function GE(t,e,r){var i=t.group,n=i.transformCoordToLocal(e,r),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function Ov(t,e,r){var i=OE(t,e);return i&&i!==O2?i.clipPath(r,t._transform):At(r)}function eY(t){var e=W7(t[0][0],t[1][0]),r=W7(t[0][1],t[1][1]),i=h4(t[0][0],t[1][0]),n=h4(t[0][1],t[1][1]);return{x:e,y:r,width:i-e,height:n-r}}function rY(t,e,r){if(!(!t._brushType||nY(t,e.offsetX,e.offsetY))){var i=t._zr,n=t._covers,a=Rv(t,e,r);if(!t._dragging)for(var o=0;oi.getWidth()||r<0||r>i.getHeight()}var w5={lineX:__(0),lineY:__(1),rect:{createCover:function(t,e){function r(i){return i}return kE({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=BE(t);return zE(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,i){FE(t,e,r,i)},updateCommon:fh,contain:vh},polygon:{createCover:function(t,e){var r=new Dt;return r.add(new qr({name:"main",style:Nv(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Zr({name:"main",draggable:!0,drift:Lt(tY,t,e),ondragend:Lt(B2,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,i){e.childAt(0).setShape({points:Ov(t,e,r)})},updateCommon:fh,contain:vh}};function __(t){return{createCover:function(e,r){return kE({toRectRange:function(i){var n=[i,[0,100]];return t&&n.reverse(),n},fromRectRange:function(i){return i[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=BE(e),i=W7(r[0][t],r[1][t]),n=h4(r[0][t],r[1][t]);return[i,n]},updateCoverShape:function(e,r,i,n){var a,o=OE(e,r);if(o!==O2&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,a];t&&l.reverse(),FE(e,r,l,n)},updateCommon:fh,contain:vh}}function HE(t){return t=Bv(t),function(e){return YT(e,t)}}function UE(t,e){return t=Bv(t),function(r){var i=e!=null?e:r,n=i?t.width:t.height,a=i?t.x:t.y;return[a,a+(n||0)]}}function WE(t,e,r){var i=Bv(t);return function(n,a){return i.contain(a[0],a[1])&&!y5(n,e,r)}}function Bv(t){return Nt.create(t)}var aY=["axisLine","axisTickLabel","axisName"],oY=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,i){t.prototype.init.apply(this,arguments),(this._brushController=new Lv(i.getZr())).on("brush",ct(this._onBrush,this))},e.prototype.render=function(r,i,n,a){if(!sY(r,i,a)){this.axisModel=r,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Dt,this.group.add(this._axisGroup),!!r.get("show")){var s=uY(r,i),l=s.coordinateSystem,u=r.getAreaSelectStyle(),f=u.width,h=r.axis.dim,c=l.getAxisLayout(h),v=H({strokeContainThreshold:f},c),d=new Hr(r,v);E(aY,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(v,u,r,s,f,n),f3(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,i,n,a,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=Nt.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:HE(h),isTargetByCursor:WE(h,s,a),getLinearBrushOtherExtent:UE(h,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(lY(n))},e.prototype._onBrush=function(r){var i=r.areas,n=this.axisModel,a=n.axis,o=j(i,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!n.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(ge);function sY(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function lY(t){var e=t.axis;return j(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function uY(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var fY={type:"axisAreaSelect",event:"axisAreaSelected"};function hY(t){t.registerAction(fY,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(i){i.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(i){i.setAxisExpand(e)})})}var cY={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function XE(t){t.registerComponentView(RX),t.registerComponentModel(OX),t.registerCoordinateSystem("parallel",UX),t.registerPreprocessor(MX),t.registerComponentModel(lh),t.registerComponentView(oY),f4(t,"parallel",lh,cY),hY(t)}function vY(t){Ct(XE),t.registerChartView(SX),t.registerSeriesModel(TX),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,EX)}var dY=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),pY=function(t){F(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new dY},e.prototype.buildPath=function(r,i){var n=i.extent;r.moveTo(i.x1,i.y1),r.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(r.lineTo(i.x2+n,i.y2),r.bezierCurveTo(i.cpx2+n,i.cpy2,i.cpx1+n,i.cpy1,i.x1+n,i.y1)):(r.lineTo(i.x2,i.y2+n),r.bezierCurveTo(i.cpx2,i.cpy2+n,i.cpx1,i.cpy1+n,i.x1,i.y1+n)),r.closePath()},e.prototype.highlight=function(){sn(this)},e.prototype.downplay=function(){ln(this)},e}(zt),gY=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._focusAdjacencyDisabled=!1,r}return e.prototype.render=function(r,i,n){var a=this,o=r.getGraph(),s=this.group,l=r.layoutInfo,u=l.width,f=l.height,h=r.getData(),c=r.getData("edge"),v=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var p=new pY,g=Et(p);g.dataIndex=d.dataIndex,g.seriesIndex=r.seriesIndex,g.dataType="edge";var m=d.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),x=d.node1.getLayout(),w=d.node1.getModel(),S=w.get("localX"),b=w.get("localY"),T=d.node2.getLayout(),A=d.node2.getModel(),D=A.get("localX"),C=A.get("localY"),M=d.getLayout(),L,I,P,R,B,O,z,G;p.shape.extent=Math.max(1,M.dy),p.shape.orient=v,v==="vertical"?(L=(S!=null?S*u:x.x)+M.sy,I=(b!=null?b*f:x.y)+x.dy,P=(D!=null?D*u:T.x)+M.ty,R=C!=null?C*f:T.y,B=L,O=I*(1-_)+R*_,z=P,G=I*_+R*(1-_)):(L=(S!=null?S*u:x.x)+x.dx,I=(b!=null?b*f:x.y)+M.sy,P=D!=null?D*u:T.x,R=(C!=null?C*f:T.y)+M.ty,B=L*(1-_)+P*_,O=I,z=L*_+P*(1-_),G=R),p.setShape({x1:L,y1:I,x2:P,y2:R,cpx1:B,cpy1:O,cpx2:z,cpy2:G}),p.useStyle(y.getItemStyle()),x_(p.style,v,d);var U=""+m.get("value"),Z=cr(m,"edgeLabel");Ar(p,Z,{labelFetcher:{getFormattedLabel:function(V,K,Y,q,et,nt){return r.getFormattedLabel(V,K,"edge",q,Ci(et,Z.normal&&Z.normal.get("formatter"),U),nt)}},labelDataIndex:d.dataIndex,defaultText:U}),p.setTextConfig({position:"inside"});var $=m.getModel("emphasis");Tr(p,m,"lineStyle",function(V){var K=V.getItemStyle();return x_(K,v,d),K}),s.add(p),c.setItemGraphicEl(d.dataIndex,p);var W=$.get("focus");ke(p,W==="adjacency"?d.getAdjacentDataIndices():W==="trajectory"?d.getTrajectoryDataIndices():W,$.get("blurScope"),$.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),m=g.get("localX"),y=g.get("localY"),_=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,w=new Xt({shape:{x:m!=null?m*u:p.x,y:y!=null?y*f:p.y,width:p.dx,height:p.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});Ar(w,cr(g),{labelFetcher:{getFormattedLabel:function(b,T){return r.getFormattedLabel(b,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),w.disableLabelAnimation=!0,w.setStyle("fill",d.getVisual("color")),w.setStyle("decal",d.getVisual("style").decal),Tr(w,g),s.add(w),h.setItemGraphicEl(d.dataIndex,w),Et(w).dataType="node";var S=_.get("focus");ke(w,S==="adjacency"?d.getAdjacentDataIndices():S==="trajectory"?d.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(d,p){var g=h.getItemModel(p);g.get("draggable")&&(d.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:h.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/f})},d.ondragend=function(){a._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(mY(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Yt);function x_(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var i=r.node1.getVisual("color"),n=r.node2.getVisual("color");ht(i)&&ht(n)&&(t.fill=new ei(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:i,offset:0},{color:n,offset:1}]))}}function mY(t,e,r){var i=new Xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Ce(i,{shape:{width:t.width+20}},e,r),i}var yY=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,i){var n=r.edges||r.links,a=r.data||r.nodes,o=r.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Jt(o[l],this,i));if(a&&n){var u=DE(a,n,this,!0,f);return u.data}function f(h,c){h.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getData().getItemLayout(d);if(g){var m=g.depth,y=p.levelModels[m];y&&(v.parentModel=y)}return v}),c.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getGraph().getEdgeByIndex(d),m=g.node1.getLayout();if(m){var y=m.depth,_=p.levelModels[y];_&&(v.parentModel=_)}return v})}},e.prototype.setNodePosition=function(r,i){var n=this.option.data||this.option.nodes,a=n[r];a.localX=i[0],a.localY=i[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,i,n){function a(v){return isNaN(v)||v==null}if(n==="edge"){var o=this.getDataParams(r,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return vr("nameValue",{name:u,value:l,noValue:a(l)})}else{var f=this.getGraph().getNodeByIndex(r),h=f.getLayout().value,c=this.getDataParams(r,n).data.name;return vr("nameValue",{name:c!=null?c+"":null,value:h,noValue:a(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,i){var n=t.prototype.getDataParams.call(this,r,i);if(n.value==null&&i==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Kt);function _Y(t,e){t.eachSeriesByType("sankey",function(r){var i=r.get("nodeWidth"),n=r.get("nodeGap"),a=xY(r,e);r.layoutInfo=a;var o=a.width,s=a.height,l=r.getGraph(),u=l.nodes,f=l.edges;wY(u);var h=ce(u,function(p){return p.getLayout().value===0}),c=h.length!==0?0:r.get("layoutIterations"),v=r.get("orient"),d=r.get("nodeAlign");SY(u,f,i,n,o,s,c,v,d)})}function xY(t,e){return Re(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function SY(t,e,r,i,n,a,o,s,l){bY(t,e,r,n,a,s,l),DY(t,e,a,n,i,o,s),BY(t,s)}function wY(t){E(t,function(e){var r=ta(e.outEdges,a0),i=ta(e.inEdges,a0),n=e.getValue()||0,a=Math.max(r,i,n);e.setLayout({value:a},!0)})}function bY(t,e,r,i,n,a,o){for(var s=[],l=[],u=[],f=[],h=0,c=0;c=0;m&&g.depth>v&&(v=g.depth),p.setLayout({depth:m?g.depth:h},!0),a==="vertical"?p.setLayout({dy:r},!0):p.setLayout({dx:r},!0);for(var y=0;yh-1?v:h-1;o&&o!=="left"&&TY(t,o,a,b);var T=a==="vertical"?(n-r)/b:(i-r)/b;CY(t,T,a)}function YE(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function TY(t,e,r,i){if(e==="right"){for(var n=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,LY(s,l,o),Nu(s,n,r,i,o),OY(s,l,o),Nu(s,n,r,i,o)}function EY(t,e){var r=[],i=e==="vertical"?"y":"x",n=df(t,function(a){return a.getLayout()[i]});return n.keys.sort(function(a,o){return a-o}),E(n.keys,function(a){r.push(n.buckets.get(a))}),r}function MY(t,e,r,i,n,a){var o=1/0;E(t,function(s){var l=s.length,u=0;E(s,function(h){u+=h.getLayout().value});var f=a==="vertical"?(i-(l-1)*n)/u:(r-(l-1)*n)/u;f0&&(s=l.getLayout()[a]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[a]+l.getLayout()[c]+e;var d=n==="vertical"?i:r;if(u=f-e-d,u>0){s=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var v=h-2;v>=0;--v)l=o[v],u=l.getLayout()[a]+l.getLayout()[c]+e-f,u>0&&(s=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[a]}})}function LY(t,e,r){E(t.slice().reverse(),function(i){E(i,function(n){if(n.outEdges.length){var a=ta(n.outEdges,IY,r)/ta(n.outEdges,a0);if(isNaN(a)){var o=n.outEdges.length;a=o?ta(n.outEdges,PY,r)/o:0}if(r==="vertical"){var s=n.getLayout().x+(a-oa(n,r))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(a-oa(n,r))*e;n.setLayout({y:l},!0)}}})})}function IY(t,e){return oa(t.node2,e)*t.getValue()}function PY(t,e){return oa(t.node2,e)}function RY(t,e){return oa(t.node1,e)*t.getValue()}function NY(t,e){return oa(t.node1,e)}function oa(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function a0(t){return t.getValue()}function ta(t,e,r){for(var i=0,n=t.length,a=-1;++ao&&(o=l)}),E(i,function(s){var l=new fr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&E(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function FY(t){t.registerChartView(gY),t.registerSeriesModel(yY),t.registerLayout(_Y),t.registerVisual(kY),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){i.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var ZE=function(){function t(){}return t.prototype.getInitialData=function(e,r){var i,n=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",i=n.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",i=a.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],c=u[1-f],v=[n,a],d=v[f].get("type"),p=v[1-f].get("type"),g=e.data;if(g&&l){var m=[];E(g,function(x,w){var S;X(x)?(S=x.slice(),x.unshift(w)):X(x.value)?(S=H({},x),S.value=S.value.slice(),x.value.unshift(w)):S=x,m.push(S)}),e.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:Z9(d),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Z9(p),dimsDef:y.slice()}];return X4(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:Lt(mA,_,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),QE=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Kt);Xe(QE,ZE,!0);var zY=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var f=a.getItemLayout(u),h=S_(f,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,f){var h=s.getItemGraphicEl(f);if(!a.hasValue(u)){o.remove(h);return}var c=a.getItemLayout(u);h?(oi(h),jE(c,h,a,u)):h=S_(c,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=a},e.prototype.remove=function(r){var i=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(a){a&&i.remove(a)})},e.type="boxplot",e}(Yt),GY=function(){function t(){}return t}(),VY=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.type="boxplotBoxPath",i}return e.prototype.getDefaultShape=function(){return new GY},e.prototype.buildPath=function(r,i){var n=i.points,a=0;for(r.moveTo(n[a][0],n[a][1]),a++;a<4;a++)r.lineTo(n[a][0],n[a][1]);for(r.closePath();ap){var x=[m,_];i.push(x)}}}return{boxData:r,outliers:i}}var QY={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Ir){var i="";se(i)}var n=ZY(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function jY(t){t.registerSeriesModel(QE),t.registerChartView(zY),t.registerLayout(UY),t.registerTransform(QY)}var qY=["color","borderColor"],KY=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,i,n){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,i,n,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,i):this._incrementalRenderNormal(r,i)},e.prototype.eachRendered=function(r){ua(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var i=r.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(r){var i=r.getData(),n=this._data,a=this.group,o=i.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),i.diff(n).add(function(f){if(i.hasValue(f)){var h=i.getItemLayout(f);if(s&&w_(u,h))return;var c=Ou(h,f,!0);Ce(c,{shape:{points:h.ends}},r,f),Bu(c,i,f,o),a.add(c),i.setItemGraphicEl(f,c)}}).update(function(f,h){var c=n.getItemGraphicEl(h);if(!i.hasValue(f)){a.remove(c);return}var v=i.getItemLayout(f);if(s&&w_(u,v)){a.remove(c);return}c?(re(c,{shape:{points:v.ends}},r,f),oi(c)):c=Ou(v),Bu(c,i,f,o),a.add(c),i.setItemGraphicEl(f,c)}).remove(function(f){var h=n.getItemGraphicEl(f);h&&a.remove(h)}).execute(),this._data=i},e.prototype._renderLarge=function(r){this._clear(),b_(r,this.group);var i=r.get("clip",!0)?g3(r.coordinateSystem,!1,r):null;i?this.group.setClipPath(i):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,i){for(var n=i.getData(),a=n.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=n.getItemLayout(o),l=Ou(s);Bu(l,n,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,i){b_(i,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Yt),$Y=function(){function t(){}return t}(),JY=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.type="normalCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new $Y},e.prototype.buildPath=function(r,i){var n=i.points;this.__simpleBox?(r.moveTo(n[4][0],n[4][1]),r.lineTo(n[6][0],n[6][1])):(r.moveTo(n[0][0],n[0][1]),r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]),r.lineTo(n[3][0],n[3][1]),r.closePath(),r.moveTo(n[4][0],n[4][1]),r.lineTo(n[5][0],n[5][1]),r.moveTo(n[6][0],n[6][1]),r.lineTo(n[7][0],n[7][1]))},e}(zt);function Ou(t,e,r){var i=t.ends;return new JY({shape:{points:r?tZ(i,t):i},z2:100})}function w_(t,e){for(var r=!0,i=0;i0?"borderColor":"borderColor0"])||r.get(["itemStyle",t>0?"color":"color0"]);t===0&&(n=r.get(["itemStyle","borderColorDoji"]));var a=r.getModel("itemStyle").getItemStyle(qY);e.useStyle(a),e.style.fill=null,e.style.stroke=n}var qE=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(r,i,n){var a=i.getItemLayout(r);return a&&n.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Kt);Xe(qE,ZE,!0);function rZ(t){!t||!X(t.series)||E(t.series,function(e){Tt(e)&&e.type==="k"&&(e.type="candlestick")})}var iZ=["itemStyle","borderColor"],nZ=["itemStyle","borderColor0"],aZ=["itemStyle","borderColorDoji"],oZ=["itemStyle","color"],sZ=["itemStyle","color0"],lZ={seriesType:"candlestick",plan:F4(),performRawSeries:!0,reset:function(t,e){function r(a,o){return o.get(a>0?oZ:sZ)}function i(a,o){return o.get(a===0?aZ:a>0?iZ:nZ)}if(!e.isSeriesFiltered(t)){var n=t.pipelineContext.large;return!n&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,f=l.getItemStyle();f.fill=r(u,l),f.stroke=i(u,l)||f.fill;var h=o.ensureUniqueItemVisual(s,"style");H(h,f)}}}}}},uZ={seriesType:"candlestick",plan:F4(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),i=fZ(t,r),n=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[n])),l=j(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],f=l[1],h=l[2],c=l[3];if(r.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),s<0||l.length<4)return;return{progress:t.pipelineContext.large?d:v};function v(p,g){for(var m,y=g.getStore();(m=p.next())!=null;){var _=y.get(s,m),x=y.get(u,m),w=y.get(f,m),S=y.get(h,m),b=y.get(c,m),T=Math.min(x,w),A=Math.max(x,w),D=B(T,_),C=B(A,_),M=B(S,_),L=B(b,_),I=[];O(I,C,0),O(I,D,1),I.push(G(L),G(C),G(M),G(D));var P=g.getItemModel(m),R=!!P.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:T_(y,m,x,w,f,R),initBaseline:x>w?C[a]:D[a],ends:I,brushRect:z(S,b,_)})}function B(U,Z){var $=[];return $[n]=Z,$[a]=U,isNaN(Z)||isNaN(U)?[NaN,NaN]:e.dataToPoint($)}function O(U,Z,$){var W=Z.slice(),V=Z.slice();W[n]=o9(W[n]+i/2,1,!1),V[n]=o9(V[n]-i/2,1,!0),$?U.push(W,V):U.push(V,W)}function z(U,Z,$){var W=B(U,$),V=B(Z,$);return W[n]-=i/2,V[n]-=i/2,{x:W[0],y:W[1],width:i,height:V[1]-W[1]}}function G(U){return U[n]=o9(U[n],1),U}}function d(p,g){for(var m=bi(p.count*4),y=0,_,x=[],w=[],S,b=g.getStore(),T=!!t.get(["itemStyle","borderColorDoji"]);(S=p.next())!=null;){var A=b.get(s,S),D=b.get(u,S),C=b.get(f,S),M=b.get(h,S),L=b.get(c,S);if(isNaN(A)||isNaN(M)||isNaN(L)){m[y++]=NaN,y+=3;continue}m[y++]=T_(b,S,D,C,f,T),x[n]=A,x[a]=M,_=e.dataToPoint(x,null,w),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,x[a]=L,_=e.dataToPoint(x,null,w),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function T_(t,e,r,i,n,a){var o;return r>i?o=-1:r0?t.get(n,e-1)<=i?1:-1:1,o}function fZ(t,e){var r=t.getBaseAxis(),i,n=r.type==="category"?r.getBandWidth():(i=r.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=ot(It(t.get("barMaxWidth"),n),n),o=ot(It(t.get("barMinWidth"),1),n),s=t.get("barWidth");return s!=null?ot(s,n):Math.max(Math.min(n/2,a),o)}function hZ(t){t.registerChartView(KY),t.registerSeriesModel(qE),t.registerPreprocessor(rZ),t.registerVisual(lZ),t.registerLayout(uZ)}function A_(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(i){i.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var cZ=function(t){F(e,t);function e(r,i){var n=t.call(this)||this,a=new d3(r,i),o=new Dt;return n.add(a),n.add(o),n.updateData(r,i),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var i=r.symbolType,n=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var c=void 0;wt(h)?c=h(n):c=h,a.__t>0&&(c=-s*a.__t),this._animateSymbol(a,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,i,n,a,o){if(i>0){r.__t=0;var s=this,l=r.animate("",a).when(o?i*2:i,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return zn(r.__p1,r.__cp1)+zn(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,i){r.__p1=i[0],r.__p2=i[1],r.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},e.prototype.updateData=function(r,i,n){this.childAt(0).updateData(r,i,n),this._updateEffectSymbol(r,i)},e.prototype._updateSymbolPosition=function(r){var i=r.__p1,n=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=mr,f=$8;s[0]=u(i[0],a[0],n[0],o),s[1]=u(i[1],a[1],n[1],o);var h=r.__t<1?f(i[0],a[0],n[0],o):f(n[0],a[0],i[0],1-o),c=r.__t<1?f(i[1],a[1],n[1],o):f(n[1],a[1],i[1],1-o);r.rotation=-Math.atan2(c,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=i);l--);l=Math.min(l,o-2)}else{for(l=s;li);l++);l=Math.min(l-1,o-2)}var f=(i-a[l])/(a[l+1]-a[l]),h=n[l],c=n[l+1];r.x=h[0]*(1-f)+f*c[0],r.y=h[1]*(1-f)+f*c[1];var v=r.__t<1?c[0]-h[0]:h[0]-c[0],d=r.__t<1?c[1]-h[1]:h[1]-c[1];r.rotation=-Math.atan2(d,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,r.ignore=!1}},e}(KE),mZ=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),yZ=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new mZ},e.prototype.buildPath=function(r,i){var n=i.segs,a=i.curveness,o;if(i.polyline)for(o=this._off;o0){r.moveTo(n[o++],n[o++]);for(var l=1;l0){var v=(u+h)/2-(f-c)*a,d=(f+c)/2-(h-u)*a;r.quadraticCurveTo(v,d,h,c)}else r.lineTo(h,c)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,i){var n=this.shape,a=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var h=a[u++],c=a[u++],v=1;v0){var g=(h+d)/2-(c-p)*o,m=(c+p)/2-(d-h)*o;if(yT(h,c,g,m,d,p,s,r,i))return l}else if(Yi(h,c,d,p,s,r,i))return l;l++}return-1},e.prototype.contain=function(r,i){var n=this.transformCoordToLocal(r,i),a=this.getBoundingRect();if(r=n[0],i=n[1],a.contain(r,i)){var o=this.hoverDataIdx=this.findDataIndex(r,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var i=this.shape,n=i.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),JE={seriesType:"lines",plan:F4(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(n,a){var o=[];if(i){var s=void 0,l=n.end-n.start;if(r){for(var u=0,f=n.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var h=r.get("clip",!0)&&g3(r.coordinateSystem,!1,r);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,i,n){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(r,i,n){this._lineDraw.incrementalUpdate(r,i.getData()),this._finished=r.end===i.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,i,n){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=JE.reset(r,i,n);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(r,i){var n=this._lineDraw,a=this._showEffect(i),o=!!i.get("polyline"),s=i.pipelineContext,l=s.large;return(!n||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new _Z:new Mv(o?a?gZ:$E:a?KE:Ev),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var i=r.getZr(),n=i.painter.getType()==="svg";!n&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},e.prototype.dispose=function(r,i){this.remove(r,i)},e.type="lines",e}(Yt),SZ=typeof Uint32Array>"u"?Array:Uint32Array,wZ=typeof Float64Array>"u"?Array:Float64Array;function C_(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=j(e,function(r){var i=[r[0].coord,r[1].coord],n={coords:i};return r[0].name&&(n.fromName=r[0].name),r[1].name&&(n.toName=r[1].name),tc([n,r[0],r[1]])}))}var bZ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],C_(r);var i=this._processFlatCoordsArray(r.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(r.data=new Float32Array(i.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(C_(r),r.data){var i=this._processFlatCoordsArray(r.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(r.data=new Float32Array(i.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var i=this._processFlatCoordsArray(r.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=r4(this._flatCoords,i.flatCoords),this._flatCoordsOffset=r4(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),r.data=new Float32Array(i.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var i=this.getData().getItemModel(r),n=i.option instanceof Array?i.option:i.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,i){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r==null?this.option.large?1e4:this.get("progressive"):r},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r==null?this.option.large?2e4:this.get("progressiveThreshold"):r},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),i=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&i>0?i+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Kt);function ws(t){return t instanceof Array||(t=[t,t]),t}var TZ={seriesType:"lines",reset:function(t){var e=ws(t.get("symbol")),r=ws(t.get("symbolSize")),i=t.getData();i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",r&&r[0]),i.setVisual("toSymbolSize",r&&r[1]);function n(a,o){var s=a.getItemModel(o),l=ws(s.getShallow("symbol",!0)),u=ws(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:i.hasItemOption?n:null}}};function AZ(t){t.registerChartView(xZ),t.registerSeriesModel(bZ),t.registerLayout(JE),t.registerVisual(TZ)}var CZ=256,DZ=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ra.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,i,n,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),f=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),v=e.length;h.width=r,h.height=i;for(var d=0;d0){var M=o(_)?l:u;_>0&&(_=_*D+T),w[S++]=M[C],w[S++]=M[C+1],w[S++]=M[C+2],w[S++]=M[C+3]*_*256}else S+=4}return c.putImageData(x,0,0),h},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ra.createCanvas()),r=this.pointSize+this.blurSize,i=r*2;e.width=i,e.height=i;var n=e.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-r,r,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},t.prototype._getGradient=function(e,r){for(var i=this._gradientPixels,n=i[r]||(i[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),n[o++]=a[0],n[o++]=a[1],n[o++]=a[2],n[o++]=a[3];return n},t}();function EZ(t,e,r){var i=t[1]-t[0];e=j(e,function(o){return{interval:[(o.interval[0]-t[0])/i,(o.interval[1]-t[0])/i]}});var n=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&i<=e[1]}}function D_(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var LZ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){var a;i.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(r,n,0,r.getData().count()):D_(o)&&this._renderOnGeo(o,r,a,n)},e.prototype.incrementalPrepareRender=function(r,i,n){this.group.removeAll()},e.prototype.incrementalRender=function(r,i,n,a){var o=i.coordinateSystem;o&&(D_(o)?this.render(i,n,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){ua(this._progressiveEls||this.group,r)},e.prototype._renderOnCartesianAndCalendar=function(r,i,n,a,o){var s=r.coordinateSystem,l=Q2(s,"cartesian2d"),u,f,h,c;if(l){var v=s.getAxis("x"),d=s.getAxis("y");u=v.getBandWidth()+.5,f=d.getBandWidth()+.5,h=v.scale.getExtent(),c=d.scale.getExtent()}for(var p=this.group,g=r.getData(),m=r.getModel(["emphasis","itemStyle"]).getItemStyle(),y=r.getModel(["blur","itemStyle"]).getItemStyle(),_=r.getModel(["select","itemStyle"]).getItemStyle(),x=r.get(["itemStyle","borderRadius"]),w=cr(r),S=r.getModel("emphasis"),b=S.get("focus"),T=S.get("blurScope"),A=S.get("disabled"),D=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],C=n;Ch[1]||Pc[1])continue;var R=s.dataToPoint([I,P]);M=new Xt({shape:{x:R[0]-u/2,y:R[1]-f/2,width:u,height:f},style:L})}else{if(isNaN(g.get(D[1],C)))continue;M=new Xt({z2:1,shape:s.dataToRect([g.get(D[0],C)]).contentShape,style:L})}if(g.hasItemOption){var B=g.getItemModel(C),O=B.getModel("emphasis");m=O.getModel("itemStyle").getItemStyle(),y=B.getModel(["blur","itemStyle"]).getItemStyle(),_=B.getModel(["select","itemStyle"]).getItemStyle(),x=B.get(["itemStyle","borderRadius"]),b=O.get("focus"),T=O.get("blurScope"),A=O.get("disabled"),w=cr(B)}M.shape.r=x;var z=r.getRawValue(C),G="-";z&&z[2]!=null&&(G=z[2]+""),Ar(M,w,{labelFetcher:r,labelDataIndex:C,defaultOpacity:L.opacity,defaultText:G}),M.ensureState("emphasis").style=m,M.ensureState("blur").style=y,M.ensureState("select").style=_,ke(M,b,T,A),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),p.add(M),g.setItemGraphicEl(C,M),this._progressiveEls&&this._progressiveEls.push(M)}},e.prototype._renderOnGeo=function(r,i,n,a){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new DZ;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var f=r.getViewRect().clone(),h=r.getRoamTransform();f.applyTransform(h);var c=Math.max(f.x,0),v=Math.max(f.y,0),d=Math.min(f.width+f.x,a.getWidth()),p=Math.min(f.height+f.y,a.getHeight()),g=d-c,m=p-v,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(b,T,A){var D=r.dataToPoint([b,T]);return D[0]-=c,D[1]-=v,D.push(A),D}),x=n.getExtent(),w=n.type==="visualMap.continuous"?MZ(x,n.option.range):EZ(x,n.getPieceList(),n.option.selected);u.update(_,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var S=new pr({style:{width:g,height:m,x:c,y:v,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e}(Yt),IZ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,i){return Bi(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=k4.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Kt);function PZ(t){t.registerChartView(LZ),t.registerSeriesModel(IZ)}var RZ=["itemStyle","borderWidth"],E_=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],zu=new gn,NZ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),h=l.master.getRect(),c={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:E_[+f],categoryDim:E_[1-+f]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=L_(o,d),g=M_(o,d,p,c),m=I_(o,c,g);o.setItemGraphicEl(d,m),a.add(m),R_(m,c,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){a.remove(g);return}var m=L_(o,d),y=M_(o,d,m,c),_=aM(o,y);g&&_!==g.__pictorialShapeStr&&(a.remove(g),o.setItemGraphicEl(d,null),g=null),g?VZ(g,c,y):g=I_(o,c,y,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=y,a.add(g),R_(g,c,y)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&P_(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var v=r.get("clip",!0)?g3(r.coordinateSystem,!1,r):null;return v?a.setClipPath(v):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,i){var n=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){P_(a,Et(o).dataIndex,r,o)}):n.removeAll()},e.type="pictorialBar",e}(Yt);function M_(t,e,r,i){var n=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=r.get("symbolPatternSize")||2,h=r.isAnimationEnabled(),c={dataIndex:e,layout:n,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:h?r:null,hoverScale:h&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};OZ(r,a,n,i,c),BZ(t,e,n,a,o,c.boundingLength,c.pxSign,f,i,c),kZ(r,c.symbolScale,u,i,c);var v=c.symbolSize,d=Y2(r.get("symbolOffset"),v);return FZ(r,v,n,a,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function OZ(t,e,r,i,n){var a=i.valueDim,o=t.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),f;if(X(o)){var h=[Gu(s,o[0])-l,Gu(s,o[1])-l];h[1]0?1:-1}function Gu(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function BZ(t,e,r,i,n,a,o,s,l,u){var f=l.valueDim,h=l.categoryDim,c=Math.abs(r[h.wh]),v=t.getItemVisual(e,"symbolSize"),d;X(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[h.index]=ot(d[h.index],c),d[f.index]=ot(d[f.index],i?c:Math.abs(a)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[f.index]*=(l.isHorizontal?-1:1)*o}function kZ(t,e,r,i,n){var a=t.get(RZ)||0;a&&(zu.attr({scaleX:e[0],scaleY:e[1],rotation:r}),zu.updateTransform(),a/=zu.getLineScale(),a*=e[i.valueDim.index]),n.valueLineWidth=a||0}function FZ(t,e,r,i,n,a,o,s,l,u,f,h){var c=f.categoryDim,v=f.valueDim,d=h.pxSign,p=Math.max(e[v.index]+s,0),g=p;if(i){var m=Math.abs(l),y=_r(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var x=ot(y,e[v.index]),w=Math.max(p+x*2,0),S=_?0:x*2,b=nT(i),T=b?i:N_((m+S)/w),A=m-T*p;x=A/2/(_?T:Math.max(T-1,1)),w=p+x*2,S=_?0:x*2,!b&&i!=="fixed"&&(T=u?N_((Math.abs(u)+S)/w):0),g=T*w-S,h.repeatTimes=T,h.symbolMargin=x}var D=d*(g/2),C=h.pathPosition=[];C[c.index]=r[c.wh]/2,C[v.index]=o==="start"?D:o==="end"?l-D:l/2,a&&(C[0]+=a[0],C[1]+=a[1]);var M=h.bundlePosition=[];M[c.index]=r[c.xy],M[v.index]=r[v.xy];var L=h.barRectShape=H({},r);L[v.wh]=d*Math.max(Math.abs(r[v.wh]),Math.abs(C[v.index]+D)),L[c.wh]=r[c.wh];var I=h.clipShape={};I[c.xy]=-r[c.xy],I[c.wh]=f.ecSize[c.wh],I[v.xy]=0,I[v.wh]=r[v.wh]}function tM(t){var e=t.symbolPatternSize,r=Ue(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function eM(t,e,r,i){var n=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,f=0,h=a[e.valueDim.index]+o+r.symbolMargin*2;for(kv(t,function(p){p.__pictorialAnimationIndex=f,p.__pictorialRepeatTimes=u,f0:m<0)&&(y=u-1-p),g[l.index]=h*(y-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function rM(t,e,r,i){var n=t.__pictorialBundle,a=t.__pictorialMainPath;a?qo(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,i):(a=t.__pictorialMainPath=tM(r),n.add(a),qo(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,i))}function iM(t,e,r){var i=H({},e.barRectShape),n=t.__pictorialBarRect;n?qo(n,null,{shape:i},e,r):(n=t.__pictorialBarRect=new Xt({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,t.add(n))}function nM(t,e,r,i){if(r.symbolClip){var n=t.__pictorialClipPath,a=H({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(n)re(n,{shape:a},s,l);else{a[o.wh]=0,n=new Xt({shape:a}),t.__pictorialBundle.setClipPath(n),t.__pictorialClipPath=n;var u={};u[o.wh]=r.clipShape[o.wh],X2[i?"updateProps":"initProps"](n,{shape:u},s,l)}}}function L_(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=zZ,r.isAnimationEnabled=GZ,r}function zZ(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function GZ(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function I_(t,e,r,i){var n=new Dt,a=new Dt;return n.add(a),n.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?eM(n,e,r):rM(n,e,r),iM(n,r,i),nM(n,e,r,i),n.__pictorialShapeStr=aM(t,r),n.__pictorialSymbolMeta=r,n}function VZ(t,e,r){var i=r.animationModel,n=r.dataIndex,a=t.__pictorialBundle;re(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},i,n),r.symbolRepeat?eM(t,e,r,!0):rM(t,e,r,!0),iM(t,r,!0),nM(t,e,r,!0)}function P_(t,e,r,i){var n=i.__pictorialBarRect;n&&n.removeTextContent();var a=[];kv(i,function(o){a.push(o)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(r=null),E(a,function(o){na(o,{scaleX:0,scaleY:0},r,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function aM(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function kv(t,e,r){E(t.__pictorialBundle.children(),function(i){i!==t.__pictorialBarRect&&e.call(r,i)})}function qo(t,e,r,i,n,a){e&&t.attr(e),i.symbolClip&&!n?r&&t.attr(r):r&&X2[n?"updateProps":"initProps"](t,r,i.animationModel,i.dataIndex,a)}function R_(t,e,r){var i=r.dataIndex,n=r.itemModel,a=n.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),f=a.get("focus"),h=a.get("blurScope"),c=a.get("scale");kv(t,function(p){if(p instanceof pr){var g=p.style;p.useStyle(H({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},r.style))}else p.useStyle(r.style);var m=p.ensureState("emphasis");m.style=o,c&&(m.scaleX=p.scaleX*1.1,m.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=r.z2});var v=e.valueDim.posDesc[+(r.boundingLength>0)],d=t.__pictorialBarRect;d.ignoreClip=!0,Ar(d,cr(n),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:u4(e.seriesModel.getData(),i),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:v}),ke(t,f,h,a.get("disabled"))}function N_(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var HZ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=fa(F7.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(F7);function UZ(t){t.registerChartView(NZ),t.registerSeriesModel(HZ),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Lt(FC,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,zC("pictorialBar"))}var WZ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,i,n){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),f=u.rect,h=u.boundaryGap;s.x=0,s.y=f.y+h[0];function c(g){return g.name}var v=new un(this._layersSeries||[],l,c,c),d=[];v.add(ct(p,this,"add")).update(ct(p,this,"update")).remove(ct(p,this,"remove")).execute();function p(g,m,y){var _=o._layers;if(g==="remove"){s.remove(_[m]);return}for(var x=[],w=[],S,b=l[m].indices,T=0;Ta&&(a=s),i.push(s)}for(var u=0;ua&&(a=h)}return{y0:n,max:a}}function jZ(t){t.registerChartView(WZ),t.registerSeriesModel(YZ),t.registerLayout(ZZ),t.registerProcessor(y3("themeRiver"))}var qZ=2,KZ=4,B_=function(t){F(e,t);function e(r,i,n,a){var o=t.call(this)||this;o.z2=qZ,o.textConfig={inside:!0},Et(o).seriesIndex=i.seriesIndex;var s=new Ht({z2:KZ,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,i,n,a),o}return e.prototype.updateData=function(r,i,n,a,o){this.node=i,i.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var s=this;Et(s).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),f=i.getLayout(),h=H({},f);h.label=null;var c=i.getVisual("style");c.lineJoin="bevel";var v=i.getVisual("decal");v&&(c.decal=s4(v,o));var d=d2(l.getModel("itemStyle"),h,!0);H(h,d),E(Xr,function(y){var _=s.ensureState(y),x=l.getModel([y,"itemStyle"]);_.style=x.getItemStyle();var w=d2(x,h);w&&(_.shape=w)}),r?(s.setShape(h),s.shape.r=f.r0,Ce(s,{shape:{r:f.r}},n,i.dataIndex)):(re(s,{shape:h},n),oi(s)),s.useStyle(c),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),m=g==="ancestor"?i.getAncestorsIndices():g==="descendant"?i.getDescendantIndices():g;ke(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var i=this,n=this.node.getModel(),a=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),h=this,c=h.getTextContent(),v=this.node.dataIndex,d=a.get("minAngle")/180*Math.PI,p=a.get("show")&&!(d!=null&&Math.abs(s)I&&!T7(R-I)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,r,i,n):(o.virtualPiece=new B_(y,r,i,n),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(i){var n=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!n&&o.piece&&o.piece===i.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";z9(u,f)}}n=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:dh,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(Yt),eQ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,i){var n={name:r.name,children:r.data};oM(n);var a=this._levelModels=j(r.levels||[],function(l){return new Jt(l,this,i)},this),o=wv.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var h=o.getNodeByDataIndex(f),c=a[h.depth];return c&&(u.parentModel=c),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(r);return i.treePathInfo=x5(n,this),i},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var i=this.getRawData().tree.root;(!r||r!==i&&!i.contains(r))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){fE(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Kt);function oM(t){var e=0;E(t.children,function(i){oM(i);var n=i.value;X(n)&&(n=n[0]),e+=n});var r=t.value;X(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),X(t.value)?t.value[0]=r:t.value=r}var F_=Math.PI/180;function rQ(t,e,r){e.eachSeriesByType(t,function(i){var n=i.get("center"),a=i.get("radius");X(a)||(a=[0,a]),X(n)||(n=[n,n]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=ot(n[0],o),f=ot(n[1],s),h=ot(a[0],l/2),c=ot(a[1],l/2),v=-i.get("startAngle")*F_,d=i.get("minAngle")*F_,p=i.getData().tree.root,g=i.getViewRoot(),m=g.depth,y=i.get("sort");y!=null&&sM(g,y);var _=0;E(g.children,function(R){!isNaN(R.getValue())&&_++});var x=g.getValue(),w=Math.PI/(x||_)*2,S=g.depth>0,b=g.height-(S?-1:1),T=(c-h)/(b||1),A=i.get("clockwise"),D=i.get("stillShowZeroSum"),C=A?1:-1,M=function(R,B){if(R){var O=B;if(R!==p){var z=R.getValue(),G=x===0&&D?w:z*w;G1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return i.depth>1&&ht(s)&&(s=i4(s,(i.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(i){var n=i.getData(),a=n.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,i,a.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");H(u,l)})})}function aQ(t){t.registerChartView(tQ),t.registerSeriesModel(eQ),t.registerLayout(Lt(rQ,"sunburst")),t.registerProcessor(Lt(y3,"sunburst")),t.registerVisual(nQ),JZ(t)}var z_={color:"fill",borderColor:"stroke"},oQ={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},tn=$t(),sQ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,i){return Bi(null,this)},e.prototype.getDataParams=function(r,i,n){var a=t.prototype.getDataParams.call(this,r,i);return n&&(a.info=tn(n).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Kt);function lQ(t,e){return e=e||[0,0],j(["x","y"],function(r,i){var n=this.getAxis(r),a=e[i],o=t[i]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(a-o)-n.dataToCoord(a+o))},this)}function uQ(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:ct(lQ,t)}}}function fQ(t,e){return e=e||[0,0],j([0,1],function(r){var i=e[r],n=t[r]/2,a=[],o=[];return a[r]=i-n,o[r]=i+n,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function hQ(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:ct(fQ,t)}}}function cQ(t,e){var r=this.getAxis(),i=e instanceof Array?e[0]:e,n=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(i-n)-r.dataToCoord(i+n))}function vQ(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:ct(cQ,t)}}}function dQ(t,e){return e=e||[0,0],j(["Radius","Angle"],function(r,i){var n="get"+r+"Axis",a=this[n](),o=e[i],s=t[i]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function pQ(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(n){var a=e.dataToRadius(n[0]),o=r.dataToAngle(n[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:ct(dQ,t)}}}function gQ(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(i,n){return t.dataToPoint(i,n)}}}}function lM(t,e,r,i){return t&&(t.legacy||t.legacy!==!1&&!r&&!i&&e!=="tspan"&&(e==="text"||gt(t,"text")))}function uM(t,e,r){var i=t,n,a,o;if(e==="text")o=i;else{o={},gt(i,"text")&&(o.text=i.text),gt(i,"rich")&&(o.rich=i.rich),gt(i,"textFill")&&(o.fill=i.textFill),gt(i,"textStroke")&&(o.stroke=i.textStroke),gt(i,"fontFamily")&&(o.fontFamily=i.fontFamily),gt(i,"fontSize")&&(o.fontSize=i.fontSize),gt(i,"fontStyle")&&(o.fontStyle=i.fontStyle),gt(i,"fontWeight")&&(o.fontWeight=i.fontWeight),a={type:"text",style:o,silent:!0},n={};var s=gt(i,"textPosition");r?n.position=s?i.textPosition:"inside":s&&(n.position=i.textPosition),gt(i,"textPosition")&&(n.position=i.textPosition),gt(i,"textOffset")&&(n.offset=i.textOffset),gt(i,"textRotation")&&(n.rotation=i.textRotation),gt(i,"textDistance")&&(n.distance=i.textDistance)}return G_(o,t),E(o.rich,function(l){G_(l,l)}),{textConfig:n,textContent:a}}function G_(t,e){e&&(e.font=e.textFont||e.font,gt(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),gt(e,"textAlign")&&(t.align=e.textAlign),gt(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),gt(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),gt(e,"textWidth")&&(t.width=e.textWidth),gt(e,"textHeight")&&(t.height=e.textHeight),gt(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),gt(e,"textPadding")&&(t.padding=e.textPadding),gt(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),gt(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),gt(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),gt(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),gt(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),gt(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),gt(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function V_(t,e,r){var i=t;i.textPosition=i.textPosition||r.position||"inside",r.offset!=null&&(i.textOffset=r.offset),r.rotation!=null&&(i.textRotation=r.rotation),r.distance!=null&&(i.textDistance=r.distance);var n=i.textPosition.indexOf("inside")>=0,a=t.fill||"#000";H_(i,e);var o=i.textFill==null;return n?o&&(i.textFill=r.insideFill||"#fff",!i.textStroke&&r.insideStroke&&(i.textStroke=r.insideStroke),!i.textStroke&&(i.textStroke=a),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(o&&(i.textFill=t.fill||r.outsideFill||"#000"),!i.textStroke&&r.outsideStroke&&(i.textStroke=r.outsideStroke)),i.text=e.text,i.rich=e.rich,E(e.rich,function(s){H_(s,s)}),i}function H_(t,e){e&&(gt(e,"fill")&&(t.textFill=e.fill),gt(e,"stroke")&&(t.textStroke=e.fill),gt(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),gt(e,"font")&&(t.font=e.font),gt(e,"fontStyle")&&(t.fontStyle=e.fontStyle),gt(e,"fontWeight")&&(t.fontWeight=e.fontWeight),gt(e,"fontSize")&&(t.fontSize=e.fontSize),gt(e,"fontFamily")&&(t.fontFamily=e.fontFamily),gt(e,"align")&&(t.textAlign=e.align),gt(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),gt(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),gt(e,"width")&&(t.textWidth=e.width),gt(e,"height")&&(t.textHeight=e.height),gt(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),gt(e,"padding")&&(t.textPadding=e.padding),gt(e,"borderColor")&&(t.textBorderColor=e.borderColor),gt(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),gt(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),gt(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),gt(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),gt(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),gt(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),gt(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),gt(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),gt(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),gt(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var fM={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},U_=Ut(fM);ni(Pi,function(t,e){return t[e]=1,t},{});Pi.join(", ");var o0=["","style","shape","extra"],c4=$t();function Fv(t,e,r,i,n){var a=t+"Animation",o=L4(t,i,n)||{},s=c4(e).userDuring;return o.duration>0&&(o.during=s?ct(SQ,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),H(o,r[a]),o}function c9(t,e,r,i){i=i||{};var n=i.dataIndex,a=i.isInit,o=i.clearStyle,s=r.isAnimationEnabled(),l=c4(t),u=e.style;l.userDuring=e.during;var f={},h={};if(bQ(t,e,h),X_("shape",e,h),X_("extra",e,h),!a&&s&&(wQ(t,e,f),W_("shape",t,e,f),W_("extra",t,e,f),TQ(t,e,u,f)),h.style=u,mQ(t,h,o),_Q(t,e),s)if(a){var c={};E(o0,function(d){var p=d?e[d]:e;p&&p.enterFrom&&(d&&(c[d]=c[d]||{}),H(d?c[d]:c,p.enterFrom))});var v=Fv("enter",t,e,r,n);v.duration>0&&t.animateFrom(c,v)}else yQ(t,e,n||0,r,f);hM(t,e),u?t.dirty():t.markRedraw()}function hM(t,e){for(var r=c4(t).leaveToProps,i=0;i0&&t.animateFrom(n,a)}}function _Q(t,e){gt(e,"silent")&&(t.silent=e.silent),gt(e,"ignore")&&(t.ignore=e.ignore),t instanceof k1&>(e,"invisible")&&(t.invisible=e.invisible),t instanceof zt&>(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var di={},xQ={setTransform:function(t,e){return di.el[t]=e,this},getTransform:function(t){return di.el[t]},setShape:function(t,e){var r=di.el,i=r.shape||(r.shape={});return i[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=di.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=di.el,i=r.style;return i&&(i[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=di.el.style;if(e)return e[t]},setExtra:function(t,e){var r=di.el.extra||(di.el.extra={});return r[t]=e,this},getExtra:function(t){var e=di.el.extra;if(e)return e[t]}};function SQ(){var t=this,e=t.el;if(e){var r=c4(e).userDuring,i=t.userDuring;if(r!==i){t.el=t.userDuring=null;return}di.el=e,i(xQ)}}function W_(t,e,r,i){var n=r[t];if(n){var a=e[t],o;if(a){var s=r.transition,l=n.transition;if(l)if(!o&&(o=i[t]={}),A2(l))H(o,a);else for(var u=de(l),f=0;f=0){!o&&(o=i[t]={});for(var v=Ut(a),f=0;f=0)){var c=t.getAnimationStyleProps(),v=c?c.style:null;if(v){!a&&(a=i.style={});for(var d=Ut(r),u=0;u=0?e.getStore().get(B,P):void 0}var O=e.get(R.name,P),z=R&&R.ordinalMeta;return z?z.categories[O]:O}function S(I,P){P==null&&(P=u);var R=e.getItemVisual(P,"style"),B=R&&R.fill,O=R&&R.opacity,z=y(P,Yn).getItemStyle();B!=null&&(z.fill=B),O!=null&&(z.opacity=O);var G={inheritColor:ht(B)?B:"#000"},U=_(P,Yn),Z=fe(U,null,G,!1,!0);Z.text=U.getShallow("show")?It(t.getFormattedLabel(P,Yn),u4(e,P)):null;var $=B9(U,G,!1);return A(I,z),z=V_(z,Z,$),I&&T(z,I),z.legacy=!0,z}function b(I,P){P==null&&(P=u);var R=y(P,en).getItemStyle(),B=_(P,en),O=fe(B,null,null,!0,!0);O.text=B.getShallow("show")?Ci(t.getFormattedLabel(P,en),t.getFormattedLabel(P,Yn),u4(e,P)):null;var z=B9(B,null,!0);return A(I,R),R=V_(R,O,z),I&&T(R,I),R.legacy=!0,R}function T(I,P){for(var R in P)gt(P,R)&&(I[R]=P[R])}function A(I,P){I&&(I.textFill&&(P.textFill=I.textFill),I.textPosition&&(P.textPosition=I.textPosition))}function D(I,P){if(P==null&&(P=u),gt(z_,I)){var R=e.getItemVisual(P,"style");return R?R[z_[I]]:null}if(gt(oQ,I))return e.getItemVisual(P,I)}function C(I){if(a.type==="cartesian2d"){var P=a.getBaseAxis();return Az(xt({axis:P},I))}}function M(){return r.getCurrentSeriesIndices()}function L(I){return Ac(I,r)}}function NQ(t){var e={};return E(t.dimensions,function(r){var i=t.getDimensionInfo(r);if(!i.isExtraCoord){var n=i.coordDim,a=e[n]=e[n]||[];a[i.coordDimIndex]=t.getDimensionIndex(r)}}),e}function Wu(t,e,r,i,n,a,o){if(!i){a.remove(e);return}var s=Uv(t,e,r,i,n,a);return s&&o.setItemGraphicEl(r,s),s&&ke(s,i.focus,i.blurScope,i.emphasisDisabled),s}function Uv(t,e,r,i,n,a){var o=-1,s=e;e&&pM(e,i,n)&&(o=kt(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Vv(i),s&&LQ(s,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),y1.normal.cfg=y1.normal.conOpt=y1.emphasis.cfg=y1.emphasis.conOpt=y1.blur.cfg=y1.blur.conOpt=y1.select.cfg=y1.select.conOpt=null,y1.isLegacy=!1,BQ(u,r,i,n,l,y1),OQ(u,r,i,n,l),Hv(t,u,r,i,y1,n,l),gt(i,"info")&&(tn(u).info=i.info);for(var f=0;f=0?a.replaceAt(u,o):a.add(u),u}function pM(t,e,r){var i=tn(t),n=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||n!=null&&n!==i.customGraphicType||n==="path"&&VQ(a)&&gM(a)!==i.customPathData||n==="image"&>(o,"image")&&o.image!==i.customImagePath}function OQ(t,e,r,i,n){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&pM(o,a,i)&&(o=null),o||(o=Vv(a),t.setClipPath(o)),Hv(null,o,e,a,null,i,n)}}function BQ(t,e,r,i,n,a){if(!t.isGroup){Z_(r,null,a),Z_(r,en,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=t.getTextContent();if(o===!1)f&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=Vv(o),t.setTextContent(f)),Hv(null,f,e,o,null,i,n);for(var h=o&&o.style,c=0;c=f;v--){var d=e.childAt(v);FQ(e,d,n)}}}function FQ(t,e,r){e&&b5(e,tn(t).option,r)}function zQ(t){new un(t.oldChildren,t.newChildren,Q_,Q_,t).add(j_).update(j_).remove(GQ).execute()}function Q_(t,e){var r=t&&t.name;return r!=null?r:EQ+e}function j_(t,e){var r=this.context,i=t!=null?r.newChildren[t]:null,n=e!=null?r.oldChildren[e]:null;Uv(r.api,n,r.dataIndex,i,r.seriesModel,r.group)}function GQ(t){var e=this.context,r=e.oldChildren[t];r&&b5(r,tn(r).option,e.seriesModel)}function gM(t){return t&&(t.pathData||t.d)}function VQ(t){return t&&(gt(t,"pathData")||gt(t,"d"))}function HQ(t){t.registerChartView(IQ),t.registerSeriesModel(sQ)}var a2=$t(),q_=At,Xu=ct,Xv=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,i,n){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,i);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new Dt,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),i.getZr().add(s);else{var c=Lt(K_,r,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,r)}J_(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var i=r.get("animation"),n=e.axis,a=n.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&n.getBandWidth()>s)return!0;if(o){var l=dv(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},t.prototype.makeElOption=function(e,r,i,n,a){},t.prototype.createPointerEl=function(e,r,i,n){var a=r.pointer;if(a){var o=a2(e).pointerEl=new X2[a.type](q_(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,i,n){if(r.label){var a=a2(e).labelEl=new Ht(q_(r.label));e.add(a),$_(a,n)}},t.prototype.updatePointerEl=function(e,r,i){var n=a2(e).pointerEl;n&&r.pointer&&(n.setStyle(r.pointer.style),i(n,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,i,n){var a=a2(e).labelEl;a&&(a.setStyle(r.label.style),i(a,{x:r.label.x,y:r.label.y}),$_(a,n))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=h3(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){an(u.event)},onmousedown:Xu(this._onHandleDragMove,this,0,0),drift:Xu(this._onHandleDragMove,this),ondragend:Xu(this._onHandleDragEnd,this)}),i.add(n)),J_(n,r,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");X(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,z4(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){K_(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Yu(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Yu(i),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Yu(n)),a2(i).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),i=this._group,n=this._handle;r&&i&&(this._lastGraphicKey=null,i&&r.remove(i),n&&r.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),P7(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,i){return i=i||0,{x:e[i],y:e[1-i],width:r[i],height:r[1-i]}},t}();function K_(t,e,r,i){mM(a2(r).lastProp,i)||(a2(r).lastProp=i,e?re(r,i,t):(r.stopAnimation(),r.attr(i)))}function mM(t,e){if(Tt(t)&&Tt(e)){var r=!0;return E(e,function(i,n){r=r&&mM(t[n],i)}),!!r}else return t===e}function $_(t,e){t[e.get(["label","show"])?"show":"hide"]()}function Yu(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function J_(t,e,r){var i=e.get("z"),n=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=r)})}function Yv(t){var e=t.get("type"),r=t.getModel(e+"Style"),i;return e==="line"?(i=r.getLineStyle(),i.fill=null):e==="shadow"&&(i=r.getAreaStyle(),i.stroke=null),i}function yM(t,e,r,i,n){var a=r.get("value"),o=_M(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=N4(s.get("padding")||0),u=s.getFont(),f=a3(o,u),h=n.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=n.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var p=n.verticalAlign;p==="bottom"&&(h[1]-=v),p==="middle"&&(h[1]-=v/2),UQ(h,c,v,i);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:fe(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function UQ(t,e,r,i){var n=i.getWidth(),a=i.getHeight();t[0]=Math.min(t[0]+e,n)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function _M(t,e,r,i,n){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:n.precision}),o=n.formatter;if(o){var s={value:tv(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};E(i,function(l){var u=r.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),ht(o)?a=o.replace("{value}",a):wt(o)&&(a=o(s))}return a}function Zv(t,e,r){var i=a1();return U2(i,i,r.rotation),Ii(i,i,r.position),ri([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],i)}function xM(t,e,r,i,n,a){var o=Hr.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=n.get(["label","margin"]),yM(e,i,n,a,{position:Zv(i.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Qv(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function SM(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function tx(t,e,r,i,n,a){return{cx:t,cy:e,r0:r,r:i,startAngle:n,endAngle:a,clockwise:!0}}var WQ=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),f=ex(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var c=Yv(a),v=XQ[u](s,h,f);v.style=c,r.graphicKey=v.type,r.pointer=v}var d=Kf(l.model,n);xM(i,r,d,n,a,o)},e.prototype.getHandleTransform=function(r,i,n){var a=Kf(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Zv(i.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=ex(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[r.x,r.y];h[f]+=i[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var c=(u[1]+u[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:v,tooltipOption:d[f]}},e}(Xv);function ex(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var XQ={line:function(t,e,r){var i=Qv([e,r[0]],[e,r[1]],rx(t));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(t,e,r){var i=Math.max(1,t.getBandWidth()),n=r[1]-r[0];return{type:"Rect",shape:SM([e-i/2,r[0]],[i,n],rx(t))}}};function rx(t){return t.dim==="x"?0:1}var YQ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Bt),qi=$t(),ZQ=E;function wM(t,e,r){if(!Vt.node){var i=e.getZr();qi(i).records||(qi(i).records={}),QQ(i,e);var n=qi(i).records[t]||(qi(i).records[t]={});n.handler=r}}function QQ(t,e){if(qi(t).initialized)return;qi(t).initialized=!0,r("click",Lt(ix,"click")),r("mousemove",Lt(ix,"mousemove")),r("globalout",qQ);function r(i,n){t.on(i,function(a){var o=KQ(e);ZQ(qi(t).records,function(s){s&&n(s,a,o.dispatchAction)}),jQ(o.pendings,e)})}}function jQ(t,e){var r=t.showTip.length,i=t.hideTip.length,n;r?n=t.showTip[r-1]:i&&(n=t.hideTip[i-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function qQ(t,e,r){t.handler("leave",null,r)}function ix(t,e,r,i){e.handler(t,r,i)}function KQ(t){var e={showTip:[],hideTip:[]},r=function(i){var n=e[i.type];n?n.push(i):(i.dispatchAction=r,t.dispatchAction(i))};return{dispatchAction:r,pendings:e}}function mh(t,e){if(!Vt.node){var r=e.getZr(),i=(qi(r).records||{})[t];i&&(qi(r).records[t]=null)}}var $Q=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){var a=i.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";wM("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,i){mh("axisPointer",i)},e.prototype.dispose=function(r,i){mh("axisPointer",i)},e.type="axisPointer",e}(ge);function bM(t,e){var r=[],i=t.seriesIndex,n;if(i==null||!(n=e.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=L2(a,t);if(o==null||o<0||X(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,c=u.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),p=[];p[v]=a.get(d,o),p[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(p)||[]}else r=l.dataToPoint(a.getValues(j(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var nx=$t();function JQ(t,e,r){var i=t.currTrigger,n=[t.x,t.y],a=t,o=t.dispatchAction||ct(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){v9(n)&&(n=bM({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=v9(n),u=a.axesInfo,f=s.axesInfo,h=i==="leave"||v9(n),c={},v={},d={list:[],map:{}},p={showPointer:Lt(ej,v),showTooltip:Lt(rj,d)};E(s.coordSysMap,function(m,y){var _=l||m.containPoint(n);E(s.coordSysAxesInfo[y],function(x,w){var S=x.axis,b=oj(u,x);if(!h&&_&&(!u||b)){var T=b&&b.value;T==null&&!l&&(T=S.pointToData(n)),T!=null&&ax(x,T,p,!1,c)}})});var g={};return E(f,function(m,y){var _=m.linkGroup;_&&!v[y]&&E(_.axesInfo,function(x,w){var S=v[w];if(x!==m&&S){var b=S.value;_.mapper&&(b=m.axis.scale.parse(_.mapper(b,ox(x),ox(m)))),g[m.key]=b}})}),E(g,function(m,y){ax(f[y],m,p,!0,c)}),ij(v,f,c),nj(d,n,t,o),aj(f,o,r),c}}function ax(t,e,r,i,n){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=tj(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&H(n,s[0]),!i&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function tj(t,e){var r=e.axis,i=r.dim,n=t,a=[],o=Number.MAX_VALUE,s=-1;return E(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(i),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,t,r);c=v.dataIndices,h=v.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],t,r.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=t-h,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,n=h,a.length=0),E(c,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:n}}function ej(t,e,r,i){t[e.key]={value:r,payloadBatch:i}}function rj(t,e,r,i){var n=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=z7(l),f=t.map[u];f||(f=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function ij(t,e,r){var i=r.axesInfo=[];E(e,function(n,a){var o=n.axisPointerModel.option,s=t[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function nj(t,e,r,i){if(v9(e)||!t.list.length){i({type:"hideTip"});return}var n=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:t.list})}function aj(t,e,r){var i=r.getZr(),n="axisPointerLastHighlights",a=nx(i)[n]||{},o=nx(i)[n]={};E(t,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&E(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];E(a,function(u,f){!o[f]&&l.push(u)}),E(o,function(u,f){!a[f]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function oj(t,e){for(var r=0;r<(t||[]).length;r++){var i=t[r];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function ox(t){var e=t.axis.model,r={},i=r.axisDim=t.axis.dim;return r.axisIndex=r[i+"AxisIndex"]=e.componentIndex,r.axisName=r[i+"AxisName"]=e.name,r.axisId=r[i+"AxisId"]=e.id,r}function v9(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function w3(t){j2.registerAxisPointerClass("CartesianAxisPointer",WQ),t.registerComponentModel(YQ),t.registerComponentView($Q),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!X(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=yH(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},JQ)}function sj(t){Ct(jD),Ct(w3)}var lj=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,i,n,a,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),h=s.dataToCoord(i),c=a.get("type");if(c&&c!=="none"){var v=Yv(a),d=fj[c](s,l,h,f);d.style=v,r.graphicKey=d.type,r.pointer=d}var p=a.get(["label","margin"]),g=uj(i,n,a,l,p);yM(r,n,a,o,g)},e}(Xv);function uj(t,e,r,i,n){var a=e.axis,o=a.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,f,h;if(a.dim==="radius"){var c=a1();U2(c,c,s),Ii(c,c,[i.cx,i.cy]),u=ri([o,-n],c);var v=e.getModel("axisLabel").get("rotate")||0,d=Hr.innerTextLayout(s,v*Math.PI/180,-1);f=d.textAlign,h=d.textVerticalAlign}else{var p=l[1];u=i.coordToPoint([p+n,o]);var g=i.cx,m=i.cy;f=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-m)/p<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:f,verticalAlign:h}}var fj={line:function(t,e,r,i){return t.dim==="angle"?{type:"Line",shape:Qv(e.coordToPoint([i[0],r]),e.coordToPoint([i[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,i){var n=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:tx(e.cx,e.cy,i[0],i[1],(-r-n/2)*a,(-r+n/2)*a)}:{type:"Sector",shape:tx(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}},hj=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var i,n=this.ecModel;return n.eachComponent(r,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Bt),jv=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",je).models[0]},e.type="polarAxis",e}(Bt);Xe(jv,W4);var cj=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(jv),vj=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(jv),qv=function(t){F(e,t);function e(r,i){return t.call(this,"radius",r,i)||this}return e.prototype.pointToData=function(r,i){return this.polar.pointToData(r,i)[this.dim==="radius"?0:1]},e}(Kr);qv.prototype.dataToRadius=Kr.prototype.dataToCoord;qv.prototype.radiusToData=Kr.prototype.coordToData;var dj=$t(),Kv=function(t){F(e,t);function e(r,i){return t.call(this,"angle",r,i||[0,360])||this}return e.prototype.pointToData=function(r,i){return this.polar.pointToData(r,i)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,i=r.getLabelModel(),n=r.scale,a=n.getExtent(),o=n.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),f=a3(s==null?"":s+"",i.getFont(),"center","top"),h=Math.max(f.height,7),c=h/u;isNaN(c)&&(c=1/0);var v=Math.max(0,Math.floor(c)),d=dj(r.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-v)<=1&&Math.abs(g-o)<=1&&p>v?v=p:(d.lastTickCount=o,d.lastAutoInterval=v),v},e}(Kr);Kv.prototype.dataToAngle=Kr.prototype.dataToCoord;Kv.prototype.angleToData=Kr.prototype.coordToData;var TM=["radius","angle"],pj=function(){function t(e){this.dimensions=TM,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new qv,this._angleAxis=new Kv,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===e&&r.push(i),n.scale.type===e&&r.push(n),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)])},t.prototype.pointToData=function(e,r){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],r),this._angleAxis.angleToData(i[1],r)]},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,i=e[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+i*i);r/=l,i/=l;for(var u=Math.atan2(-i,r)/Math.PI*180,f=us;)u+=f*360;return[l,u]},t.prototype.coordToPoint=function(e){var r=e[0],i=e[1]/180*Math.PI,n=Math.cos(i)*r+this.cx,a=-Math.sin(i)*r+this.cy;return[n,a]},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),i=r.getExtent().slice();i[0]>i[1]&&i.reverse();var n=e.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,f=l*l+u*u-1e-4,h=this.r,c=this.r0;return f<=h*h&&f>=c*c}}},t.prototype.convertToPixel=function(e,r,i){var n=sx(r);return n===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(e,r,i){var n=sx(r);return n===this?this.pointToData(i):null},t}();function sx(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}const gj=pj;function mj(t,e,r){var i=e.get("center"),n=r.getWidth(),a=r.getHeight();t.cx=ot(i[0],n),t.cy=ot(i[1],a);var o=t.getRadiusAxis(),s=Math.min(n,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:X(l)||(l=[0,l]);var u=[ot(l[0],s),ot(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function yj(t,e){var r=this,i=r.getAngleAxis(),n=r.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();E(j9(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),E(j9(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),N2(i.scale,i.model),N2(n.scale,n.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function _j(t){return t.mainType==="angleAxis"}function lx(t,e){var r;if(t.type=e.get("type"),t.scale=v3(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),_j(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),n=(r=e.get("endAngle"))!==null&&r!==void 0?r:i+(t.inverse?-360:360);t.setExtent(i,n)}e.axis=t,t.model=e}var xj={dimensions:TM,create:function(t,e){var r=[];return t.eachComponent("polar",function(i,n){var a=new gj(n+"");a.update=yj;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");lx(o,l),lx(s,u),mj(a,i,e),r.push(a),i.coordinateSystem=a,a.model=i}),t.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var n=i.getReferringComponents("polar",je).models[0];i.coordinateSystem=n.coordinateSystem}}),r}},Sj=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function bs(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],r]),n=t.coordToPoint([e[1],r]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function Ts(t){var e=t.getRadiusAxis();return e.inverse?0:1}function ux(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var wj=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,i){if(this.group.removeAll(),!!r.get("show")){var n=r.axis,a=n.polar,o=a.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=j(n.getViewLabels(),function(f){f=At(f);var h=n.scale,c=h.type==="ordinal"?h.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(c),f});ux(u),ux(s),E(Sj,function(f){r.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&bj[f](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(j2),bj={axisLine:function(t,e,r,i,n,a){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=Ts(r),h=f?0:1,c,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?c=new X2[v]({shape:{cx:r.cx,cy:r.cy,r:a[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):c=new l3({shape:{cx:r.cx,cy:r.cy,r:a[f],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),c.style.fill=null,t.add(c)},axisTick:function(t,e,r,i,n,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Ts(r)],u=j(i,function(f){return new ar({shape:bs(r,[l,l+s],f.coord)})});t.add(M1(u,{style:xt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,i,n,a){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Ts(r)],f=[],h=0;hm?"left":"right",x=Math.abs(g[1]-y)/p<.3?"middle":g[1]>y?"top":"bottom";if(s&&s[d]){var w=s[d];Tt(w)&&w.textStyle&&(v=new Jt(w.textStyle,l,l.ecModel))}var S=new Ht({silent:Hr.isLabelSilent(e),style:fe(v,{x:g[0],y:g[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:x})});if(t.add(S),f){var b=Hr.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=h.rawLabel,Et(S).eventData=b}},this)},splitLine:function(t,e,r,i,n,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],h=0;h=0?"p":"n",P=A;w&&(i[f][L]||(i[f][L]={p:A,n:A}),P=i[f][L][I]);var R=void 0,B=void 0,O=void 0,z=void 0;if(d.dim==="radius"){var G=d.dataToCoord(M)-A,U=l.dataToCoord(L);Math.abs(G)=z})}}})}function Lj(t){var e={};E(t,function(i,n){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=CM(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=h.stacks;e[l]=h;var v=AM(i);c[v]||h.autoWidthCount++,c[v]=c[v]||{width:0,maxWidth:0};var d=ot(i.get("barWidth"),f),p=ot(i.get("barMaxWidth"),f),g=i.get("barGap"),m=i.get("barCategoryGap");d&&!c[v].width&&(d=Math.min(h.remainedWidth,d),c[v].width=d,h.remainedWidth-=d),p&&(c[v].maxWidth=p),g!=null&&(h.gap=g),m!=null&&(h.categoryGap=m)});var r={};return E(e,function(i,n){r[n]={};var a=i.stacks,o=i.bandWidth,s=ot(i.categoryGap,o),l=ot(i.gap,1),u=i.remainedWidth,f=i.autoWidthCount,h=(u-s)/(f+(f-1)*l);h=Math.max(h,0),E(a,function(p,g){var m=p.maxWidth;m&&m=r.y&&e[1]<=r.y+r.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e){var r=this.getAxis();return[r.coordToData(r.toLocalCoord(e[r.orient==="horizontal"?0:1]))]},t.prototype.dataToPoint=function(e){var r=this.getAxis(),i=this.getRect(),n=[],a=r.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[a]=r.toGlobalCoord(r.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},t.prototype.convertToPixel=function(e,r,i){var n=fx(r);return n===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(e,r,i){var n=fx(r);return n===this?this.pointToData(i):null},t}();function fx(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Vj(t,e){var r=[];return t.eachComponent("singleAxis",function(i,n){var a=new Gj(i,t,e);a.name="single_"+n,a.resize(i,e),i.coordinateSystem=a,r.push(a)}),t.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var n=i.getReferringComponents("singleAxis",je).models[0];i.coordinateSystem=n&&n.coordinateSystem}}),r}var Hj={create:Vj,dimensions:DM},hx=["x","y"],Uj=["width","height"],Wj=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,i,n,a,o){var s=n.axis,l=s.coordinateSystem,u=Zu(l,1-u0(s)),f=l.dataToPoint(i)[0],h=a.get("type");if(h&&h!=="none"){var c=Yv(a),v=Xj[h](s,f,u);v.style=c,r.graphicKey=v.type,r.pointer=v}var d=yh(n);xM(i,r,d,n,a,o)},e.prototype.getHandleTransform=function(r,i,n){var a=yh(i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Zv(i.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,i,n,a){var o=n.axis,s=o.coordinateSystem,l=u0(o),u=Zu(s,l),f=[r.x,r.y];f[l]+=i[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var h=Zu(s,1-l),c=(h[1]+h[0])/2,v=[c,c];return v[l]=f[l],{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(Xv),Xj={line:function(t,e,r){var i=Qv([e,r[0]],[e,r[1]],u0(t));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(t,e,r){var i=t.getBandWidth(),n=r[1]-r[0];return{type:"Rect",shape:SM([e-i/2,r[0]],[i,n],u0(t))}}};function u0(t){return t.isHorizontal()?0:1}function Zu(t,e){var r=t.getRect();return[r[hx[e]],r[hx[e]]+r[Uj[e]]]}var Yj=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(ge);function Zj(t){Ct(w3),j2.registerAxisPointerClass("SingleAxisPointer",Wj),t.registerComponentView(Yj),t.registerComponentView(kj),t.registerComponentModel(d9),f4(t,"single",d9,d9.defaultOption),t.registerCoordinateSystem("single",Hj)}var Qj=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,i,n){var a=O4(r);t.prototype.init.apply(this,arguments),cx(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),cx(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Bt);function cx(t,e){var r=t.cellSize,i;X(r)?i=r:i=t.cellSize=[r,r],i.length===1&&(i[1]=i[0]);var n=j([0,1],function(a){return bB(e,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});aa(t,e,{type:"box",ignoreSize:n})}var jj=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=i.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,i,n){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=i.start.time;u<=i.end.time;u=a.getNextNDay(u,1).time){var f=a.dataToRect([u],!1).tl,h=new Xt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(h)}},e.prototype._renderLines=function(r,i,n,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=i.start,c=0;h.time<=i.end.time;c++){d(h.formatedDate),c===0&&(h=s.getDateInfo(i.start.y+"-"+i.start.m));var v=h.date;v.setMonth(v.getMonth()+1),h=s.getDateInfo(v)}d(s.getNextNDay(i.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToRect([p],!1).tl);var g=o._getLinePointsOfOneWeek(r,p,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,n),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,n),l,a)},e.prototype._getEdgesPoints=function(r,i,n){var a=[r[0].slice(),r[r.length-1].slice()],o=n==="horizontal"?0:1;return a[0][o]=a[0][o]-i/2,a[1][o]=a[1][o]+i/2,a},e.prototype._drawSplitline=function(r,i,n){var a=new qr({z2:20,shape:{points:r},style:i});n.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,i,n){for(var a=r.coordinateSystem,o=a.getDateInfo(i),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),f=a.dataToRect([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,i){return ht(r)&&r?_B(r,i):wt(r)?r(i):i.nameMap},e.prototype._yearTextPositionControl=function(r,i,n,a,o){var s=i[0],l=i[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(a==="left"||a==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,i,n,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,c=n==="horizontal"?0:1,v={top:[f,u[c][1]],bottom:[f,u[1-c][1]],left:[u[1-c][0],h],right:[u[c][0],h]},d=i.start.y;+i.end.y>+i.start.y&&(d=d+"-"+i.end.y);var p=o.get("formatter"),g={start:i.start.y,end:i.end.y,nameMap:d},m=this._formatterLabel(p,g),y=new Ht({z2:30,style:fe(o,{text:m})});y.attr(this._yearTextPositionControl(y,v[l],n,l,s)),a.add(y)}},e.prototype._monthTextPositionControl=function(r,i,n,a,o){var s="left",l="top",u=r[0],f=r[1];return n==="horizontal"?(f=f+o,i&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),a==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,i,n,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||ht(s))&&(s&&(i=Cf(s)||i),s=i.get(["time","monthAbbr"])||[]);var c=u==="start"?0:1,v=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=f==="center",p=0;p=n.start.time&&i.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],i;r[0].time>r[1].time&&(i=!0,r.reverse());var n=Math.floor(r[1].time/Qu)-Math.floor(r[0].time/Qu)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+n-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)n-=u,a.setDate(l-u);var f=Math.floor((n+r[0].day+6)/7),h=i?-f+1:f-1;return i&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:n,weeks:f,nthWeek:h,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,i){var n=this._getRangeInfo(i);if(e>n.weeks||e===0&&rn.lweek)return null;var a=(e-1)*7-n.fweek+r,o=new Date(n.start.time);return o.setDate(+n.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var i=[];return e.eachComponent("calendar",function(n){var a=new t(n);i.push(a),n.coordinateSystem=a}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=i[n.get("calendarIndex")||0])}),i},t.dimensions=["time","value"],t}();function vx(t){var e=t.calendarModel,r=t.seriesModel,i=e?e.coordinateSystem:r?r.coordinateSystem:null;return i}function Kj(t){t.registerComponentModel(Qj),t.registerComponentView(jj),t.registerCoordinateSystem("calendar",qj)}function $j(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var i=e.parentOption;i?e.parentId=i.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function dx(t,e){var r;return E(e,function(i){t[i]!=null&&t[i]!=="auto"&&(r=!0)}),r}function Jj(t,e,r){var i=H({},r),n=t[e],a=r.$action||"merge";a==="merge"?n?(mt(n,i,!0),aa(n,i,{ignoreSize:!0}),cA(r,n),As(r,n),As(r,n,"shape"),As(r,n,"style"),As(r,n,"extra"),r.clipPath=n.clipPath):t[e]=i:a==="replace"?t[e]=i:a==="remove"&&n&&(t[e]=null)}var EM=["transition","enterFrom","leaveTo"],tq=EM.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function As(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var i=r?EM:tq,n=0;n=0;f--){var h=n[f],c=tr(h.id,null),v=c!=null?o.get(c):null;if(v){var d=v.parent,m=T1(d),y=d===a?{width:s,height:l}:{width:m.width,height:m.height},_={},x=o5(v,h,y,null,{hv:h.hv,boundingMode:h.bounding},_);if(!T1(v).isNew&&x){for(var w=h.transition,S={},b=0;b=0)?S[T]=A:v[T]=A}re(v,S,r,0)}else v.attr(_)}}},e.prototype._clear=function(){var r=this,i=this._elMap;i.each(function(n){p9(n,T1(n).option,i,r._lastGraphicModel)}),this._elMap=yt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(ge);function _h(t){var e=gt(px,t)?px[t]:Tc(t),r=new e({});return T1(r).type=t,r}function gx(t,e,r,i){var n=_h(r);return e.add(n),i.set(t,n),T1(n).id=t,T1(n).isNew=!0,n}function p9(t,e,r,i){var n=t&&t.parent;n&&(t.type==="group"&&t.traverse(function(a){p9(a,e,r,i)}),b5(t,e,i),r.removeKey(T1(t).id))}function mx(t,e,r,i){t.isGroup||E([["cursor",k1.prototype.cursor],["zlevel",i||0],["z",r||0],["z2",0]],function(n){var a=n[0];gt(e,a)?t[a]=It(e[a],n[1]):t[a]==null&&(t[a]=n[1])}),E(Ut(e),function(n){if(n.indexOf("on")===0){var a=e[n];t[n]=wt(a)?a:null}}),gt(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function nq(t){return t=H({},t),E(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(hA),function(e){delete t[e]}),t}function aq(t,e,r){var i=Et(t).eventData;!t.silent&&!t.ignore&&!i&&(i=Et(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=r.info)}function oq(t){t.registerComponentModel(rq),t.registerComponentView(iq),t.registerPreprocessor(function(e){var r=e.graphic;X(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var yx=["x","y","radius","angle","single"],sq=["cartesian2d","polar","singleAxis"];function lq(t){var e=t.get("coordinateSystem");return kt(sq,e)>=0}function Zn(t){return t+"Axis"}function uq(t,e){var r=yt(),i=[],n=yt();t.eachComponent({mainType:"dataZoom",query:e},function(f){n.get(f.uid)||s(f)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(f){!n.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){n.set(f.uid,!0),i.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var d=r.get(c);d&&d[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(r.get(h)||r.set(h,[]))[c]=!0})}return i}function MM(t){var e=t.ecModel,r={infoList:[],infoMap:yt()};return t.eachTargetAxis(function(i,n){var a=e.getComponent(Zn(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var ju=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),X7=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,i,n){var a=_x(r);this.settledOption=a,this.mergeDefaultAndTheme(r,n),this._doInit(a)},e.prototype.mergeOption=function(r){var i=_x(r);mt(this.option,r,!0),mt(this.settledOption,i,!0),this._doInit(i)},e.prototype._doInit=function(r){var i=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var n=this.settledOption;E([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),i=this._targetAxisInfoMap=yt(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var i=!1;return E(yx,function(n){var a=this.getReferringComponents(Zn(n),nN);if(a.specified){i=!0;var o=new ju;E(a.models,function(s){o.add(s.componentIndex)}),r.set(n,o)}},this),i},e.prototype._fillAutoTargetAxisByOrient=function(r,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===i}});l(s,"single")}function l(u,f){var h=u[0];if(h){var c=new ju;if(c.add(h.componentIndex),r.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",je).models[0];v&&E(u,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",je).models[0]&&c.add(d.componentIndex)})}}}a&&E(yx,function(u){if(a){var f=n.findComponents({mainType:Zn(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new ju;h.add(f[0].componentIndex),r.set(u,h),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(i){!r&&(r=i)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var i=this._rangePropMode,n=this.get("rangeMode");E([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(i,n){r==null&&(r=this.ecModel.getComponent(Zn(i),n))},this),r},e.prototype.eachTargetAxis=function(r,i){this._targetAxisInfoMap.each(function(n,a){E(n.indexList,function(o){r.call(i,a,o)})})},e.prototype.getAxisProxy=function(r,i){var n=this.getAxisModel(r,i);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(r,i){var n=this._targetAxisInfoMap.get(r);if(n&&n.indexMap[i])return this.ecModel.getComponent(Zn(r),i)},e.prototype.setRawRange=function(r){var i=this.option,n=this.settledOption;E([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(i[a[0]]=n[a[0]]=r[a[0]],i[a[1]]=n[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var i=this.option;E(["start","startValue","end","endValue"],function(n){i[n]=r[n]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,i){if(r==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(r,i).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;ao[1];if(_&&!x&&!w)return!0;_&&(g=!0),x&&(d=!0),w&&(p=!0)}return g&&d&&p})}else Bo(f,function(v){if(a==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});Bo(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,i=this._dataExtent;Bo(["min","max"],function(n){var a=r.get(n+"Span"),o=r.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=oe(i[0]+o,i,[0,100],!0):a!=null&&(o=oe(a,[0,100],i,!0)-i[0]),e[n+"Span"]=a,e[n+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,i=this._valueWindow;if(r){var n=eT(i,[0,500]);n=Math.min(n,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),r[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},t}();function vq(t,e,r){var i=[1/0,-1/0];Bo(r,function(o){Zz(i,o.getData(),e)});var n=t.getAxisModel(),a=UC(n.axis.scale,n,i).calculate();return[a.min,a.max]}var dq={getTargetSeries:function(t){function e(n){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Zn(o),s);n(o,s,l,a)})})}e(function(n,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new cq(n,a,s,t),r.push(o.__dzAxisProxy))});var i=yt();return E(r,function(n){E(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(i,n){r.getAxisProxy(i,n).reset(r)}),r.eachTargetAxis(function(i,n){r.getAxisProxy(i,n).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var i=r.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();r.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function pq(t){t.registerAction("dataZoom",function(e,r){var i=uq(r,e);E(i,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Sx=!1;function Jv(t){Sx||(Sx=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,dq),pq(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function gq(t){t.registerComponentModel(fq),t.registerComponentView(hq),Jv(t)}var C1=function(){function t(){}return t}(),LM={};function ko(t,e){LM[t]=e}function IM(t){return LM[t]}var mq=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;E(this.option.feature,function(i,n){var a=IM(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),mt(i,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Bt);function yq(t,e,r){var i=e.getBoxLayoutParams(),n=e.get("padding"),a={width:r.getWidth(),height:r.getHeight()},o=Re(i,a,n);b2(e.get("orient"),t,e.get("itemGap"),o.width,o.height),o5(t,i,a,n)}function PM(t,e){var r=N4(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Xt({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}),t}var _q=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,i,n,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},f=this._features||(this._features={}),h=[];E(u,function(d,p){h.push(p)}),new un(this._featureNames||[],h).add(c).update(c).remove(Lt(c,null)).execute(),this._featureNames=h;function c(d,p){var g=h[d],m=h[p],y=u[g],_=new Jt(y,r,r.ecModel),x;if(a&&a.newTitle!=null&&a.featureName===g&&(y.title=a.newTitle),g&&!m){if(xq(g))x={onclick:_.option.onclick,featureName:g};else{var w=IM(g);if(!w)return;x=new w}f[g]=x}else if(x=f[m],!x)return;x.uid=R4("toolbox-feature"),x.model=_,x.ecModel=i,x.api=n;var S=x instanceof C1;if(!g&&m){S&&x.dispose&&x.dispose(i,n);return}if(!_.get("show")||S&&x.unusable){S&&x.remove&&x.remove(i,n);return}v(_,x,g),_.setIconStatus=function(b,T){var A=this.option,D=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[b]=T,D[b]&&(T==="emphasis"?sn:ln)(D[b])},x instanceof C1&&x.render&&x.render(_,i,n,a)}function v(d,p,g){var m=d.getModel("iconStyle"),y=d.getModel(["emphasis","iconStyle"]),_=p instanceof C1&&p.getIcons?p.getIcons():d.get("icon"),x=d.get("title")||{},w,S;ht(_)?(w={},w[g]=_):w=_,ht(x)?(S={},S[g]=x):S=x;var b=d.iconPaths={};E(w,function(T,A){var D=h3(T,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(m.getItemStyle());var C=D.ensureState("emphasis");C.style=y.getItemStyle();var M=new Ht({style:{text:S[A],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:Ac({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},i)},ignore:!0});D.setTextContent(M),I4({el:D,componentModel:r,itemName:A,formatterParamsExtra:{title:S[A]}}),D.__title=S[A],D.on("mouseover",function(){var L=y.getItemStyle(),I=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";M.setStyle({fill:y.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),D.setTextConfig({position:y.get("textPosition")||I}),M.ignore=!r.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",A])!=="emphasis"&&n.leaveEmphasis(this),M.hide()}),(d.get(["iconStatus",A])==="emphasis"?sn:ln)(D),o.add(D),D.on("click",ct(p.onclick,p,i,n,A)),b[A]=D})}yq(o,r,n),o.add(PM(o.getBoundingRect(),r)),l||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),y=d.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!wt(_)&&p){var x=_.style||(_.style={}),w=a3(p,Ht.makeFont(x)),S=d.x+o.x,b=d.y+o.y+s,T=!1;b+w.height>n.getHeight()&&(m.position="top",T=!0);var A=T?-5-w.height:s+10;S+w.width/2>n.getWidth()?(m.position=["100%",A],x.align="right"):S-w.width/2<0&&(m.position=[0,A],x.align="left")}})},e.prototype.updateView=function(r,i,n,a){E(this._features,function(o){o instanceof C1&&o.updateView&&o.updateView(o.model,i,n,a)})},e.prototype.remove=function(r,i){E(this._features,function(n){n instanceof C1&&n.remove&&n.remove(r,i)}),this.group.removeAll()},e.prototype.dispose=function(r,i){E(this._features,function(n){n instanceof C1&&n.dispose&&n.dispose(r,i)})},e.type="toolbox",e}(ge);function xq(t){return t.indexOf("my")===0}var Sq=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,i){var n=this.model,a=n.get("name")||r.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||r.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Vt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=a+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var c=l.split(","),v=c[0].indexOf("base64")>-1,d=o?decodeURIComponent(c[1]):c[1];v&&(d=window.atob(d));var p=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,m=new Uint8Array(g);g--;)m[g]=d.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var x=_.contentWindow,w=x.document;w.open("image/svg+xml","replace"),w.write(d),w.close(),x.focus(),w.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var S=n.get("lang"),b='',T=window.open();T.document.write(b),T.document.title=a}},e.getDefaultOption=function(r){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},e}(C1),bx="__ec_magicType_stack__",wq=[["line","bar"],["stack"]],bq=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,i=r.get("icon"),n={};return E(r.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},e.getDefaultOption=function(r){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},e.prototype.onclick=function(r,i,n){var a=this.model,o=a.get(["seriesIndex",n]);if(Tx[n]){var s={series:[]},l=function(h){var c=h.subType,v=h.id,d=Tx[n](c,v,h,a);d&&(xt(d,h.option),s.series.push(d));var p=h.coordinateSystem;if(p&&p.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=h.getReferringComponents(y,je).models[0],x=_.componentIndex;s[y]=s[y]||[];for(var w=0;w<=x;w++)s[y][x]=s[y][x]||{};s[y][x].boundaryGap=n==="bar"}}};E(wq,function(h){kt(h,n)>=0&&E(h,function(c){a.setIconStatus(c,"normal")})}),a.setIconStatus(n,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=mt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),i.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e}(C1),Tx={line:function(t,e,r,i){if(t==="bar")return mt({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,r,i){if(t==="line")return mt({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,r,i){var n=r.get("stack")===bx;if(t==="line"||t==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),mt({id:e,stack:n?"":bx},i.get(["option","stack"])||{},!0)}};Oi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var T5=new Array(60).join("-"),v4=" ";function Tq(t){var e={},r=[],i=[];return t.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else r.push(n)}else r.push(n)}),{seriesGroupByCategoryAxis:e,other:r,meta:i}}function Aq(t){var e=[];return E(t,function(r,i){var n=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(j(r.series,function(v){return v.name})),l=[n.model.getCategories()];E(r.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(v4)],f=0;f=0)return!0}var xh=new RegExp("["+v4+"]+","g");function Mq(t){for(var e=t.split(/\n+/g),r=f0(e.shift()).split(xh),i=[],n=j(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[n])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();r[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),r.push(e)}function Oq(t){var e=td(t),r=e[e.length-1];e.length>1&&e.pop();var i={};return RM(r,function(n,a){for(var o=e.length-1;o>=0;o--)if(n=e[o][a],n){i[a]=n;break}}),i}function Bq(t){NM(t).snapshots=null}function kq(t){return td(t).length}function td(t){var e=NM(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Fq=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,i){Bq(r),i.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return i},e}(C1);Oi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var zq=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],ed=function(){function t(e,r,i){var n=this;this._targetInfoList=[];var a=Ax(r,e);E(Gq,function(o,s){(!i||!i.include||kt(i.include,s)>=0)&&o(a,n._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var o=qu[i.brushType](0,a,n);i.__rangeOffset={offset:Mx[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,i){E(e,function(n){var a=this.findTargetInfo(n,r);a&&a!==!0&&E(a.coordSyses,function(o){var s=qu[n.brushType](1,o,n.range,!0);i(n,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){E(e,function(i){var n=this.findTargetInfo(i,r);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=qu[i.brushType](0,n.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?Mx[i.brushType](a.values,o.offset,Vq(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return j(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:r?r(i):null,clipPath:HE(n),isTargetByCursor:WE(n,e,i.coordSysModel),getLinearBrushOtherExtent:UE(n)}})},t.prototype.controlSeries=function(e,r,i){var n=this.findTargetInfo(e,i);return n===!0||n&&kt(n.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var i=this._targetInfoList,n=Ax(r,e),a=0;at[1]&&t.reverse(),t}function Ax(t,e){return o7(t,e,{includeMainTypes:zq})}var Gq={grid:function(t,e){var r=t.xAxisModels,i=t.yAxisModels,n=t.gridModels,a=yt(),o={},s={};!r&&!i&&!n||(E(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),E(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),E(n,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,f=[];E(u.getCartesians(),function(h,c){(kt(r,h.getAxis("x").model)>=0||kt(i,h.getAxis("y").model)>=0)&&f.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Dx.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){E(t.geoModels,function(r){var i=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:i,coordSyses:[i],getPanelRect:Dx.geo})})}},Cx=[function(t,e){var r=t.xAxisModel,i=t.yAxisModel,n=t.gridModel;return!n&&r&&(n=r.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],Dx={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(w2(t)),e}},qu={lineX:Lt(Ex,0),lineY:Lt(Ex,1),rect:function(t,e,r,i){var n=t?e.pointToData([r[0][0],r[1][0]],i):e.dataToPoint([r[0][0],r[1][0]],i),a=t?e.pointToData([r[0][1],r[1][1]],i):e.dataToPoint([r[0][1],r[1][1]],i),o=[Sh([n[0],a[0]]),Sh([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=j(r,function(o){var s=t?e.pointToData(o,i):e.dataToPoint(o,i);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:a,xyMinMax:n}}};function Ex(t,e,r,i){var n=r.getAxis(["x","y"][t]),a=Sh(j([0,1],function(s){return e?n.coordToData(n.toLocalCoord(i[s]),!0):n.toGlobalCoord(n.dataToCoord(i[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var Mx={lineX:Lt(Lx,0),lineY:Lt(Lx,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return j(t,function(i,n){return[i[0]-r[0]*e[n][0],i[1]-r[1]*e[n][1]]})}};function Lx(t,e,r,i){return[e[0]-i[t]*r[0],e[1]-i[t]*r[1]]}function Vq(t,e){var r=Ix(t),i=Ix(e),n=[r[0]/i[0],r[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function Ix(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var wh=E,Hq=JR("toolbox-dataZoom_"),Uq=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,i,n,a){this._brushController||(this._brushController=new Lv(n.getZr()),this._brushController.on("brush",ct(this._onBrush,this)).mount()),Yq(r,i,this,a,n),Xq(r,i)},e.prototype.onclick=function(r,i,n){Wq[n].call(this)},e.prototype.remove=function(r,i){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,i){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var i=r.areas;if(!r.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var o=new ed(rd(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,function(u,f,h){if(h.type==="cartesian2d"){var c=u.brushType;c==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[c],h,f)}}),Nq(a,n),this._dispatchZoomAction(n);function s(u,f,h){var c=f.getAxis(u),v=c.model,d=l(u,v,a),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(h=q2(0,h.slice(),c.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var c;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,f.componentIndex);d&&(c=v)}),c}},e.prototype._dispatchZoomAction=function(r){var i=[];wh(r,function(n,a){i.push(At(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},e.getDefaultOption=function(r){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},e}(C1),Wq={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Oq(this.ecModel))}};function rd(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Xq(t,e){t.setIconStatus("back",kq(e)>1?"emphasis":"normal")}function Yq(t,e,r,i,n){var a=r._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new ed(rd(t),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}MB("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var i=e.getModel(r),n=[],a=rd(i),o=o7(t,a);wh(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),wh(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:Hq+u+h};c[f]=h,n.push(c)}return n});function Zq(t){t.registerComponentModel(mq),t.registerComponentView(_q),ko("saveAsImage",Sq),ko("magicType",bq),ko("dataView",Pq),ko("dataZoom",Uq),ko("restore",Fq),Ct(gq)}var Qq=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Bt);function OM(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function BM(t){if(Vt.domSupported){for(var e=document.documentElement.style,r=0,i=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+n,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*n)/2+Math.SQRT2*n-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=e+" solid "+n+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'
'}function eK(t,e){var r="cubic-bezier(0.23,1,0.32,1)",i=" "+t/2+"s "+r,n="opacity"+i+",visibility"+i;return e||(i=" "+t+"s "+r,n+=Vt.transformSupported?","+id+i:",left"+i+",top"+i),Kq+":"+n}function Px(t,e,r){var i=t.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!Vt.transformSupported)return r?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=Vt.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return r?"top:0;left:0;"+id+":"+o+";":[["top",0],["left",0],[kM,o]]}function rK(t){var e=[],r=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var n=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return n&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+n),E(["decoration","align"],function(l){var u=t.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function iK(t,e,r){var i=[],n=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),s=t.get("shadowColor"),l=t.get("shadowOffsetX"),u=t.get("shadowOffsetY"),f=t.getModel("textStyle"),h=UA(t,"html"),c=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+c),e&&n&&i.push(eK(n,r)),a&&i.push("background-color:"+a),E(["width","color","radius"],function(v){var d="border-"+v,p=uA(d),g=t.get(p);g!=null&&i.push(d+":"+g+(v==="color"?"":"px"))}),i.push(rK(f)),h!=null&&i.push("padding:"+N4(h).join("px ")+"px"),i.join(";")+";"}function Rx(t,e,r,i,n){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&PP(t,o,r,i,n)}else{t[0]=i,t[1]=n;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var nK=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Vt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=e.getZr(),a=r.appendTo,o=a&&(ht(a)?document.querySelector(a):e4(a)?a:wt(a)&&a(e.getDom()));Rx(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(i),this._api=e,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();S1(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),i=qq(r,"position"),n=r.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=$q+iK(e,!this._firstShow,this._longHide)+Px(a[0],a[1],!0)+("border-color:"+R2(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,i,n,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(ht(a)&&i.get("trigger")==="item"&&!OM(i)&&(s=tK(i,n,a)),ht(e))o.innerHTML=e+s;else if(e){o.innerHTML="",X(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,i=this._ecModel,n=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(r,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,i,n,a){if(!(a.from===this.uid||Vt.node||!n.getDom())){var o=Bx(a,n);this._ticket="";var s=a.dataByCoordSys,l=hK(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=oK;f.x=a.x,f.y=a.y,f.update(),Et(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,i,n,a))return;var h=bM(a,i),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&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Bx(a,n))},e.prototype._manuallyAxisShowTip=function(r,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var f=u.getData(),h=T6([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,i){var n=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(n){var s=Et(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;h2(n,function(f){if(Et(f).dataIndex!=null)return l=f,!0;if(Et(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(r,l,i):u?this._showComponentItemTooltip(r,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(r,i){var n=r.get("showDelay");i=ct(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},e.prototype._showAxisTooltip=function(r,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=T6([i.tooltipOption],a),l=this._renderMode,u=[],f=vr("section",{blocks:[],noHeader:!0}),h=[],c=new Nl;E(r,function(y){E(y.dataByAxis,function(_){var x=n.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!x||w==null)){var S=_M(w,x.axis,n,_.seriesDataIndices,_.valueLabelOpt),b=vr("section",{header:S,noHeader:!K1(S),sortBlocks:!0,blocks:[]});f.blocks.push(b),E(_.seriesDataIndices,function(T){var A=n.getSeriesByIndex(T.seriesIndex),D=T.dataIndexInside,C=A.getDataParams(D);if(!(C.dataIndex<0)){C.axisDim=_.axisDim,C.axisIndex=_.axisIndex,C.axisType=_.axisType,C.axisId=_.axisId,C.axisValue=tv(x.axis,{value:w}),C.axisValueLabel=S,C.marker=c.makeTooltipMarker("item",R2(C.color),l);var M=xg(A.formatTooltip(D,!0,null)),L=M.frag;if(L){var I=T6([A],a).get("valueFormatter");b.blocks.push(I?H({valueFormatter:I},L):L)}M.text&&h.push(M.text),u.push(C)}})}})}),f.blocks.reverse(),h.reverse();var v=i.position,d=s.get("order"),p=Cg(f,c,l,d,n.get("useUTC"),s.get("textStyle"));p&&h.unshift(p);var g=l==="richText"?"\n\n":"
",m=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],v,null,c)})},e.prototype._showSeriesItemTooltip=function(r,i,n){var a=this._ecModel,o=Et(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=r.positionDefault,p=T6([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(f,h),y=new Nl;m.marker=y.makeTooltipMarker("item",R2(m.color),v);var _=xg(u.formatTooltip(f,!1,h)),x=p.get("order"),w=p.get("valueFormatter"),S=_.frag,b=S?Cg(w?H({valueFormatter:w},S):S,y,v,x,a.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,b,m,T,r.offsetX,r.offsetY,r.position,r.target,y)}),n({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,i,n){var a=this._renderMode==="html",o=Et(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(ht(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=At(l),l.content=Je(l.content));var h=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:l.content});var v=r.positionDefault,d=T6(h,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",m=new Nl;this._showOrMove(d,function(){var y=At(d.get("formatterParams")||{});this._showTooltipContent(d,p,y,g,r.offsetX,r.offsetY,r.position,i,m)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,i,n,a,o,s,l,u,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var c=r.get("formatter");l=l||r.get("position");var v=i,d=this._getNearestPoint([o,s],n,r.get("trigger"),r.get("borderColor")),p=d.color;if(c)if(ht(c)){var g=r.ecModel.get("useUTC"),m=X(n)?n[0]:n,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;v=c,y&&(v=e5(m.axisValue,v,g)),v=Ic(v,n,!0)}else if(wt(c)){var _=ct(function(x,w){x===this._ticket&&(h.setContent(w,f,r,p,l),this._updatePosition(r,l,o,s,h,n,u))},this);this._ticket=a,v=c(n,a,_)}else v=c;h.setContent(v,f,r,p,l),h.show(r,p),this._updatePosition(r,l,o,s,h,n,u)}},e.prototype._getNearestPoint=function(r,i,n,a){if(n==="axis"||X(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!X(i))return{color:a||i.color||i.borderColor}},e.prototype._updatePosition=function(r,i,n,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||r.get("position");var h=o.getSize(),c=r.get("align"),v=r.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),wt(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),X(i))n=ot(i[0],u),a=ot(i[1],f);else if(Tt(i)){var p=i;p.width=h[0],p.height=h[1];var g=Re(p,{width:u,height:f});n=g.x,a=g.y,c=null,v=null}else if(ht(i)&&l){var m=fK(i,d,h,r.get("borderWidth"));n=m[0],a=m[1]}else{var m=lK(n,a,o,u,f,c?null:20,v?null:20);n=m[0],a=m[1]}if(c&&(n-=kx(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=kx(v)?h[1]/2:v==="bottom"?h[1]:0),OM(r)){var m=uK(n,a,o,u,f);n=m[0],a=m[1]}o.moveTo(n,a)},e.prototype._updateContentNotChangedOnAxis=function(r,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===r.length;return o&&E(n,function(s,l){var u=s.dataByAxis||[],f=r[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&E(u,function(c,v){var d=h[v]||{},p=c.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&p.length===g.length,o&&E(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&E(c.seriesDataIndices,function(m){var y=m.seriesIndex,_=i[y],x=a[y];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=i,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,i){Vt.node||!i.getDom()||(P7(this,"_updatePosition"),this._tooltipContent.dispose(),mh("itemTooltip",i))},e.type="tooltip",e}(ge);function T6(t,e,r){var i=e.ecModel,n;r?(n=new Jt(r,i,i),n=new Jt(e.option,n,i)):n=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof Jt&&(o=o.get("tooltip",!0)),ht(o)&&(o={formatter:o}),o&&(n=new Jt(o,n,i)))}return n}function Bx(t,e){return t.dispatchAction||ct(e.dispatchAction,e)}function lK(t,e,r,i,n,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>i?t-=l+a:t+=a),o!=null&&(e+u+o>n?e-=u+o:e+=o),[t,e]}function uK(t,e,r,i,n){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,i)-o,e=Math.min(e+s,n)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function fK(t,e,r,i){var n=r[0],a=r[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,f=e.height;switch(t){case"inside":s=e.x+u/2-n/2,l=e.y+f/2-a/2;break;case"top":s=e.x+u/2-n/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+f+o;break;case"left":s=e.x-n-o,l=e.y+f/2-a/2;break;case"right":s=e.x+u+o,l=e.y+f/2-a/2}return[s,l]}function kx(t){return t==="center"||t==="middle"}function hK(t,e,r){var i=cc(t).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=o3(e,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=Et(u).tooltipConfig;if(f&&f.name===t.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function cK(t){Ct(w3),t.registerComponentModel(Qq),t.registerComponentView(sK),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},He),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},He)}var vK=["rect","polygon","keep","clear"];function dK(t,e){var r=de(t?t.brush:[]);if(r.length){var i=[];E(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var n=t&&t.toolbox;X(n)&&(n=n[0]),n||(n={feature:{}},t.toolbox=[n]);var a=n.feature||(n.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),pK(s),e&&!s.length&&s.push.apply(s,vK)}}function pK(t){var e={};E(t,function(r){e[r]=1}),t.length=0,E(e,function(r,i){t.push(i)})}var Fx=E;function zx(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function bh(t,e,r){var i={};return Fx(e,function(a){var o=i[a]=n();Fx(t[a],function(s,l){if(fr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new fr(u),l==="opacity"&&(u=At(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new fr(u))}})}),i;function n(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function zM(t,e,r){var i;E(r,function(n){e.hasOwnProperty(n)&&zx(e[n])&&(i=!0)}),i&&E(r,function(n){e.hasOwnProperty(n)&&zx(e[n])?t[n]=At(e[n]):delete t[n]})}function gK(t,e,r,i,n,a){var o={};E(t,function(h){var c=fr.prepareVisualTypes(e[h]);o[h]=c});var s;function l(h){return Hc(r,s,h)}function u(h,c){JA(r,s,h,c)}r.each(f);function f(h,c){s=h;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=i.call(n,h),p=e[d],g=o[d],m=0,y=g.length;me[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&Wx(e)}};function Wx(t){return new Nt(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var TK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,i){this.ecModel=r,this.api=i,this.model,(this._brushController=new Lv(i.getZr())).on("brush",ct(this._onBrush,this)).mount()},e.prototype.render=function(r,i,n,a){this.model=r,this._updateController(r,i,n,a)},e.prototype.updateTransform=function(r,i,n,a){GM(i),this._updateController(r,i,n,a)},e.prototype.updateVisual=function(r,i,n,a){this.updateTransform(r,i,n,a)},e.prototype.updateView=function(r,i,n,a){this._updateController(r,i,n,a)},e.prototype._updateController=function(r,i,n,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(n)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var i=this.model.id,n=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:At(n),$from:i}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:At(n),$from:i})},e.type="brush",e}(ge),AK="#ddd",CK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,i){var n=this.option;!i&&zM(n,r,["inBrush","outOfBrush"]);var a=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:AK},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=j(r,function(i){return Xx(this.option,i)},this))},e.prototype.setBrushOption=function(r){this.brushOption=Xx(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Bt);function Xx(t,e){return mt({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Jt(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var DK=["rect","polygon","lineX","lineY","keep","clear"],EK=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,i,n){var a,o,s;i.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,E(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,i,n){this.render(r,i,n)},e.prototype.getIcons=function(){var r=this.model,i=r.get("icon",!0),n={};return E(r.get("type",!0),function(a){i[a]&&(n[a]=i[a])}),n},e.prototype.onclick=function(r,i,n){var a=this._brushType,o=this._brushMode;n==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?a:a===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var i={show:!0,type:DK.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return i},e}(C1);function MK(t){t.registerComponentView(TK),t.registerComponentModel(CK),t.registerPreprocessor(dK),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,_K),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(i){i.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},He),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},He),ko("brush",EK)}var LK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Bt),IK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,i,n){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=It(r.get("textBaseline"),r.get("textVerticalAlign")),f=new Ht({style:fe(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=r.get("subtext"),v=new Ht({style:fe(s,{text:c,fill:s.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=r.get("link"),p=r.get("sublink"),g=r.get("triggerEvent",!0);f.silent=!d&&!g,v.silent=!p&&!g,d&&f.on("click",function(){z9(d,"_"+r.get("target"))}),p&&v.on("click",function(){z9(p,"_"+r.get("subtarget"))}),Et(f).eventData=Et(v).eventData=g?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),c&&a.add(v);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=Re(y,{width:n.getWidth(),height:n.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var x={align:l,verticalAlign:u};f.setStyle(x),v.setStyle(x),m=a.getBoundingRect();var w=_.margin,S=r.getItemStyle(["color","opacity"]);S.fill=r.get("backgroundColor");var b=new Xt({shape:{x:m.x-w[3],y:m.y-w[0],width:m.width+w[1]+w[3],height:m.height+w[0]+w[2],r:r.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(b)}},e.type="title",e}(ge);function PK(t){t.registerComponentModel(LK),t.registerComponentView(IK)}var Yx=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,i,n){this.mergeDefaultAndTheme(r,n),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var i=this._data.count();this.option.loop?r=(r%i+i)%i:(r>=i&&(r=i-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,i=r.data||[],n=r.axisType,a=this._names=[],o;n==="category"?(o=[],E(i,function(u,f){var h=tr(E4(u),""),c;Tt(u)?(c=At(u),c.value=f):c=f,o.push(c),a.push(h)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Le([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Bt),VM=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=fa(Yx.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Yx);Xe(VM,l5.prototype);var RK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(ge),NK=function(t){F(e,t);function e(r,i,n,a){var o=t.call(this,r,i,n)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Kr),$u=Math.PI,Zx=$t(),OK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,i){this.api=i},e.prototype.render=function(r,i,n){if(this.model=r,this.api=n,this.ecModel=i,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return vr("nameValue",{noName:!0,value:f})},E(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,i){var n=r.get(["label","position"]),a=r.get("orient"),o=kK(r,i),s;n==null||n==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:$u/2},h=a==="vertical"?o.height:o.width,c=r.getModel("controlStyle"),v=c.get("show",!0),d=v?c.get("itemSize"):0,p=v?c.get("itemGap"):0,g=d+p,m=r.get(["label","rotate"])||0;m=m*$u/180;var y,_,x,w=c.get("position",!0),S=v&&c.get("showPlayBtn",!0),b=v&&c.get("showPrevBtn",!0),T=v&&c.get("showNextBtn",!0),A=0,D=h;w==="left"||w==="bottom"?(S&&(y=[0,0],A+=g),b&&(_=[A,0],A+=g),T&&(x=[D-d,0],D-=g)):(S&&(y=[D-d,0],D-=g),b&&(_=[0,0],A+=g),T&&(x=[D-d,0],D-=g));var C=[A,D];return r.get("inverse")&&C.reverse(),{viewRect:o,mainLength:h,orient:a,rotation:f[a],labelRotation:m,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:_,nextBtnPosition:x,axisExtent:C,controlSize:d,controlGap:p}},e.prototype._position=function(r,i){var n=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=a1(),l=o.x,u=o.y+o.height;Ii(s,s,[-l,-u]),U2(s,s,-$u/2),Ii(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=y(o),h=y(n.getBoundingRect()),c=y(a.getBoundingRect()),v=[n.x,n.y],d=[a.x,a.y];d[0]=v[0]=f[0][0];var p=r.labelPosOpt;if(p==null||ht(p)){var g=p==="+"?0:1;_(v,h,f,1,g),_(d,c,f,1,1-g)}else{var g=p>=0?0:1;_(v,h,f,1,g),d[1]=v[1]+p}n.setPosition(v),a.setPosition(d),n.rotation=a.rotation=r.rotation,m(n),m(a);function m(x){x.originX=f[0][0]-x.x,x.originY=f[1][0]-x.y}function y(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,w,S,b,T){x[b]+=S[b][T]-w[b][T]}},e.prototype._createAxis=function(r,i){var n=i.getData(),a=i.get("axisType"),o=BK(i,a);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new NK("value",o,r.axisExtent,a);return l.model=i,l},e.prototype._createGroup=function(r){var i=this[r]=new Dt;return this.group.add(i),i},e.prototype._renderAxisLine=function(r,i,n,a){var o=n.getExtent();if(a.get(["lineStyle","show"])){var s=new ar({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:H({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new ar({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:xt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},e.prototype._renderAxisTick=function(r,i,n,a){var o=this,s=a.getData(),l=n.scale.getTicks();this._tickSymbols=[],E(l,function(u){var f=n.dataToCoord(u.value),h=s.getItemModel(u.value),c=h.getModel("itemStyle"),v=h.getModel(["emphasis","itemStyle"]),d=h.getModel(["progress","itemStyle"]),p={x:f,y:0,onclick:ct(o._changeTimeline,o,u.value)},g=Qx(h,c,i,p);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),Kn(g);var m=Et(g);h.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(r,i,n,a){var o=this,s=n.getLabelModel();if(s.get("show")){var l=a.getData(),u=n.getViewLabels();this._tickLabels=[],E(u,function(f){var h=f.tickValue,c=l.getItemModel(h),v=c.getModel("label"),d=c.getModel(["emphasis","label"]),p=c.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),m=new Ht({x:g,y:0,rotation:r.labelRotation-r.rotation,onclick:ct(o._changeTimeline,o,h),silent:!1,style:fe(v,{text:f.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});m.ensureState("emphasis").style=fe(d),m.ensureState("progress").style=fe(p),i.add(m),Kn(m),Zx(m).dataIndex=h,o._tickLabels.push(m)})}},e.prototype._renderControl=function(r,i,n,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),f=a.getPlayState(),h=a.get("inverse",!0);c(r.nextBtnPosition,"next",ct(this._changeTimeline,this,h?"-":"+")),c(r.prevBtnPosition,"prev",ct(this._changeTimeline,this,h?"+":"-")),c(r.playPosition,f?"stop":"play",ct(this._handlePlayClick,this,!f),!0);function c(v,d,p,g){if(v){var m=ai(It(a.get(["controlStyle",d+"BtnSize"]),o),o),y=[0,-m/2,m,m],_=FK(a,d+"Icon",y,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,i.add(_),Kn(_)}}},e.prototype._renderCurrentPointer=function(r,i,n,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(h){h.draggable=!0,h.drift=ct(u._handlePointerDrag,u),h.ondragend=ct(u._handlePointerDragend,u),jx(h,u._progressLine,s,n,a,!0)},onUpdate:function(h){jx(h,u._progressLine,s,n,a)}};this._currentPointer=Qx(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,i,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,i){var n=this._toAxisCoord(r)[0],a=this._axis,o=I1(a.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[a]=+o[a].toFixed(c)),[o,h]}var Ju={min:Lt(Es,"min"),max:Lt(Es,"max"),average:Lt(Es,"average"),median:Lt(Es,"median")};function Y7(t,e){if(e){var r=t.getData(),i=t.coordinateSystem,n=i&&i.dimensions;if(!WK(e)&&!X(e.coord)&&X(n)){var a=HM(e,r,i,t);if(e=At(e),e.type&&Ju[e.type]&&a.baseAxis&&a.valueAxis){var o=kt(n,a.baseAxis.dim),s=kt(n,a.valueAxis.dim),l=Ju[e.type](r,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!X(n))e.coord=[];else for(var u=e.coord,f=0;f<2;f++)Ju[u[f]]&&(u[f]=ad(r,r.mapDimension(n[f]),u[f]));return e}}function HM(t,e,r,i){var n={};return t.valueIndex!=null||t.valueDim!=null?(n.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,n.valueAxis=r.getAxis(XK(i,n.valueDataDim)),n.baseAxis=r.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=r.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function XK(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function Z7(t,e){return t&&t.containData&&e.coord&&!Ah(e)?t.containData(e.coord):!0}function YK(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!Ah(e)&&!Ah(r)?t.containZone(e.coord,r.coord):!0}function UM(t,e){return t?function(r,i,n,a){var o=a<2?r.coord&&r.coord[a]:r.value;return Jn(o,e[a])}:function(r,i,n,a){return Jn(r.value,e[a])}}function ad(t,e,r){if(r==="average"){var i=0,n=0;return t.each(e,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var t8=$t(),od=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=yt()},e.prototype.render=function(r,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){t8(s).keep=!1}),i.eachSeries(function(s){var l=vn.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!t8(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(r){t8(r).keep=!0},e.prototype.toggleBlurSeries=function(r,i){var n=this;E(r,function(a){var o=vn.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?ET(l):_c(l))})}})},e.type="marker",e}(ge);function Kx(t,e,r){var i=e.coordinateSystem;t.each(function(n){var a=t.getItemModel(n),o,s=ot(a.get("x"),r.getWidth()),l=ot(a.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,n));else if(i){var u=t.get(i.dimensions[0],n),f=t.get(i.dimensions[1],n);o=i.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(n,o)})}var ZK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,i,n){i.eachSeries(function(a){var o=vn.getMarkerModelFromSeries(a,"markPoint");o&&(Kx(o.getData(),a,n),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,i,n,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new p3),h=QK(o,r,i);i.setData(h),Kx(i.getData(),r,a),h.each(function(c){var v=h.getItemModel(c),d=v.getShallow("symbol"),p=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),m=v.getShallow("symbolOffset"),y=v.getShallow("symbolKeepAspect");if(wt(d)||wt(p)||wt(g)||wt(m)){var _=i.getRawValue(c),x=i.getDataParams(c);wt(d)&&(d=d(_,x)),wt(p)&&(p=p(_,x)),wt(g)&&(g=g(_,x)),wt(m)&&(m=m(_,x))}var w=v.getModel("itemStyle").getItemStyle(),S=c3(l,"color");w.fill||(w.fill=S),h.setItemVisual(c,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:m,symbolKeepAspect:y,style:w})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(c){c.traverse(function(v){Et(v).dataModel=i})}),this.markKeep(f),f.group.silent=i.get("silent")||r.get("silent")},e.type="markPoint",e}(od);function QK(t,e,r){var i;t?i=j(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return H(H({},l),{name:s,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new Le(i,r),a=j(r.get("data"),Lt(Y7,e));t&&(a=ce(a,Lt(Z7,t)));var o=UM(!!t,i);return n.initData(a,null,o),n}function jK(t){t.registerComponentModel(UK),t.registerComponentView(ZK),t.registerPreprocessor(function(e){nd(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var qK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,i,n){return new e(r,i,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(vn),Ms=$t(),KK=function(t,e,r,i){var n=t.getData(),a;if(X(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=e.getAxis(i.yAxis!=null?"y":"x"),l=_r(i.yAxis,i.xAxis);else{var u=HM(i,n,e,t);s=u.valueAxis;var f=jc(n,u.valueDataDim);l=ad(n,f,o)}var h=s.dim==="x"?0:1,c=1-h,v=At(i),d={coord:[]};v.type=null,v.coord=[],v.coord[c]=-1/0,d.coord[c]=1/0;var p=r.get("precision");p>=0&&te(l)&&(l=+l.toFixed(Math.min(p,20))),v.coord[h]=d.coord[h]=l,a=[v,d,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var g=[Y7(t,a[0]),Y7(t,a[1]),H({},a[2])];return g[2].type=g[2].type||null,mt(g[2],g[0]),mt(g[2],g[1]),g};function h0(t){return!isNaN(t)&&!isFinite(t)}function $x(t,e,r,i){var n=1-t,a=i.dimensions[t];return h0(e[n])&&h0(r[n])&&e[t]===r[t]&&i.getAxis(a).containData(e[t])}function $K(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,i=e[1].coord;if(r&&i&&($x(1,r,i,t)||$x(0,r,i,t)))return!0}return Z7(t,e[0])&&Z7(t,e[1])}function e8(t,e,r,i,n){var a=i.coordinateSystem,o=t.getItemModel(e),s,l=ot(o.get("x"),n.getWidth()),u=ot(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var f=a.dimensions,h=t.get(f[0],e),c=t.get(f[1],e);s=a.dataToPoint([h,c])}if(Q2(a,"cartesian2d")){var v=a.getAxis("x"),d=a.getAxis("y"),f=a.dimensions;h0(t.get(f[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):h0(t.get(f[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var JK=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,i,n){i.eachSeries(function(a){var o=vn.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Ms(o).from,u=Ms(o).to;l.each(function(f){e8(l,f,!0,a,n),e8(u,f,!1,a,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,i,n,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Mv);this.group.add(f.group);var h=t$(o,r,i),c=h.from,v=h.to,d=h.line;Ms(i).from=c,Ms(i).to=v,i.setData(d);var p=i.get("symbol"),g=i.get("symbolSize"),m=i.get("symbolRotate"),y=i.get("symbolOffset");X(p)||(p=[p,p]),X(g)||(g=[g,g]),X(m)||(m=[m,m]),X(y)||(y=[y,y]),h.from.each(function(x){_(c,x,!0),_(v,x,!1)}),d.each(function(x){var w=d.getItemModel(x).getModel("lineStyle").getLineStyle();d.setItemLayout(x,[c.getItemLayout(x),v.getItemLayout(x)]),w.stroke==null&&(w.stroke=c.getItemVisual(x,"style").fill),d.setItemVisual(x,{fromSymbolKeepAspect:c.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(x,"symbolOffset"),fromSymbolRotate:c.getItemVisual(x,"symbolRotate"),fromSymbolSize:c.getItemVisual(x,"symbolSize"),fromSymbol:c.getItemVisual(x,"symbol"),toSymbolKeepAspect:v.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(x,"symbolOffset"),toSymbolRotate:v.getItemVisual(x,"symbolRotate"),toSymbolSize:v.getItemVisual(x,"symbolSize"),toSymbol:v.getItemVisual(x,"symbol"),style:w})}),f.updateData(d),h.line.eachItemGraphicEl(function(x){Et(x).dataModel=i,x.traverse(function(w){Et(w).dataModel=i})});function _(x,w,S){var b=x.getItemModel(w);e8(x,w,S,r,a);var T=b.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=c3(l,"color")),x.setItemVisual(w,{symbolKeepAspect:b.get("symbolKeepAspect"),symbolOffset:It(b.get("symbolOffset",!0),y[S?0:1]),symbolRotate:It(b.get("symbolRotate",!0),m[S?0:1]),symbolSize:It(b.get("symbolSize"),g[S?0:1]),symbol:It(b.get("symbol",!0),p[S?0:1]),style:T})}this.markKeep(f),f.group.silent=i.get("silent")||r.get("silent")},e.type="markLine",e}(od);function t$(t,e,r){var i;t?i=j(t&&t.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return H(H({},f),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new Le(i,r),a=new Le(i,r),o=new Le([],r),s=j(r.get("data"),Lt(KK,e,t,r));t&&(s=ce(s,Lt($K,t)));var l=UM(!!t,i);return n.initData(j(s,function(u){return u[0]}),null,l),a.initData(j(s,function(u){return u[1]}),null,l),o.initData(j(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}function e$(t){t.registerComponentModel(qK),t.registerComponentView(JK),t.registerPreprocessor(function(e){nd(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var r$=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,i,n){return new e(r,i,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(vn),Ls=$t(),i$=function(t,e,r,i){var n=i[0],a=i[1];if(!(!n||!a)){var o=Y7(t,n),s=Y7(t,a),l=o.coord,u=s.coord;l[0]=_r(l[0],-1/0),l[1]=_r(l[1],-1/0),u[0]=_r(u[0],1/0),u[1]=_r(u[1],1/0);var f=tc([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function c0(t){return!isNaN(t)&&!isFinite(t)}function Jx(t,e,r,i){var n=1-t;return c0(e[n])&&c0(r[n])}function n$(t,e){var r=e.coord[0],i=e.coord[1],n={coord:r,x:e.x0,y:e.y0},a={coord:i,x:e.x1,y:e.y1};return Q2(t,"cartesian2d")?r&&i&&(Jx(1,r,i)||Jx(0,r,i))?!0:YK(t,n,a):Z7(t,n)||Z7(t,a)}function tS(t,e,r,i,n){var a=i.coordinateSystem,o=t.getItemModel(e),s,l=ot(o.get(r[0]),n.getWidth()),u=ot(o.get(r[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var f=t.getValues(["x0","y0"],e),h=t.getValues(["x1","y1"],e),c=a.clampData(f),v=a.clampData(h),d=[];r[0]==="x0"?d[0]=c[0]>v[0]?h[0]:f[0]:d[0]=c[0]>v[0]?f[0]:h[0],r[1]==="y0"?d[1]=c[1]>v[1]?h[1]:f[1]:d[1]=c[1]>v[1]?f[1]:h[1],s=i.getMarkerPosition(d,r,!0)}else{var p=t.get(r[0],e),g=t.get(r[1],e),m=[p,g];a.clampData&&a.clampData(m,m),s=a.dataToPoint(m,!0)}if(Q2(a,"cartesian2d")){var y=a.getAxis("x"),_=a.getAxis("y"),p=t.get(r[0],e),g=t.get(r[1],e);c0(p)?s[0]=y.toGlobalCoord(y.getExtent()[r[0]==="x0"?0:1]):c0(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var eS=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],a$=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,i,n){i.eachSeries(function(a){var o=vn.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=j(eS,function(h){return tS(s,l,h,a,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,i,n,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new Dt});this.group.add(f.group),this.markKeep(f);var h=o$(o,r,i);i.setData(h),h.each(function(c){var v=j(eS,function(T){return tS(h,c,T,r,a)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),m=p.getExtent(),y=[d.parse(h.get("x0",c)),d.parse(h.get("x1",c))],_=[p.parse(h.get("y0",c)),p.parse(h.get("y1",c))];I1(y),I1(_);var x=!(g[0]>y[1]||g[1]_[1]||m[1]<_[0]),w=!x;h.setItemLayout(c,{points:v,allClipped:w});var S=h.getItemModel(c).getModel("itemStyle").getItemStyle(),b=c3(l,"color");S.fill||(S.fill=b,ht(S.fill)&&(S.fill=C9(S.fill,.4))),S.stroke||(S.stroke=b),h.setItemVisual(c,"style",S)}),h.diff(Ls(f).data).add(function(c){var v=h.getItemLayout(c);if(!v.allClipped){var d=new Zr({shape:{points:v.points}});h.setItemGraphicEl(c,d),f.group.add(d)}}).update(function(c,v){var d=Ls(f).data.getItemGraphicEl(v),p=h.getItemLayout(c);p.allClipped?d&&f.group.remove(d):(d?re(d,{shape:{points:p.points}},i,c):d=new Zr({shape:{points:p.points}}),h.setItemGraphicEl(c,d),f.group.add(d))}).remove(function(c){var v=Ls(f).data.getItemGraphicEl(c);f.group.remove(v)}).execute(),h.eachItemGraphicEl(function(c,v){var d=h.getItemModel(v),p=h.getItemVisual(v,"style");c.useStyle(h.getItemVisual(v,"style")),Ar(c,cr(d),{labelFetcher:i,labelDataIndex:v,defaultText:h.getName(v)||"",inheritColor:ht(p.fill)?C9(p.fill,1):"#000"}),Tr(c,d),ke(c,null,null,d.get(["emphasis","disabled"])),Et(c).dataModel=i}),Ls(f).data=h,f.group.silent=i.get("silent")||r.get("silent")},e.type="markArea",e}(od);function o$(t,e,r){var i,n,a=["x0","y0","x1","y1"];if(t){var o=j(t&&t.dimensions,function(u){var f=e.getData(),h=f.getDimensionInfo(f.mapDimension(u))||{};return H(H({},h),{name:u,ordinalMeta:null})});n=j(a,function(u,f){return{name:u,type:o[f%2].type}}),i=new Le(n,r)}else n=[{name:"value",type:"float"}],i=new Le(n,r);var s=j(r.get("data"),Lt(i$,e,t,r));t&&(s=ce(s,Lt(n$,t)));var l=t?function(u,f,h,c){var v=u.coord[Math.floor(c/2)][c%2];return Jn(v,n[c])}:function(u,f,h,c){return Jn(u.value,n[c])};return i.initData(s,null,l),i.hasItemOption=!0,i}function s$(t){t.registerComponentModel(r$),t.registerComponentView(a$),t.registerPreprocessor(function(e){nd(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var l$=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},Ch=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,i,n){this.mergeDefaultAndTheme(r,n),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,i){t.prototype.mergeOption.call(this,r,i),this._updateSelector(r)},e.prototype._updateSelector=function(r){var i=r.selector,n=this.ecModel;i===!0&&(i=r.selector=["all","inverse"]),X(i)&&E(i,function(a,o){ht(a)&&(a={type:a}),i[o]=mt(a,l$(n,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Bt),_o=Lt,Dh=E,Is=Dt,WM=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Is),this.group.add(this._selectorGroup=new Is),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,i,n){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 l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,i,n,l,s,u);var f=r.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},c=r.get("padding"),v=Re(f,h,c),d=this.layoutInner(r,o,v,a,l,u),p=Re(xt({width:d.width,height:d.height},f),h,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=PM(d,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,i,n,a,o,s,l){var u=this.getContentGroup(),f=yt(),h=i.get("selectedMode"),c=[];n.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Dh(i.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p==="\n")){var g=new Is;g.newline=!0,u.add(g);return}var m=n.getSeriesByName(p)[0];if(!f.get(p))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},x=y.getVisual("legendIcon"),w=y.getVisual("style"),S=this._createItem(m,p,d,v,i,r,_,w,x,h,a);S.on("click",_o(rS,p,null,a,c)).on("mouseover",_o(Eh,m.name,null,a,c)).on("mouseout",_o(Mh,m.name,null,a,c)),n.ssr&&S.eachChild(function(b){var T=Et(b);T.seriesIndex=m.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),f.set(p,!0)}else n.eachRawSeries(function(b){if(!f.get(p)&&b.legendVisualProvider){var T=b.legendVisualProvider;if(!T.containName(p))return;var A=T.indexOfName(p),D=T.getItemVisual(A,"style"),C=T.getItemVisual(A,"legendIcon"),M=Vr(D.fill);M&&M[3]===0&&(M[3]=.2,D=H(H({},D),{fill:Ji(M,"rgba")}));var L=this._createItem(b,p,d,v,i,r,{},D,C,h,a);L.on("click",_o(rS,null,p,a,c)).on("mouseover",_o(Eh,null,p,a,c)).on("mouseout",_o(Mh,null,p,a,c)),n.ssr&&L.eachChild(function(I){var P=Et(I);P.seriesIndex=b.seriesIndex,P.dataIndex=d,P.ssrType="legend"}),f.set(p,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},e.prototype._createSelector=function(r,i,n,a,o){var s=this.getSelectorGroup();Dh(r,function(u){var f=u.type,h=new Ht({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var c=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);Ar(h,{normal:c,emphasis:v},{defaultText:u.title}),Kn(h)})},e.prototype._createItem=function(r,i,n,a,o,s,l,u,f,h,c){var v=r.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(i),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var x=u$(f,a,l,u,v,g,c),w=new Is,S=a.getModel("textStyle");if(wt(r.getLegendIcon)&&(!_||_==="inherit"))w.add(r.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:m,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}));else{var b=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;w.add(f$({itemWidth:d,itemHeight:p,icon:f,iconRotate:b,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,A=s,D=o.get("formatter"),C=i;ht(D)&&D?C=D.replace("{name}",i!=null?i:""):wt(D)&&(C=D(i));var M=g?S.getTextColor():a.get("inactiveColor");w.add(new Ht({style:fe(S,{text:C,x:T,y:p/2,fill:M,align:A,verticalAlign:"middle"},{inheritColor:M})}));var L=new Xt({shape:w.getBoundingRect(),style:{fill:"transparent"}}),I=a.getModel("tooltip");return I.get("show")&&I4({el:L,componentModel:o,itemName:i,itemTooltipOption:I.option}),w.add(L),w.eachChild(function(P){P.silent=!0}),L.silent=!h,this.getContentGroup().add(w),Kn(w),w.__legendDataIndex=n,w},e.prototype.layoutInner=function(r,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();b2(r.get("orient"),l,r.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){b2("horizontal",u,r.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=r.get("selectorButtonGap",!0),p=r.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?v[p]+=f[g]+d:h[p]+=c[g]+d,v[1-p]+=f[m]/2-c[m]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+d+c[g],_[m]=Math.max(f[m],c[m]),_[y]=Math.min(0,c[y]+v[1-p]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(ge);function u$(t,e,r,i,n,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),Dh(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=t.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:s4(h,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:r).opacity),s(u,i);var c=e.getModel("lineStyle"),v=c.getLineStyle();if(s(v,r),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!a){var d=e.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?i.lineWidth>0&&p?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function f$(t){var e=t.icon||"roundRect",r=Ue(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function rS(t,e,r,i){Mh(t,e,r,i),r.dispatchAction({type:"legendToggleSelect",name:t!=null?t:e}),Eh(t,e,r,i)}function XM(t){for(var e=t.getZr().storage.getDisplayList(),r,i=0,n=e.length;in[o],g=[-v.x,-v.y];i||(g[a]=f[u]);var m=[0,0],y=[-d.x,-d.y],_=It(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var x=r.get("pageButtonPosition",!0);x==="end"?y[a]+=n[o]-d[o]:m[a]+=d[o]+_}y[1-a]+=v[s]/2-d[s]/2,f.setPosition(g),h.setPosition(m),c.setPosition(y);var w={x:0,y:0};if(w[o]=p?n[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+y[1-a]),h.__rectSize=n[o],p){var S={x:0,y:0};S[o]=Math.max(n[o]-d[o]-_,0),S[s]=w[s],h.setClipPath(new Xt({shape:S})),h.__rectSize=S[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(r);return b.pageIndex!=null&&re(f,{x:b.contentPosition[0],y:b.contentPosition[1]},p?r:null),this._updatePageInfoView(r,b),w},e.prototype._pageGo=function(r,i,n){var a=this._getPageInfo(i)[r];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},e.prototype._updatePageInfoView=function(r,i){var n=this._controllerGroup;E(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=i[h]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",c?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=n.childOfName("pageText"),o=r.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",ht(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var i=r.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=r8[o],l=i8[o],u=this._findTargetItemIndex(i),f=n.children(),h=f[u],c=f.length,v=c?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=x(h);d.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=c;++g)_=x(f[g]),(!_&&y.e>m.s+a||_&&!w(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=x(f[g]),(!_||!w(y,_.s))&&m.i=b&&S.s<=b+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(i=s)}),i!=null?i:a},e.type="legend.scroll",e}(WM);function p$(t){t.registerAction("legendScroll","legendscroll",function(e,r){var i=e.scrollDataIndex;i!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(i)})})}function g$(t){Ct(YM),t.registerComponentModel(v$),t.registerComponentView(d$),p$(t)}function m$(t){Ct(YM),Ct(g$)}var y$=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=fa(X7.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(X7),sd=$t();function _$(t,e,r){sd(t).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(e.uid);n&&(n.getRange=r)})}function x$(t,e){for(var r=sd(t).coordSysRecordMap,i=r.keys(),n=0;ni[r+e]&&(e=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function A$(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var i=sd(r),n=i.coordSysRecordMap||(i.coordSysRecordMap=yt());n.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=MM(a);E(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,S$(r,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=yt());f.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),n.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){ZM(n,a);return}var f=T$(l);o.enable(f.controlType,f.opt),o.setPointerChecker(a.containsPoint),z4(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var C$=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,i,n){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),_$(n,r,{pan:ct(n8.pan,this),zoom:ct(n8.zoom,this),scrollMove:ct(n8.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){x$(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}($v),n8={zoom:function(t,e,r,i){var n=this.range,a=n.slice(),o=t.axisModels[0];if(o){var s=a8[e](null,[i.originX,i.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(q2(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:aS(function(t,e,r,i,n,a){var o=a8[i]([a.oldX,a.oldY],[a.newX,a.newY],e,n,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:aS(function(t,e,r,i,n,a){var o=a8[i]([0,0],[a.scrollDelta,a.scrollDelta],e,n,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function aS(t){return function(e,r,i,n){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,i,n);if(q2(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var a8={grid:function(t,e,r,i,n){var a=r.axis,o={},s=n.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,i,n){var a=r.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,i,n){var a=r.axis,o=n.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function QM(t){Jv(t),t.registerComponentModel(y$),t.registerComponentView(C$),A$(t)}var D$=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=fa(X7.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(X7),D6=Xt,oS=7,E$=1,o8=30,M$=7,E6="horizontal",sS="vertical",L$=5,I$=["line","bar","candlestick","scatter"],P$={easing:"cubicOut",duration:100,delay:0},R$=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,i){this.api=i,this._onBrush=ct(this._onBrush,this),this._onBrushEnd=ct(this._onBrushEnd,this)},e.prototype.render=function(r,i,n,a){if(t.prototype.render.apply(this,arguments),z4(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){P7(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new Dt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(i),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,i=this.api,n=r.get("brushSelect"),a=n?M$:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===E6?{right:s.width-o.x-o.width,top:s.height-o8-oS-a,width:o.width,height:o8}:{right:oS,top:o.y,width:o8,height:o.height},u=O4(r.option);E(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=Re(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===sS&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===E6&&!o?{scaleY:l?1:-1,scaleX:1}:n===E6&&o?{scaleY:l?1:-1,scaleX:-1}:n===sS&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=i.x-u.x,r.y=i.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=r.get("brushSelect");n.add(new D6({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new D6({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:ct(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var i=this._size,n=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var v=[0,i[1]],d=[0,i[0]],p=[[i[0],0],[0,0]],g=[],m=d[1]/(o.count()-1),y=0,_=Math.round(o.count()/i[0]),x;o.each([l],function(A,D){if(_>0&&D%_){y+=m;return}var C=A==null||isNaN(A)||A==="",M=C?0:oe(A,h,v,!0);C&&!x&&D?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!C&&x&&(p.push([y,0]),g.push([y,0])),p.push([y,M]),g.push([y,M]),y+=m,x=C}),u=this._shadowPolygonPts=p,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var w=this.dataZoomModel;function S(A){var D=w.getModel(A?"selectedDataBackground":"dataBackground"),C=new Dt,M=new Zr({shape:{points:u},segmentIgnoreThreshold:1,style:D.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new qr({shape:{points:f},segmentIgnoreThreshold:1,style:D.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return C.add(M),C.add(L),C}for(var b=0;b<3;b++){var T=S(b===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,i=r.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();E(l,function(u){if(!n&&!(i!==!0&&kt(I$,u.get("type"))<0)){var f=a.getComponent(Zn(o),s).axis,h=N$(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),n={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:c}}},this)},this),n}},e.prototype._renderHandle=function(){var r=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),c=i.filler=new D6({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new D6({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:E$,fill:"rgba(0,0,0,0)"}})),E([0,1],function(_){var x=l.get("handleIcon");!H9[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var w=Ue(x,-1,0,2,2,null,!0);w.attr({cursor:lS(this._orient),draggable:!0,drift:ct(this._onDragMove,this,_),ondragend:ct(this._onDragEnd,this),onmouseover:ct(this._showDataInfo,this,!0),onmouseout:ct(this._showDataInfo,this,!1),z2:5});var S=w.getBoundingRect(),b=l.get("handleSize");this._handleHeight=ot(b,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Kn(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(n[_]=w);var A=l.getModel("textStyle");r.add(a[_]=new Ht({silent:!0,invisible:!0,style:fe(A,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:A.getTextColor(),font:A.getFont()}),z2:10}))},this);var v=c;if(h){var d=ot(l.get("moveHandleSize"),s[1]),p=i.moveHandle=new Xt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,m=i.moveHandleIcon=Ue(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));v=i.moveZone=new Xt({invisible:!0,shape:{y:s[1]-y,height:d+y}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(m),o.add(v)}v.attr({draggable:!0,cursor:lS(this._orient),drift:ct(this._onDragMove,this,"all"),ondragstart:ct(this._showDataInfo,this,!0),ondragend:ct(this._onDragEnd,this),onmouseover:ct(this._showDataInfo,this,!0),onmouseout:ct(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[oe(r[0],[0,100],i,!0),oe(r[1],[0,100],i,!0)]},e.prototype._updateInterval=function(r,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];q2(i,a,o,n.get("zoomLock")?"all":r,s.minSpan!=null?oe(s.minSpan,l,o,!0):null,s.maxSpan!=null?oe(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=I1([oe(a[0],o,l,!0),oe(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(r){var i=this._displayables,n=this._handleEnds,a=I1(n.slice()),o=this._size;E([0,1],function(v){var d=i.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;fi[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var i=r.offsetX,n=r.offsetY;this._brushStart=new Rt(i,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=I1([oe(n.x,o,s,!0),oe(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(an(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new D6({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,i),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},e.prototype._dispatchZoomAction=function(r){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?P$:null,start:i[0],end:i[1]})},e.prototype._findCoordRect=function(){var r,i=MM(this.dataZoomModel).infoList;if(!r&&i.length){var n=i[0].model.coordinateSystem;r=n.getRect&&n.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}($v);function N$(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function lS(t){return t==="vertical"?"ns-resize":"ew-resize"}function jM(t){t.registerComponentModel(D$),t.registerComponentView(R$),Jv(t)}function O$(t){Ct(QM),Ct(jM)}var qM={get:function(t,e,r){var i=At((B$[t]||{})[e]);return r&&X(i)?i[i.length-1]:i}},B$={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},uS=fr.mapVisual,k$=fr.eachVisual,F$=X,fS=E,z$=I1,G$=oe,v0=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,i,n){this.mergeDefaultAndTheme(r,n)},e.prototype.optionUpdated=function(r,i){var n=this.option;!i&&zM(n,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var i=this.stateList;r=ct(r,this),this.controllerVisuals=bh(this.option.controller,i,r),this.targetVisuals=bh(this.option.target,i,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,i=[];return r==null||r==="all"?this.ecModel.eachSeries(function(n,a){i.push(a)}):i=de(r),i},e.prototype.eachTargetSeries=function(r,i){E(this.getTargetSeriesIndices(),function(n){var a=this.ecModel.getSeriesByIndex(n);a&&r.call(i,a)},this)},e.prototype.isTargetSeries=function(r){var i=!1;return this.eachTargetSeries(function(n){n===r&&(i=!0)}),i},e.prototype.formatValueText=function(r,i,n){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;n=n||["<",">"],X(r)&&(r=r.slice(),u=!0);var f=i?r:u?[h(r[0]),h(r[1])]:h(r);if(ht(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(wt(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?n[0]+" "+f[1]:r[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(c){return c===s[0]?"min":c===s[1]?"max":(+c).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,i=z$([r.min,r.max]);this._dataExtent=i},e.prototype.getDataDimensionIndex=function(r){var i=this.option.dimension;if(i!=null)return r.getDimensionIndex(i);for(var n=r.dimensions,a=n.length-1;a>=0;a--){var o=n[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),o=i.controller||(i.controller={});mt(a,n),mt(o,n);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),f.call(this,o);function l(h){F$(i.color)&&!h.inRange&&(h.inRange={color:i.color.slice().reverse()}),h.inRange=h.inRange||{color:r.get("gradientColor")}}function u(h,c,v){var d=h[c],p=h[v];d&&!p&&(p=h[v]={},fS(d,function(g,m){if(fr.isValidType(m)){var y=qM.get(m,"inactive",s);y!=null&&(p[m]=y,m==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(h){var c=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,v=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";fS(this.stateList,function(m){var y=this.itemSize,_=h[m];_||(_=h[m]={color:s?d:[d]}),_.symbol==null&&(_.symbol=c&&At(c)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&At(v)||(s?y[0]:[y[0],y[0]])),_.symbol=uS(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var w=-1/0;k$(x,function(S){S>w&&(w=S)}),_.symbolSize=uS(x,function(S){return G$(S,[0,w],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Bt),hS=[20,140],V$=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=hS[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=hS[1])},e.prototype._resetRange=function(){var r=this.getExtent(),i=this.option.range;!i||i.auto?(r.auto=1,this.option.range=r):X(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],r[0]),i[1]=Math.min(i[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(r){var i=this.option.controller[r].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),i=I1((this.get("range")||[]).slice());return i[0]>r[1]&&(i[0]=r[1]),i[1]>r[1]&&(i[1]=r[1]),i[0]=n[1]||r<=i[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var i=[];return this.eachTargetSeries(function(n){var a=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),i.push({seriesId:n.id,dataIndex:a})},this),i},e.prototype.getVisualMeta=function(r){var i=cS(this,"outOfRange",this.getExtent()),n=cS(this,"inRange",this.option.range.slice()),a=[];function o(v,d){a.push({value:v,color:r(v,d)})}for(var s=0,l=0,u=n.length,f=i.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:s/n})}return a.push({color:this.getControllerVisual(r[1],"color",i),offset:1}),a},e.prototype._createBarPoints=function(r,i){var n=this.visualMapModel.itemSize;return[[n[0]-i[0],r[0]],[n[0],r[0]],[n[0],r[1]],[n[0]-i[1],r[1]]]},e.prototype._createBarGroup=function(r){var i=this._orient,n=this.visualMapModel.get("inverse");return new Dt(i==="horizontal"&&!n?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&n?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!n?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,i){if(this._useHandle){var n=this._shapes,a=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=a.itemSize,u=a.getExtent();H$([0,1],function(f){var h=o[f];h.setStyle("fill",i.handlesColor[f]),h.y=r[f];var c=pi(r[f],[0,l[1]],u,!0),v=this.getControllerVisual(c,"symbolSize");h.scaleX=h.scaleY=v/l[0],h.x=l[0]-v/2;var d=ri(n.handleLabelPoints[f],w2(h,this.group));s[f].setStyle({x:d[0],y:d[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,i,n,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,h=f.indicator;if(h){h.attr("invisible",!1);var c={convertOpacityToAlpha:!0},v=this.getControllerVisual(r,"color",c),d=this.getControllerVisual(r,"symbolSize"),p=pi(r,s,u,!0),g=l[0]-d/2,m={x:h.x,y:h.y};h.y=p,h.x=g;var y=ri(f.indicatorLabelPoint,w2(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",f.mainGroup),w=this._orient,S=w==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(i),verticalAlign:S?x:"middle",align:S?"center":x});var b={x:g,y:p,style:{fill:v}},T={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var A={duration:100,easing:"cubicInOut",additive:!0};h.x=m.x,h.y=m.y,h.animateTo(b,A),_.animateTo(T,A)}else h.attr(b),_.attr(T);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var C=0;Co[1]&&(h[1]=1/0),i&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var c=this._hoverLinkDataIndices,v=[];(i||gS(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var d=rN(c,v);this._dispatchHighDown("downplay",g9(d[0],n)),this._dispatchHighDown("highlight",g9(d[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var i;if(h2(r.target,function(l){var u=Et(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var n=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(n)){var o=n.getData(i.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var n=0;n=0&&(a.dimension=o,i.push(a))}}),t.getData().setVisual("visualMeta",i)}}];function q$(t,e,r,i){for(var n=e.targetVisuals[i],a=fr.prepareVisualTypes(n),o={color:c3(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(Z$,Q$),E(j$,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(K$))}function tL(t){t.registerComponentModel(V$),t.registerComponentView(X$),JM(t)}var $$=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],J$[this._mode].call(this,this._pieceList),this._resetSelected(r,i);var a=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=At(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=j(this._pieceList,function(l){return l=At(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,i={},n=fr.listVisualTypes(),a=this.isCategory();E(r.pieces,function(s){E(n,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),E(i,function(s,l){var u=!1;E(this.stateList,function(f){u=u||o(r,f,l)||o(r.target,f,l)},this),!u&&E(this.stateList,function(f){(r[f]||(r[f]={}))[l]=qM.get(l,f==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,i){var n=this.option,a=this._pieceList,o=(i?n:r).selected||{};if(n.selected=o,E(a,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;E(a,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=At(r)},e.prototype.getValueState=function(r){var i=fr.findPieceIndex(r,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var i=[],n=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=fr.findPieceIndex(l,n);f===r&&o.push(u)},this),i.push({seriesId:a.id,dataIndex:o})},this),i},e.prototype.getRepresentValue=function(r){var i;if(this.isCategory())i=r.value;else if(r.value!=null)i=r.value;else{var n=r.interval||[];i=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return i},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var i=[],n=["",""],a=this;function o(f,h){var c=a.getRepresentValue({interval:f});h||(h=a.getValueState(c));var v=r(c,h);f[0]===-1/0?n[0]=v:f[1]===1/0?n[1]=v:i.push({value:f[0],color:v},{value:f[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return E(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:i,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=fa(v0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(v0),J$={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),i=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var a=(i[1]-i[0])/n;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o","≥"][i[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,n)},this)}};function xS(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var tJ=function(t){F(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,f=this._getViewData(),h=f.endsText,c=_r(i.get("showLabel",!0),!h);h&&this._renderEndsText(r,h[0],u,c,l),E(f.viewPieceList,function(v){var d=v.piece,p=new Dt;p.onclick=ct(this._onItemClick,this,d),this._enableHoverLink(p,v.indexInModelPieceList);var g=i.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,u[0],u[1]]),c){var m=this.visualMapModel.getValueState(g);p.add(new Ht({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1}}))}r.add(p)},this),h&&this._renderEndsText(r,h[1],u,c,l),b2(i.get("orient"),r,i.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,i){var n=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:g9(s.findTargetDataIndices(i),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,i=r.option;if(i.orient==="vertical")return $M(r,this.api,r.itemSize);var n=i.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(r,i,n,a,o){if(i){var s=new Dt,l=this.visualMapModel.textStyleModel;s.add(new Ht({style:fe(l,{x:a?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:a?o:"center",text:i})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,i=j(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?i.reverse():n&&(n=n.slice().reverse()),{viewPieceList:i,endsText:n}},e.prototype._createItemSymbol=function(r,i,n){r.add(Ue(this.getControllerVisual(i,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(i,"color")))},e.prototype._onItemClick=function(r){var i=this.visualMapModel,n=i.option,a=n.selectedMode;if(a){var o=At(n.selected),s=i.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,E(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(KM);function eL(t){t.registerComponentModel($$),t.registerComponentView(tJ),JM(t)}function eJ(t){Ct(tL),Ct(eL)}var rJ={label:{enabled:!0},decal:{show:!1}},SS=$t(),iJ={};function nJ(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var i=At(rJ);mt(i.label,t.getLocaleModel().get("aria"),!1),mt(r.option,i,!1),n(),a();function n(){var u=r.getModel("decal"),f=u.get("show");if(f){var h=yt();t.eachSeries(function(c){if(!c.isColorBySeries()){var v=h.get(c.type);v||(v={},h.set(c.type,v)),SS(c).scope=v}}),t.eachRawSeries(function(c){if(t.isSeriesFiltered(c))return;if(wt(c.enableAriaDecal)){c.enableAriaDecal();return}var v=c.getData();if(c.isColorBySeries()){var y=Mf(c.ecModel,c.name,iJ,t.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",x(_,y))}else{var d=c.getRawData(),p={},g=SS(c).scope;v.each(function(w){var S=v.getRawIndex(w);p[S]=w});var m=d.count();d.each(function(w){var S=p[w],b=d.getName(w)||w+"",T=Mf(c.ecModel,b,g,m),A=v.getItemVisual(S,"decal");v.setItemVisual(S,"decal",x(A,T))})}function x(w,S){var b=w?H(H({},S),w):S;return b.dirty=!0,b}})}}function a(){var u=e.getZr().dom;if(u){var f=t.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=xt(h.option,f),!!h.get("enabled")){if(h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var c=t.getSeriesCount(),v=h.get(["data","maxCount"])||10,d=h.get(["series","maxCount"])||10,p=Math.min(c,d),g;if(!(c<1)){var m=s();if(m){var y=h.get(["general","withTitle"]);g=o(y,{title:m})}else g=h.get(["general","withoutTitle"]);var _=[],x=c>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);g+=o(x,{seriesCount:c}),t.eachSeries(function(T,A){if(A1?h.get(["series","multiple",M]):h.get(["series","single",M]),D=o(D,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>v){var I=h.get(["data","partialData"]);D+=o(I,{displayCnt:v})}else D+=h.get(["data","allData"]);for(var P=h.get(["data","separator","middle"]),R=h.get(["data","separator","end"]),B=[],O=0;O":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},sJ=function(){function t(e){var r=this._condVal=ht(e)?new RegExp(e):bP(e)?e:null;if(r==null){var i="";se(i)}}return t.prototype.evaluate=function(e){var r=typeof e;return ht(r)?this._condVal.test(e):te(r)?this._condVal.test(e+""):!1},t}(),lJ=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),uJ=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&i.push(n),n=[L,I]}function f(L,I,P,R){Ho(L,P)&&Ho(I,R)||n.push(L,I,P,R,P,R)}function h(L,I,P,R,B,O){var z=Math.abs(I-L),G=Math.tan(z/4)*4/3,U=IT:C2&&i.push(n),i}function Ih(t,e,r,i,n,a,o,s,l,u){if(Ho(t,r)&&Ho(e,i)&&Ho(n,o)&&Ho(a,s)){l.push(o,s);return}var f=2/u,h=f*f,c=o-t,v=s-e,d=Math.sqrt(c*c+v*v);c/=d,v/=d;var p=r-t,g=i-e,m=n-o,y=a-s,_=p*p+g*g,x=m*m+y*y;if(_=0&&T=0){l.push(o,s);return}var A=[],D=[];ia(t,r,n,o,.5,A),ia(e,i,a,s,.5,D),Ih(A[0],D[0],A[1],D[1],A[2],D[2],A[3],D[3],l,u),Ih(A[4],D[4],A[5],D[5],A[6],D[6],A[7],D[7],l,u)}function wJ(t,e){var r=Lh(t),i=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),h=nL([l,u],f?0:1,e),c=(f?s:u)/h.length,v=0;vn,o=nL([i,n],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",f=a?"y":"x",h=t[s]/o.length,c=0;c1?null:new Rt(p*l+t,p*u+e)}function AJ(t,e,r){var i=new Rt;Rt.sub(i,r,e),i.normalize();var n=new Rt;Rt.sub(n,t,e);var a=n.dot(i);return a}function So(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function CJ(t,e,r){for(var i=t.length,n=[],a=0;ao?(u.x=f.x=s+a/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+a),CJ(e,u,f)}function d0(t,e,r,i){if(r===1)i.push(e);else{var n=Math.floor(r/2),a=t(e);d0(t,a[0],n,i),d0(t,a[1],r-n,i)}return i}function DJ(t,e){for(var r=[],i=0;i0;u/=2){var f=0,h=0;(t&u)>0&&(f=1),(e&u)>0&&(h=1),s+=u*u*(3*f^h),h===0&&(f===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function m0(t){var e=1/0,r=1/0,i=-1/0,n=-1/0,a=j(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),r=Math.min(h,r),i=Math.max(f,i),n=Math.max(h,n),[f,h]}),o=j(a,function(s,l){return{cp:s,z:BJ(s[0],s[1],e,r,i,n),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function sL(t){return LJ(t.path,t.count)}function Ph(){return{fromIndividuals:[],toIndividuals:[],count:0}}function kJ(t,e,r){var i=[];function n(w){for(var S=0;S=0;n--)if(!r[n].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[n].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var zJ={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0))return;var s=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;LS(t)&&(u=t,f=e),LS(e)&&(u=e,f=t);function h(m,y,_,x,w){var S=m.many,b=m.one;if(S.length===1&&!w){var T=y?S[0]:b,A=y?b:S[0];if(p0(T))h({many:[T],one:A},!0,_,x,!0);else{var D=s?xt({delay:s(_,x)},l):l;ud(T,A,D),a(T,A,T,A,D)}}else for(var C=xt({dividePath:zJ[r],individualDelay:s&&function(B,O,z,G){return s(B+_,x)}},l),M=y?kJ(S,b,C):FJ(b,S,C),L=M.fromIndividuals,I=M.toIndividuals,P=L.length,R=0;Re.length,v=u?IS(f,u):IS(c?e:t,[c?t:e]),d=0,p=0;plL))for(var a=i.getIndices(),o=0;o0&&S.group.traverse(function(T){T instanceof zt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},b)})})}function BS(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function kS(t){return X(t)?t.sort().join(","):t}function Fn(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function YJ(t,e){var r=yt(),i=yt(),n=yt();return E(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=BS(a),f=kS(u);i.set(f,{dataGroupId:s,data:l}),X(u)&&E(u,function(h){n.set(h,{key:f,dataGroupId:s,data:l})})}),E(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=BS(a),u=kS(l),f=i.get(u);if(f)r.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:Fn(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:Fn(s),data:s}]});else if(X(l)){var h=[];E(l,function(d){var p=i.get(d);p.data&&h.push({dataGroupId:p.dataGroupId,divide:Fn(p.data),data:p.data})}),h.length&&r.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:Fn(s)}]})}else{var c=n.get(l);if(c){var v=r.get(c.key);v||(v={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:Fn(c.data)}],newSeries:[]},r.set(c.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Fn(s)})}}}}),r}function FS(t,e){for(var r=0;r=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Fn(e.oldData[s]),groupIdDim:o.dimension})}),E(de(t.to),function(o){var s=FS(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Fn(l),groupIdDim:o.dimension})}}),n.length>0&&a.length>0&&uL(n,a,i)}function QJ(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,i){E(de(i.seriesTransition),function(n){E(de(n.to),function(a){for(var o=i.updatedSeries,s=0;s=400?t.onerror&&t.onerror():t.onload&&t.onload(e.response)},t.onerror&&(e.onerror=t.onerror),e.send(null)}const itt={get:rtt};var h8,le={};le.supportWebGL=function(){if(h8==null)try{var t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)throw new Error}catch(r){h8=!1}return h8};le.Int8Array=typeof Int8Array>"u"?Array:Int8Array;le.Uint8Array=typeof Uint8Array>"u"?Array:Uint8Array;le.Uint16Array=typeof Uint16Array>"u"?Array:Uint16Array;le.Uint32Array=typeof Uint32Array>"u"?Array:Uint32Array;le.Int16Array=typeof Int16Array>"u"?Array:Int16Array;le.Float32Array=typeof Float32Array>"u"?Array:Float32Array;le.Float64Array=typeof Float64Array>"u"?Array:Float64Array;var p2={};typeof window<"u"?p2=window:typeof global<"u"&&(p2=global);le.requestAnimationFrame=p2.requestAnimationFrame||p2.msRequestAnimationFrame||p2.mozRequestAnimationFrame||p2.webkitRequestAnimationFrame||function(t){setTimeout(t,16)};le.createCanvas=function(){return document.createElement("canvas")};le.createImage=function(){return new p2.Image};le.request={get:itt.get};le.addEventListener=function(t,e,r,i){t.addEventListener(e,r,i)};le.removeEventListener=function(t,e,r){t.removeEventListener(e,r)};var dr=function(){this.head=null,this.tail=null,this._length=0};dr.prototype.insert=function(t){var e=new dr.Entry(t);return this.insertEntry(e),e};dr.prototype.insertAt=function(t,e){if(!(t<0)){for(var r=this.head,i=0;r&&i!=t;)r=r.next,i++;if(r){var n=new dr.Entry(e),a=r.prev;a?(a.next=n,n.prev=a):this.head=n,n.next=r,r.prev=n}else this.insert(e)}};dr.prototype.insertBeforeEntry=function(t,e){var r=new dr.Entry(t),i=e.prev;i?(i.next=r,r.prev=i):this.head=r,r.next=e,e.prev=r,this._length++};dr.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._length++};dr.prototype.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._length--};dr.prototype.removeAt=function(t){if(!(t<0)){for(var e=this.head,r=0;e&&r!=t;)e=e.next,r++;if(e)return this.remove(e),e.value}};dr.prototype.getHead=function(){if(this.head)return this.head.value};dr.prototype.getTail=function(){if(this.tail)return this.tail.value};dr.prototype.getAt=function(t){if(!(t<0)){for(var e=this.head,r=0;e&&r!=t;)e=e.next,r++;return e.value}};dr.prototype.indexOf=function(t){for(var e=this.head,r=0;e;){if(e.value===t)return r;e=e.next,r++}};dr.prototype.length=function(){return this._length};dr.prototype.isEmpty=function(){return this._length===0};dr.prototype.forEach=function(t,e){for(var r=this.head,i=0,n=typeof e<"u";r;)n?t.call(e,r.value,i):t(r.value,i),r=r.next,i++};dr.prototype.clear=function(){this.tail=this.head=null,this._length=0};dr.Entry=function(t){this.value=t,this.next=null,this.prev=null};var K2=function(t){this._list=new dr,this._map={},this._maxSize=t||10};K2.prototype.setMaxSize=function(t){this._maxSize=t};K2.prototype.put=function(t,e){if(!this._map.hasOwnProperty(t)){var r=this._list.length();if(r>=this._maxSize&&r>0){var i=this._list.head;this._list.remove(i),delete this._map[i.key]}var n=this._list.insert(e);n.key=t,this._map[t]=n}};K2.prototype.get=function(t){var e=this._map[t];if(this._map.hasOwnProperty(t))return e!==this._list.tail&&(this._list.remove(e),this._list.insertEntry(e)),e.value};K2.prototype.remove=function(t){var e=this._map[t];typeof e<"u"&&(delete this._map[t],this._list.remove(e))};K2.prototype.clear=function(){this._list.clear(),this._map={}};var Pe={},US={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 ii(t){return t=Math.round(t),t<0?0:t>255?255:t}function ntt(t){return t=Math.round(t),t<0?0:t>360?360:t}function Q7(t){return t<0?0:t>1?1:t}function c8(t){return t.length&&t.charAt(t.length-1)==="%"?ii(parseFloat(t)/100*255):ii(parseInt(t,10))}function d4(t){return t.length&&t.charAt(t.length-1)==="%"?Q7(parseFloat(t)/100):Q7(parseFloat(t))}function v8(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Qn(t,e,r){return t+(e-t)*r}function Y1(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t}function Rh(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var fL=new K2(20),Ps=null;function bo(t,e){Ps&&Rh(Ps,e),Ps=fL.put(t,Ps||e.slice())}Pe.parse=function(t,e){if(t){e=e||[];var r=fL.get(t);if(r)return Rh(e,r);t=t+"";var i=t.replace(/ /g,"").toLowerCase();if(i in US)return Rh(e,US[i]),bo(t,e),e;if(i.charAt(0)==="#"){if(i.length===4){var n=parseInt(i.substr(1),16);if(!(n>=0&&n<=4095)){Y1(e,0,0,0,1);return}return Y1(e,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,1),bo(t,e),e}else if(i.length===7){var n=parseInt(i.substr(1),16);if(!(n>=0&&n<=16777215)){Y1(e,0,0,0,1);return}return Y1(e,(n&16711680)>>16,(n&65280)>>8,n&255,1),bo(t,e),e}return}var a=i.indexOf("("),o=i.indexOf(")");if(a!==-1&&o+1===i.length){var s=i.substr(0,a),l=i.substr(a+1,o-(a+1)).split(","),u=1;switch(s){case"rgba":if(l.length!==4){Y1(e,0,0,0,1);return}u=d4(l.pop());case"rgb":if(l.length!==3){Y1(e,0,0,0,1);return}return Y1(e,c8(l[0]),c8(l[1]),c8(l[2]),u),bo(t,e),e;case"hsla":if(l.length!==4){Y1(e,0,0,0,1);return}return l[3]=d4(l[3]),Nh(l,e),bo(t,e),e;case"hsl":if(l.length!==3){Y1(e,0,0,0,1);return}return Nh(l,e),bo(t,e),e;default:return}}Y1(e,0,0,0,1)}};Pe.parseToFloat=function(t,e){if(e=Pe.parse(t,e),!!e)return e[0]/=255,e[1]/=255,e[2]/=255,e};function Nh(t,e){var r=(parseFloat(t[0])%360+360)%360/360,i=d4(t[1]),n=d4(t[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return e=e||[],Y1(e,ii(v8(o,a,r+1/3)*255),ii(v8(o,a,r)*255),ii(v8(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function att(t){if(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),a=Math.max(e,r,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var f=((a-e)/6+o/2)/o,h=((a-r)/6+o/2)/o,c=((a-i)/6+o/2)/o;e===a?l=c-h:r===a?l=1/3+f-c:i===a&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}Pe.lift=function(t,e){var r=Pe.parse(t);if(r){for(var i=0;i<3;i++)e<0?r[i]=r[i]*(1-e)|0:r[i]=(255-r[i])*e+r[i]|0;return Pe.stringify(r,r.length===4?"rgba":"rgb")}};Pe.toHex=function(t){var e=Pe.parse(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)};Pe.fastLerp=function(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var i=t*(e.length-1),n=Math.floor(i),a=Math.ceil(i),o=e[n],s=e[a],l=i-n;return r[0]=ii(Qn(o[0],s[0],l)),r[1]=ii(Qn(o[1],s[1],l)),r[2]=ii(Qn(o[2],s[2],l)),r[3]=Q7(Qn(o[3],s[3],l)),r}};Pe.fastMapToColor=Pe.fastLerp;Pe.lerp=function(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var i=t*(e.length-1),n=Math.floor(i),a=Math.ceil(i),o=Pe.parse(e[n]),s=Pe.parse(e[a]),l=i-n,u=Pe.stringify([ii(Qn(o[0],s[0],l)),ii(Qn(o[1],s[1],l)),ii(Qn(o[2],s[2],l)),Q7(Qn(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:n,rightIndex:a,value:i}:u}};Pe.mapToColor=Pe.lerp;Pe.modifyHSL=function(t,e,r,i){if(t=Pe.parse(t),t)return t=att(t),e!=null&&(t[0]=ntt(e)),r!=null&&(t[1]=d4(r)),i!=null&&(t[2]=d4(i)),Pe.stringify(Nh(t),"rgba")};Pe.modifyAlpha=function(t,e){if(t=Pe.parse(t),t&&e!=null)return t[3]=Q7(e),Pe.stringify(t,"rgba")};Pe.stringify=function(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}};var ott=Pe.parseToFloat,d8={};function WS(t){var e=Object.keys(t);e.sort();for(var r=[],i=0;i=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(t,e){if(typeof t=="object")for(var r in t){var i=t[r];this.setUniform(r,i)}else this.setUniform(t,e)},get:function(t){var e=this.uniforms[t];if(e)return e.value},attachShader:function(t,e){var r=this.uniforms;this.uniforms=t.createUniforms(),this.shader=t;var i=this.uniforms;this._enabledUniforms=Object.keys(i),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter(function(u){var f=this.uniforms[u].type;return f==="t"||f==="tv"},this);var n=this.vertexDefines,a=this.fragmentDefines;if(this.vertexDefines=Ve.clone(t.vertexDefines),this.fragmentDefines=Ve.clone(t.fragmentDefines),e){for(var o in r)i[o]&&(i[o].value=r[o].value);Ve.defaults(this.vertexDefines,n),Ve.defaults(this.fragmentDefines,a)}var s={};for(var l in t.textures)s[l]={shaderType:t.textures[l].shaderType,type:t.textures[l].type,enabled:e&&this._textureStatus[l]?this._textureStatus[l].enabled:!1};this._textureStatus=s,this._programKey=""},clone:function(){var t=new this.constructor({name:this.name,shader:this.shader});for(var e in this.uniforms)t.uniforms[e].value=this.uniforms[e].value;return t.depthTest=this.depthTest,t.depthMask=this.depthMask,t.transparent=this.transparent,t.blend=this.blend,t.vertexDefines=Ve.clone(this.vertexDefines),t.fragmentDefines=Ve.clone(this.fragmentDefines),t.enableTexture(this.getEnabledTextures()),t.precision=this.precision,t},define:function(t,e,r){var i=this.vertexDefines,n=this.fragmentDefines;t!=="vertex"&&t!=="fragment"&&t!=="both"&&arguments.length<3&&(r=e,e=t,t="both"),r=r!=null?r:null,(t==="vertex"||t==="both")&&i[e]!==r&&(i[e]=r,this._programKey=""),(t==="fragment"||t==="both")&&n[e]!==r&&(n[e]=r,t!=="both"&&(this._programKey=""))},undefine:function(t,e){t!=="vertex"&&t!=="fragment"&&t!=="both"&&arguments.length<2&&(e=t,t="both"),(t==="vertex"||t==="both")&&this.isDefined("vertex",e)&&(delete this.vertexDefines[e],this._programKey=""),(t==="fragment"||t==="both")&&this.isDefined("fragment",e)&&(delete this.fragmentDefines[e],t!=="both"&&(this._programKey=""))},isDefined:function(t,e){switch(t){case"vertex":return this.vertexDefines[e]!==void 0;case"fragment":return this.fragmentDefines[e]!==void 0}},getDefine:function(t,e){switch(t){case"vertex":return this.vertexDefines[e];case"fragment":return this.fragmentDefines[e]}},enableTexture:function(t){if(Array.isArray(t)){for(var e=0;e0&&(n=1/Math.sqrt(n),t[0]=e[0]*n,t[1]=e[1]*n),t};st.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]};st.cross=function(t,e,r){var i=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=i,t};st.lerp=function(t,e,r,i){var n=e[0],a=e[1];return t[0]=n+i*(r[0]-n),t[1]=a+i*(r[1]-a),t};st.random=function(t,e){e=e||1;var r=GLMAT_RANDOM()*2*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t};st.transformMat2=function(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[2]*n,t[1]=r[1]*i+r[3]*n,t};st.transformMat2d=function(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[2]*n+r[4],t[1]=r[1]*i+r[3]*n+r[5],t};st.transformMat3=function(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[3]*n+r[6],t[1]=r[1]*i+r[4]*n+r[7],t};st.transformMat4=function(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[4]*n+r[12],t[1]=r[1]*i+r[5]*n+r[13],t};st.forEach=function(){var t=st.create();return function(e,r,i,n,a,o){var s,l;for(r||(r=2),i||(i=0),n?l=Math.min(n*r+i,e.length):l=e.length,s=i;s0&&i.push("#define "+n.toUpperCase()+"_COUNT "+a)}if(r)for(var o=0;ol.getMaxJointNumber()&&(c.USE_SKIN_MATRICES_TEXTURE=null),h+="\n"+g8(c)+"\n"}a&&(h+="\n#define INSTANCING\n");var v=h+g8(e.vertexDefines,s,f),d=h+g8(e.fragmentDefines,s,f),p=v+"\n"+e.shader.vertex,g=["OES_standard_derivatives","EXT_shader_texture_lod"].filter(function(S){return l.getGLExtension(S)!=null});g.indexOf("EXT_shader_texture_lod")>=0&&(d+="\n#define SUPPORT_TEXTURE_LOD"),g.indexOf("OES_standard_derivatives")>=0&&(d+="\n#define SUPPORT_STANDARD_DERIVATIVES");var m=htt(g)+"\n"+ctt(e.precision)+"\n"+d+"\n"+e.shader.fragment,y=KS(p,e.vertexDefines,s),_=KS(m,e.fragmentDefines,s),x=new utt;x.uniformSemantics=e.shader.uniformSemantics,x.attributes=e.shader.attributes;var w=x.buildProgram(u,e.shader,y,_);return x.__error=w,i[o]=x,x};var $S=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g,vtt=/attribute\s+(float|int|vec2|vec3|vec4)\s+([\s\S]*?);/g,JS=/#define\s+(\w+)?(\s+[\d-.]+)?\s*;?\s*\n/g,dtt={bool:"1i",int:"1i",sampler2D:"t",samplerCube:"t",float:"1f",vec2:"2f",vec3:"3f",vec4:"4f",ivec2:"2i",ivec3:"3i",ivec4:"4i",mat2:"m2",mat3:"m3",mat4:"m4"};function Hi(t){for(var e=[],r=0;r=0){if(c!==s&&c!==f){To();break}c=l,d=[];continue}else if(c===s){t==="bool"?v[p].value=m==="true":v[p].value=parseFloat(m),d=null;continue}else if(c===f){var y=m;Oh.indexOf(y)>=0||cL.indexOf(y)>=0||vL.indexOf(y)>=0?v[p].semantic=y:y==="ignore"||y==="unconfigurable"?v[p].ignore=!0:t==="bool"?v[p].value=y==="true":v[p].value=parseFloat(y);continue}g(m),c=o}}return v}function ft(t,e){typeof t=="object"&&(e=t.fragment,t=t.vertex),t=ew(t),e=ew(e),this._shaderID=gtt(t,e),this._vertexCode=ft.parseImport(t),this._fragmentCode=ft.parseImport(e),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}ft.prototype={constructor:ft,createUniforms:function(){var t={};for(var e in this.uniformTemplates){var r=this.uniformTemplates[e];t[e]={type:r.type,value:r.value()}}return t},_parseImport:function(){this._vertexCode=ft.parseImport(this.vertex),this._fragmentCode=ft.parseImport(this.fragment)},_addSemanticUniform:function(t,e,r){if(Oh.indexOf(r)>=0)this.attributeSemantics[r]={symbol:t,type:e};else if(vL.indexOf(r)>=0){var i=!1,n=r;r.match(/TRANSPOSE$/)&&(i=!0,n=r.slice(0,-9)),this.matrixSemantics[r]={symbol:t,type:e,isTranspose:i,semanticNoTranspose:n}}else cL.indexOf(r)>=0&&(this.uniformSemantics[r]={symbol:t,type:e})},_addMaterialUniform:function(t,e,r,i,n,a){a[t]={type:r,value:n?tw.array:i||tw[e],semantic:null}},_parseUniforms:function(){var t={},e=this,r="vertex";this._uniformList=[],this._vertexCode=this._vertexCode.replace($S,n),r="fragment",this._fragmentCode=this._fragmentCode.replace($S,n),e.matrixSemanticKeys=Object.keys(this.matrixSemantics);function i(a){return a!=null?function(){return a}:null}function n(a,o,s){var l=rw(o,s),u=[];for(var f in l){var h=l[f],c=h.semantic,v=f,d=dtt[o],p=i(l[f].value);l[f].isArray&&(v+="["+l[f].arraySize+"]",d+="v"),u.push(v),e._uniformList.push(f),h.ignore||((o==="sampler2D"||o==="samplerCube")&&(e.textures[f]={shaderType:r,type:o}),c?e._addSemanticUniform(f,d,c):e._addMaterialUniform(f,o,d,p,l[f].isArray,t))}return u.length>0?"uniform "+o+" "+u.join(",")+";\n":""}this.uniformTemplates=t},_parseAttributes:function(){var t={},e=this;this._vertexCode=this._vertexCode.replace(vtt,r);function r(i,n,a){var o=rw(n,a),s=ptt[n]||1,l=[];for(var u in o){var f=o[u].semantic;if(t[u]={type:"float",size:s,semantic:f||null},f){if(Oh.indexOf(f)<0)throw new Error('Unkown semantic "'+f+'"');e.attributeSemantics[f]={symbol:u,type:n}}l.push(u)}return"attribute "+n+" "+l.join(",")+";\n"}this.attributes=t},_parseDefines:function(){var t=this,e="vertex";this._vertexCode=this._vertexCode.replace(JS,r),e="fragment",this._fragmentCode=this._fragmentCode.replace(JS,r);function r(i,n,a){var o=e==="vertex"?t.vertexDefines:t.fragmentDefines;return o[n]||(a==="false"?o[n]=!1:a==="true"?o[n]=!0:o[n]=a?isNaN(parseFloat(a))?a.trim():parseFloat(a):null),""}},clone:function(){var t=dL[this._shaderID],e=new ft(t.vertex,t.fragment);return e}};Object.defineProperty&&(Object.defineProperty(ft.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(ft.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(ft.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(ft.prototype,"uniforms",{get:function(){return this._uniformList}}));var mtt=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;ft.parseImport=function(t){return t=t.replace(mtt,function(n,r,i){var n=ft.source(i);return n?ft.parseImport(n):(console.error('Shader chunk "'+i+'" not existed in library'),"")}),t};var ytt=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;ft.import=function(t){t.replace(ytt,function(e,r,i,a){var a=a.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"");if(a){for(var o=i.split("."),s=ft.codes,l=0,u;l0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t};k.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]};k.cross=function(t,e,r){var i=e[0],n=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=n*l-a*s,t[1]=a*o-i*l,t[2]=i*s-n*o,t};k.lerp=function(t,e,r,i){var n=e[0],a=e[1],o=e[2];return t[0]=n+i*(r[0]-n),t[1]=a+i*(r[1]-a),t[2]=o+i*(r[2]-o),t};k.random=function(t,e){e=e||1;var r=Uo()*2*Math.PI,i=Uo()*2-1,n=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t[2]=i*e,t};k.transformMat4=function(t,e,r){var i=e[0],n=e[1],a=e[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/o,t[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,t[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,t};k.transformMat3=function(t,e,r){var i=e[0],n=e[1],a=e[2];return t[0]=i*r[0]+n*r[3]+a*r[6],t[1]=i*r[1]+n*r[4]+a*r[7],t[2]=i*r[2]+n*r[5]+a*r[8],t};k.transformQuat=function(t,e,r){var i=e[0],n=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],f=u*i+s*a-l*n,h=u*n+l*i-o*a,c=u*a+o*n-s*i,v=-o*i-s*n-l*a;return t[0]=f*u+v*-o+h*-l-c*-s,t[1]=h*u+v*-s+c*-o-f*-l,t[2]=c*u+v*-l+f*-s-h*-o,t};k.rotateX=function(t,e,r,i){var n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t};k.rotateY=function(t,e,r,i){var n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t};k.rotateZ=function(t,e,r,i){var n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t};k.forEach=function(){var t=k.create();return function(e,r,i,n,a,o){var s,l;for(r||(r=3),i||(i=0),n?l=Math.min(n*r+i,e.length):l=e.length,s=i;s1?0:Math.acos(n)};ft.import(pL);var Me=it.create,iw={};function nw(t){return t.material}function _tt(t,e,r){return e.uniforms[r].value}function xtt(t,e,r,i){return r!==i}function Stt(t){return!0}function aw(){}var ow={float:tt.FLOAT,byte:tt.BYTE,ubyte:tt.UNSIGNED_BYTE,short:tt.SHORT,ushort:tt.UNSIGNED_SHORT};function wtt(t,e,r){this.availableAttributes=t,this.availableAttributeSymbols=e,this.indicesBuffer=r,this.vao=null}function btt(t){var e,r;this.bind=function(i){e||(e=le.createCanvas(),e.width=e.height=1,e.getContext("2d"));var n=i.gl,a=!r;a&&(r=n.createTexture()),n.bindTexture(n.TEXTURE_2D,r),a&&n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e)},this.unbind=function(i){i.gl.bindTexture(i.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var N1=xr.extend(function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:typeof window<"u"&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},maxJointNumber:20,__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}},function(){this.canvas||(this.canvas=le.createCanvas());var t=this.canvas;try{var e={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!this.gl)throw new Error;this._glinfo=new ett(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(r){throw"Error creating WebGL Context "+r}this._programMgr=new hL(this),this._placeholderTexture=new btt},{resize:function(t,e){var r=this.canvas,i=this.devicePixelRatio;t!=null?(r.style&&(r.style.width=t+"px",r.style.height=e+"px"),r.width=t*i,r.height=e*i,this._width=t,this._height=e):(this._width=r.width/i,this._height=r.height/i),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var t=this.viewport;return t.width/t.height},setDevicePixelRatio:function(t){this.devicePixelRatio=t,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(t){return this._glinfo.getExtension(t)},getGLParameter:function(t){return this._glinfo.getParameter(t)},setViewport:function(t,e,r,i,n){if(typeof t=="object"){var a=t;t=a.x,e=a.y,r=a.width,i=a.height,n=a.devicePixelRatio}n=n||this.devicePixelRatio,this.gl.viewport(t*n,e*n,r*n,i*n),this.viewport={x:t,y:e,width:r,height:i,devicePixelRatio:n}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var t=this._clearStack.pop();this.clearColor=t.clearColor,this.clearBit=t.clearBit}},bindSceneRendering:function(t){this._sceneRendering=t},render:function(t,e,r,i){var n=this.gl,a=this.clearColor;if(this.clearBit){n.colorMask(!0,!0,!0,!0),n.depthMask(!0);var o=this.viewport,s=!1,l=o.devicePixelRatio;(o.width!==this._width||o.height!==this._height||l&&l!==this.devicePixelRatio||o.x||o.y)&&(s=!0,n.enable(n.SCISSOR_TEST),n.scissor(o.x*l,o.y*l,o.width*l,o.height*l)),n.clearColor(a[0],a[1],a[2],a[3]),n.clear(this.clearBit),s&&n.disable(n.SCISSOR_TEST)}if(r||t.update(!1),t.updateLights(),e=e||t.getMainCamera(),!e){console.error("Can't find camera in the scene.");return}e.update();var u=t.updateRenderList(e,!0);this._sceneRendering=t;var f=u.opaque,h=u.transparent,c=t.material;t.trigger("beforerender",this,t,e,u),i?(this.renderPreZ(f,t,e),n.depthFunc(n.LEQUAL)):n.depthFunc(n.LESS);for(var v=Me(),d=k.create(),p=0;p0){var s=t[n-1],l=s.joints?s.joints.length:0,u=a.joints?a.joints.length:0;if(u===l&&a.material===s.material&&a.lightGroup===s.lightGroup){a.__program=s.__program;continue}}var f=this._programMgr.getProgram(a,o,e);this.validateProgram(f),a.__program=f}},renderPass:function(t,e,r){this.trigger("beforerenderpass",this,t,e,r),r=r||{},r.getMaterial=r.getMaterial||nw,r.getUniform=r.getUniform||_tt,r.isMaterialChanged=r.isMaterialChanged||xtt,r.beforeRender=r.beforeRender||aw,r.afterRender=r.afterRender||aw;var i=r.ifRender||Stt;this.updatePrograms(t,this._sceneRendering,r),r.sortCompare&&t.sort(r.sortCompare);var n=this.viewport,a=n.devicePixelRatio,o=[n.x*a,n.y*a,n.width*a,n.height*a],s=this.devicePixelRatio,l=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*s,this._height*s],u=[o[2],o[3]],f=Date.now();e?(it.copy(Ee.VIEW,e.viewMatrix.array),it.copy(Ee.PROJECTION,e.projectionMatrix.array),it.copy(Ee.VIEWINVERSE,e.worldTransform.array)):(it.identity(Ee.VIEW),it.identity(Ee.PROJECTION),it.identity(Ee.VIEWINVERSE)),it.multiply(Ee.VIEWPROJECTION,Ee.PROJECTION,Ee.VIEW),it.invert(Ee.PROJECTIONINVERSE,Ee.PROJECTION),it.invert(Ee.VIEWPROJECTIONINVERSE,Ee.VIEWPROJECTION);for(var h=this.gl,c=this._sceneRendering,v,d,p,g,m,y,_,x,w,S,b,T,A=null,D=0;Dthis.getMaxJointNumber()){var a=n.getSubSkinMatricesTexture(t.__uid__,t.joints);e.useTextureSlot(this,a,r),e.setUniform(i,"1i","skinMatricesTexture",r),e.setUniform(i,"1f","skinMatricesTextureSize",a.width)}else{var o=n.getSubSkinMatrices(t.__uid__,t.joints);e.setUniformOfSemantic(i,"SKIN_MATRIX",o)}},_renderObject:function(t,e,r){var i=this.gl,n=t.geometry,a=t.mode;a==null&&(a=4);var o=null,s=t.isInstancedMesh&&t.isInstancedMesh();if(s&&(o=this.getGLExtension("ANGLE_instanced_arrays"),!o)){console.warn("Device not support ANGLE_instanced_arrays extension");return}var l;if(s&&(l=this._bindInstancedAttributes(t,r,o)),e.indicesBuffer){var u=this.getGLExtension("OES_element_index_uint"),f=u&&n.indices instanceof Uint32Array,h=f?i.UNSIGNED_INT:i.UNSIGNED_SHORT;s?o.drawElementsInstancedANGLE(a,e.indicesBuffer.count,h,0,t.getInstanceCount()):i.drawElements(a,e.indicesBuffer.count,h,0)}else s?o.drawArraysInstancedANGLE(a,0,n.vertexCount,t.getInstanceCount()):i.drawArrays(a,0,n.vertexCount);if(s)for(var c=0;cr?r:t}var ye=Math.atan2,E1=Math.asin,Ao=Math.abs;Q.eulerFromQuat=function(t,e,c){t._dirty=!0,e=e.array;var i=t.array,n=e[0],a=e[1],o=e[2],s=e[3],l=n*n,u=a*a,f=o*o,h=s*s,c=(c||"XYZ").toUpperCase();switch(c){case"XYZ":i[0]=ye(2*(n*s-a*o),h-l-u+f),i[1]=E1(D1(2*(n*o+a*s),-1,1)),i[2]=ye(2*(o*s-n*a),h+l-u-f);break;case"YXZ":i[0]=E1(D1(2*(n*s-a*o),-1,1)),i[1]=ye(2*(n*o+a*s),h-l-u+f),i[2]=ye(2*(n*a+o*s),h-l+u-f);break;case"ZXY":i[0]=E1(D1(2*(n*s+a*o),-1,1)),i[1]=ye(2*(a*s-o*n),h-l-u+f),i[2]=ye(2*(o*s-n*a),h-l+u-f);break;case"ZYX":i[0]=ye(2*(n*s+o*a),h-l-u+f),i[1]=E1(D1(2*(a*s-n*o),-1,1)),i[2]=ye(2*(n*a+o*s),h+l-u-f);break;case"YZX":i[0]=ye(2*(n*s-o*a),h-l+u-f),i[1]=ye(2*(a*s-n*o),h+l-u-f),i[2]=E1(D1(2*(n*a+o*s),-1,1));break;case"XZY":i[0]=ye(2*(n*s+a*o),h-l+u-f),i[1]=ye(2*(n*o+a*s),h+l-u-f),i[2]=E1(D1(2*(o*s-n*a),-1,1));break;default:console.warn("Unkown order: "+c)}return t};Q.eulerFromMat3=function(t,e,d){var i=e.array,n=i[0],a=i[3],o=i[6],s=i[1],l=i[4],u=i[7],f=i[2],h=i[5],c=i[8],v=t.array,d=(d||"XYZ").toUpperCase();switch(d){case"XYZ":v[1]=E1(D1(o,-1,1)),Ao(o)<.99999?(v[0]=ye(-u,c),v[2]=ye(-a,n)):(v[0]=ye(h,l),v[2]=0);break;case"YXZ":v[0]=E1(-D1(u,-1,1)),Ao(u)<.99999?(v[1]=ye(o,c),v[2]=ye(s,l)):(v[1]=ye(-f,n),v[2]=0);break;case"ZXY":v[0]=E1(D1(h,-1,1)),Ao(h)<.99999?(v[1]=ye(-f,c),v[2]=ye(-a,l)):(v[1]=0,v[2]=ye(s,n));break;case"ZYX":v[1]=E1(-D1(f,-1,1)),Ao(f)<.99999?(v[0]=ye(h,c),v[2]=ye(s,n)):(v[0]=0,v[2]=ye(-a,l));break;case"YZX":v[2]=E1(D1(s,-1,1)),Ao(s)<.99999?(v[0]=ye(-u,l),v[1]=ye(-f,n)):(v[0]=0,v[1]=ye(o,c));break;case"XZY":v[2]=E1(-D1(a,-1,1)),Ao(a)<.99999?(v[0]=ye(h,l),v[1]=ye(o,n)):(v[0]=ye(-u,c),v[1]=0);break;default:console.warn("Unkown order: "+d)}return t._dirty=!0,t};Object.defineProperties(Q,{POSITIVE_X:{get:function(){return new Q(1,0,0)}},NEGATIVE_X:{get:function(){return new Q(-1,0,0)}},POSITIVE_Y:{get:function(){return new Q(0,1,0)}},NEGATIVE_Y:{get:function(){return new Q(0,-1,0)}},POSITIVE_Z:{get:function(){return new Q(0,0,1)}},NEGATIVE_Z:{get:function(){return new Q(0,0,-1)}},UP:{get:function(){return new Q(0,1,0)}},ZERO:{get:function(){return new Q}}});var _8=1e-5,C2=function(t,e){this.origin=t||new Q,this.direction=e||new Q};C2.prototype={constructor:C2,intersectPlane:function(t,e){var r=t.normal.array,i=t.distance,n=this.origin.array,a=this.direction.array,o=k.dot(r,a);if(o===0)return null;e||(e=new Q);var s=(k.dot(r,n)-i)/o;return k.scaleAndAdd(e.array,n,a,-s),e._dirty=!0,e},mirrorAgainstPlane:function(t){var e=k.dot(t.normal.array,this.direction.array);k.scaleAndAdd(this.direction.array,this.direction.array,t.normal.array,-e*2),this.direction._dirty=!0},distanceToPoint:function(){var t=k.create();return function(e){k.sub(t,e,this.origin.array);var r=k.dot(t,this.direction.array);if(r<0)return k.distance(this.origin.array,e);var i=k.lenSquared(t);return Math.sqrt(i-r*r)}}(),intersectSphere:function(){var t=k.create();return function(e,r,i){var n=this.origin.array,a=this.direction.array;e=e.array,k.sub(t,e,n);var o=k.dot(t,a),s=k.squaredLength(t),l=s-o*o,u=r*r;if(!(l>u)){var f=Math.sqrt(u-l),h=o-f,c=o+f;return i||(i=new Q),h<0?c<0?null:(k.scaleAndAdd(i.array,n,a,c),i):(k.scaleAndAdd(i.array,n,a,h),i)}}}(),intersectBoundingBox:function(t,e){var r=this.direction.array,i=this.origin.array,n=t.min.array,a=t.max.array,o=1/r[0],s=1/r[1],l=1/r[2],u,f,h,c,v,d;if(o>=0?(u=(n[0]-i[0])*o,f=(a[0]-i[0])*o):(f=(n[0]-i[0])*o,u=(a[0]-i[0])*o),s>=0?(h=(n[1]-i[1])*s,c=(a[1]-i[1])*s):(c=(n[1]-i[1])*s,h=(a[1]-i[1])*s),u>c||h>f||((h>u||u!==u)&&(u=h),(c=0?(v=(n[2]-i[2])*l,d=(a[2]-i[2])*l):(d=(n[2]-i[2])*l,v=(a[2]-i[2])*l),u>d||v>f)||((v>u||u!==u)&&(u=v),(d=0?u:f;return e||(e=new Q),k.scaleAndAdd(e.array,i,r,p),e},intersectTriangle:function(){var t=k.create(),e=k.create(),r=k.create(),i=k.create();return function(n,a,o,s,l,u){var f=this.direction.array,h=this.origin.array;n=n.array,a=a.array,o=o.array,k.sub(t,a,n),k.sub(e,o,n),k.cross(i,e,f);var c=k.dot(t,i);if(s){if(c>-_8)return null}else if(c>-_8&&c<_8)return null;k.sub(r,h,n);var v=k.dot(i,r)/c;if(v<0||v>1)return null;k.cross(i,t,r);var d=k.dot(f,i)/c;if(d<0||d>1||v+d>1)return null;k.cross(i,t,e);var p=-k.dot(r,i)/c;return p<0?null:(l||(l=new Q),u&&Q.set(u,1-v-d,v,d),k.scaleAndAdd(l.array,h,f,p),l)}}(),applyTransform:function(t){Q.add(this.direction,this.direction,this.origin),Q.transformMat4(this.origin,this.origin,t),Q.transformMat4(this.direction,this.direction,t),Q.sub(this.direction,this.direction,this.origin),Q.normalize(this.direction,this.direction)},copy:function(t){Q.copy(this.origin,t.origin),Q.copy(this.direction,t.direction)},clone:function(){var t=new C2;return t.copy(this),t}};var rt={};rt.create=function(){var t=new Sr(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t};rt.clone=function(t){var e=new Sr(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e};rt.fromValues=function(t,e,r,i){var n=new Sr(4);return n[0]=t,n[1]=e,n[2]=r,n[3]=i,n};rt.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t};rt.set=function(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t};rt.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t};rt.subtract=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t};rt.sub=rt.subtract;rt.multiply=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t};rt.mul=rt.multiply;rt.divide=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t};rt.div=rt.divide;rt.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t};rt.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t};rt.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t};rt.scaleAndAdd=function(t,e,r,i){return t[0]=e[0]+r[0]*i,t[1]=e[1]+r[1]*i,t[2]=e[2]+r[2]*i,t[3]=e[3]+r[3]*i,t};rt.distance=function(t,e){var r=e[0]-t[0],i=e[1]-t[1],n=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+i*i+n*n+a*a)};rt.dist=rt.distance;rt.squaredDistance=function(t,e){var r=e[0]-t[0],i=e[1]-t[1],n=e[2]-t[2],a=e[3]-t[3];return r*r+i*i+n*n+a*a};rt.sqrDist=rt.squaredDistance;rt.length=function(t){var e=t[0],r=t[1],i=t[2],n=t[3];return Math.sqrt(e*e+r*r+i*i+n*n)};rt.len=rt.length;rt.squaredLength=function(t){var e=t[0],r=t[1],i=t[2],n=t[3];return e*e+r*r+i*i+n*n};rt.sqrLen=rt.squaredLength;rt.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t};rt.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t};rt.normalize=function(t,e){var r=e[0],i=e[1],n=e[2],a=e[3],o=r*r+i*i+n*n+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t[3]=e[3]*o),t};rt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]};rt.lerp=function(t,e,r,i){var n=e[0],a=e[1],o=e[2],s=e[3];return t[0]=n+i*(r[0]-n),t[1]=a+i*(r[1]-a),t[2]=o+i*(r[2]-o),t[3]=s+i*(r[3]-s),t};rt.random=function(t,e){return e=e||1,t[0]=Uo(),t[1]=Uo(),t[2]=Uo(),t[3]=Uo(),rt.normalize(t,t),rt.scale(t,t,e),t};rt.transformMat4=function(t,e,r){var i=e[0],n=e[1],a=e[2],o=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,t[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,t[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,t[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,t};rt.transformQuat=function(t,e,r){var i=e[0],n=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],f=u*i+s*a-l*n,h=u*n+l*i-o*a,c=u*a+o*n-s*i,v=-o*i-s*n-l*a;return t[0]=f*u+v*-o+h*-l-c*-s,t[1]=h*u+v*-s+c*-o-f*-l,t[2]=c*u+v*-l+f*-s-h*-o,t};rt.forEach=function(){var t=rt.create();return function(e,r,i,n,a,o){var s,l;for(r||(r=4),i||(i=0),n?l=Math.min(n*r+i,e.length):l=e.length,s=i;s.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(k.cross(t,n,a),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+o,pt.normalize(i,i))}}();pt.setAxes=function(){var t=Mt.create();return function(e,r,i,n){return t[0]=i[0],t[3]=i[1],t[6]=i[2],t[1]=n[0],t[4]=n[1],t[7]=n[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],pt.normalize(e,pt.fromMat3(e,t))}}();pt.clone=rt.clone;pt.fromValues=rt.fromValues;pt.copy=rt.copy;pt.set=rt.set;pt.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t};pt.setAxisAngle=function(t,e,r){r=r*.5;var i=Math.sin(r);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(r),t};pt.add=rt.add;pt.multiply=function(t,e,r){var i=e[0],n=e[1],a=e[2],o=e[3],s=r[0],l=r[1],u=r[2],f=r[3];return t[0]=i*f+o*s+n*u-a*l,t[1]=n*f+o*l+a*s-i*u,t[2]=a*f+o*u+i*l-n*s,t[3]=o*f-i*s-n*l-a*u,t};pt.mul=pt.multiply;pt.scale=rt.scale;pt.rotateX=function(t,e,r){r*=.5;var i=e[0],n=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=i*l+o*s,t[1]=n*l+a*s,t[2]=a*l-n*s,t[3]=o*l-i*s,t};pt.rotateY=function(t,e,r){r*=.5;var i=e[0],n=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=i*l-a*s,t[1]=n*l+o*s,t[2]=a*l+i*s,t[3]=o*l-n*s,t};pt.rotateZ=function(t,e,r){r*=.5;var i=e[0],n=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=i*l+n*s,t[1]=n*l-i*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t};pt.calculateW=function(t,e){var r=e[0],i=e[1],n=e[2];return t[0]=r,t[1]=i,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),t};pt.dot=rt.dot;pt.lerp=rt.lerp;pt.slerp=function(t,e,r,i){var n=e[0],a=e[1],o=e[2],s=e[3],l=r[0],u=r[1],f=r[2],h=r[3],c,v,d,p,g;return v=n*l+a*u+o*f+s*h,v<0&&(v=-v,l=-l,u=-u,f=-f,h=-h),1-v>1e-6?(c=Math.acos(v),d=Math.sin(c),p=Math.sin((1-i)*c)/d,g=Math.sin(i*c)/d):(p=1-i,g=i),t[0]=p*n+g*l,t[1]=p*a+g*u,t[2]=p*o+g*f,t[3]=p*s+g*h,t};pt.invert=function(t,e){var r=e[0],i=e[1],n=e[2],a=e[3],o=r*r+i*i+n*n+a*a,s=o?1/o:0;return t[0]=-r*s,t[1]=-i*s,t[2]=-n*s,t[3]=a*s,t};pt.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t};pt.length=rt.length;pt.len=pt.length;pt.squaredLength=rt.squaredLength;pt.sqrLen=pt.squaredLength;pt.normalize=rt.normalize;pt.fromMat3=function(t,e){var r=e[0]+e[4]+e[8],i;if(r>0)i=Math.sqrt(r+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{var n=0;e[4]>e[0]&&(n=1),e[8]>e[n*3+n]&&(n=2);var a=(n+1)%3,o=(n+2)%3;i=Math.sqrt(e[n*3+n]-e[a*3+a]-e[o*3+o]+1),t[n]=.5*i,i=.5/i,t[3]=(e[a*3+o]-e[o*3+a])*i,t[a]=(e[a*3+n]+e[n*3+a])*i,t[o]=(e[o*3+n]+e[n*3+o])*i}return t};var dt=function(){this._axisX=new Q,this._axisY=new Q,this._axisZ=new Q,this.array=it.create(),this._dirty=!0};dt.prototype={constructor:dt,setArray:function(t){for(var e=0;e0){var e=this.min,r=this.max,i=e.array,n=r.array;Bs(i,t[0]),Bs(n,t[0]);for(var a=1;an[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1]),o[2]>n[2]&&(n[2]=o[2])}e._dirty=!0,r._dirty=!0}},union:function(t){var e=this.min,r=this.max;return k.min(e.array,e.array,t.min.array),k.max(r.array,r.array,t.max.array),e._dirty=!0,r._dirty=!0,this},intersection:function(t){var e=this.min,r=this.max;return k.max(e.array,e.array,t.min.array),k.min(r.array,r.array,t.max.array),e._dirty=!0,r._dirty=!0,this},intersectBoundingBox:function(t){var e=this.min.array,r=this.max.array,i=t.min.array,n=t.max.array;return!(e[0]>n[0]||e[1]>n[1]||e[2]>n[2]||r[0]=n[0]&&r[1]>=n[1]&&r[2]>=n[2]},containPoint:function(t){var e=this.min.array,r=this.max.array,i=t.array;return e[0]<=i[0]&&e[1]<=i[1]&&e[2]<=i[2]&&r[0]>=i[0]&&r[1]>=i[1]&&r[2]>=i[2]},isFinite:function(){var t=this.min.array,e=this.max.array;return isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])},applyTransform:function(t){this.transformFrom(this,t)},transformFrom:function(){var t=k.create(),e=k.create(),r=k.create(),i=k.create(),n=k.create(),a=k.create();return function(o,s){var l=o.min.array,u=o.max.array,f=s.array;return t[0]=f[0]*l[0],t[1]=f[1]*l[0],t[2]=f[2]*l[0],e[0]=f[0]*u[0],e[1]=f[1]*u[0],e[2]=f[2]*u[0],r[0]=f[4]*l[1],r[1]=f[5]*l[1],r[2]=f[6]*l[1],i[0]=f[4]*u[1],i[1]=f[5]*u[1],i[2]=f[6]*u[1],n[0]=f[8]*l[2],n[1]=f[9]*l[2],n[2]=f[10]*l[2],a[0]=f[8]*u[2],a[1]=f[9]*u[2],a[2]=f[10]*u[2],l=this.min.array,u=this.max.array,l[0]=Math.min(t[0],e[0])+Math.min(r[0],i[0])+Math.min(n[0],a[0])+f[12],l[1]=Math.min(t[1],e[1])+Math.min(r[1],i[1])+Math.min(n[1],a[1])+f[13],l[2]=Math.min(t[2],e[2])+Math.min(r[2],i[2])+Math.min(n[2],a[2])+f[14],u[0]=Math.max(t[0],e[0])+Math.max(r[0],i[0])+Math.max(n[0],a[0])+f[12],u[1]=Math.max(t[1],e[1])+Math.max(r[1],i[1])+Math.max(n[1],a[1])+f[13],u[2]=Math.max(t[2],e[2])+Math.max(r[2],i[2])+Math.max(n[2],a[2])+f[14],this.min._dirty=!0,this.max._dirty=!0,this}}(),applyProjection:function(t){var e=this.min.array,r=this.max.array,i=t.array,n=e[0],a=e[1],o=e[2],s=r[0],l=r[1],u=e[2],f=r[0],h=r[1],c=r[2];if(i[15]===1)e[0]=i[0]*n+i[12],e[1]=i[5]*a+i[13],r[2]=i[10]*o+i[14],r[0]=i[0]*f+i[12],r[1]=i[5]*h+i[13],e[2]=i[10]*c+i[14];else{var v=-1/o;e[0]=i[0]*n*v,e[1]=i[5]*a*v,r[2]=(i[10]*o+i[14])*v,v=-1/u,r[0]=i[0]*s*v,r[1]=i[5]*l*v,v=-1/c,e[2]=(i[10]*c+i[14])*v}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var t=this.vertices;if(!t){t=[];for(var e=0;e<8;e++)t[e]=k.fromValues(0,0,0);this.vertices=t}var r=this.min.array,i=this.max.array;return Ln(t[0],r[0],r[1],r[2]),Ln(t[1],r[0],i[1],r[2]),Ln(t[2],i[0],r[1],r[2]),Ln(t[3],i[0],i[1],r[2]),Ln(t[4],r[0],r[1],i[2]),Ln(t[5],r[0],i[1],i[2]),Ln(t[6],i[0],r[1],i[2]),Ln(t[7],i[0],i[1],i[2]),this},copy:function(t){var e=this.min,r=this.max;return Bs(e.array,t.min.array),Bs(r.array,t.max.array),e._dirty=!0,r._dirty=!0,this},clone:function(){var t=new yr;return t.copy(this),t}};var Ttt=0,Ei=xr.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},function(){this.name||(this.name=(this.type||"NODE")+"_"+Ttt++),this.position||(this.position=new Q),this.rotation||(this.rotation=new ve),this.scale||(this.scale=new Q(1,1,1)),this.worldTransform=new dt,this.localTransform=new dt,this._children=[]},{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(t){var e=this._scene;if(e){var r=e._nodeRepository;delete r[this.name],r[t]=this}this.name=t},add:function(t){var e=t._parent;if(e!==this){e&&e.remove(t),t._parent=this,this._children.push(t);var r=this._scene;r&&r!==t.scene&&t.traverse(this._addSelfToScene,this),t._needsUpdateWorldTransform=!0}},remove:function(t){var e=this._children,r=e.indexOf(t);r<0||(e.splice(r,1),t._parent=null,this._scene&&t.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var t=this._children,e=0;e0},beforeRender:function(t){},afterRender:function(t,e){},getBoundingBox:function(t,e){return e=Ei.prototype.getBoundingBox.call(this,t,e),this.geometry&&this.geometry.boundingBox&&e.union(this.geometry.boundingBox),e},clone:function(){var t=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"];return function(){var e=Ei.prototype.clone.call(this);e.geometry=this.geometry,e.material=this.material;for(var r=0;r=0&&w[_]>1e-4&&(k.transformMat4(T,x,m[S[_]]),k.scaleAndAdd(b,b,T,w[_]));A.set(y,b)}}for(var y=0;y>e;return t+1},dispose:function(t){var e=this._cache;e.use(t.__uid__);var r=e.get("webgl_texture");r&&t.gl.deleteTexture(r),e.deleteContext(t.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(lt.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}});Object.defineProperty(lt.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}});lt.BYTE=tt.BYTE;lt.UNSIGNED_BYTE=tt.UNSIGNED_BYTE;lt.SHORT=tt.SHORT;lt.UNSIGNED_SHORT=tt.UNSIGNED_SHORT;lt.INT=tt.INT;lt.UNSIGNED_INT=tt.UNSIGNED_INT;lt.FLOAT=tt.FLOAT;lt.HALF_FLOAT=36193;lt.UNSIGNED_INT_24_8_WEBGL=34042;lt.DEPTH_COMPONENT=tt.DEPTH_COMPONENT;lt.DEPTH_STENCIL=tt.DEPTH_STENCIL;lt.ALPHA=tt.ALPHA;lt.RGB=tt.RGB;lt.RGBA=tt.RGBA;lt.LUMINANCE=tt.LUMINANCE;lt.LUMINANCE_ALPHA=tt.LUMINANCE_ALPHA;lt.SRGB=35904;lt.SRGB_ALPHA=35906;lt.COMPRESSED_RGB_S3TC_DXT1_EXT=33776;lt.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777;lt.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778;lt.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779;lt.NEAREST=tt.NEAREST;lt.LINEAR=tt.LINEAR;lt.NEAREST_MIPMAP_NEAREST=tt.NEAREST_MIPMAP_NEAREST;lt.LINEAR_MIPMAP_NEAREST=tt.LINEAR_MIPMAP_NEAREST;lt.NEAREST_MIPMAP_LINEAR=tt.NEAREST_MIPMAP_LINEAR;lt.LINEAR_MIPMAP_LINEAR=tt.LINEAR_MIPMAP_LINEAR;lt.REPEAT=tt.REPEAT;lt.CLAMP_TO_EDGE=tt.CLAMP_TO_EDGE;lt.MIRRORED_REPEAT=tt.MIRRORED_REPEAT;var sr=Qr.extend({skeleton:null,joints:null},function(){this.joints||(this.joints=[])},{offsetMatrix:null,isInstancedMesh:function(){return!1},isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var t=Qr.prototype.clone.call(this);return t.skeleton=this.skeleton,this.joints&&(t.joints=this.joints.slice()),t}});sr.POINTS=tt.POINTS;sr.LINES=tt.LINES;sr.LINE_LOOP=tt.LINE_LOOP;sr.LINE_STRIP=tt.LINE_STRIP;sr.TRIANGLES=tt.TRIANGLES;sr.TRIANGLE_STRIP=tt.TRIANGLE_STRIP;sr.TRIANGLE_FAN=tt.TRIANGLE_FAN;sr.BACK=tt.BACK;sr.FRONT=tt.FRONT;sr.FRONT_AND_BACK=tt.FRONT_AND_BACK;sr.CW=tt.CW;sr.CCW=tt.CCW;var b3={};b3.isPowerOfTwo=function(t){return(t&t-1)===0};b3.nextPowerOfTwo=function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t};b3.nearestPowerOfTwo=function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))};var sw=b3.isPowerOfTwo;function lw(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}function Att(t,e){var r=lw(t.width),i=lw(t.height);e=e||document.createElement("canvas"),e.width=r,e.height=i;var n=e.getContext("2d");return n.drawImage(t.image,0,0,r,i),e}var Gt=lt.extend(function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}},{textureType:"texture2D",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(t);var r=this.format,i=this.type,n=!!(this.convertToPOT&&!this.mipmaps.length&&this.image&&(this.wrapS===lt.REPEAT||this.wrapT===lt.REPEAT)&&this.NPOT);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,n?this.wrapS:this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,n?this.wrapT:this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n?this.magFilter:this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n?this.minFilter:this.getAvailableMinFilter());var a=t.getGLExtension("EXT_texture_filter_anisotropic");if(a&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_2D,a.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),i===36193){var o=t.getGLExtension("OES_texture_half_float");o||(i=tt.FLOAT)}if(this.mipmaps.length)for(var s=this.width,l=this.height,u=0;u=lt.COMPRESSED_RGB_S3TC_DXT1_EXT?t.compressedTexImage2D(t.TEXTURE_2D,r,a,i,n,0,e.pixels):t.texImage2D(t.TEXTURE_2D,r,a,i,n,0,a,o,e.pixels)},generateMipmap:function(t){var e=t.gl;this.useMipmap&&!this.NPOT&&(e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),e.generateMipmap(e.TEXTURE_2D))},isPowerOfTwo:function(){return sw(this.width)&&sw(this.height)},isRenderable:function(){return this.image?this.image.width>0&&this.image.height>0:!!(this.width&&this.height)},bind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,this.getWebGLTexture(t))},unbind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},load:function(t,e){var r=le.createImage();e&&(r.crossOrigin=e);var i=this;return r.onload=function(){i.dirty(),i.trigger("success",i)},r.onerror=function(){i.trigger("error",i)},r.src=t,this.image=r,this}});Object.defineProperty(Gt.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(t){this.image?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}});Object.defineProperty(Gt.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(t){this.image?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});function gL(t){return{byte:le.Int8Array,ubyte:le.Uint8Array,short:le.Int16Array,ushort:le.Uint16Array}[t]||le.Float32Array}function S8(t){return"attr_"+t}function g4(t,e,r,i){switch(this.name=t,this.type=e,this.size=r,this.semantic=i||"",this.value=null,r){case 1:this.get=function(n){return this.value[n]},this.set=function(n,a){this.value[n]=a},this.copy=function(n,a){this.value[n]=this.value[n]};break;case 2:this.get=function(n,a){var o=this.value;return a[0]=o[n*2],a[1]=o[n*2+1],a},this.set=function(n,a){var o=this.value;o[n*2]=a[0],o[n*2+1]=a[1]},this.copy=function(n,a){var o=this.value;a*=2,n*=2,o[n]=o[a],o[n+1]=o[a+1]};break;case 3:this.get=function(n,a){var o=n*3,s=this.value;return a[0]=s[o],a[1]=s[o+1],a[2]=s[o+2],a},this.set=function(n,a){var o=n*3,s=this.value;s[o]=a[0],s[o+1]=a[1],s[o+2]=a[2]},this.copy=function(n,a){var o=this.value;a*=3,n*=3,o[n]=o[a],o[n+1]=o[a+1],o[n+2]=o[a+2]};break;case 4:this.get=function(n,a){var o=this.value,s=n*4;return a[0]=o[s],a[1]=o[s+1],a[2]=o[s+2],a[3]=o[s+3],a},this.set=function(n,a){var o=this.value,s=n*4;o[s]=a[0],o[s+1]=a[1],o[s+2]=a[2],o[s+3]=a[3]},this.copy=function(n,a){var o=this.value;a*=4,n*=4,o[n]=o[a],o[n+1]=o[a+1],o[n+2]=o[a+2],o[n+3]=o[a+3]}}}g4.prototype.init=function(t){if(!this.value||this.value.length!==t*this.size){var e=gL(this.type);this.value=new e(t*this.size)}};g4.prototype.fromArray=function(t){var e=gL(this.type),r;if(t[0]&&t[0].length){var i=0,n=this.size;r=new e(t.length*n);for(var a=0;a=0){e||(e=[]);var r=this.indices;return e[0]=r[t*3],e[1]=r[t*3+1],e[2]=r[t*3+2],e}},setTriangleIndices:function(t,e){var r=this.indices;r[t*3]=e[0],r[t*3+1]=e[1],r[t*3+2]=e[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(t){var e,r=this.vertexCount>65535?le.Uint32Array:le.Uint16Array;if(t[0]&&t[0].length){var i=0,n=3;e=new r(t.length*n);for(var a=0;a=0?(e.splice(r,1),delete this.attributes[t],!0):!1},getAttribute:function(t){return this.attributes[t]},getEnabledAttributes:function(){var t=this._enabledAttributes,e=this._attributeList;if(t)return t;for(var r=[],i=this.vertexCount,n=0;na[0]&&(a[0]=s),l>a[1]&&(a[1]=l),u>a[2]&&(a[2]=u)}r._dirty=!0,i._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var t=this.indices,e=this.attributes,r=e.position.value,i=e.normal.value;if(!i||i.length!==r.length)i=e.normal.value=new le.Float32Array(r.length);else for(var n=0;n65535&&(this.indices=new le.Uint32Array(this.indices));for(var t=this.attributes,e=this.indices,r=this.getEnabledAttributes(),i={},n=0;nthis.distance,n=1;n<8;n++)if(k.dot(e[n].array,r)>this.distance!=i)return!0},intersectLine:function(){var t=k.create();return function(e,r,i){var n=this.distanceToPoint(e),a=this.distanceToPoint(r);if(n>0&&a>0||n<0&&a<0)return null;var o=this.normal.array,s=this.distance,l=e.array;k.sub(t,r.array,e.array),k.normalize(t,t);var u=k.dot(o,t);if(u===0)return null;i||(i=new Q);var f=(k.dot(o,l)-s)/u;return k.scaleAndAdd(i.array,l,t,-f),i._dirty=!0,i}}(),applyTransform:function(){var t=it.create(),e=rt.create(),r=rt.create();return r[3]=1,function(i){i=i.array,k.scale(r,this.normal.array,this.distance),rt.transformMat4(r,r,i),this.distance=k.dot(r,this.normal.array),it.invert(t,i),it.transpose(t,t),e[3]=0,k.copy(e,this.normal.array),rt.transformMat4(e,e,t),k.copy(this.normal.array,e)}}(),copy:function(t){k.copy(this.normal.array,t.normal.array),this.normal._dirty=!0,this.distance=t.distance},clone:function(){var t=new m7;return t.copy(this),t}};var ze=k.set,uw=k.copy,fw=k.transformMat4,w8=Math.min,b8=Math.max,A5=function(){this.planes=[];for(var t=0;t<6;t++)this.planes.push(new m7);this.boundingBox=new yr,this.vertices=[];for(var t=0;t<8;t++)this.vertices[t]=k.fromValues(0,0,0)};A5.prototype={setFromProjection:function(t){var e=this.planes,r=t.array,i=r[0],n=r[1],a=r[2],o=r[3],s=r[4],l=r[5],u=r[6],f=r[7],h=r[8],c=r[9],v=r[10],d=r[11],p=r[12],g=r[13],m=r[14],y=r[15];ze(e[0].normal.array,o-i,f-s,d-h),e[0].distance=-(y-p),e[0].normalize(),ze(e[1].normal.array,o+i,f+s,d+h),e[1].distance=-(y+p),e[1].normalize(),ze(e[2].normal.array,o+n,f+l,d+c),e[2].distance=-(y+g),e[2].normalize(),ze(e[3].normal.array,o-n,f-l,d-c),e[3].distance=-(y-g),e[3].normalize(),ze(e[4].normal.array,o-a,f-u,d-v),e[4].distance=-(y-m),e[4].normalize(),ze(e[5].normal.array,o+a,f+u,d+v),e[5].distance=-(y+m),e[5].normalize();var _=this.boundingBox,x=this.vertices;if(y===0){var w=l/i,S=-m/(v-1),b=-m/(v+1),T=-b/l,A=-S/l;_.min.set(-T*w,-T,b),_.max.set(T*w,T,S),ze(x[0],-T*w,-T,b),ze(x[1],-T*w,T,b),ze(x[2],T*w,-T,b),ze(x[3],T*w,T,b),ze(x[4],-A*w,-A,S),ze(x[5],-A*w,A,S),ze(x[6],A*w,-A,S),ze(x[7],A*w,A,S)}else{var D=(-1-p)/i,C=(1-p)/i,M=(1-g)/l,L=(-1-g)/l,I=(-1-m)/v,P=(1-m)/v;_.min.set(Math.min(D,C),Math.min(L,M),Math.min(P,I)),_.max.set(Math.max(C,D),Math.max(M,L),Math.max(I,P));var R=_.min.array,B=_.max.array;ze(x[0],R[0],R[1],R[2]),ze(x[1],R[0],B[1],R[2]),ze(x[2],B[0],R[1],R[2]),ze(x[3],B[0],B[1],R[2]),ze(x[4],R[0],R[1],B[2]),ze(x[5],R[0],B[1],B[2]),ze(x[6],B[0],R[1],B[2]),ze(x[7],B[0],B[1],B[2])}},getTransformedBoundingBox:function(){var t=k.create();return function(e,r){var i=this.vertices,n=r.array,a=e.min,o=e.max,s=a.array,l=o.array,u=i[0];fw(t,u,n),uw(s,t),uw(l,t);for(var f=1;f<8;f++)u=i[f],fw(t,u,n),s[0]=w8(t[0],s[0]),s[1]=w8(t[1],s[1]),s[2]=w8(t[2],s[2]),l[0]=b8(t[0],l[0]),l[1]=b8(t[1],l[1]),l[2]=b8(t[2],l[2]);return a._dirty=!0,o._dirty=!0,e}}()};var m4=Ei.extend(function(){return{projectionMatrix:new dt,invProjectionMatrix:new dt,viewMatrix:new dt,frustum:new A5}},function(){this.update(!0)},{update:function(t){Ei.prototype.update.call(this,t),dt.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),dt.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(t){dt.copy(this.viewMatrix,t),dt.invert(this.worldTransform,t),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(t){dt.copy(this.projectionMatrix,t),dt.invert(this.invProjectionMatrix,t),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:function(){var t=rt.create();return function(e,r){var i=r!==void 0?r:new C2,n=e.array[0],a=e.array[1];return rt.set(t,n,a,-1,1),rt.transformMat4(t,t,this.invProjectionMatrix.array),rt.transformMat4(t,t,this.worldTransform.array),k.scale(i.origin.array,t,1/t[3]),rt.set(t,n,a,1,1),rt.transformMat4(t,t,this.invProjectionMatrix.array),rt.transformMat4(t,t,this.worldTransform.array),k.scale(t,t,1/t[3]),k.sub(i.direction.array,t,i.origin.array),k.normalize(i.direction.array,i.direction.array),i.direction._dirty=!0,i.origin._dirty=!0,i}}()}),Ett=it.create(),hw=it.create(),T8={};function Mtt(t){var e=[],r=Object.keys(t);r.sort();for(var i=0;i0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(t)):t instanceof si&&this.lights.push(t),t.name&&(this._nodeRepository[t.name]=t)},removeFromScene:function(t){var e;t instanceof m4?(e=this._cameraList.indexOf(t),e>=0&&this._cameraList.splice(e,1)):t instanceof si&&(e=this.lights.indexOf(t),e>=0&&this.lights.splice(e,1)),t.name&&delete this._nodeRepository[t.name]},getNode:function(t){return this._nodeRepository[t]},setMainCamera:function(t){var e=this._cameraList.indexOf(t);e>=0&&this._cameraList.splice(e,1),this._cameraList.unshift(t)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var t=this.lights;this._previousLightNumber=this._lightNumber;for(var e={},r=0;r0&&this._doUpdateRenderList(o,e,r,i,n)}},isFrustumCulled:function(){var t=new yr,e=new dt;return function(r,i,n){var a=r.boundingBox;if(a||(r.skeleton&&r.skeleton.boundingBox?a=r.skeleton.boundingBox:a=r.geometry.boundingBox),!a)return!1;if(e.array=n,t.transformFrom(a,e),r.castShadow&&this.viewBoundingBoxLastFrame.union(t),r.frustumCulling){if(!t.intersectBoundingBox(i.frustum.boundingBox))return!0;e.array=i.projectionMatrix.array,t.max.array[2]>0&&t.min.array[2]<0&&(t.max.array[2]=-1e-20),t.applyProjection(e);var o=t.min.array,s=t.max.array;if(s[0]<-1||o[0]>1||s[1]<-1||o[1]>1||s[2]<-1||o[2]>1)return!0}return!1}}(),_updateLightUniforms:function(){var t=this.lights;t.sort(Ltt);var e=this._lightUniforms;for(var r in e)for(var i in e[r])e[r][i].value.length=0;for(var n=0;n1&&e.texParameterf(e.TEXTURE_CUBE_MAP,n.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),i===36193){var a=t.getGLExtension("OES_texture_half_float");a||(i=tt.FLOAT)}if(this.mipmaps.length)for(var o=this.width,s=this.height,l=0;l0&&t.height>0}var nr=m4.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var t=this.fov/180*Math.PI;this.projectionMatrix.perspective(t,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array,e=Math.atan(1/t[5])*2;this.fov=e/Math.PI*180,this.aspect=t[5]/t[0],this.near=t[14]/(t[10]-1),this.far=t[14]/(t[10]+1)},clone:function(){var t=m4.prototype.clone.call(this);return t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t}}),Fs="framebuffer",Zi="renderbuffer",cw=Zi+"_width",vw=Zi+"_height",A8=Zi+"_attached",C8="depthtexture_attached",Wa=tt.FRAMEBUFFER,P6=tt.RENDERBUFFER,K6=tt.DEPTH_ATTACHMENT,_L=tt.COLOR_ATTACHMENT0,We=xr.extend({depthBuffer:!0,viewport:null,_width:0,_height:0,_textures:null,_boundRenderer:null},function(){this._cache=new p4,this._textures={}},{getTextureWidth:function(){return this._width},getTextureHeight:function(){return this._height},bind:function(t){if(t.__currentFrameBuffer){if(t.__currentFrameBuffer===this)return;console.warn("Renderer already bound with another framebuffer. Unbind it first")}t.__currentFrameBuffer=this;var e=t.gl;e.bindFramebuffer(Wa,this._getFrameBufferGL(t)),this._boundRenderer=t;var r=this._cache;r.put("viewport",t.viewport);var i=!1,n,a;for(var o in this._textures){i=!0;var s=this._textures[o];s&&(n=s.texture.width,a=s.texture.height,this._doAttach(t,s.texture,o,s.target))}this._width=n,this._height=a,!i&&this.depthBuffer&&console.error("Must attach texture before bind, or renderbuffer may have incorrect width and height."),this.viewport?t.setViewport(this.viewport):t.setViewport(0,0,n,a,1);var l=r.get("attached_textures");if(l){for(var o in l)if(!this._textures[o]){var u=l[o];this._doDetach(e,o,u)}}if(!r.get(C8)&&this.depthBuffer){r.miss(Zi)&&r.put(Zi,e.createRenderbuffer());var f=r.get(Zi);(n!==r.get(cw)||a!==r.get(vw))&&(e.bindRenderbuffer(P6,f),e.renderbufferStorage(P6,e.DEPTH_COMPONENT16,n,a),r.put(cw,n),r.put(vw,a),e.bindRenderbuffer(P6,null)),r.get(A8)||(e.framebufferRenderbuffer(Wa,K6,P6,f),r.put(A8,!0))}},unbind:function(t){t.__currentFrameBuffer=null;var e=t.gl;e.bindFramebuffer(Wa,null),this._boundRenderer=null,this._cache.use(t.__uid__);var r=this._cache.get("viewport");r&&t.setViewport(r),this.updateMipmap(t)},updateMipmap:function(t){var e=t.gl;for(var r in this._textures){var i=this._textures[r];if(i){var n=i.texture;if(!n.NPOT&&n.useMipmap&&n.minFilter===lt.LINEAR_MIPMAP_LINEAR){var a=n.textureType==="textureCube"?tt.TEXTURE_CUBE_MAP:tt.TEXTURE_2D;e.bindTexture(a,n.getWebGLTexture(t)),e.generateMipmap(a),e.bindTexture(a,null)}}}},checkStatus:function(t){return t.checkFramebufferStatus(Wa)},_getFrameBufferGL:function(t){var e=this._cache;return e.use(t.__uid__),e.miss(Fs)&&e.put(Fs,t.gl.createFramebuffer()),e.get(Fs)},attach:function(t,e,r){if(!t.width)throw new Error("The texture attached to color buffer is not a valid.");e=e||_L,r=r||tt.TEXTURE_2D;var i=this._boundRenderer,n=i&&i.gl,a;if(n){var o=this._cache;o.use(i.__uid__),a=o.get("attached_textures")}var s=this._textures[e];if(!(s&&s.target===r&&s.texture===t&&a&&a[e]!=null)){var l=!0;i&&(l=this._doAttach(i,t,e,r),this.viewport||i.setViewport(0,0,t.width,t.height,1)),l&&(this._textures[e]=this._textures[e]||{},this._textures[e].texture=t,this._textures[e].target=r)}},_doAttach:function(t,e,r,i){var n=t.gl,a=e.getWebGLTexture(t),o=this._cache.get("attached_textures");if(o&&o[r]){var s=o[r];if(s.texture===e&&s.target===i)return}r=+r;var l=!0;if(r===K6||r===tt.DEPTH_STENCIL_ATTACHMENT){var u=t.getGLExtension("WEBGL_depth_texture");if(u||(console.error("Depth texture is not supported by the browser"),l=!1),e.format!==tt.DEPTH_COMPONENT&&e.format!==tt.DEPTH_STENCIL&&(console.error("The texture attached to depth buffer is not a valid."),l=!1),l){var f=this._cache.get(Zi);f&&(n.framebufferRenderbuffer(Wa,K6,P6,null),n.deleteRenderbuffer(f),this._cache.put(Zi,!1)),this._cache.put(A8,!1),this._cache.put(C8,!0)}}return n.framebufferTexture2D(Wa,r,i,a,0),o||(o={},this._cache.put("attached_textures",o)),o[r]=o[r]||{},o[r].texture=e,o[r].target=i,l},_doDetach:function(t,e,r){t.framebufferTexture2D(Wa,e,r,null,0);var i=this._cache.get("attached_textures");i&&i[e]&&(i[e]=null),(e===K6||e===tt.DEPTH_STENCIL_ATTACHMENT)&&this._cache.put(C8,!1)},detach:function(t,e){if(this._textures[t]=null,this._boundRenderer){var r=this._cache;r.use(this._boundRenderer.__uid__),this._doDetach(this._boundRenderer.gl,t,e)}},dispose:function(t){var e=t.gl,r=this._cache;r.use(t.__uid__);var i=r.get(Zi);i&&e.deleteRenderbuffer(i);var n=r.get(Fs);n&&e.deleteFramebuffer(n),r.deleteContext(t.__uid__),this._textures={}}});We.DEPTH_ATTACHMENT=K6;We.COLOR_ATTACHMENT0=_L;We.STENCIL_ATTACHMENT=tt.STENCIL_ATTACHMENT;We.DEPTH_STENCIL_ATTACHMENT=tt.DEPTH_STENCIL_ATTACHMENT;var Ptt=["px","nx","py","ny","pz","nz"],cd=xr.extend(function(){var t={position:new Q,far:1e3,near:.1,texture:null,shadowMapPass:null},e=t._cameras={px:new nr({fov:90}),nx:new nr({fov:90}),py:new nr({fov:90}),ny:new nr({fov:90}),pz:new nr({fov:90}),nz:new nr({fov:90})};return e.px.lookAt(Q.POSITIVE_X,Q.NEGATIVE_Y),e.nx.lookAt(Q.NEGATIVE_X,Q.NEGATIVE_Y),e.py.lookAt(Q.POSITIVE_Y,Q.POSITIVE_Z),e.ny.lookAt(Q.NEGATIVE_Y,Q.NEGATIVE_Z),e.pz.lookAt(Q.POSITIVE_Z,Q.NEGATIVE_Y),e.nz.lookAt(Q.NEGATIVE_Z,Q.NEGATIVE_Y),t._frameBuffer=new We,t},{getCamera:function(t){return this._cameras[t]},render:function(t,e,r){var i=t.gl;r||e.update();for(var n=this.texture.width,a=2*Math.atan(n/(n-.5))/Math.PI*180,o=0;o<6;o++){var s=Ptt[o],l=this._cameras[s];if(Q.copy(l.position,this.position),l.far=this.far,l.near=this.near,l.fov=a,this.shadowMapPass){l.update();var u=e.getBoundingBox();u.applyTransform(l.viewMatrix),e.viewBoundingBoxLastFrame.copy(u),this.shadowMapPass.render(t,e,l,!0)}this._frameBuffer.attach(this.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+o),this._frameBuffer.bind(t),t.render(e,l,!0),this._frameBuffer.unbind(t)}},dispose:function(t){this._frameBuffer.dispose(t)}}),D5=qt.extend({dynamic:!1,widthSegments:1,heightSegments:1},function(){this.build()},{build:function(){for(var t=this.heightSegments,e=this.widthSegments,r=this.attributes,i=[],n=[],a=[],o=[],s=0;s<=t;s++)for(var l=s/t,u=0;u<=e;u++){var f=u/e;if(i.push([2*f-1,2*l-1,0]),n&&n.push([f,l]),a&&a.push([0,0,1]),u0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),t.renderPass([this],r)}}),Ntt=542327876,Ott=131072,Btt=512,ktt=4;function vd(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}var Ftt=31,ztt=vd("DXT1"),Gtt=vd("DXT3"),Vtt=vd("DXT5"),Htt=0,Utt=1,Wtt=2,Xtt=3,Ytt=4,Ztt=7,Qtt=20,jtt=21,qtt=28,Ktt={parse:function(t,e){var r=new Int32Array(t,0,Ftt);if(r[Htt]!==Ntt||!r(Qtt)&ktt)return null;var i=r(jtt),n=r[Ytt],a=r[Xtt],o=r[qtt]&Btt,s=r[Wtt]&Ott,l,u;switch(i){case ztt:l=8,u=lt.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Gtt:l=16,u=lt.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Vtt:l=16,u=lt.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var f=r[Utt]+4,h=o?6:1,c=1;s&&(c=Math.max(1,r[Ztt]));for(var v=[],d=0;d0){var n=Math.pow(2,t[3]-128-8+i);e[r+0]=t[0]*n,e[r+1]=t[1]*n,e[r+2]=t[2]*n}else e[r+0]=0,e[r+1]=0,e[r+2]=0;return e[r+3]=1,e}function eet(t,e,r){for(var i="",n=e;n0;)if(t[a][0]=e[r++],t[a][1]=e[r++],t[a][2]=e[r++],t[a][3]=e[r++],t[a][0]===1&&t[a][1]===1&&t[a][2]===1){for(var s=t[a][3]<>>0;s>0;s--)ret(t[a-1],t[a]),a++,o--;n+=8}else a++,o--,n=0;return r}function iet(t,e,r,i){if(i<$tt|i>Jtt)return dw(t,e,r,i);var n=e[r++];if(n!=2)return dw(t,e,r-1,i);if(t[0][1]=e[r++],t[0][2]=e[r++],n=e[r++],(t[0][2]<<8>>>0|n)>>>0!==i)return null;for(var n=0;n<4;n++)for(var a=0;a128){o=(o&127)>>>0;for(var s=e[r++];o--;)t[a++][n]=s}else for(;o--;)t[a++][n]=e[r++]}return r}var net={parseRGBE:function(t,e,r){r==null&&(r=0);var i=new Uint8Array(t),n=i.length;if(eet(i,0,2)==="#?"){for(var a=2;a=n)){a+=2;for(var o="";a20)return console.warn("Given image is not a height map"),t}var v,d,p,g;l%(i*4)===0?(v=o.data[l],p=o.data[l+4]):l%(i*4)===(i-1)*4?(v=o.data[l-4],p=o.data[l]):(v=o.data[l-4],p=o.data[l+4]),li*(n-1)*4?(d=o.data[l-i*4],g=o.data[l]):(d=o.data[l-i*4],g=o.data[l+i*4]),s.data[l]=v-p+127,s.data[l+1]=d-g+127,s.data[l+2]=255,s.data[l+3]=255}return a.putImageData(s,0,0),r},isHeightImage:function(t,e,r){if(!t||!t.width||!t.height)return!1;var i=document.createElement("canvas"),n=i.getContext("2d"),a=e||32;r=r||20,i.width=i.height=a,n.drawImage(t,0,0,a,a);for(var o=n.getImageData(0,0,a,a),s=0;sr)return!1}return!0},_fetchTexture:function(t,e,r){le.request.get({url:t,responseType:"arraybuffer",onload:e,onerror:r})},createChessboard:function(t,e,r,i){t=t||512,e=e||64,r=r||"black",i=i||"white";var n=Math.ceil(t/e),a=document.createElement("canvas");a.width=t,a.height=t;var o=a.getContext("2d");o.fillStyle=i,o.fillRect(0,0,t,t),o.fillStyle=r;for(var s=0;s=0||(Bh.forEach(function(e){t.on(e,this[kh(e)],this)},this),this._meshes.push(t))},detachFromMesh:function(t){var e=this._meshes.indexOf(t);e>=0&&this._meshes.splice(e,1),Bh.forEach(function(r){t.off(r,this[kh(r)])},this)},dispose:function(){this._meshes.forEach(function(t){this.detachFromMesh(t)},this)}};var y4=m4.extend({left:-1,right:1,near:-1,far:1,top:1,bottom:-1},{updateProjectionMatrix:function(){this.projectionMatrix.ortho(this.left,this.right,this.bottom,this.top,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array;this.left=(-1-t[12])/t[0],this.right=(1-t[12])/t[0],this.top=(1-t[13])/t[5],this.bottom=(-1-t[13])/t[5],this.near=-(-1-t[14])/t[10],this.far=-(1-t[14])/t[10]},clone:function(){var t=m4.prototype.clone.call(this);return t.left=this.left,t.right=this.right,t.near=this.near,t.far=this.far,t.top=this.top,t.bottom=this.bottom,t}});const aet="\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end";ft.import(aet);var oet=new D5,pw=new sr({geometry:oet,frustumCulling:!1}),set=new y4,qe=xr.extend(function(){return{fragment:"",outputs:null,material:null,blendWithPrevious:!1,clearColor:!1,clearDepth:!0}},function(){var t=new ft(ft.source("clay.compositor.vertex"),this.fragment),e=new R1({shader:t});e.enableTexturesAll(),this.material=e},{setUniform:function(t,e){this.material.setUniform(t,e)},getUniform:function(t){var e=this.material.uniforms[t];if(e)return e.value},attachOutput:function(t,e){this.outputs||(this.outputs={}),e=e||tt.COLOR_ATTACHMENT0,this.outputs[e]=t},detachOutput:function(t){for(var e in this.outputs)this.outputs[e]===t&&(this.outputs[e]=null)},bind:function(t,e){if(this.outputs)for(var r in this.outputs){var i=this.outputs[r];i&&e.attach(i,r)}e&&e.bind(t)},unbind:function(t,e){e.unbind(t)},render:function(t,e){var r=t.gl;if(e){this.bind(t,e);var i=t.getGLExtension("EXT_draw_buffers");if(i&&this.outputs){var n=[];for(var a in this.outputs)a=+a,a>=r.COLOR_ATTACHMENT0&&a<=r.COLOR_ATTACHMENT0+8&&n.push(a);i.drawBuffersEXT(n)}}this.trigger("beforerender",this,t);var o=this.clearDepth?r.DEPTH_BUFFER_BIT:0;if(r.depthMask(!0),this.clearColor){o=o|r.COLOR_BUFFER_BIT,r.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&r.clearColor(s[0],s[1],s[2],s[3])}r.clear(o),this.blendWithPrevious?(r.enable(r.BLEND),this.material.transparent=!0):(r.disable(r.BLEND),this.material.transparent=!1),this.renderQuad(t),this.trigger("afterrender",this,t),e&&this.unbind(t,e)},renderQuad:function(t){pw.material=this.material,t.renderPass([pw],set)},dispose:function(t){}});const uet="#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform sampler2D normalDistribution;\nuniform vec2 viewportSize : [512, 256];\nconst vec3 N = vec3(0.0, 0.0, 1.0);\nconst float fSampleNumber = float(SAMPLE_NUMBER);\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n",fet="#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n";var Li={},D8=["px","nx","py","ny","pz","nz"];Li.prefilterEnvironmentMap=function(t,e,r,i,n){(!n||!i)&&(i=Li.generateNormalDistribution(),n=Li.integrateBRDF(t,i)),r=r||{};var a=r.width||64,o=r.height||64,s=r.type||e.type,l=new k2({width:a,height:o,type:s,flipY:!1,mipmaps:[]});l.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var u=Math.min(a,o),f=Math.log(u)/Math.log(2)+1,h=new R1({shader:new ft({vertex:ft.source("clay.skybox.vertex"),fragment:fet})});h.set("normalDistribution",i),r.encodeRGBM&&h.define("fragment","RGBM_ENCODE"),r.decodeRGBM&&h.define("fragment","RGBM_DECODE");var c=new ha,v;if(e.textureType==="texture2D"){var d=new k2({width:a,height:o,type:s===lt.FLOAT?lt.HALF_FLOAT:s});Mi.panoramaToCubeMap(t,e,d,{encodeRGBM:r.decodeRGBM}),e=d}v=new j7({scene:c,material:h}),v.material.set("environmentMap",e);var p=new cd({texture:l});r.encodeRGBM&&(s=l.type=lt.UNSIGNED_BYTE);for(var g=new Gt({width:a,height:o,type:s}),m=new We({depthBuffer:!1}),y=le[s===lt.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],_=0;_>>16)>>>0;h=((h&1431655765)<<1|(h&2863311530)>>>1)>>>0,h=((h&858993459)<<2|(h&3435973836)>>>2)>>>0,h=((h&252645135)<<4|(h&4042322160)>>>4)>>>0,h=(((h&16711935)<<8|(h&4278255360)>>>8)>>>0)/4294967296;var c=Math.sqrt((1-h)/(1+(u*u-1)*h));o[f]=c}for(var f=0;f65535?Uint32Array:Uint16Array,s=this.indices=new o(e*t*6),l,u,f,h,c,v,d,_=this.radius,p=this.phiStart,g=this.phiLength,m=this.thetaStart,y=this.thetaLength,_=this.radius,x=[],w=[],S=0,b=1/_;for(d=0;d<=t;d++)for(v=0;v<=e;v++)h=v/e,c=d/t,l=-_*Math.cos(p+h*g)*Math.sin(m+c*y),u=_*Math.cos(m+c*y),f=_*Math.sin(p+h*g)*Math.sin(m+c*y),x[0]=l,x[1]=u,x[2]=f,w[0]=h,w[1]=c,r.set(S,x),i.set(S,w),x[0]*=b,x[1]*=b,x[2]*=b,n.set(S,x),S++;var T,A,D,C,M=e+1,L=0;for(d=0;d=0&&l.splice(h,1)}),l.push(u),this.__zr&&this.__zr.animation.addAnimator(u),u},stopAnimation:function(t){this._animators=this._animators||[];for(var e=this._animators,r=e.length,i=0;i3?e[3]=t[3]:e[3]=1,e):(e=Vr(t||"#000",e)||[0,0,0,0],e[0]/=255,e[1]/=255,e[2]/=255,e)};N.directionFromAlphaBeta=function(t,e){var r=t/180*Math.PI+Math.PI/2,i=-e/180*Math.PI+Math.PI/2,n=[],a=Math.sin(r);return n[0]=a*Math.cos(i),n[1]=-Math.cos(r),n[2]=a*Math.sin(i),n};N.getShadowResolution=function(t){var e=1024;switch(t){case"low":e=512;break;case"medium":break;case"high":e=2048;break;case"ultra":e=4096;break}return e};N.COMMON_SHADERS=["lambert","color","realistic","hatching","shadow"];N.createShader=function(t){t==="ecgl.shadow"&&(t="ecgl.displayShadow");var e=ft.source(t+".vertex"),r=ft.source(t+".fragment");e||console.error("Vertex shader of '%s' not exits",t),r||console.error("Fragment shader of '%s' not exits",t);var i=new ft(e,r);return i.name=t,i};N.createMaterial=function(t,e){e instanceof Array||(e=[e]);var r=N.createShader(t),i=new R1({shader:r});return e.forEach(function(n){typeof n=="string"&&i.define(n)}),i};N.setMaterialFromModel=function(t,e,r,i){e.autoUpdateTextureStatus=!1;var n=r.getModel(t+"Material"),a=n.get("detailTexture"),o=Zt.firstNotNull(n.get("textureTiling"),1),s=Zt.firstNotNull(n.get("textureOffset"),0);typeof o=="number"&&(o=[o,o]),typeof s=="number"&&(s=[s,s]);var l=o[0]>1||o[1]>1?N.Texture.REPEAT:N.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if(t==="realistic"){var f=n.get("roughness"),h=n.get("metalness");h!=null?isNaN(h)&&(e.setTextureImage("metalnessMap",h,i,u),h=Zt.firstNotNull(n.get("metalnessAdjust"),.5)):h=0,f!=null?isNaN(f)&&(e.setTextureImage("roughnessMap",f,i,u),f=Zt.firstNotNull(n.get("roughnessAdjust"),.5)):f=.5;var c=n.get("normalTexture");e.setTextureImage("detailMap",a,i,u),e.setTextureImage("normalMap",c,i,u),e.set({roughness:f,metalness:h,detailUvRepeat:o,detailUvOffset:s})}else if(t==="lambert")e.setTextureImage("detailMap",a,i,u),e.set({detailUvRepeat:o,detailUvOffset:s});else if(t==="color")e.setTextureImage("detailMap",a,i,u),e.set({detailUvRepeat:o,detailUvOffset:s});else if(t==="hatching"){var v=n.get("hatchingTextures")||[];v.length<6;for(var d=0;d<6;d++)e.setTextureImage("hatch"+(d+1),v[d],i,{anisotropic:8,wrapS:N.Texture.REPEAT,wrapT:N.Texture.REPEAT});e.set({detailUvRepeat:o,detailUvOffset:s})}};N.updateVertexAnimation=function(t,e,r,i){var n=i.get("animation"),a=i.get("animationDurationUpdate"),o=i.get("animationEasingUpdate"),s=r.shadowDepthMaterial;if(n&&e&&a>0&&e.geometry.vertexCount===r.geometry.vertexCount){r.material.define("vertex","VERTEX_ANIMATION"),r.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;l=0&&this._viewsToDispose.splice(e,1),this.views.push(t),t.layer=this;var r=this.zr;t.scene.traverse(function(i){i.__zr=r,i.addAnimatorsToZr&&i.addAnimatorsToZr(r)})}};function TL(t){var e=t.__zr;t.__zr=null,e&&t.removeAnimatorsFromZr&&t.removeAnimatorsFromZr(e)}_e.prototype.removeView=function(t){if(t.layer===this){var e=this.views.indexOf(t);e>=0&&(this.views.splice(e,1),t.scene.traverse(TL,this),t.layer=null,this._viewsToDispose.push(t))}};_e.prototype.removeViewsAll=function(){this.views.forEach(function(t){t.scene.traverse(TL,this),t.layer=null,this._viewsToDispose.push(t)},this),this.views.length=0};_e.prototype.resize=function(t,e){var r=this.renderer;r.resize(t,e)};_e.prototype.clear=function(){var t=this.renderer.gl,e=this._backgroundColor||[0,0,0,0];t.clearColor(e[0],e[1],e[2],e[3]),t.depthMask(!0),t.colorMask(!0,!0,!0,!0),t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT)};_e.prototype.clearDepth=function(){var t=this.renderer.gl;t.clear(t.DEPTH_BUFFER_BIT)};_e.prototype.clearColor=function(){var t=this.renderer.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)};_e.prototype.needsRefresh=function(){this.zr.refresh()};_e.prototype.refresh=function(t){this._backgroundColor=t?N.parseColor(t):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var e=0;e20)){t=t.event;var i=this.pickObject(t.offsetX,t.offsetY);i&&(this._dispatchEvent(t.type,t,i),this._dispatchDataEvent(t.type,t,i));var n=this._clickToSetFocusPoint(t);if(n){var a=n.view.setDOFFocusOnPoint(n.distance);a&&this.zr.refresh()}}}};_e.prototype._clickToSetFocusPoint=function(t){for(var e=this.renderer,r=e.viewport,i=this.views.length-1;i>=0;i--){var n=this.views[i];if(n.hasDOF()&&n.containPoint(t.offsetX,t.offsetY)){this._picking.scene=n.scene,this._picking.camera=n.camera,e.viewport=n.viewport;var a=this._picking.pick(t.offsetX,t.offsetY,!0);if(a)return a.view=n,a}}e.viewport=r};_e.prototype.onglobalout=function(t){var e=this._hovered;e&&this._dispatchEvent("mouseout",t,{target:e.target})};_e.prototype.pickObject=function(t,e){for(var r=[],i=this.renderer,n=i.viewport,a=0;a=0&&(f.dataIndex=this._lastDataIndex,f.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(u,"mouseout",e)),s=!0):o!=null&&o!==this._lastEventData&&(this._lastEventData!=null&&(f.eventData=this._lastEventData,this.zr.handler.dispatchToElement(u,"mouseout",e)),s=!0),this._lastEventData=o,this._lastDataIndex=n,this._lastSeriesIndex=a),f.eventData=o,f.dataIndex=n,f.seriesIndex=a,(o!=null||parseInt(n,10)>=0&&parseInt(a,10)>=0)&&(this.zr.handler.dispatchToElement(u,t,e),s&&this.zr.handler.dispatchToElement(u,"mouseover",e))};_e.prototype._dispatchToView=function(t,e){for(var r=0;r=0&&(ket(e),e.coordinateSystem==="mapbox"&&(e.coordinateSystem="mapbox3D",t.mapbox3D=t.mapbox))}),Hs(t.xAxis3D),Hs(t.yAxis3D),Hs(t.zAxis3D),Hs(t.grid3D),$6(t.geo3D)}function AL(t){this._layers={},this._zr=t}AL.prototype.update=function(t,e){var r=this,i=e.getZr();if(!i.getWidth()||!i.getHeight()){console.warn("Dom has no width or height");return}function n(s){i.setSleepAfterStill(0);var l;s.coordinateSystem&&s.coordinateSystem.model,l=s.get("zlevel");var u=r._layers,f=u[l];if(!f){if(f=u[l]=new _e("gl-"+l,i),i.painter.isSingleCanvas()){f.virtual=!0;var h=new pr({z:1e4,style:{image:f.renderer.canvas},silent:!0});f.__hostImage=h,i.add(h)}i.painter.insertLayer(l,f)}return f.__hostImage&&f.__hostImage.setStyle({width:f.renderer.getWidth(),height:f.renderer.getHeight()}),f}function a(s,l){s&&s.traverse(function(u){u.isRenderable&&u.isRenderable()&&(u.ignorePicking=u.$ignorePicking!=null?u.$ignorePicking:l)})}for(var o in this._layers)this._layers[o].removeViewsAll();t.eachComponent(function(s,l){if(s!=="series"){var u=e.getViewOfComponentModel(l),f=l.coordinateSystem;if(u.__ecgl__){var h;if(f){if(!f.viewGL){console.error("Can't find viewGL in coordinateSystem of component "+l.id);return}h=f.viewGL}else{if(!l.viewGL){console.error("Can't find viewGL of component "+l.id);return}h=f.viewGL}var h=f.viewGL,c=n(l);c.addView(h),u.afterRender&&u.afterRender(l,t,e,c),a(u.groupGL,l.get("silent"))}}}),t.eachSeries(function(s){var l=e.getViewOfSeriesModel(s),u=s.coordinateSystem;if(l.__ecgl__){if(u&&!u.viewGL&&!l.viewGL){console.error("Can't find viewGL of series "+l.id);return}var f=u&&u.viewGL||l.viewGL,h=n(s);h.addView(f),l.afterRender&&l.afterRender(s,t,e,h),a(l.groupGL,s.get("silent"))}})};SC(function(t){var e=t.getZr(),r=e.painter.dispose;e.painter.dispose=function(){typeof this.eachOtherLayer=="function"&&this.eachOtherLayer(function(i){i instanceof _e&&i.dispose()}),r.call(this)},e.painter.getRenderedCanvas=function(i){if(i=i||{},this._singleCanvas)return this._layers[0].dom;var n=document.createElement("canvas"),a=i.pixelRatio||this.dpr;n.width=this.getWidth()*a,n.height=this.getHeight()*a;var o=n.getContext("2d");o.dpr=a,o.clearRect(0,0,n.width,n.height),i.backgroundColor&&(o.fillStyle=i.backgroundColor,o.fillRect(0,0,n.width,n.height));var s=this.storage.getDisplayList(!0),l={},u,f=this;function h(p,g){var m=f._zlevelList;p==null&&(p=-1/0);for(var y,_=0;_p&&x0&&this._notFirst?this.animateTo({alpha:u,beta:f,center:h,distance:a,orthographicSize:o,easing:l.animationEasingUpdate,duration:l.animationDurationUpdate}):(this.setDistance(a),this.setAlpha(u),this.setBeta(f),this.setCenter(h),this.setOrthographicSize(o)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){},animateTo:function(t){var e=this.zr,r=this,i={},n={};return t.distance!=null&&(i.distance=this.getDistance(),n.distance=t.distance),t.orthographicSize!=null&&(i.orthographicSize=this.getOrthographicSize(),n.orthographicSize=t.orthographicSize),t.alpha!=null&&(i.alpha=this.getAlpha(),n.alpha=t.alpha),t.beta!=null&&(i.beta=this.getBeta(),n.beta=t.beta),t.center!=null&&(i.center=this.getCenter(),n.center=t.center),this._addAnimator(e.animation.animate(i).when(t.duration||1e3,n).during(function(){i.alpha!=null&&r.setAlpha(i.alpha),i.beta!=null&&r.setBeta(i.beta),i.distance!=null&&r.setDistance(i.distance),i.center!=null&&r.setCenter(i.center),i.orthographicSize!=null&&r.setOrthographicSize(i.orthographicSize),r._needsUpdate=!0})).start(t.easing||"linear")},stopAllAnimation:function(){for(var t=0;t0},_update:function(t){if(this._rotating){var e=(this.autoRotateDirection==="cw"?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=e*t/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(t=Math.min(t,50),this._updateDistanceOrSize(t),this._updatePan(t),this._updateRotate(t),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(t){var e=this._rotateVelocity;this._phi=e.y*t/20+this._phi,this._theta=e.x*t/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(e,Math.pow(this.damping,t/16))},_updateDistanceOrSize:function(t){this._projection==="perspective"?this._setDistance(this._distance+this._zoomSpeed*t/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*t/20),this._zoomSpeed*=Math.pow(this.damping,t/16)},_setDistance:function(t){this._distance=Math.max(Math.min(t,this.maxDistance),this.minDistance)},_setOrthoSize:function(t){this._orthoSize=Math.max(Math.min(t,this.maxOrthographicSize),this.minOrthographicSize);var e=this.getCamera(),r=this._orthoSize,i=r/this.viewGL.viewport.height*this.viewGL.viewport.width;e.left=-i/2,e.right=i/2,e.top=r/2,e.bottom=-r/2},_updatePan:function(t){var e=this._panVelocity,r=this._distance,i=this.getCamera(),n=i.worldTransform.y,a=i.worldTransform.x;this._center.scaleAndAdd(a,-e.x*r/200).scaleAndAdd(n,-e.y*r/200),this._vectorDamping(e,0)},_updateTransform:function(){var t=this.getCamera(),e=new Q,r=this._theta+Math.PI/2,i=this._phi+Math.PI/2,n=Math.sin(r);e.x=n*Math.cos(i),e.y=-Math.cos(r),e.z=n*Math.sin(i),t.position.copy(this._center).scaleAndAdd(e,this._distance),t.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var t=this.autoRotateAfterStill,e=this;!isNaN(t)&&t>0&&(this._stillTimeout=setTimeout(function(){e._rotating=!0},t*1e3))},_vectorDamping:function(t,e){var r=t.len();r=r*e,r<1e-4&&(r=0),t.normalize().scale(r)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var t=this.getCamera().worldTransform.z,e=Math.asin(t.y),r=Math.atan2(t.x,t.z);this._theta=e,this._phi=-r,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(t){if(!t.target&&!this._isAnimating()){var e=t.offsetX,r=t.offsetY;this.viewGL&&!this.viewGL.containPoint(e,r)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),t.event.targetTouches?t.event.targetTouches.length===1&&(this._mode="rotate"):t.event.button===yw[this.rotateMouseButton]?this._mode="rotate":t.event.button===yw[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=t.offsetX,this._mouseY=t.offsetY)}},_mouseMoveHandler:function(t){if(!(t.target&&t.target.__isGLToZRProxy)&&!this._isAnimating()){var e=_w(this.panSensitivity),r=_w(this.rotateSensitivity);this._mode==="rotate"?(this._rotateVelocity.y=(t.offsetX-this._mouseX)/this.zr.getHeight()*2*r[0],this._rotateVelocity.x=(t.offsetY-this._mouseY)/this.zr.getWidth()*2*r[1]):this._mode==="pan"&&(this._panVelocity.x=(t.offsetX-this._mouseX)/this.zr.getWidth()*e[0]*400,this._panVelocity.y=(-t.offsetY+this._mouseY)/this.zr.getHeight()*e[1]*400),this._mouseX=t.offsetX,this._mouseY=t.offsetY,t.event.preventDefault()}},_mouseWheelHandler:function(t){if(!this._isAnimating()){var e=t.event.wheelDelta||-t.event.detail;this._zoomHandler(t,e)}},_pinchHandler:function(t){this._isAnimating()||(this._zoomHandler(t,t.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(t,e){if(e!==0){var r=t.offsetX,i=t.offsetY;if(!(this.viewGL&&!this.viewGL.containPoint(r,i))){var n;this._projection==="perspective"?n=Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):n=Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(e>0?-1:1)*n*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&this._mode==="rotate"&&this._startCountingStill(),t.event.preventDefault()}}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return this.rotateMouseButton==="right"||this.panMouseButton==="right"},_contextMenuHandler:function(t){this._isRightMouseButtonUsed()&&t.preventDefault()},_addAnimator:function(t){var e=this._animators;return e.push(t),t.done(function(){var r=e.indexOf(t);r>=0&&e.splice(r,1)}),t}});Object.defineProperty(T3.prototype,"autoRotate",{get:function(t){return this._autoRotate},set:function(t){this._autoRotate=t,this._rotating=t}});const A3={convertToDynamicArray:function(t){t&&this.resetOffset();var e=this.attributes;for(var r in e)t||!e[r].value?e[r].value=[]:e[r].value=Array.prototype.slice.call(e[r].value);t||!this.indices?this.indices=[]:this.indices=Array.prototype.slice.call(this.indices)},convertToTypedArray:function(){var t=this.attributes;for(var e in t)t[e].value&&t[e].value.length>0?t[e].value=new Float32Array(t[e].value):t[e].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}},Ye={vec2:st,vec3:k,vec4:rt,mat2:ie,mat2d:ue,mat3:Mt,mat4:it,quat:pt};var E8=Ye.vec3,xw=[[0,0],[1,1]],ca=qt.extend(function(){return{segmentScale:1,dynamic:!0,useNativeLine:!0,attributes:{position:new qt.Attribute("position","float",3,"POSITION"),positionPrev:new qt.Attribute("positionPrev","float",3),positionNext:new qt.Attribute("positionNext","float",3),prevPositionPrev:new qt.Attribute("prevPositionPrev","float",3),prevPosition:new qt.Attribute("prevPosition","float",3),prevPositionNext:new qt.Attribute("prevPositionNext","float",3),offset:new qt.Attribute("offset","float",1),color:new qt.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(t){var e=this.attributes;this.vertexCount!==t&&(e.position.init(t),e.color.init(t),this.useNativeLine||(e.positionPrev.init(t),e.positionNext.init(t),e.offset.init(t)),t>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(t===0?this.indices=null:this.indices=this.vertexCount>65535?new Uint32Array(t*3):new Uint16Array(t*3))},_getCubicCurveApproxStep:function(t,e,r,i){var n=E8.dist(t,e)+E8.dist(r,e)+E8.dist(i,r),a=1/(n+1)*this.segmentScale;return a},getCubicCurveVertexCount:function(t,e,r,i){var n=this._getCubicCurveApproxStep(t,e,r,i),a=Math.ceil(1/n);return this.useNativeLine?a*2:a*2+2},getCubicCurveTriangleCount:function(t,e,r,i){var n=this._getCubicCurveApproxStep(t,e,r,i),a=Math.ceil(1/n);return this.useNativeLine?0:a*2},getLineVertexCount:function(){return this.getPolylineVertexCount(xw)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(xw)},getPolylineVertexCount:function(t){var e;if(typeof t=="number")e=t;else{var r=typeof t[0]!="number";e=r?t.length:t.length/3}return this.useNativeLine?(e-1)*2:(e-1)*2+2},getPolylineTriangleCount:function(t){var e;if(typeof t=="number")e=t;else{var r=typeof t[0]!="number";e=r?t.length:t.length/3}return this.useNativeLine?0:Math.max(e-1,0)*2},addCubicCurve:function(t,e,r,i,n,a){a==null&&(a=1);for(var o=t[0],s=t[1],l=t[2],u=e[0],f=e[1],h=e[2],c=r[0],v=r[1],d=r[2],p=i[0],g=i[1],m=i[2],y=this._getCubicCurveApproxStep(t,e,r,i),_=y*y,x=_*y,w=3*y,S=3*_,b=6*_,T=6*x,A=o-u*2+c,D=s-f*2+v,C=l-h*2+d,M=(u-c)*3-o+p,L=(f-v)*3-s+g,I=(h-d)*3-l+m,P=o,R=s,B=l,O=(u-o)*w+A*S+M*x,z=(f-s)*w+D*S+L*x,G=(h-l)*w+C*S+I*x,U=A*b+M*T,Z=D*b+L*T,$=C*b+I*T,W=M*T,V=L*T,K=I*T,Y=0,q=0,et=Math.ceil(1/y),nt=new Float32Array((et+1)*3),nt=[],J=0,q=0;q1&&(P=O>0?Math.min(P,p):Math.max(P,p),R=z>0?Math.min(R,g):Math.max(R,g),B=G>0?Math.min(B,m):Math.max(B,m));return this.addPolyline(nt,n,a)},addLine:function(t,e,r,i){return this.addPolyline([t,e],r,i)},addPolyline:function(t,e,r,i,n){if(t.length){var a=typeof t[0]!="number";if(n==null&&(n=a?t.length:t.length/3),!(n<2)){i==null&&(i=0),r==null&&(r=1),this._itemVertexOffsets.push(this._vertexOffset);var a=typeof t[0]!="number",o=a?typeof e[0]!="number":e.length/4===n,s=this.attributes.position,l=this.attributes.positionPrev,u=this.attributes.positionNext,f=this.attributes.color,h=this.attributes.offset,c=this.indices,v=this._vertexOffset,d,p;r=Math.max(r,.01);for(var g=i;g1&&(s.copy(v,v-1),f.copy(v,v-1),v++):(g0&&(u.set(v-2,d),u.set(v-1,d)),s.set(v,d),s.set(v+1,d),f.set(v,p),f.set(v+1,p),h.set(v,r/2),h.set(v+1,-r/2),v+=2),this.useNativeLine)f.set(v,p),s.set(v,d),v++;else if(g>0){var _=this._triangleOffset*3,c=this.indices;c[_]=v-4,c[_+1]=v-3,c[_+2]=v-2,c[_+3]=v-3,c[_+4]=v-1,c[_+5]=v-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,w=this._vertexOffset+n*2;l.copy(x,x+2),l.copy(x+1,x+3),u.copy(w-1,w-3),u.copy(w-2,w-4)}return this._vertexOffset=v,this._vertexOffset}}},setItemColor:function(t,e){for(var r=this._itemVertexOffsets[t],i=to&&(n=this._x=0,a+=this._rowHeight+l,this._y=a,this._rowHeight=0),this._x+=e+l,this._rowHeight=Math.max(this._rowHeight,r),a+r+l>s)return null;t.x+=this.offsetX*this.dpr+n,t.y+=this.offsetY*this.dpr+a,this._zr.add(t);var u=[this.offsetX/this.width,this.offsetY/this.height],f=[[n/o+u[0],a/s+u[1]],[(n+e)/o+u[0],(a+r)/s+u[1]]];return f},_fitElement:function(t,e,r){var i=t.getBoundingRect(),n=e/i.width,a=r/i.height;t.x=-i.x*n,t.y=-i.y*a,t.scaleX=n,t.scaleY=a,t.update()}};function S0(t){t=t||{},t.width=t.width||512,t.height=t.height||512,t.devicePixelRatio=t.devicePixelRatio||1,t.gap=t.gap==null?2:t.gap;var e=document.createElement("canvas");e.width=t.width*t.devicePixelRatio,e.height=t.height*t.devicePixelRatio,this._canvas=e,this._texture=new Gt({image:e,flipY:!1});var r=this;this._zr=cf(e);var i=this._zr.refreshImmediately;this._zr.refreshImmediately=function(){i.call(this),r._texture.dirty(),r.onupdate&&r.onupdate()},this._dpr=t.devicePixelRatio,this._coords={},this.onupdate=t.onupdate,this._gap=t.gap,this._textureAtlasNodes=[new x0(this._zr,0,0,t.width,t.height,this._gap,this._dpr)],this._nodeWidth=t.width,this._nodeHeight=t.height,this._currentNodeIdx=0}S0.prototype={clear:function(){for(var t=0;t=t)){var a=(i+this._nodeWidth)*this._dpr,o=(n+this._nodeHeight)*this._dpr;try{this._zr.resize({width:a,height:o})}catch(l){this._canvas.width=a,this._canvas.height=o}var s=new x0(this._zr,i,n,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(s),s}},add:function(t,e,r){if(this._coords[t.id])return this._coords[t.id];var i=this._getCurrentNode().add(t,e,r);if(!i){var n=this._expand();if(!n)return;i=n.add(t,e,r)}return this._coords[t.id]=i,i},getCoordsScale:function(){var t=this._dpr;return[this._nodeWidth/this._canvas.width*t,this._nodeHeight/this._canvas.height*t]},getCoords:function(t){return this._coords[t]},dispose:function(){this._zr.dispose()}};function la(){}la.prototype={constructor:la,setScene:function(t){this._scene=t,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(t){this._lightRoot=t,this.mainLight=new N.DirectionalLight({shadowBias:.005}),this.ambientLight=new N.AmbientLight,t.add(this.mainLight),t.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(t){var e=this.mainLight,r=this.ambientLight,i=t.getModel("light"),n=i.getModel("main"),a=i.getModel("ambient");e.intensity=n.get("intensity"),r.intensity=a.get("intensity"),e.color=N.parseColor(n.get("color")).slice(0,3),r.color=N.parseColor(a.get("color")).slice(0,3);var o=n.get("alpha")||0,s=n.get("beta")||0;e.position.setArray(N.directionFromAlphaBeta(o,s)),e.lookAt(N.Vector3.ZERO),e.castShadow=n.get("shadow"),e.shadowResolution=N.getShadowResolution(n.get("shadowQuality"))},updateAmbientCubemap:function(t,e,r){var i=e.getModel("light.ambientCubemap"),n=i.get("texture");if(n){this._cubemapLightsCache=this._cubemapLightsCache||{};var a=this._cubemapLightsCache[n];if(!a){var o=this;a=this._cubemapLightsCache[n]=N.createAmbientCubemap(i.option,t,r,function(){o._isSkyboxFromAmbientCubemap&&o._skybox.setEnvironmentMap(a.specular.cubemap),r.getZr().refresh()})}this._lightRoot.add(a.diffuse),this._lightRoot.add(a.specular),this._currentCubemapLights=a}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(t,e,r){var i=e.get("environment"),n=this;function a(){return n._skybox=n._skybox||new j7,n._skybox}var o=a();if(i&&i!=="none")if(i==="auto")if(this._isSkyboxFromAmbientCubemap=!0,this._currentCubemapLights){var s=this._currentCubemapLights.specular.cubemap;o.setEnvironmentMap(s),this._scene&&o.attachScene(this._scene),o.material.set("lod",3)}else this._skybox&&this._skybox.detachScene();else if(typeof i=="object"&&i.colorStops||typeof i=="string"&&Vr(i)){this._isSkyboxFromAmbientCubemap=!1;var l=new N.Texture2D({anisotropic:8,flipY:!1});o.setEnvironmentMap(l);var u=l.image=document.createElement("canvas");u.width=u.height=16;var f=u.getContext("2d"),h=new Xt({shape:{x:0,y:0,width:16,height:16},style:{fill:i}});f5(f,h),o.attachScene(this._scene)}else{this._isSkyboxFromAmbientCubemap=!1;var l=N.loadTexture(i,r,{anisotropic:8,flipY:!1});o.setEnvironmentMap(l),o.attachScene(this._scene)}else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var c=e.coordinateSystem;if(this._skybox)if(c&&c.viewGL&&i!=="auto"&&!(i.match&&i.match(/.hdr$/))){var v=c.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[v]("fragment","SRGB_DECODE")}else this._skybox.material.undefine("fragment","SRGB_DECODE")}};var Xa=Ye.vec3,CL=qt.extend(function(){return{segmentScale:1,useNativeLine:!0,attributes:{position:new qt.Attribute("position","float",3,"POSITION"),normal:new qt.Attribute("normal","float",3,"NORMAL"),color:new qt.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setQuadCount:function(t){var e=this.attributes,r=this.getQuadVertexCount()*t,i=this.getQuadTriangleCount()*t;this.vertexCount!==r&&(e.position.init(r),e.normal.init(r),e.color.init(r)),this.triangleCount!==i&&(this.indices=r>65535?new Uint32Array(i*3):new Uint16Array(i*3))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var t=Xa.create(),e=Xa.create(),r=Xa.create(),i=[0,3,1,3,2,1];return function(n,a){var o=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;Xa.sub(t,n[1],n[0]),Xa.sub(e,n[2],n[1]),Xa.cross(r,t,e),Xa.normalize(r,r);for(var u=0;u<4;u++)o.set(this._vertexOffset+u,n[u]),l.set(this._vertexOffset+u,a),s.set(this._vertexOffset+u,r);for(var f=this._faceOffset*3,u=0;u<6;u++)this.indices[f+u]=i[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});xt(CL.prototype,A3);var zh=Zt.firstNotNull,zet={x:0,y:2,z:1};function Get(t,e,r,i){var n=[0,0,0],a=i<0?r.getExtentMin():r.getExtentMax();n[zet[r.dim]]=a,t.position.setArray(n),t.rotation.identity(),e.distance=-Math.abs(a),e.normal.set(0,0,0),r.dim==="x"?(t.rotation.rotateY(i*Math.PI/2),e.normal.x=-i):r.dim==="z"?(t.rotation.rotateX(-i*Math.PI/2),e.normal.y=-i):(i>0&&t.rotation.rotateY(Math.PI),e.normal.z=-i)}function L5(t,e,r){this.rootNode=new N.Node;var i=new N.Mesh({geometry:new ca({useNativeLine:!1}),material:e,castShadow:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:1}),n=new N.Mesh({geometry:new CL,material:r,castShadow:!1,culling:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:0});this.rootNode.add(n),this.rootNode.add(i),this.faceInfo=t,this.plane=new N.Plane,this.linesMesh=i,this.quadsMesh=n}L5.prototype.update=function(t,e,r){var i=t.coordinateSystem,n=[i.getAxis(this.faceInfo[0]),i.getAxis(this.faceInfo[1])],a=this.linesMesh.geometry,o=this.quadsMesh.geometry;a.convertToDynamicArray(!0),o.convertToDynamicArray(!0),this._updateSplitLines(a,n,t,r),this._udpateSplitAreas(o,n,t,r),a.convertToTypedArray(),o.convertToTypedArray();var s=i.getAxis(this.faceInfo[2]);Get(this.rootNode,this.plane,s,this.faceInfo[3])};L5.prototype._updateSplitLines=function(t,e,r,i){var n=i.getDevicePixelRatio();e.forEach(function(a,o){var s=a.model,l=e[1-o].getExtent();if(!a.scale.isBlank()){var u=s.getModel("splitLine",r.getModel("splitLine"));if(u.get("show")){var f=u.getModel("lineStyle"),h=f.get("color"),c=zh(f.get("opacity"),1),v=zh(f.get("width"),1);h=X(h)?h:[h];for(var d=a.getTicksCoords({tickModel:u}),p=0,g=0;g65535?new Uint32Array(r*3):new Uint16Array(r*3))},setSpriteAlign:function(t,e,r,i,n){r==null&&(r="left"),i==null&&(i="top");var a,o,s,l;switch(n=n||0,r){case"left":a=n,s=e[0]+n;break;case"center":case"middle":a=-e[0]/2,s=e[0]/2;break;case"right":a=-e[0]-n,s=-n;break}switch(i){case"bottom":o=n,l=e[1]+n;break;case"middle":o=-e[1]/2,l=e[1]/2;break;case"top":o=-e[1]-n,l=-n;break}var u=t*4,f=this.attributes.offset;f.set(u,[a,l]),f.set(u+1,[s,l]),f.set(u+2,[s,o]),f.set(u+3,[a,o])},addSprite:function(t,e,r,i,n,a){var o=this._vertexOffset;this.setSprite(this._vertexOffset/4,t,e,r,i,n,a);for(var s=0;si[1]?0:1,s=this._faces[r*2+o],l=this._faces[r*2+1-o];s.rootNode.invisible=!0,l.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var t=this._model.coordinateSystem,e=t.getAxis("x"),r=t.getAxis("y"),i=t.getAxis("z"),n=i.getExtentMax(),a=i.getExtentMin(),o=e.getExtentMin(),s=e.getExtentMax(),l=r.getExtentMax(),u=r.getExtentMin(),f=this._axes[0].rootNode,h=this._axes[1].rootNode,c=this._axes[2].rootNode,v=this._faces,d=v[4].rootNode.invisible?u:l,p=v[2].rootNode.invisible?n:a,g=v[0].rootNode.invisible?o:s,m=v[2].rootNode.invisible?n:a,y=v[0].rootNode.invisible?s:o,_=v[4].rootNode.invisible?u:l;f.rotation.identity(),h.rotation.identity(),c.rotation.identity(),v[4].rootNode.invisible&&(this._axes[0].flipped=!0,f.rotation.rotateX(Math.PI)),v[0].rootNode.invisible&&(this._axes[1].flipped=!0,h.rotation.rotateZ(Math.PI)),v[4].rootNode.invisible&&(this._axes[2].flipped=!0,c.rotation.rotateY(Math.PI)),f.position.set(0,p,d),h.position.set(g,m,0),c.position.set(y,0,_),f.update(),h.update(),c.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var t=this._control.getCamera(),e=[new N.Vector4,new N.Vector4],r=new N.Vector4;this.groupGL.getWorldPosition(r),r.w=1,r.transformMat4(t.viewMatrix).transformMat4(t.projectionMatrix),r.x/=r.w,r.y/=r.w,this._axes.forEach(function(i){var n=i.axisLineCoords;i.labelsMesh.geometry;for(var a=0;ar.y?"bottom":"top"):(h="middle",f=l>r.x?"left":"right"),i.setSpriteAlign(f,h,this._api)},this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(t){var e=this._model.coordinateSystem,r=e.dataToPoint(t),i=this._axisPointerLineMesh,n=i.geometry,a=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();n.convertToDynamicArray(!0);function s(T){return Zt.firstNotNull(T.model.get("axisPointer.show"),a.get("show"))}function l(T){var A=T.model.getModel("axisPointer",a),D=A.getModel("lineStyle"),C=N.parseColor(D.get("color")),M=ww(D.get("width"),1),L=ww(D.get("opacity"),1);return C[3]*=L,{color:C,lineWidth:M}}for(var u=0;u4){console.warn("Support at most 4 cascade");continue}d.shadowCascade>1&&(c=d),this.renderDirectionalLightShadow(t,e,r,d,f,u,l)}else d.type==="SPOT_LIGHT"?this.renderSpotLightShadow(t,e,d,s,o):d.type==="POINT_LIGHT"&&this.renderPointLightShadow(t,e,d,h);this._shadowMapNumber[d.type]++}for(var p in this._shadowMapNumber)for(var g=this._shadowMapNumber[p],m=p+"_SHADOWMAP_COUNT",v=0;v0?_.define("fragment",m,g):_.isDefined("fragment",m)&&_.undefine("fragment",m))}for(var v=0;v0){var S=l.map(w);if(x.directionalLightShadowMaps={value:l,type:"tv"},x.directionalLightMatrices={value:u,type:"m4v"},x.directionalLightShadowMapSizes={value:S,type:"1fv"},c){var b=f.slice(),T=f.slice();b.pop(),T.shift(),b.reverse(),T.reverse(),u.reverse(),x.shadowCascadeClipsNear={value:b,type:"1fv"},x.shadowCascadeClipsFar={value:T,type:"1fv"}}}if(o.length>0){var A=o.map(w),x=e.shadowUniforms;x.spotLightShadowMaps={value:o,type:"tv"},x.spotLightMatrices={value:s,type:"m4v"},x.spotLightShadowMapSizes={value:A,type:"1fv"}}h.length>0&&(x.pointLightShadowMaps={value:h,type:"tv"})},renderDirectionalLightShadow:function(){var t=new A5,e=new dt,r=new yr,i=new dt,n=new dt,a=new dt,o=new dt;return function(s,l,u,f,h,c,v){var d=this._getDepthMaterial(f),p={getMaterial:function($){return $.shadowDepthMaterial||d},isMaterialChanged:Tw,getUniform:I8,ifRender:function($){return $.castShadow},sortCompare:N1.opaqueSortCompare};if(!l.viewBoundingBoxLastFrame.isFinite()){var g=l.getBoundingBox();l.viewBoundingBoxLastFrame.copy(g).applyTransform(u.viewMatrix)}var m=Math.min(-l.viewBoundingBoxLastFrame.min.z,u.far),y=Math.max(-l.viewBoundingBoxLastFrame.max.z,u.near),_=this._getDirectionalLightCamera(f,l,u),x=a.array;o.copy(_.projectionMatrix),it.invert(n.array,_.worldTransform.array),it.multiply(n.array,n.array,u.worldTransform.array),it.multiply(x,o.array,n.array);for(var w=[],S=u instanceof nr,b=(u.near+u.far)/(u.near-u.far),T=2*u.near*u.far/(u.near-u.far),A=0;A<=f.shadowCascade;A++){var D=y*Math.pow(m/y,A/f.shadowCascade),C=y+(m-y)*A/f.shadowCascade,M=D*f.cascadeSplitLogFactor+C*(1-f.cascadeSplitLogFactor);w.push(M),h.push(-(-M*b+T)/-M)}var L=this._getTexture(f,f.shadowCascade);v.push(L);var I=s.viewport,P=s.gl;this._frameBuffer.attach(L),this._frameBuffer.bind(s),P.clear(P.COLOR_BUFFER_BIT|P.DEPTH_BUFFER_BIT);for(var A=0;AD?A>C?d[S>0?"px":"nx"]=!0:d[T>0?"pz":"nz"]=!0:D>C?d[b>0?"py":"ny"]=!0:d[T>0?"pz":"nz"]=!0}for(var x=0;x0){var e=this.outputs[t];e.keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t])}}}),Aw=xr.extend(function(){return{nodes:[]}},{dirty:function(){this._dirty=!0},addNode:function(t){this.nodes.indexOf(t)>=0||(this.nodes.push(t),this._dirty=!0)},removeNode:function(t){typeof t=="string"&&(t=this.getNodeByName(t));var e=this.nodes.indexOf(t);e>=0&&(this.nodes.splice(e,1),this._dirty=!0)},getNodeByName:function(t){for(var e=0;e=e.COLOR_ATTACHMENT0&&l<=e.COLOR_ATTACHMENT0+8&&f.push(l);u.drawBuffersEXT(f)}t.saveClear(),t.clearBit=tt.DEPTH_BUFFER_BIT|tt.COLOR_BUFFER_BIT,r=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),t.restoreClear(),i.unbind(t)}this.trigger("afterrender",r),this._rendering=!1,this._rendered=!0}}),Qet=K7.extend(function(){return{texture:null,outputs:{color:{}}}},function(){},{getOutput:function(t,e){return this.texture},beforeFrame:function(){},afterFrame:function(){}}),jet=K7.extend(function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}},function(){var t=new qe({fragment:this.shader});this.pass=t},{render:function(t,e){this.trigger("beforerender",t),this._rendering=!0;var r=t.gl;for(var i in this.inputLinks){var n=this.inputLinks[i],a=n.node.getOutput(t,n.pin);this.pass.setUniform(i,a)}if(!this.outputs)this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(t),this.pass.render(t,e);else{this.pass.outputs={};var o={};for(var s in this.outputs){var l=this.updateParameter(s,t);isNaN(l.width)&&this.updateParameter(s,t);var u=this.outputs[s],f=this._compositor.allocateTexture(l);this._outputTextures[s]=f;var h=u.attachment||r.COLOR_ATTACHMENT0;typeof h=="string"&&(h=r[h]),o[h]=f}this._compositor.getFrameBuffer().bind(t);for(var h in o)this._compositor.getFrameBuffer().attach(o[h],h);this.pass.render(t),this._compositor.getFrameBuffer().updateMipmap(t)}for(var i in this.inputLinks){var n=this.inputLinks[i];n.node.removeReference(n.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",t)},updateParameter:function(t,e){var r=this.outputs[t],i=r.parameters,n=r._parametersCopy;if(n||(n=r._parametersCopy={}),i)for(var a in i)a!=="width"&&a!=="height"&&(n[a]=i[a]);var o,s;return typeof i.width=="function"?o=i.width.call(this,e):o=i.width,typeof i.height=="function"?s=i.height.call(this,e):s=i.height,o=Math.ceil(o),s=Math.ceil(s),(n.width!==o||n.height!==s)&&this._outputTextures[t]&&this._outputTextures[t].dispose(e),n.width=o,n.height=s,n},setParameter:function(t,e){this.pass.setUniform(t,e)},getParameter:function(t){return this.pass.getUniform(t)},setParameters:function(t){for(var e in t)this.setParameter(e,t[e])},define:function(t,e){this.pass.material.define("fragment",t,e)},undefine:function(t){this.pass.material.undefine("fragment",t)},removeReference:function(t){if(this._outputReferences[t]--,this._outputReferences[t]===0){var e=this.outputs[t];e.keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t])}},clear:function(){K7.prototype.clear.call(this),this.pass.material.disableTexturesAll()}});const qet="@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end",ML="@export clay.compositor.kernel.gaussian_9\nfloat gaussianKernel[9];\ngaussianKernel[0] = 0.07;\ngaussianKernel[1] = 0.09;\ngaussianKernel[2] = 0.12;\ngaussianKernel[3] = 0.14;\ngaussianKernel[4] = 0.16;\ngaussianKernel[5] = 0.14;\ngaussianKernel[6] = 0.12;\ngaussianKernel[7] = 0.09;\ngaussianKernel[8] = 0.07;\n@end\n@export clay.compositor.kernel.gaussian_13\nfloat gaussianKernel[13];\ngaussianKernel[0] = 0.02;\ngaussianKernel[1] = 0.03;\ngaussianKernel[2] = 0.06;\ngaussianKernel[3] = 0.08;\ngaussianKernel[4] = 0.11;\ngaussianKernel[5] = 0.13;\ngaussianKernel[6] = 0.14;\ngaussianKernel[7] = 0.13;\ngaussianKernel[8] = 0.11;\ngaussianKernel[9] = 0.08;\ngaussianKernel[10] = 0.06;\ngaussianKernel[11] = 0.03;\ngaussianKernel[12] = 0.02;\n@end\n@export clay.compositor.gaussian_blur\n#define SHADER_NAME gaussian_blur\nuniform sampler2D texture;varying vec2 v_Texcoord;\nuniform float blurSize : 2.0;\nuniform vec2 textureSize : [512.0, 512.0];\nuniform float blurDir : 0.0;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main (void)\n{\n @import clay.compositor.kernel.gaussian_9\n vec2 off = blurSize / textureSize;\n off *= vec2(1.0 - blurDir, blurDir);\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n for (int i = 0; i < 9; i++) {\n float w = gaussianKernel[i];\n vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off));\n sum += texel * w;\n weightAll += w;\n }\n gl_FragColor = encodeHDR(sum / max(weightAll, 0.01));\n}\n@end\n",Ket="@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end",LL="\n@export clay.compositor.lut\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform sampler2D lookup;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n float blueColor = tex.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec4 newColor1 = texture2D(lookup, texPos1);\n vec4 newColor2 = texture2D(lookup, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n gl_FragColor = vec4(newColor.rgb, tex.w);\n}\n@end",$et="@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end",IL="@export clay.compositor.output\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = tex.rgb;\n#ifdef OUTPUT_ALPHA\n gl_FragColor.a = tex.a;\n#else\n gl_FragColor.a = 1.0;\n#endif\n gl_FragColor = encodeHDR(gl_FragColor);\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",PL="@export clay.compositor.bright\nuniform sampler2D texture;\nuniform float threshold : 1;\nuniform float scale : 1.0;\nuniform vec2 textureSize: [512, 512];\nvarying vec2 v_Texcoord;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvec4 median(vec4 a, vec4 b, vec4 c)\n{\n return a + b + c - min(min(a, b), c) - max(max(a, b), c);\n}\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n#ifdef ANTI_FLICKER\n vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0);\n vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz));\n vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz));\n vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy));\n vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy));\n texel = median(median(texel, s1, s2), s3, s4);\n#endif\n float lum = dot(texel.rgb , lumWeight);\n vec4 color;\n if (lum > threshold && texel.a > 0.0)\n {\n color = vec4(texel.rgb * scale, texel.a * scale);\n }\n else\n {\n color = vec4(0.0);\n }\n gl_FragColor = encodeHDR(color);\n}\n@end\n",RL="@export clay.compositor.downsample\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nfloat brightness(vec3 c)\n{\n return max(max(c.r, c.g), c.b);\n}\n@import clay.util.clamp_sample\nvoid main()\n{\n vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy;\n#ifdef ANTI_FLICKER\n vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb;\n vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb;\n vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb;\n vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb;\n float s1w = 1.0 / (brightness(s1) + 1.0);\n float s2w = 1.0 / (brightness(s2) + 1.0);\n float s3w = 1.0 / (brightness(s3) + 1.0);\n float s4w = 1.0 / (brightness(s4) + 1.0);\n float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w);\n vec4 color = vec4(\n (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum,\n 1.0\n );\n#else\n vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n color *= 0.25;\n#endif\n gl_FragColor = encodeHDR(color);\n}\n@end",NL="\n@export clay.compositor.upsample\n#define HIGH_QUALITY\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nuniform float sampleScale: 0.5;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main()\n{\n#ifdef HIGH_QUALITY\n vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord - d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord - d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n gl_FragColor = encodeHDR(s / 16.0);\n#else\n vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n gl_FragColor = encodeHDR(s / 4.0);\n#endif\n}\n@end",OL="@export clay.compositor.hdr.composite\n#define TONEMAPPING\nuniform sampler2D texture;\n#ifdef BLOOM_ENABLED\nuniform sampler2D bloom;\n#endif\n#ifdef LENSFLARE_ENABLED\nuniform sampler2D lensflare;\nuniform sampler2D lensdirt;\n#endif\n#ifdef LUM_ENABLED\nuniform sampler2D lum;\n#endif\n#ifdef LUT_ENABLED\nuniform sampler2D lut;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float saturation : 1.0;\n#endif\n#ifdef VIGNETTE\nuniform float vignetteDarkness: 1.0;\nuniform float vignetteOffset: 1.0;\n#endif\nuniform float exposure : 1.0;\nuniform float bloomIntensity : 0.25;\nuniform float lensflareIntensity : 1;\nvarying vec2 v_Texcoord;\n@import clay.util.srgb\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nfloat eyeAdaption(float fLum)\n{\n return mix(0.2, fLum, 0.5);\n}\n#ifdef LUT_ENABLED\nvec3 lutTransform(vec3 color) {\n float blueColor = color.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec4 newColor1 = texture2D(lut, texPos1);\n vec4 newColor2 = texture2D(lut, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n return newColor.rgb;\n}\n#endif\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = vec4(0.0);\n vec4 originalTexel = vec4(0.0);\n#ifdef TEXTURE_ENABLED\n texel = decodeHDR(texture2D(texture, v_Texcoord));\n originalTexel = texel;\n#endif\n#ifdef BLOOM_ENABLED\n vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord));\n texel.rgb += bloomTexel.rgb * bloomIntensity;\n texel.a += bloomTexel.a * bloomIntensity;\n#endif\n#ifdef LENSFLARE_ENABLED\n texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity;\n#endif\n texel.a = min(texel.a, 1.0);\n#ifdef LUM_ENABLED\n float fLum = texture2D(lum, vec2(0.5, 0.5)).r;\n float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum)));\n float exposureBias = adaptedLumDest * exposure;\n#else\n float exposureBias = exposure;\n#endif\n#ifdef TONEMAPPING\n texel.rgb *= exposureBias;\n texel.rgb = ACESToneMapping(texel.rgb);\n#endif\n texel = linearTosRGB(texel);\n#ifdef LUT_ENABLED\n texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0)));\n#endif\n#ifdef COLOR_CORRECTION\n texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0);\n texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(lum), texel.rgb, saturation);\n#endif\n#ifdef VIGNETTE\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset);\n texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv));\n#endif\n gl_FragColor = encodeHDR(texel);\n#ifdef DEBUG\n #if DEBUG == 1\n gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord)));\n #elif DEBUG == 2\n gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity);\n #elif DEBUG == 3\n gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity));\n #endif\n#endif\n if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) {\n gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721));\n }\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",Jet="@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end",BL="@export clay.compositor.blend\n#define SHADER_NAME blend\n#ifdef TEXTURE1_ENABLED\nuniform sampler2D texture1;\nuniform float weight1 : 1.0;\n#endif\n#ifdef TEXTURE2_ENABLED\nuniform sampler2D texture2;\nuniform float weight2 : 1.0;\n#endif\n#ifdef TEXTURE3_ENABLED\nuniform sampler2D texture3;\nuniform float weight3 : 1.0;\n#endif\n#ifdef TEXTURE4_ENABLED\nuniform sampler2D texture4;\nuniform float weight4 : 1.0;\n#endif\n#ifdef TEXTURE5_ENABLED\nuniform sampler2D texture5;\nuniform float weight5 : 1.0;\n#endif\n#ifdef TEXTURE6_ENABLED\nuniform sampler2D texture6;\nuniform float weight6 : 1.0;\n#endif\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = vec4(0.0);\n#ifdef TEXTURE1_ENABLED\n tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1;\n#endif\n#ifdef TEXTURE2_ENABLED\n tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2;\n#endif\n#ifdef TEXTURE3_ENABLED\n tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3;\n#endif\n#ifdef TEXTURE4_ENABLED\n tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4;\n#endif\n#ifdef TEXTURE5_ENABLED\n tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5;\n#endif\n#ifdef TEXTURE6_ENABLED\n tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6;\n#endif\n gl_FragColor = encodeHDR(tex);\n}\n@end",kL="@export clay.compositor.fxaa\nuniform sampler2D texture;\nuniform vec4 viewport : VIEWPORT;\nvarying vec2 v_Texcoord;\n#define FXAA_REDUCE_MIN (1.0/128.0)\n#define FXAA_REDUCE_MUL (1.0/8.0)\n#define FXAA_SPAN_MAX 8.0\n@import clay.util.rgbm\nvoid main()\n{\n vec2 resolution = 1.0 / viewport.zw;\n vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz;\n vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) );\n vec3 rgbM = rgbaM.xyz;\n float opacity = rgbaM.w;\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float lumaNW = dot( rgbNW, luma );\n float lumaNE = dot( rgbNE, luma );\n float lumaSW = dot( rgbSW, luma );\n float lumaSE = dot( rgbSE, luma );\n float lumaM = dot( rgbM, luma );\n float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );\n float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );\n float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );\n dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * resolution;\n vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA *= 0.5;\n vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz;\n rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz;\n rgbB *= 0.25;\n rgbB += rgbA * 0.5;\n float lumaB = dot( rgbB, luma );\n if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) )\n {\n gl_FragColor = vec4( rgbA, opacity );\n }\n else {\n gl_FragColor = vec4( rgbB, opacity );\n }\n}\n@end";function trt(t){t.import(qet),t.import(ML),t.import(Ket),t.import(LL),t.import($et),t.import(IL),t.import(PL),t.import(RL),t.import(NL),t.import(OL),t.import(Jet),t.import(BL),t.import(kL)}trt(ft);var ert=/^#source\((.*?)\)/;function rrt(t,e){var r=new Yet;e=e||{};var i={textures:{},parameters:{}},n=function(s,l){for(var u=0;u0;)r=r+i*(n%e),n=Math.floor(n/e),i=i/e;return r}const urt="@export ecgl.ssao.estimate\n\nuniform sampler2D depthTex;\n\nuniform sampler2D normalTex;\n\nuniform sampler2D noiseTex;\n\nuniform vec2 depthTexSize;\n\nuniform vec2 noiseTexSize;\n\nuniform mat4 projection;\n\nuniform mat4 projectionInv;\n\nuniform mat4 viewInverseTranspose;\n\nuniform vec3 kernel[KERNEL_SIZE];\n\nuniform float radius : 1;\n\nuniform float power : 1;\n\nuniform float bias: 1e-2;\n\nuniform float intensity: 1.0;\n\nvarying vec2 v_Texcoord;\n\nfloat ssaoEstimator(in vec3 originPos, in mat3 kernelBasis) {\n float occlusion = 0.0;\n\n for (int i = 0; i < KERNEL_SIZE; i++) {\n vec3 samplePos = kernel[i];\n#ifdef NORMALTEX_ENABLED\n samplePos = kernelBasis * samplePos;\n#endif\n samplePos = samplePos * radius + originPos;\n\n vec4 texCoord = projection * vec4(samplePos, 1.0);\n texCoord.xy /= texCoord.w;\n\n vec4 depthTexel = texture2D(depthTex, texCoord.xy * 0.5 + 0.5);\n\n float sampleDepth = depthTexel.r * 2.0 - 1.0;\n if (projection[3][3] == 0.0) {\n sampleDepth = projection[3][2] / (sampleDepth * projection[2][3] - projection[2][2]);\n }\n else {\n sampleDepth = (sampleDepth - projection[3][2]) / projection[2][2];\n }\n \n float rangeCheck = smoothstep(0.0, 1.0, radius / abs(originPos.z - sampleDepth));\n occlusion += rangeCheck * step(samplePos.z, sampleDepth - bias);\n }\n#ifdef NORMALTEX_ENABLED\n occlusion = 1.0 - occlusion / float(KERNEL_SIZE);\n#else\n occlusion = 1.0 - clamp((occlusion / float(KERNEL_SIZE) - 0.6) * 2.5, 0.0, 1.0);\n#endif\n return pow(occlusion, power);\n}\n\nvoid main()\n{\n\n vec4 depthTexel = texture2D(depthTex, v_Texcoord);\n\n#ifdef NORMALTEX_ENABLED\n vec4 tex = texture2D(normalTex, v_Texcoord);\n if (dot(tex.rgb, tex.rgb) == 0.0) {\n gl_FragColor = vec4(1.0);\n return;\n }\n vec3 N = tex.rgb * 2.0 - 1.0;\n N = (viewInverseTranspose * vec4(N, 0.0)).xyz;\n\n vec2 noiseTexCoord = depthTexSize / vec2(noiseTexSize) * v_Texcoord;\n vec3 rvec = texture2D(noiseTex, noiseTexCoord).rgb * 2.0 - 1.0;\n vec3 T = normalize(rvec - N * dot(rvec, N));\n vec3 BT = normalize(cross(N, T));\n mat3 kernelBasis = mat3(T, BT, N);\n#else\n if (depthTexel.r > 0.99999) {\n gl_FragColor = vec4(1.0);\n return;\n }\n mat3 kernelBasis;\n#endif\n\n float z = depthTexel.r * 2.0 - 1.0;\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * projectedPos;\n\n vec3 position = p4.xyz / p4.w;\n\n float ao = ssaoEstimator(position, kernelBasis);\n ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n\n@end\n\n\n@export ecgl.ssao.blur\n#define SHADER_NAME SSAO_BLUR\n\nuniform sampler2D ssaoTexture;\n\n#ifdef NORMALTEX_ENABLED\nuniform sampler2D normalTex;\n#endif\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\nuniform int direction: 0.0;\n\n#ifdef DEPTHTEX_ENABLED\nuniform sampler2D depthTex;\nuniform mat4 projection;\nuniform float depthRange : 0.5;\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(depthTex, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n#endif\n\nvoid main()\n{\n float kernel[5];\n kernel[0] = 0.122581;\n kernel[1] = 0.233062;\n kernel[2] = 0.288713;\n kernel[3] = 0.233062;\n kernel[4] = 0.122581;\n\n vec2 off = vec2(0.0);\n if (direction == 0) {\n off[0] = blurSize / textureSize.x;\n }\n else {\n off[1] = blurSize / textureSize.y;\n }\n\n vec2 coord = v_Texcoord;\n\n float sum = 0.0;\n float weightAll = 0.0;\n\n#ifdef NORMALTEX_ENABLED\n vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0;\n#endif\n#if defined(DEPTHTEX_ENABLED)\n float centerDepth = getLinearDepth(v_Texcoord);\n#endif\n\n for (int i = 0; i < 5; i++) {\n vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0));\n\n float w = kernel[i];\n#ifdef NORMALTEX_ENABLED\n vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0;\n w *= clamp(dot(normal, centerNormal), 0.0, 1.0);\n#endif\n#ifdef DEPTHTEX_ENABLED\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0));\n#endif\n\n weightAll += w;\n sum += texture2D(ssaoTexture, coord).r * w;\n }\n\n gl_FragColor = vec4(vec3(sum / weightAll), 1.0);\n}\n\n@end\n";ft.import(urt);function zL(t){for(var e=new Uint8Array(t*t*4),r=0,i=new Q,n=0;n=1?.95:0,weight2:i>=1?.05:1}),v.render(t)),u.attach(s),h.setUniform("texture",this._physicallyCorrect?this._currentTexture:o),h.render(t),u.attach(l),c.setUniform("texture",s),c.render(t),u.unbind(t),this._physicallyCorrect){var m=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=m}};yn.prototype.getTargetTexture=function(){return this._texture3};yn.prototype.setParameter=function(t,e){t==="maxIteration"?this._ssrPass.material.define("fragment","MAX_ITERATION",e):this._ssrPass.setUniform(t,e)};yn.prototype.setPhysicallyCorrect=function(t){t?(this._normalDistribution||(this._normalDistribution=Li.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=t};yn.prototype.setSSAOTexture=function(t){var e=this._blurPass2;t?(e.material.enableTexture("ssaoTex"),e.material.set("ssaoTex",t)):e.material.disableTexture("ssaoTex")};yn.prototype.isFinished=function(t){return this._physicallyCorrect?t>this._totalSamples/this._samplePerFrame:!0};yn.prototype.dispose=function(t){this._ssrTexture.dispose(t),this._texture2.dispose(t),this._texture3.dispose(t),this._prevTexture.dispose(t),this._currentTexture.dispose(t),this._frameBuffer.dispose(t)};const Dw=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925],crt="@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end";ft.import(crt);function P8(t,e,r,i,n){var a=t.gl;e.setUniform(a,"1i",r,n),a.activeTexture(a.TEXTURE0+n),i.isRenderable()?i.bind(t):i.unbind(t)}function vrt(t,e,r,i,n){var a,o,s,l,u=t.gl;return function(f,h,c){if(!(l&&l.material===f.material)){var v=f.material,d=f.__program,p=v.get("roughness");p==null&&(p=1);var g=v.get("normalMap")||e,m=v.get("roughnessMap"),y=v.get("bumpMap"),_=v.get("uvRepeat"),x=v.get("uvOffset"),w=v.get("detailUvRepeat"),S=v.get("detailUvOffset"),b=!!y&&v.isTextureEnabled("bumpMap"),T=!!m&&v.isTextureEnabled("roughnessMap"),A=v.isDefined("fragment","DOUBLE_SIDED");y=y||r,m=m||i,c!==h?(h.set("normalMap",g),h.set("bumpMap",y),h.set("roughnessMap",m),h.set("useBumpMap",b),h.set("useRoughnessMap",T),h.set("doubleSide",A),_!=null&&h.set("uvRepeat",_),x!=null&&h.set("uvOffset",x),w!=null&&h.set("detailUvRepeat",w),S!=null&&h.set("detailUvOffset",S),h.set("roughness",p)):(d.setUniform(u,"1f","roughness",p),a!==g&&P8(t,d,"normalMap",g,0),o!==y&&y&&P8(t,d,"bumpMap",y,1),s!==m&&m&&P8(t,d,"roughnessMap",m,2),_!=null&&d.setUniform(u,"2f","uvRepeat",_),x!=null&&d.setUniform(u,"2f","uvOffset",x),w!=null&&d.setUniform(u,"2f","detailUvRepeat",w),S!=null&&d.setUniform(u,"2f","detailUvOffset",S),d.setUniform(u,"1i","useBumpMap",+b),d.setUniform(u,"1i","useRoughnessMap",+T),d.setUniform(u,"1i","doubleSide",+A)),a=g,o=y,s=m,l=f}}}function Q4(t){this._depthTex=new Gt({format:lt.DEPTH_COMPONENT,type:lt.UNSIGNED_INT}),this._normalTex=new Gt({type:lt.HALF_FLOAT}),this._framebuffer=new We,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,We.DEPTH_ATTACHMENT),this._normalMaterial=new R1({shader:new ft(ft.source("ecgl.normal.vertex"),ft.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=Mi.createBlank("#000"),this._defaultBumpMap=Mi.createBlank("#000"),this._defaultRoughessMap=Mi.createBlank("#000"),this._debugPass=new qe({fragment:ft.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}Q4.prototype.getDepthTexture=function(){return this._depthTex};Q4.prototype.getNormalTexture=function(){return this._normalTex};Q4.prototype.update=function(t,e,r){var i=t.getWidth(),n=t.getHeight(),a=this._depthTex,o=this._normalTex,s=this._normalMaterial;a.width=i,a.height=n,o.width=i,o.height=n;var l=e.getRenderList(r).opaque;this._framebuffer.bind(t),t.gl.clearColor(0,0,0,0),t.gl.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.gl.disable(t.gl.BLEND),t.renderPass(l,r,{getMaterial:function(){return s},ifRender:function(u){return u.renderNormal},beforeRender:vrt(t,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:t.opaqueSortCompare}),this._framebuffer.unbind(t)};Q4.prototype.renderDebug=function(t){this._debugPass.render(t)};Q4.prototype.dispose=function(t){this._depthTex.dispose(t),this._normalTex.dispose(t)};function C3(t){t=t||{},this._edgePass=new qe({fragment:ft.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",t.normalTexture),this._edgePass.setUniform("depthTexture",t.depthTexture),this._targetTexture=new Gt({type:lt.HALF_FLOAT}),this._frameBuffer=new We,this._frameBuffer.attach(this._targetTexture)}C3.prototype.update=function(t,e,r,i){var n=t.getWidth(),a=t.getHeight(),o=this._targetTexture;o.width=n,o.height=a;var s=this._frameBuffer;s.bind(t),this._edgePass.setUniform("projectionInv",e.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[n,a]),this._edgePass.setUniform("texture",r),this._edgePass.render(t),s.unbind(t)};C3.prototype.getTargetTexture=function(){return this._targetTexture};C3.prototype.setParameter=function(t,e){this._edgePass.setUniform(t,e)};C3.prototype.dispose=function(t){this._targetTexture.dispose(t),this._frameBuffer.dispose(t)};const drt={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]},prt="@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end",grt="@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end";ft.import(ML);ft.import(LL);ft.import(IL);ft.import(PL);ft.import(RL);ft.import(NL);ft.import(OL);ft.import(BL);ft.import(kL);ft.import(prt);ft.import(grt);function GL(t,e){return{color:{parameters:{width:t,height:e}}}}var md=["composite","FXAA"];function ee(){this._width,this._height,this._dpr,this._sourceTexture=new Gt({type:lt.HALF_FLOAT}),this._depthTexture=new Gt({format:lt.DEPTH_COMPONENT,type:lt.UNSIGNED_INT}),this._framebuffer=new We,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,We.DEPTH_ATTACHMENT),this._normalPass=new Q4,this._compositor=rrt(drt);var t=this._compositor.getNodeByName("source");t.texture=this._sourceTexture;var e=this._compositor.getNodeByName("coc");this._sourceNode=t,this._cocNode=e,this._compositeNode=this._compositor.getNodeByName("composite"),this._fxaaNode=this._compositor.getNodeByName("FXAA"),this._dofBlurNodes=["dof_far_blur","dof_near_blur","dof_coc_blur"].map(function(i){return this._compositor.getNodeByName(i)},this),this._dofBlurKernel=0,this._dofBlurKernelSize=new Float32Array(0),this._finalNodesChain=md.map(function(i){return this._compositor.getNodeByName(i)},this);var r={normalTexture:this._normalPass.getNormalTexture(),depthTexture:this._normalPass.getDepthTexture()};this._ssaoPass=new mn(r),this._ssrPass=new yn(r),this._edgePass=new C3(r)}ee.prototype.resize=function(i,n,r){r=r||1;var i=i*r,n=n*r,a=this._sourceTexture,o=this._depthTexture;a.width=i,a.height=n,o.width=i,o.height=n;var s={getWidth:function(){return i},getHeight:function(){return n},getDevicePixelRatio:function(){return r}};function l(u,f){if(typeof u[f]=="function"){var h=u[f].__original||u[f];u[f]=function(c){return h.call(this,s)},u[f].__original=h}}this._compositor.nodes.forEach(function(u){for(var f in u.outputs){var h=u.outputs[f].parameters;h&&(l(h,"width"),l(h,"height"))}for(var c in u.parameters)l(u.parameters,c)}),this._width=i,this._height=n,this._dpr=r};ee.prototype.getWidth=function(){return this._width};ee.prototype.getHeight=function(){return this._height};ee.prototype._ifRenderNormalPass=function(){return this._enableSSAO||this._enableEdge||this._enableSSR};ee.prototype._getPrevNode=function(t){for(var e=md.indexOf(t.name)-1,r=this._finalNodesChain[e];r&&!this._compositor.getNodeByName(r.name);)e-=1,r=this._finalNodesChain[e];return r};ee.prototype._getNextNode=function(t){for(var e=md.indexOf(t.name)+1,r=this._finalNodesChain[e];r&&!this._compositor.getNodeByName(r.name);)e+=1,r=this._finalNodesChain[e];return r};ee.prototype._addChainNode=function(t){var e=this._getPrevNode(t),r=this._getNextNode(t);e&&(t.inputs.texture=e.name,r?(t.outputs=GL(this.getWidth.bind(this),this.getHeight.bind(this)),r.inputs.texture=t.name):t.outputs=null,this._compositor.addNode(t))};ee.prototype._removeChainNode=function(t){var e=this._getPrevNode(t),r=this._getNextNode(t);e&&(r?(e.outputs=GL(this.getWidth.bind(this),this.getHeight.bind(this)),r.inputs.texture=e.name):e.outputs=null,this._compositor.removeNode(t))};ee.prototype.updateNormal=function(t,e,r,i){this._ifRenderNormalPass()&&this._normalPass.update(t,e,r)};ee.prototype.updateSSAO=function(t,e,r,i){this._ssaoPass.update(t,r,i)};ee.prototype.enableSSAO=function(){this._enableSSAO=!0};ee.prototype.disableSSAO=function(){this._enableSSAO=!1};ee.prototype.enableSSR=function(){this._enableSSR=!0};ee.prototype.disableSSR=function(){this._enableSSR=!1};ee.prototype.getSSAOTexture=function(){return this._ssaoPass.getTargetTexture()};ee.prototype.getSourceFrameBuffer=function(){return this._framebuffer};ee.prototype.getSourceTexture=function(){return this._sourceTexture};ee.prototype.disableFXAA=function(){this._removeChainNode(this._fxaaNode)};ee.prototype.enableFXAA=function(){this._addChainNode(this._fxaaNode)};ee.prototype.enableBloom=function(){this._compositeNode.inputs.bloom="bloom_composite",this._compositor.dirty()};ee.prototype.disableBloom=function(){this._compositeNode.inputs.bloom=null,this._compositor.dirty()};ee.prototype.enableDOF=function(){this._compositeNode.inputs.texture="dof_composite",this._compositor.dirty()};ee.prototype.disableDOF=function(){this._compositeNode.inputs.texture="source",this._compositor.dirty()};ee.prototype.enableColorCorrection=function(){this._compositeNode.define("COLOR_CORRECTION"),this._enableColorCorrection=!0};ee.prototype.disableColorCorrection=function(){this._compositeNode.undefine("COLOR_CORRECTION"),this._enableColorCorrection=!1};ee.prototype.enableEdge=function(){this._enableEdge=!0};ee.prototype.disableEdge=function(){this._enableEdge=!1};ee.prototype.setBloomIntensity=function(t){this._compositeNode.setParameter("bloomIntensity",t)};ee.prototype.setSSAOParameter=function(t,e){switch(t){case"quality":var r={low:6,medium:12,high:32,ultra:62}[e]||12;this._ssaoPass.setParameter("kernelSize",r);break;case"radius":this._ssaoPass.setParameter(t,e),this._ssaoPass.setParameter("bias",e/200);break;case"intensity":this._ssaoPass.setParameter(t,e);break}};ee.prototype.setDOFParameter=function(t,e){switch(t){case"focalDistance":case"focalRange":case"fstop":this._cocNode.setParameter(t,e);break;case"blurRadius":for(var r=0;r=this._haltonSequence.length},render:function(t,e,r){var i=this._blendPass;this._frame===0?(i.setUniform("weight1",0),i.setUniform("weight2",1)):(i.setUniform("weight1",.9),i.setUniform("weight2",.1)),i.setUniform("texture1",this._prevFrameTex),i.setUniform("texture2",e||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(t),i.render(t),this._blendFb.unbind(t),r||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(t));var n=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=n,this._frame++},dispose:function(t){this._sourceFb.dispose(t),this._blendFb.dispose(t),this._prevFrameTex.dispose(t),this._outputTex.dispose(t),this._sourceTex.dispose(t),this._outputPass.dispose(t),this._blendPass.dispose(t)}};function pe(t){t=t||"perspective",this.layer=null,this.scene=new ha,this.rootNode=this.scene,this.viewport={x:0,y:0,width:0,height:0},this.setProjection(t),this._compositor=new ee,this._temporalSS=new Gh,this._shadowMapPass=new yi;for(var e=[],r=0,i=0;i<30;i++){for(var n=[],a=0;a<6;a++)n.push(_4(r,2)*4-2),n.push(_4(r,3)*4-2),r++;e.push(n)}this._pcfKernels=e,this.scene.on("beforerender",function(o,s,l){this.needsTemporalSS()&&this._temporalSS.jitterProjection(o,l)},this)}pe.prototype.setProjection=function(t){var e=this.camera;e&&e.update(),t==="perspective"?this.camera instanceof nr||(this.camera=new nr,e&&this.camera.setLocalTransform(e.localTransform)):this.camera instanceof y4||(this.camera=new y4,e&&this.camera.setLocalTransform(e.localTransform)),this.camera.near=.1,this.camera.far=2e3};pe.prototype.setViewport=function(t,e,r,i,n){this.camera instanceof nr&&(this.camera.aspect=r/i),n=n||1,this.viewport.x=t,this.viewport.y=e,this.viewport.width=r,this.viewport.height=i,this.viewport.devicePixelRatio=n,this._compositor.resize(r*n,i*n),this._temporalSS.resize(r*n,i*n)};pe.prototype.containPoint=function(t,e){var r=this.viewport,i=this.layer.renderer.getHeight();return e=i-e,t>=r.x&&e>=r.y&&t<=r.x+r.width&&e<=r.y+r.height};var Ew=new Ot;pe.prototype.castRay=function(t,e,r){var i=this.layer.renderer,n=i.viewport;return i.viewport=this.viewport,i.screenToNDC(t,e,Ew),this.camera.castRay(Ew,r),i.viewport=n,r};pe.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var t=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var e=0;e30};pe.prototype._doRender=function(t,e,r){var i=this.scene,n=this.camera;r=r||0,this._updateTransparent(t,i,n,r),e||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(t,i,n,!0)),this._updateShadowPCFKernel(r);var a=t.clearColor;if(t.gl.clearColor(a[0],a[1],a[2],a[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,n),this._compositor.updateNormal(t,i,n,this._temporalSS.getFrame())),this._updateSSAO(t,i,n,this._temporalSS.getFrame()),this._enablePostEffect){var o=this._compositor.getSourceFrameBuffer();o.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),t.render(i,n,!0,!0),o.unbind(t),this.needsTemporalSS()&&e?(this._compositor.composite(t,i,n,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),this._compositor.composite(t,i,n,null,0))}else if(this.needsTemporalSS()&&e){var o=this._temporalSS.getSourceFrameBuffer();o.bind(t),t.saveClear(),t.clearBit=t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT,t.render(i,n,!0,!0),t.restoreClear(),o.unbind(t),t.setViewport(this.viewport),this._temporalSS.render(t)}else t.setViewport(this.viewport),t.render(i,n,!0,!0)};pe.prototype._updateTransparent=function(t,e,r,i){for(var n=new Q,a=new dt,o=r.getWorldPosition(),s=e.getRenderList(r).transparent,l=0;lthis.camera.far||t80*r){s=u=t[0],l=f=t[1];for(var d=r;du&&(u=h),c>f&&(f=c);v=Math.max(u-s,f-l)}return J7(a,o,r,s,l,v),o}function YL(t,e,r,i,n){var a,o;if(n===Uh(t,e,r,i)>0)for(a=e;a=e;a-=i)o=Mw(a,t[a],t[a+1],o);return o&&m2(o,o.next)&&(e3(o),o=o.next),o}function $7(t,e){if(!t)return t;e||(e=t);var r=t,i;do if(i=!1,!r.steiner&&(m2(r,r.next)||zr(r.prev,r,r.next)===0)){if(e3(r),r=e=r.prev,r===r.next)return null;i=!0}else r=r.next;while(i||r!==e);return e}function J7(t,e,r,i,n,a,o){if(t){!o&&a&&Ort(t,i,n,a);for(var s=t,l,u;t.prev!==t.next;){if(l=t.prev,u=t.next,a?Ert(t,i,n,a):Drt(t)){e.push(l.i/r),e.push(t.i/r),e.push(u.i/r),e3(t),t=u.next,s=u.next;continue}if(t=u,t===s){o?o===1?(t=Mrt(t,e,r),J7(t,e,r,i,n,a,2)):o===2&&Lrt(t,e,r,i,n,a):J7($7(t),e,r,i,n,a,1);break}}}}function Drt(t){var e=t.prev,r=t,i=t.next;if(zr(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(T0(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&zr(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function Ert(t,e,r,i){var n=t.prev,a=t,o=t.next;if(zr(n,a,o)>=0)return!1;for(var s=n.xa.x?n.x>o.x?n.x:o.x:a.x>o.x?a.x:o.x,f=n.y>a.y?n.y>o.y?n.y:o.y:a.y>o.y?a.y:o.y,h=Vh(s,l,e,r,i),c=Vh(u,f,e,r,i),v=t.nextZ;v&&v.z<=c;){if(v!==t.prev&&v!==t.next&&T0(n.x,n.y,a.x,a.y,o.x,o.y,v.x,v.y)&&zr(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(v=t.prevZ;v&&v.z>=h;){if(v!==t.prev&&v!==t.next&&T0(n.x,n.y,a.x,a.y,o.x,o.y,v.x,v.y)&&zr(v.prev,v,v.next)>=0)return!1;v=v.prevZ}return!0}function Mrt(t,e,r){var i=t;do{var n=i.prev,a=i.next.next;!m2(n,a)&&ZL(n,i,i.next,a)&&t3(n,a)&&t3(a,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(a.i/r),e3(i),e3(i.next),i=t=a),i=i.next}while(i!==t);return i}function Lrt(t,e,r,i,n,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Frt(o,s)){var l=QL(o,s);o=$7(o,o.next),l=$7(l,l.next),J7(o,e,r,i,n,a),J7(l,e,r,i,n,a);return}s=s.next}o=o.next}while(o!==t)}function Irt(t,e,r,i){var n=[],a,o,s,l,u;for(a=0,o=e.length;a=r.next.y&&r.next.y!==r.y){var s=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(n===r.y)return r;if(n===r.next.y)return r.next}o=r.x=r.x&&r.x>=u&&i!==r.x&&T0(no.x)&&t3(r,t)&&(o=r,h=c)),r=r.next;return o}function Ort(t,e,r,i){var n=t;do n.z===null&&(n.z=Vh(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,Brt(n)}function Brt(t){var e,r,i,n,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,i=r,s=0,e=0;e0||l>0&&i;)s!==0&&(l===0||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),a?a.nextZ=n:t=n,n.prevZ=a,a=n;r=i}a.nextZ=null,u*=2}while(o>1);return t}function Vh(t,e,r,i,n){return t=32767*(t-r)/n,e=32767*(e-i)/n,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function krt(t){var e=t,r=t;do e.x=0&&(t-o)*(i-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(n-o)*(i-s)>=0}function Frt(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!zrt(t,e)&&t3(t,e)&&t3(e,t)&&Grt(t,e)}function zr(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function m2(t,e){return t.x===e.x&&t.y===e.y}function ZL(t,e,r,i){return m2(t,e)&&m2(r,i)||m2(t,i)&&m2(r,e)?!0:zr(t,e,r)>0!=zr(t,e,i)>0&&zr(r,i,t)>0!=zr(r,i,e)>0}function zrt(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&ZL(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function t3(t,e){return zr(t.prev,t,t.next)<0?zr(t,e,t.next)>=0&&zr(t,t.prev,e)>=0:zr(t,e,t.prev)<0||zr(t,t.next,e)<0}function Grt(t,e){var r=t,i=!1,n=(t.x+e.x)/2,a=(t.y+e.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==t);return i}function QL(t,e){var r=new Hh(t.i,t.x,t.y),i=new Hh(e.i,e.x,e.y),n=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function Mw(t,e,r,i){var n=new Hh(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function e3(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Hh(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}XL.deviation=function(t,e,r,i){var n=e&&e.length,a=n?e[0]*r:t.length,o=Math.abs(Uh(t,0,a,r));if(n)for(var s=0,l=e.length;sl&&s.push({pivot:Math.floor((u+l)/2),left:l,right:u});var l=a[o].pivot+1,u=a[o].right;u>l&&s.push({pivot:Math.floor((u+l)/2),left:l,right:u})}a=this._parts=s}else for(var o=0;o=2e4},doSortTriangles:function(t,e){var r=this.indices;if(e===0){var i=this.attributes.position,t=t.array;(!this._triangleZList||this._triangleZList.length!==this.triangleCount)&&(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new r.constructor(r.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var n=0,a,o=0;o0,r={},i=0;i65535?new Uint32Array(o*3):new Uint16Array(o*3),c.material.shader!==e&&c.material.attachShader(e,!0),N.setMaterialFromModel(e.__shading,c.material,t,r),s>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(s),this._linesMesh.geometry.setTriangleCount(l)),this._dataIndexOfVertex=new Uint32Array(a),this._vertexRangeOfDataIndex=new Uint32Array((n-i)*2)},_updateRegionMesh:function(t,e,r,i){for(var n=t.getData(),a=0,o=0,s=!1,S=this._polygonMesh,l=this._linesMesh,u=r;u0;w&&(x*=e.getDevicePixelRatio(),this._updateLinesGeometry(l.geometry,t,u,m,x,t.coordinateSystem.transform)),l.invisible=!w,l.material.set({color:p})}var S=this._polygonMesh;S.material.transparent=s,S.material.depthMask=!s,S.geometry.updateBoundingBox(),S.frontFace=this.extrudeY?N.Mesh.CCW:N.Mesh.CW,S.material.get("normalMap")&&S.geometry.generateTangents(),S.seriesIndex=t.seriesIndex,S.on("mousemove",this._onmousemove,this),S.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(t){var e=t.getModel("debug.wireframe");if(e.get("show")){var r=N.parseColor(e.get("lineStyle.color")||"rgba(0,0,0,0.5)"),i=Zt.firstNotNull(e.get("lineStyle.width"),1),n=this._polygonMesh;n.geometry.generateBarycentric(),n.material.define("both","WIREFRAME_TRIANGLE"),n.material.set("wireframeLineColor",r),n.material.set("wireframeLineWidth",i)}},_onmousemove:function(t){var e=this._dataIndexOfVertex[t.triangle[0]];e==null&&(e=-1),e!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(e),this._labelsBuilder.updateLabels([e])),this._lastHoverDataIndex=e,this._polygonMesh.dataIndex=e},_onmouseout:function(t){t.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(t,e,r){var i=t.getModel("groundPlane",t);if(this._groundMesh.invisible=!i.get("show",!0),!this._groundMesh.invisible){var n=t.get("shading"),a=this._groundMaterials[n];a||(a=this._groundMaterials.lambert),N.setMaterialFromModel(n,a,i,r),a.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=a,this._groundMesh.material.set("color",N.parseColor(i.get("color"))),this._groundMesh.scale.set(e.size[0],e.size[2],1)}},_triangulation:function(t,e,r){this._triangulationResults=[];for(var i=[1/0,1/0,1/0],n=[-1/0,-1/0,-1/0],a=t.coordinateSystem,o=e;o1?i:0,P[V][g]=C.points[Y+2],l.set(n+V,P[V]),s?(z[0]=(C.points[Y]*m[0]-y[0])/x,z[1]=(C.points[Y+2]*m[g]-y[g])/x):(z[0]=(K?G:G+W)/x,z[1]=(P[V][p]*m[p]-y[p])/x),f.set(n+V,z)}t1.sub(R,P[1],P[0]),t1.sub(B,P[3],P[0]),t1.cross(O,R,B),t1.normalize(O,O);for(var V=0;V<4;V++)u.set(n+V,O),v&&h.set(n+V,o);for(var V=0;V<6;V++)d[a*3+V]=I[V]+n;n+=4,a+=2,G+=W}}return e.dirty(),{vertexOffset:n,triangleOffset:a}},_getRegionLinesInfo:function(t,e,r){var i=0,n=0,a=e.getRegionModel(t),o=a.getModel("itemStyle"),s=o.get("borderWidth");if(s>0){var l=e.getRegionPolygonCoords(t);l.forEach(function(u){var f=u.exterior,h=u.interiors;i+=r.getPolylineVertexCount(f),n+=r.getPolylineTriangleCount(f);for(var c=0;cthis._endIndex)){e-=this._startIndex;for(var i=this._vertexRangeOfDataIndex[e*2];i0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var t=this.getDisplacementTexture(),e=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==t||this._displacementScale!==e,this._displacementTexture=t,this._displacementScale=e},isDisplacementChanged:function(){return this._displacementChanged}});mt(F2.prototype,E5);mt(F2.prototype,Y4);mt(F2.prototype,Z4);mt(F2.prototype,j4);var JL=Math.PI,O1=Math.sin,rn=Math.cos,tI=Math.tan,eI=Math.asin,rI=Math.atan2,z2=JL/180,qrt=1e3*60*60*24,Krt=2440588,$rt=2451545;function Jrt(t){return t.valueOf()/qrt-.5+Krt}function t1t(t){return Jrt(t)-$rt}var D0=z2*23.4397;function e1t(t,e){return rI(O1(t)*rn(D0)-tI(e)*O1(D0),rn(t))}function r1t(t,e){return eI(O1(e)*rn(D0)+rn(e)*O1(D0)*O1(t))}function i1t(t,e,r){return rI(O1(t),rn(t)*O1(e)-tI(r)*rn(e))}function n1t(t,e,r){return eI(O1(e)*O1(r)+rn(e)*rn(r)*rn(t))}function a1t(t,e){return z2*(280.16+360.9856235*t)-e}function o1t(t){return z2*(357.5291+.98560028*t)}function s1t(t){var e=z2*(1.9148*O1(t)+.02*O1(2*t)+3e-4*O1(3*t)),r=z2*102.9372;return t+e+r+JL}function l1t(t){var e=o1t(t),r=s1t(e);return{dec:r1t(r,0),ra:e1t(r,0)}}var iI={};iI.getPosition=function(t,e,r){var i=z2*-r,n=z2*e,a=t1t(t),o=l1t(a),s=a1t(a,i)-o.ra;return{azimuth:i1t(s,n,o.dec),altitude:n1t(s,n,o.dec)}};const u1t="@export ecgl.atmosphere.vertex\nattribute vec3 position: POSITION;\nattribute vec3 normal : NORMAL;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 normalMatrix : WORLDINVERSETRANSPOSE;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n v_Normal = normalize((normalMatrix * vec4(normal, 0.0)).xyz);\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end\n\n\n@export ecgl.atmosphere.fragment\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform float glowPower;\nuniform vec3 glowColor;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n float intensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor = vec4(glowColor, intensity * intensity);\n}\n@end";N.Shader.import(wL);N.Shader.import(u1t);const f1t=ge.extend({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(t,e){this.groupGL=new N.Node,this._sphereGeometry=new N.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new N.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new N.PlaneGeometry,this._earthMesh=new N.Mesh({renderNormal:!0}),this._atmosphereMesh=new N.Mesh,this._atmosphereGeometry=new N.SphereGeometry({widthSegments:80,heightSegments:40}),this._atmosphereMaterial=new N.Material({shader:new N.Shader(N.Shader.source("ecgl.atmosphere.vertex"),N.Shader.source("ecgl.atmosphere.fragment")),transparent:!0}),this._atmosphereMesh.geometry=this._atmosphereGeometry,this._atmosphereMesh.material=this._atmosphereMaterial,this._atmosphereMesh.frontFace=N.Mesh.CW,this._lightRoot=new N.Node,this._sceneHelper=new la,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._atmosphereMesh),this.groupGL.add(this._earthMesh),this._control=new T3({zr:e.getZr()}),this._control.init(),this._layerMeshes={}},render:function(t,e,r){var i=t.coordinateSystem,n=t.get("shading");i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL),this._sceneHelper.setScene(i.viewGL.scene),i.viewGL.setPostEffect(t.getModel("postEffect"),r),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling"));var a=this._earthMesh;a.geometry=this._sphereGeometry;var o="ecgl."+n;(!a.material||a.material.shader.name!==o)&&(a.material=N.createMaterial(o)),N.setMaterialFromModel(n,a.material,t,r),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach(function(h){var c=a.material.get(h);c&&(c.flipY=!1)}),a.material.set("color",N.parseColor(t.get("baseColor")));var s=i.radius*.99;if(a.scale.set(s,s,s),t.get("atmosphere.show")){a.material.define("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!1,this._atmosphereMaterial.setUniforms({glowPower:t.get("atmosphere.glowPower")||6,glowColor:t.get("atmosphere.color")||"#ffffff"}),a.material.setUniforms({glowPower:t.get("atmosphere.innerGlowPower")||2,glowColor:t.get("atmosphere.color")||"#ffffff"});var l=t.get("atmosphere.offset")||5;this._atmosphereMesh.scale.set(s+l,s+l,s+l)}else a.material.undefine("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!0;var u=a.material.setTextureImage("diffuseMap",t.get("baseTexture"),r,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(a);var f=a.material.setTextureImage("bumpMap",t.get("heightTexture"),r,{flipY:!1,anisotropic:8});f&&f.surface&&f.surface.attachToMesh(a),a.material[t.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(t,r),this._displaceVertices(t,r),this._updateViewControl(t,r),this._updateLayers(t,r)},afterRender:function(t,e,r,i){var n=i.renderer;this._sceneHelper.updateAmbientCubemap(n,t,r),this._sceneHelper.updateSkybox(n,t,r)},_updateLayers:function(t,e){var r=t.coordinateSystem,i=t.get("layers"),n=r.radius,a=[],o=[],s=[],l=[];E(i,function(v){var d=new Jt(v),p=d.get("type"),g=N.loadTexture(d.get("texture"),e,{flipY:!1,anisotropic:8});if(g.surface&&g.surface.attachToMesh(this._earthMesh),p==="blend"){var m=d.get("blendTo"),y=Zt.firstNotNull(d.get("intensity"),1);m==="emission"?(s.push(g),l.push(y)):(a.push(g),o.push(y))}else{var _=d.get("id"),x=this._layerMeshes[_];x||(x=this._layerMeshes[_]=new N.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0}));var w=d.get("shading");w==="lambert"?(x.material=x.__lambertMaterial||new N.Material({autoUpdateTextureStatus:!1,shader:N.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),x.__lambertMaterial=x.material):(x.material=x.__colorMaterial||new N.Material({autoUpdateTextureStatus:!1,shader:N.createShader("ecgl.color"),transparent:!0,depthMask:!1}),x.__colorMaterial=x.material),x.material.enableTexture("diffuseMap");var S=d.get("distance"),b=n+(S==null?r.radius/100:S);x.scale.set(b,b,b),n=b;var T=this._blankTexture||(this._blankTexture=N.createBlankTexture("rgba(255, 255, 255, 0)"));x.material.set("diffuseMap",T),N.loadTexture(d.get("texture"),e,{flipY:!1,anisotropic:8},function(A){A.surface&&A.surface.attachToMesh(x),x.material.set("diffuseMap",A),e.getZr().refresh()}),d.get("show")?this.groupGL.add(x):this.groupGL.remove(x)}},this);var u=this._earthMesh.material;u.define("fragment","LAYER_DIFFUSEMAP_COUNT",a.length),u.define("fragment","LAYER_EMISSIVEMAP_COUNT",s.length),u.set("layerDiffuseMap",a),u.set("layerDiffuseIntensity",o),u.set("layerEmissiveMap",s),u.set("layerEmissionIntensity",l);var f=t.getModel("debug.wireframe");if(f.get("show")){u.define("both","WIREFRAME_TRIANGLE");var h=N.parseColor(f.get("lineStyle.color")||"rgba(0,0,0,0.5)"),c=Zt.firstNotNull(f.get("lineStyle.width"),1);u.set("wireframeLineWidth",c),u.set("wireframeLineColor",h)}else u.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(t,e){var r=t.coordinateSystem,i=t.getModel("viewControl");r.viewGL.camera;var n=this;function a(){return{type:"globeChangeCamera",alpha:o.getAlpha(),beta:o.getBeta(),distance:o.getDistance()-r.radius,center:o.getCenter(),from:n.uid,globeId:t.id}}var o=this._control;o.setViewGL(r.viewGL);var s=i.get("targetCoord"),l,u;s!=null&&(u=s[0]+90,l=s[1]),o.setFromViewControlModel(i,{baseDistance:r.radius,alpha:l,beta:u}),o.off("update"),o.on("update",function(){e.dispatchAction(a())})},_displaceVertices:function(t,e){var r=t.get("displacementQuality"),i=t.get("debug.wireframe.show"),n=t.coordinateSystem;if(!(!t.isDisplacementChanged()&&r===this._displacementQuality&&i===this._showDebugWireframe)){this._displacementQuality=r,this._showDebugWireframe=i;var a=this._sphereGeometry,o={low:100,medium:200,high:400,ultra:800}[r]||200,s=o/2;(a.widthSegments!==o||i)&&(a.widthSegments=o,a.heightSegments=s,a.build()),this._doDisplaceVertices(a,n),i&&a.generateBarycentric()}},_doDisplaceVertices:function(t,e){var r=t.attributes.position.value,i=t.attributes.texcoord0.value,n=t.__originalPosition;(!n||n.length!==r.length)&&(n=new Float32Array(r.length),n.set(r),t.__originalPosition=n);for(var a=e.displacementWidth,o=e.displacementHeight,s=e.displacementData,l=0;l50&&(o=1e3);var s=[];Pn.perspective(s,N8,this.width/this.height,1,o),this.viewGL.camera.projectionMatrix.setArray(s),this.viewGL.camera.decomposeProjectionMatrix();var s=Pn.identity([]),l=this.dataToPoint(this.center);Pn.scale(s,s,[1,-1,1]),Pn.translate(s,s,[0,0,-t]),Pn.rotateX(s,s,e),Pn.rotateZ(s,s,-this.bearing/180*Math.PI),Pn.translate(s,s,[-l[0]*this.getScale()*Io,-l[1]*this.getScale()*Io,0]),this.viewGL.camera.viewMatrix.array=s;var u=[];Pn.invert(u,s),this.viewGL.camera.worldTransform.array=u,this.viewGL.camera.decomposeWorldTransform();var f=O6*this.getScale(),h;if(this.altitudeExtent&&!isNaN(this.boxHeight)){var c=this.altitudeExtent[1]-this.altitudeExtent[0];h=this.boxHeight/c*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else h=f/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*Io;this.viewGL.rootNode.scale.set(this.getScale()*Io,this.getScale()*Io,h)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(t,e){return this.projectOnTileWithScale(t,this.getScale()*O6,e)},projectOnTileWithScale:function(t,e,r){var i=t[0],n=t[1],a=i*e1/180,o=n*e1/180,s=e*(a+e1)/(2*e1),l=e*(e1-Math.log(Math.tan(e1/4+o*.5)))/(2*e1);return r=r||[],r[0]=s,r[1]=l,r},unprojectFromTile:function(t,e){return this.unprojectOnTileWithScale(t,this.getScale()*O6,e)},unprojectOnTileWithScale:function(t,e,r){var i=t[0],n=t[1],a=i/e*(2*e1)-e1,o=2*(Math.atan(Math.exp(e1-n/e*(2*e1)))-e1/4);return r=r||[],r[0]=a*180/e1,r[1]=o*180/e1,r},dataToPoint:function(t,e){return e=this.projectOnTileWithScale(t,O6,e),e[0]-=this._origin[0],e[1]-=this._origin[1],e[2]=isNaN(t[2])?0:t[2],isNaN(t[2])||(e[2]=t[2],this.altitudeExtent&&(e[2]-=this.altitudeExtent[0])),e}};function r3(){w4.apply(this,arguments)}r3.prototype=new w4;r3.prototype.constructor=r3;r3.prototype.type="mapbox3D";function oI(t,e,r){function i(a,o){var s=o.getWidth(),l=o.getHeight(),u=o.getDevicePixelRatio();this.viewGL.setViewport(0,0,s,l,u),this.width=s,this.height=l,this.altitudeScale=a.get("altitudeScale"),this.boxHeight=a.get("boxHeight")}function n(a,o){if(this.model.get("boxHeight")!=="auto"){var s=[1/0,-1/0];a.eachSeries(function(l){if(l.coordinateSystem===this){var u=l.getData(),f=l.coordDimToDataDim("alt")[0];if(f){var h=u.getDataExtent(f,!0);s[0]=Math.min(s[0],h[0]),s[1]=Math.max(s[1],h[1])}}},this),s&&isFinite(s[1]-s[0])&&(this.altitudeExtent=s)}}return{dimensions:e.prototype.dimensions,create:function(a,o){var s=[];return a.eachComponent(t,function(l){var u=l.__viewGL;u||(u=l.__viewGL=new pe,u.setRootNode(new N.Node));var f=new e;f.viewGL=l.__viewGL,f.resize=i,f.resize(l,o),s.push(f),l.coordinateSystem=f,f.model=l,f.update=n}),a.eachSeries(function(l){if(l.get("coordinateSystem")===t){var u=l.getReferringComponents(t).models[0];if(u||(u=a.getComponent(t)),!u)throw new Error(t+' "'+Zt.firstNotNull(l.get(t+"Index"),l.get(t+"Id"),0)+'" not found');l.coordinateSystem=u.coordinateSystem}}),r&&r(s,a,o),s}}}var y1t=oI("mapbox3D",r3,function(t){t.forEach(function(e){e.setCameraOption(e.model.getMapboxCameraOption())})});function _1t(t){t.registerComponentModel(Sd),t.registerComponentView(m1t),t.registerCoordinateSystem("mapbox3D",y1t),t.registerAction({type:"mapbox3DChangeCamera",event:"mapbox3dcamerachanged",update:"mapbox3D:updateCamera"},function(e,r){r.eachComponent({mainType:"mapbox3D",query:e},function(i){i.setMapboxCameraOption(e)})})}Ct(_1t);var Bw=["zoom","center","pitch","bearing"],wd=Bt.extend({type:"maptalks3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,urlTemplate:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",attribution:'© OpenStreetMap contributors, © CARTO',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var t=this;return Bw.reduce(function(e,r){return e[r]=t.get(r),e},{})},setMaptalksCameraOption:function(t){t!=null&&Bw.forEach(function(e){t[e]!=null&&(this.option[e]=t[e])},this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(t){this._maptalks=t}});mt(wd.prototype,Y4);mt(wd.prototype,Z4);function da(t,e,r,i){if(this.id=t,this.zr=e,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:r,zoom:i,doubleClickZoom:!1,fog:!1}),this._initEvents()}da.prototype.setUnpainted=function(){};da.prototype.resize=function(){this._maptalks.checkSize()};da.prototype.getMaptalks=function(){return this._maptalks};da.prototype.clear=function(){};da.prototype.refresh=function(){this._maptalks.checkSize()};var sI=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];da.prototype._initEvents=function(){var t=this.dom;this._handlers=this._handlers||{contextmenu:function(e){return e.preventDefault(),!1}},sI.forEach(function(e){this._handlers[e]=function(r){var i={};for(var n in r)i[n]=r[n];i.bubbles=!1;var a=new r.constructor(r.type,i);e==="mousewheel"||e==="DOMMouseScroll"?t.dispatchEvent(a):t.firstElementChild.dispatchEvent(a)},this.zr.dom.addEventListener(e,this._handlers[e])},this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)};da.prototype.dispose=function(){sI.forEach(function(t){this.zr.dom.removeEventListener(t,this._handlers[t])},this),this._maptalks.remove()};N.Shader.import(aI);const x1t=ge.extend({type:"maptalks3D",__ecgl__:!0,init:function(t,e){this._groundMesh=new N.Mesh({geometry:new N.PlaneGeometry,material:new N.Material({shader:new N.Shader({vertex:N.Shader.source("ecgl.displayShadow.vertex"),fragment:N.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(t,e){var r=e.getZr();this._zrLayer=new da("maptalks3D",r,t.get("center"),t.get("zoom")),r.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new N.Node,this._sceneHelper=new la(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var i=this._zrLayer.getMaptalks(),n=this._dispatchInteractAction.bind(this,e,i);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend","animating"].forEach(function(a){i.on(a,n)})},render:function(t,e,r){this._zrLayer||this._initMaptalksLayer(t,r);var i=this._zrLayer.getMaptalks(),n=t.get("urlTemplate"),a=i.getBaseLayer();n!==this._oldUrlTemplate&&(a?a.setOptions({urlTemplate:n,attribution:t.get("attribution")}):(a=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:n,subdomains:["a","b","c"],attribution:t.get("attribution")}),i.setBaseLayer(a))),this._oldUrlTemplate=n,i.setCenter(t.get("center")),i.setZoom(t.get("zoom"),{animation:!1}),i.setPitch(t.get("pitch")),i.setBearing(t.get("bearing")),t.setMaptalks(i);var o=t.coordinateSystem;o.viewGL.scene.add(this._lightRoot),o.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(o.viewGL.scene),this._sceneHelper.updateLight(t),o.viewGL.setPostEffect(t.getModel("postEffect"),r),o.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._maptalks3DModel=t},afterRender:function(t,e,r,i){var n=i.renderer;this._sceneHelper.updateAmbientCubemap(n,t,r),this._sceneHelper.updateSkybox(n,t,r),t.coordinateSystem.viewGL.scene.traverse(function(a){a.material&&(a.material.define("fragment","NORMAL_UP_AXIS",2),a.material.define("fragment","NORMAL_FRONT_AXIS",1))})},updateCamera:function(t,e,r,i){t.coordinateSystem.setCameraOption(i),this._updateGroundMesh(),r.getZr().refresh()},_dispatchInteractAction:function(t,e,r){t.dispatchAction({type:"maptalks3DChangeCamera",pitch:e.getPitch(),zoom:w1t(e.getResolution())+1,center:e.getCenter().toArray(),bearing:e.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var t=this._maptalks3DModel.coordinateSystem,e=t.dataToPoint(t.center);this._groundMesh.position.set(e[0],e[1],-.001);var r=new N.Plane(new N.Vector3(0,0,1),0),i=t.viewGL.camera.castRay(new N.Vector2(-1,-1)),n=t.viewGL.camera.castRay(new N.Vector2(1,1)),a=i.intersectPlane(r),o=n.intersectPlane(r),s=a.dist(o)/t.viewGL.rootNode.scale.x;this._groundMesh.scale.set(s,s,1)}},dispose:function(t,e){this._zrLayer&&this._zrLayer.dispose(),e.getZr().painter.delLayer(-1e3)}}),S1t=2*6378137*Math.PI/(256*Math.pow(2,20));function w1t(t){return 19-Math.log(t/S1t)/Math.LN2}function i3(){w4.apply(this,arguments),this.maxPitch=85,this.zoomOffset=1}i3.prototype=new w4;i3.prototype.constructor=i3;i3.prototype.type="maptalks3D";var b1t=oI("maptalks3D",i3,function(t){t.forEach(function(e){e.setCameraOption(e.model.getMaptalksCameraOption())})});function T1t(t){t.registerComponentModel(wd),t.registerComponentView(x1t),t.registerCoordinateSystem("maptalks3D",b1t),t.registerAction({type:"maptalks3DChangeCamera",event:"maptalks3dcamerachanged",update:"maptalks3D:updateCamera"},function(e,r){r.eachComponent({mainType:"maptalks3D",query:e},function(i){i.setMaptalksCameraOption(e)})})}Ct(T1t);var A1t=Ye.vec3,C1t=rv.isDimensionStacked;function D1t(t){var e=t[0],r=t[1];return!(e>0&&r>0||e<0&&r<0)}function E1t(t,e){var r=t.getData(),i=t.get("barSize");if(i==null){var n=e.size,a,o,s=e.getAxis("x"),l=e.getAxis("y");s.type==="category"?a=s.getBandWidth()*.7:a=Math.round(n[0]/Math.sqrt(r.count()))*.6,l.type==="category"?o=l.getBandWidth()*.7:o=Math.round(n[1]/Math.sqrt(r.count()))*.6,i=[a,o]}else X(i)||(i=[i,i]);var u=e.getAxis("z").scale.getExtent(),f=D1t(u),h=["x","y","z"].map(function(d){return t.coordDimToDataDim(d)[0]}),c=C1t(r,h[2]),v=c?r.getCalculationInfo("stackResultDimension"):h[2];r.each(h,function(d,p,g,m){var y=r.get(v,m),_=c?y-g:f?0:u[0],x=e.dataToPoint([d,p,_]),w=e.dataToPoint([d,p,y]),S=A1t.dist(x,w),b=[0,w[1]"+c.join("
")}var n=t.getData(),a=t.getRawValue(e),o=X(a)?i(a):Je(F9(a)),s=n.getName(e),l=hr(n,e);Tt(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var u=fA(l),f=t.name;return f==="\0-"&&(f=""),f=f?Je(f)+(r?": ":"
"):"",r?u+f+o:f+u+(s?Je(s)+": "+o:o)}function P5(t,e,r){r=r||t.getSource();var i=e||bC(t.get("coordinateSystem"))||["x","y","z"],n=V4(r,{dimensionsDefine:r.dimensionsDefine||t.get("dimensions"),encodeDefine:r.encodeDefine||t.get("encode"),coordDimensions:i.map(function(s){var l=t.getReferringComponents(s+"Axis3D").models[0];return{type:l&&l.get("type")==="category"?"ordinal":"float",name:s}})});t.get("coordinateSystem")==="cartesian3D"&&n.forEach(function(s){if(i.indexOf(s.coordDim)>=0){var l=t.getReferringComponents(s.coordDim+"Axis3D").models[0];l&&l.get("type")==="category"&&(s.ordinalMeta=l.getOrdinalMeta())}});var a=rv.enableDataStack(t,n,{byIndex:!0,stackedCoordDimension:"z"}),o=new Le(n,t);return o.setCalculationInfo(a),o.initData(r),o}var lI=Kt.extend({type:"series.bar3D",dependencies:["globe"],visualStyleAccessPathvisu:"itemStyle",getInitialData:function(t,e){return P5(this)},getFormattedLabel:function(t,e,r,i){var n=pa.getFormattedLabel(this,t,e,r,i);return n==null&&(n=this.getData().get("z",t)),n},formatTooltip:function(t){return D3(this,t)},defaultOption:{coordinateSystem:"cartesian3D",globeIndex:0,grid3DIndex:0,zlevel:-10,bevelSize:0,bevelSmoothness:2,onGridPlane:"xy",shading:"color",minHeight:0,itemStyle:{opacity:1},label:{show:!1,distance:2,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},emphasis:{label:{show:!0}},animationDurationUpdate:500}});mt(lI.prototype,j4);var Be=Ye.vec3,O1t=Ye.mat3,Ad=qt.extend(function(){return{attributes:{position:new qt.Attribute("position","float",3,"POSITION"),normal:new qt.Attribute("normal","float",3,"NORMAL"),color:new qt.Attribute("color","float",4,"COLOR"),prevPosition:new qt.Attribute("prevPosition","float",3),prevNormal:new qt.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}},{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(t){var e=this.enableNormal,r=this.getBarVertexCount()*t,i=this.getBarTriangleCount()*t;this.vertexCount!==r&&(this.attributes.position.init(r),e?this.attributes.normal.init(r):this.attributes.normal.value=null,this.attributes.color.init(r)),this.triangleCount!==i&&(this.indices=r>65535?new Uint32Array(i*3):new Uint16Array(i*3),this._dataIndices=new Uint32Array(r))},getBarVertexCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarVertexCount(t):this.enableNormal?24:8},getBarTriangleCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarTriangleCount(t):12},_getBevelBarVertexCount:function(t){return(t+1)*4*(t+1)*2},_getBevelBarTriangleCount:function(t){var e=t*4+3,r=t*2+1;return(e+1)*r*2+4},setColor:function(t,e){for(var r=this.getBarVertexCount(),i=r*t,n=r*(t+1),a=i;a0&&this.bevelSegments>0)this._addBevelBar(_,x,w,S,this.bevelSize,this.bevelSegments,b);else{Be.copy(n,x),Be.normalize(n,n),Be.cross(a,w,n),Be.normalize(a,a),Be.cross(i,n,a),Be.normalize(a,a),Be.negate(o,i),Be.negate(s,n),Be.negate(l,a),e(u[0],_,i,S[0]/2),e(u[0],u[0],a,S[2]/2),e(u[1],_,i,S[0]/2),e(u[1],u[1],l,S[2]/2),e(u[2],_,o,S[0]/2),e(u[2],u[2],l,S[2]/2),e(u[3],_,o,S[0]/2),e(u[3],u[3],a,S[2]/2),e(r,_,n,S[1]),e(u[4],r,i,S[0]/2),e(u[4],u[4],a,S[2]/2),e(u[5],r,i,S[0]/2),e(u[5],u[5],l,S[2]/2),e(u[6],r,o,S[0]/2),e(u[6],u[6],l,S[2]/2),e(u[7],r,o,S[0]/2),e(u[7],u[7],a,S[2]/2);var D=this.attributes;if(this.enableNormal){f[0]=i,f[1]=o,f[2]=n,f[3]=s,f[4]=a,f[5]=l;for(var C=this._vertexOffset,M=0;M0&&(g++,f[3]<.99&&(v=!0))}}),o.geometry.setBarCount(g);var d=r.getLayout("orient"),p=this._barIndexOfData=new Int32Array(r.count()),g=0;r.each(function(y){if(!r.hasValue(y)){p[y]=-1;return}var _=r.getItemLayout(y),x=_[0],w=_[1],S=_[2],b=y*4;f[0]=h[b++],f[1]=h[b++],f[2]=h[b++],f[3]=h[b++],f[3]>0&&(a._barMesh.geometry.addBar(x,w,d,S,f,y),p[y]=g++)}),o.geometry.dirty(),o.geometry.updateBoundingBox();var m=o.material;m.transparent=v,m.depthMask=!v,o.geometry.sortTriangles=v,this._initHandler(t,e)},_initHandler:function(t,e){var r=t.getData(),i=this._barMesh,n=t.coordinateSystem.type==="cartesian3D";i.seriesIndex=t.seriesIndex;var a=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",function(o){var s=i.geometry.getDataIndexOfVertex(o.triangle[0]);s!==a&&(this._downplay(a),this._highlight(s),this._labelsBuilder.updateLabels([s]),n&&e.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get("x",s),r.get("y",s),r.get("z",s,!0)]})),a=s,i.dataIndex=s},this),i.on("mouseout",function(o){this._downplay(a),this._labelsBuilder.updateLabels(),a=-1,i.dataIndex=-1,n&&e.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_highlight:function(t){var e=this._data;if(e){var r=this._barIndexOfData[t];if(!(r<0)){var i=e.getItemModel(t),n=i.getModel("emphasis.itemStyle"),a=n.get("color"),o=n.get("opacity");if(a==null){var s=hr(e,t);a=i4(s,-.4)}o==null&&(o=lr(e,t));var l=N.parseColor(a);l[3]*=o,this._barMesh.geometry.setColor(r,l),this._api.getZr().refresh()}}},_downplay:function(t){var e=this._data;if(e){var r=this._barIndexOfData[t];if(!(r<0)){var i=hr(e,t),n=lr(e,t),a=N.parseColor(i);a[3]*=n,this._barMesh.geometry.setColor(r,a),this._api.getZr().refresh()}}},highlight:function(t,e,r,i){this._toggleStatus("highlight",t,e,r,i)},downplay:function(t,e,r,i){this._toggleStatus("downplay",t,e,r,i)},_toggleStatus:function(t,e,r,i,n){var a=e.getData(),o=Zt.queryDataIndex(a,n),s=this;o!=null?E(pa.normalizeToArray(o),function(l){t==="highlight"?this._highlight(l):this._downplay(l)},this):a.each(function(l){t==="highlight"?s._highlight(l):s._downplay(l)})},remove:function(){this.groupGL.removeAll()},dispose:function(){this._labelsBuilder.dispose(),this.groupGL.removeAll()}});function F1t(t){t.registerChartView(k1t),t.registerSeriesModel(lI),R1t(t),t.registerProcessor(function(e,r){e.eachSeriesByType("bar3d",function(i){var n=i.getData();n.filterSelf(function(a){return n.hasValue(a)})})})}Ct(F1t);var z1t=Kt.extend({type:"series.line3D",dependencies:["grid3D"],visualStyleAccessPath:"lineStyle",visualDrawType:"stroke",getInitialData:function(t,e){return P5(this)},formatTooltip:function(t){return D3(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,lineStyle:{width:2},animationDurationUpdate:500}}),G1t=Ye.vec3;N.Shader.import(I5);const V1t=Yt.extend({type:"line3D",__ecgl__:!0,init:function(t,e){this.groupGL=new N.Node,this._api=e},render:function(t,e,r){var i=this._prevLine3DMesh;this._prevLine3DMesh=this._line3DMesh,this._line3DMesh=i,this._line3DMesh||(this._line3DMesh=new N.Mesh({geometry:new ca({useNativeLine:!1,sortTriangles:!0}),material:new N.Material({shader:N.createShader("ecgl.meshLines3D")}),renderOrder:10}),this._line3DMesh.geometry.pick=this._pick.bind(this)),this.groupGL.remove(this._prevLine3DMesh),this.groupGL.add(this._line3DMesh);var n=t.coordinateSystem;if(n&&n.viewGL){n.viewGL.add(this.groupGL);var a=n.viewGL.isLinearSpace()?"define":"undefine";this._line3DMesh.material[a]("fragment","SRGB_DECODE")}this._doRender(t,r),this._data=t.getData(),this._camera=n.viewGL.camera,this.updateCamera(),this._updateAnimation(t)},updateCamera:function(){this._updateNDCPosition()},_doRender:function(t,e){var r=t.getData(),i=this._line3DMesh;i.geometry.resetOffset();var n=r.getLayout("points"),a=[],o=new Float32Array(n.length/3*4),s=0,l=!1;r.each(function(h){var c=hr(r,h),v=lr(r,h);v==null&&(v=1),N.parseColor(c,a),a[3]*=v,o[s++]=a[0],o[s++]=a[1],o[s++]=a[2],o[s++]=a[3],a[3]<.99&&(l=!0)}),i.geometry.setVertexCount(i.geometry.getPolylineVertexCount(n)),i.geometry.setTriangleCount(i.geometry.getPolylineTriangleCount(n)),i.geometry.addPolyline(n,o,Zt.firstNotNull(t.get("lineStyle.width"),1)),i.geometry.dirty(),i.geometry.updateBoundingBox();var u=i.material;u.transparent=l,u.depthMask=!l;var f=t.getModel("debug.wireframe");f.get("show")?(i.geometry.createAttribute("barycentric","float",3),i.geometry.generateBarycentric(),i.material.set("both","WIREFRAME_TRIANGLE"),i.material.set("wireframeLineColor",N.parseColor(f.get("lineStyle.color")||"rgba(0,0,0,0.5)")),i.material.set("wireframeLineWidth",Zt.firstNotNull(f.get("lineStyle.width"),1))):i.material.set("both","WIREFRAME_TRIANGLE"),this._points=n,this._initHandler(t,e)},_updateAnimation:function(t){N.updateVertexAnimation([["prevPosition","position"],["prevPositionPrev","positionPrev"],["prevPositionNext","positionNext"]],this._prevLine3DMesh,this._line3DMesh,t)},_initHandler:function(t,e){var r=t.getData(),i=t.coordinateSystem,n=this._line3DMesh,a=-1;n.seriesIndex=t.seriesIndex,n.off("mousemove"),n.off("mouseout"),n.on("mousemove",function(o){var s=i.pointToData(o.point.array),l=r.indicesOfNearest("x",s[0])[0];l!==a&&(e.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get("x",l),r.get("y",l),r.get("z",l)]}),n.dataIndex=l),a=l},this),n.on("mouseout",function(o){a=-1,n.dataIndex=-1,e.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_updateNDCPosition:function(){var t=new dt,e=this._camera;dt.multiply(t,e.projectionMatrix,e.viewMatrix);var r=this._positionNDC,i=this._points,n=i.length/3;(!r||r.length/2!==n)&&(r=this._positionNDC=new Float32Array(n*2));for(var a=[],o=0;o=0){var w=u*3,S=new Q(this._points[w],this._points[w+1],this._points[w+2]);a.push({dataIndex:u,point:S,pointWorld:S.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(S)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});function H1t(t){t.registerChartView(V1t),t.registerSeriesModel(z1t),t.registerLayout(function(e,r){e.eachSeriesByType("line3D",function(i){var n=i.getData(),a=i.coordinateSystem;if(a){if(a.type!=="cartesian3D")return;var o=new Float32Array(n.count()*3),s=[],l=[],u=a.dimensions,f=u.map(function(h){return i.coordDimToDataDim(h)[0]});a&&n.each(f,function(h,c,v,d){s[0]=h,s[1]=c,s[2]=v,a.dataToPoint(s,l),o[d*3]=l[0],o[d*3+1]=l[1],o[d*3+2]=l[2]}),n.setLayout("points",o)}})})}Ct(H1t);const U1t=Kt.extend({type:"series.scatter3D",dependencies:["globe","grid3D","geo3D"],visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,getInitialData:function(t,e){return P5(this)},getFormattedLabel:function(t,e,r,i){var n=pa.getFormattedLabel(this,t,e,r,i);if(n==null){var a=this.getData(),o=a.dimensions[a.dimensions.length-1];n=a.get(o,t)}return n},formatTooltip:function(t){return D3(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,progressive:1e5,progressiveThreshold:1e5,grid3DIndex:0,globeIndex:0,symbol:"circle",symbolSize:10,blendMode:"source-over",label:{show:!1,position:"right",distance:5,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},itemStyle:{opacity:.8},emphasis:{label:{show:!0}},animationDurationUpdate:500}});function O8(t,i,r){var i=i||document.createElement("canvas");i.width=t,i.height=t;var n=i.getContext("2d");return r&&r(n),i}function W1t(t,e,r,i){X(e)||(e=[e,e]);var n=M0.getMarginByStyle(r,i),a=e[0]+n.left+n.right,o=e[1]+n.top+n.bottom,s=Ue(t,0,0,e[0],e[1]),l=Math.max(a,o);s.x=n.left,s.y=n.top,a>o?s.y+=(l-o)/2:s.x+=(l-a)/2;var u=s.getBoundingRect();return s.x-=u.x,s.y-=u.y,s.setStyle(r),s.update(),s.__size=l,s}function X1t(t,e,r){var i=e.width,n=e.height,a=t.canvas.width,o=t.canvas.height,s=i/a,l=n/o;function u(m){return m<128?1:-1}function f(m,y){var _=1/0;m=Math.floor(m*s),y=Math.floor(y*l);for(var x=y*i+m,w=e.data[x*4],S=u(w),b=Math.max(y-r,0);b=2e4},doSortVertices:function(t,e){var r=this.indices,i=Fw.create();if(!r){r=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var n=0;n.05);else for(var n=0;n<3;n++)this._progressiveQuickSort(e*3+n);this.dirtyIndices()},_simpleSort:function(t){var e=this._zList,r=this.indices;function i(n,a){return e[a]-e[n]}t?Array.prototype.sort.call(r,i):x4.sort(r,i,0,r.length-1)},_progressiveQuickSort:function(t){var e=this._zList,r=this.indices;this._quickSort=this._quickSort||new x4,this._quickSort.step(r,function(i,n){return e[n]-e[i]},t)}},Z1t="@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end";var B8=Ye.vec4;N.Shader.import(Z1t);var Q1t=N.Mesh.extend(function(){var t=new N.Geometry({dynamic:!0,attributes:{color:new N.Geometry.Attribute("color","float",4,"COLOR"),position:new N.Geometry.Attribute("position","float",3,"POSITION"),size:new N.Geometry.Attribute("size","float",1),prevPosition:new N.Geometry.Attribute("prevPosition","float",3),prevSize:new N.Geometry.Attribute("prevSize","float",1)}});Object.assign(t,Y1t);var e=new N.Material({shader:N.createShader("ecgl.sdfSprite"),transparent:!0,depthMask:!1});e.enableTexture("sprite"),e.define("both","VERTEX_COLOR"),e.define("both","VERTEX_SIZE");var r=new N.Texture2D({image:document.createElement("canvas"),flipY:!1});return e.set("sprite",r),t.pick=this._pick.bind(this),{geometry:t,material:e,mode:N.Mesh.POINTS,sizeScale:1}},{_pick:function(t,e,r,i,n,a){var o=this._positionNDC;if(o)for(var s=r.viewport,l=2/s.width,u=2/s.height,f=this.geometry.vertexCount-1;f>=0;f--){var h;this.geometry.indices?h=this.geometry.indices[f]:h=f;var c=o[h*2],v=o[h*2+1],d=this.geometry.attributes.size.get(h)/this.sizeScale,p=d/2;if(t>c-p*l&&tv-p*u&&e2?(d=this._updateSymbolSprite(t,c,f,h),s.enableTexture("sprite")):s.disableTexture("sprite"),u.position.init(n-i);var p=[];if(v){s.undefine("VERTEX_SIZE"),s.undefine("VERTEX_COLOR");var g=Vrt(o),m=Hrt(o);N.parseColor(g,p),p[3]*=m,s.set({color:p,u_Size:f.maxSize*this._sizeScale})}else s.set({color:[1,1,1,1]}),s.define("VERTEX_SIZE"),s.define("VERTEX_COLOR"),u.size.init(n-i),u.color.init(n-i),this._originalOpacity=new Float32Array(n-i);for(var y=o.getLayout("points"),_=u.position.value,x=0;x1?(n[0]=r.maxSize,n[1]=r.maxSize/r.aspect):(n[1]=r.maxSize,n[0]=r.maxSize*r.aspect),n[0]=n[0]||1,n[1]=n[1]||1,(this._symbolType!==r.type||!j1t(this._symbolSize,n)||this._lineWidth!==e.lineWidth)&&(M0.createSymbolSprite(r.type,n,{fill:"#fff",lineWidth:e.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(n[0]/2,10)},this._spriteImageCanvas),M0.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),zw,this._mesh.material.get("sprite").image),this._symbolType=r.type,this._symbolSize=n,this._lineWidth=e.lineWidth),this._spriteImageCanvas.width/r.maxSize*i},_updateMaterial:function(t,e){var r=t.get("blendMode")==="lighter"?N.additiveBlend:null,i=this._mesh.material;i.blend=r,i.set("lineWidth",e.lineWidth/zw);var n=N.parseColor(e.stroke);i.set("strokeColor",n),i.transparent=!0,i.depthMask=!1,i.depthTest=!this.is2D,i.sortVertices=!this.is2D},_updateLabelBuilder:function(t,o,r){var i=t.getData(),n=this._mesh.geometry,a=n.attributes.position.value,o=this._startDataIndex,s=this._mesh.sizeScale;this._labelsBuilder.updateData(i,o,r),this._labelsBuilder.getLabelPosition=function(l,u,f){var h=(l-o)*3;return[a[h],a[h+1],a[h+2]]},this._labelsBuilder.getLabelDistance=function(l,u,f){var h=n.attributes.size.get(l-o)/s;return h/2+f},this._labelsBuilder.updateLabels()},_updateAnimation:function(t){N.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,t)},_updateHandler:function(t,e,r){var i=t.getData(),n=this._mesh,a=this,o=-1,s=t.coordinateSystem&&t.coordinateSystem.type==="cartesian3D",l;s&&(l=t.coordinateSystem.model),n.seriesIndex=t.seriesIndex,n.off("mousemove"),n.off("mouseout"),n.on("mousemove",function(u){var f=u.vertexIndex+a._startDataIndex;f!==o&&(this.highlightOnMouseover&&(this.downplay(i,o),this.highlight(i,f),this._labelsBuilder.updateLabels([f])),s&&r.dispatchAction({type:"grid3DShowAxisPointer",value:[i.get(t.coordDimToDataDim("x")[0],f),i.get(t.coordDimToDataDim("y")[0],f),i.get(t.coordDimToDataDim("z")[0],f)],grid3DIndex:l.componentIndex})),n.dataIndex=f,o=f},this),n.on("mouseout",function(u){var f=u.vertexIndex+a._startDataIndex;this.highlightOnMouseover&&(this.downplay(i,f),this._labelsBuilder.updateLabels()),o=-1,n.dataIndex=-1,s&&r.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:l.componentIndex})},this)},updateLayout:function(t,e,r){var i=t.getData();if(this._mesh){var n=this._mesh.geometry.attributes.position.value,a=i.getLayout("points");if(this.is2D)for(var o=0;othis._endDataIndex||ethis._endDataIndex||e0?1:-1}N.Shader.import(iit);const ait=N.Mesh.extend(function(){var t=new N.Material({shader:new N.Shader(N.Shader.source("ecgl.trail2.vertex"),N.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),e=new ca({dynamic:!0});return e.createAttribute("dist","float",1),e.createAttribute("distAll","float",1),e.createAttribute("start","float",1),{geometry:e,material:t,culling:!1,$ignorePicking:!0}},{updateData:function(t,e,r){var i=t.hostModel,n=this.geometry,a=i.getModel("effect"),o=a.get("trailWidth")*e.getDevicePixelRatio(),s=a.get("trailLength"),l=i.get("effect.constantSpeed"),u=i.get("effect.period")*1e3,f=l!=null;f?this.material.set("speed",l/1e3):this.material.set("period",u),this.material[f?"define":"undefine"]("vertex","CONSTANT_SPEED");var h=i.get("polyline");n.trailLength=s,this.material.set("trailLength",s),n.resetOffset(),["position","positionPrev","positionNext"].forEach(function(b){n.attributes[b].value=r.attributes[b].value});var c=["dist","distAll","start","offset","color"];c.forEach(function(b){n.attributes[b].init(n.vertexCount)}),n.indices=r.indices;var v=[],d=a.get("trailColor"),p=a.get("trailOpacity"),g=d!=null,m=p!=null;this.updateWorldTransform();var y=this.worldTransform.x.len(),_=this.worldTransform.y.len(),x=this.worldTransform.z.len(),w=0,S=0;t.each(function(b){var T=t.getItemLayout(b),A=m?p:lr(t,b),D=hr(t,b);A==null&&(A=1),v=N.parseColor(g?d:D,v),v[3]*=A;for(var C=h?r.getPolylineVertexCount(T):r.getCubicCurveVertexCount(T[0],T[1],T[2],T[3]),M=0,L=[],I=[],P=w;Pw&&(M+=Yw.dist(L,I)),n.attributes.dist.set(P,M),Yw.copy(I,L);S=Math.max(S,M);for(var R=Math.random()*(f?M:u),P=w;P0;this._updateSurfaceMesh(this._surfaceMesh,t,f,v);var d=this._surfaceMesh.material;v?(d.define("WIREFRAME_QUAD"),d.set("wireframeLineWidth",c),d.set("wireframeLineColor",N.parseColor(h.get("lineStyle.color")))):d.undefine("WIREFRAME_QUAD"),this._initHandler(t,r),this._updateAnimation(t)},_updateAnimation:function(t){N.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,t)},_createSurfaceMesh:function(){var t=new N.Mesh({geometry:new N.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new N.Material({shader:new N.Shader(N.Shader.source("ecgl.sm.depth.vertex"),N.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return t.geometry.createAttribute("barycentric","float",4),t.geometry.createAttribute("prevPosition","float",3),t.geometry.createAttribute("prevNormal","float",3),Object.assign(t.geometry,_d),t},_initHandler:function(t,e){var r=t.getData(),i=this._surfaceMesh,n=t.coordinateSystem;function a(s,l){for(var u=1/0,f=-1,h=[],c=0;c=0){var u=[];i.geometry.attributes.position.get(l,u);for(var f=n.pointToData(u),h=1/0,c=-1,v=[],d=0;d65535?Uint32Array:Uint16Array)((d-1)*(p-1)*6),S=function(_t,St,bt){bt[1]=_t*p+St,bt[0]=_t*p+St+1,bt[3]=(_t+1)*p+St+1,bt[2]=(_t+1)*p+St},b=!1;if(l){var T=[],A=[],D=0;m?f.init(n.vertexCount):f.value=null;for(var C=[[],[],[]],M=[],L=[],I=ja.create(),P=function(_t,St,bt){var Pt=St*3;return bt[0]=_t[Pt],bt[1]=_t[Pt+1],bt[2]=_t[Pt+2],bt},R=new Float32Array(o.length),B=new Float32Array(o.length/3*4),O=0;O0;){if(Math.floor(s/f)===s/f)return[f,s/f];f--}return f=Math.floor(Math.sqrt(s)),[f,f]},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}});function vit(t){t.registerChartView(cit),t.registerSeriesModel(cI),t.registerLayout(function(e,r){e.eachSeriesByType("surface",function(i){var n=i.coordinateSystem;!n||n.type;var a=i.getData(),o=new Float32Array(3*a.count()),s=[NaN,NaN,NaN];if(n&&n.type==="cartesian3D"){var l=n.dimensions,u=l.map(function(f){return i.coordDimToDataDim(f)[0]});a.each(u,function(f,h,c,v){var d;a.hasValue(v)?d=n.dataToPoint([f,h,c]):d=s,o[v*3]=d[0],o[v*3+1]=d[1],o[v*3+2]=d[2]})}a.setLayout("points",o)})})}Ct(vit);function Qw(t,e){for(var r=[],i=0;i "+c)),u++)}var v,d=V4(t,{coordDimensions:["value"]});v=new Le(d,r),v.initData(t);var p=new Le(["value"],r);return p.initData(l,s),n&&n(v,p),xv({mainData:v,struct:a,structAttr:"graph",datas:{node:v,edge:p},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var J6=Kt.extend({type:"series.graphGL",visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,init:function(t){J6.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this._updateCategoriesData()},mergeOption:function(t){J6.superApply(this,"mergeOption",arguments),this._updateCategoriesData()},getFormattedLabel:function(t,e,r,i){var n=pa.getFormattedLabel(this,t,e,r,i);if(n==null){var a=this.getData(),o=a.dimensions[a.dimensions.length-1];n=a.get(o,t)}return n},getInitialData:function(t,e){var r=t.edges||t.links||[],i=t.data||t.nodes||[],n=this;if(i&&r)return _it(i,r,this,!0,a).data;function a(o,s){o.wrapMethod("getItemModel",function(h){const c=n._categoriesModels,v=h.getShallow("category"),d=c[v];return d&&(d.parentModel=h.parentModel,h.parentModel=d),h});const l=e.getModel([]).getModel;function u(h,c){const v=l.call(this,h,c);return v.resolveParentPath=f,v}s.wrapMethod("getItemModel",function(h){return h.resolveParentPath=f,h.getModel=u,h});function f(h){if(h&&(h[0]==="label"||h[1]==="label")){const c=h.slice();return h[0]==="label"?c[0]="edgeLabel":h[1]==="label"&&(c[1]="edgeLabel"),c}return h}}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,r){if(r==="edge"){var i=this.getData(),n=this.getDataParams(t,r),a=i.graph.getEdgeByIndex(t),o=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),l=[];return o!=null&&l.push(o),s!=null&&l.push(s),l=Je(l.join(" > ")),n.value&&(l+=" : "+Je(n.value)),l}else return J6.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=(this.option.categories||[]).map(function(r){return r.value!=null?r:Object.assign({value:0},r)}),e=new Le(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(r){return e.getItemModel(r,!0)})},setView:function(t){t.zoom!=null&&(this.option.zoom=t.zoom),t.offset!=null&&(this.option.offset=t.offset)},setNodePosition:function(t){for(var e=0;e65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(t===0?this.indices=null:this.indices=this.vertexCount>65535?new Uint32Array(t*3):new Uint16Array(t*3))},_getCubicCurveApproxStep:function(t,e,r,i){var n=Ke.dist(t,e)+Ke.dist(r,e)+Ke.dist(i,r),a=1/(n+1)*this.segmentScale;return a},getCubicCurveVertexCount:function(t,e,r,i){var n=this._getCubicCurveApproxStep(t,e,r,i),a=Math.ceil(1/n);return this.useNativeLine?a*2:a*2+2},getCubicCurveTriangleCount:function(t,e,r,i){var n=this._getCubicCurveApproxStep(t,e,r,i),a=Math.ceil(1/n);return this.useNativeLine?0:a*2},getLineVertexCount:function(){return this.getPolylineVertexCount(jw)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(jw)},getPolylineVertexCount:function(t){var e;if(typeof t=="number")e=t;else{var r=typeof t[0]!="number";e=r?t.length:t.length/2}return this.useNativeLine?(e-1)*2:(e-1)*2+2},getPolylineTriangleCount:function(t){var e;if(typeof t=="number")e=t;else{var r=typeof t[0]!="number";e=r?t.length:t.length/2}return this.useNativeLine?0:(e-1)*2},addCubicCurve:function(t,e,r,i,n,a){a==null&&(a=1);for(var o=t[0],s=t[1],l=e[0],u=e[1],f=r[0],h=r[1],c=i[0],v=i[1],d=this._getCubicCurveApproxStep(t,e,r,i),p=d*d,g=p*d,m=3*d,y=3*p,_=6*p,x=6*g,w=o-l*2+f,S=s-u*2+h,b=(l-f)*3-o+c,T=(u-h)*3-s+v,A=o,D=s,C=(l-o)*m+w*y+b*g,M=(u-s)*m+S*y+T*g,L=w*_+b*x,I=S*_+T*x,P=b*x,R=T*x,B=0,O=0,z=Math.ceil(1/d),G=new Float32Array((z+1)*3),G=[],U=0,O=0;O1&&(A=C>0?Math.min(A,c):Math.max(A,c),D=M>0?Math.min(D,v):Math.max(D,v));this.addPolyline(G,n,a)},addLine:function(t,e,r,i){this.addPolyline([t,e],r,i)},addPolyline:function(){var t=Ke.create(),e=Ke.create(),r=Ke.create(),i=Ke.create(),n=[],a=[],o=[];return function(s,l,u,f,h){if(s.length){var c=typeof s[0]!="number";if(h==null&&(h=c?s.length:s.length/2),!(h<2)){f==null&&(f=0),u==null&&(u=1),this._itemVertexOffsets.push(this._vertexOffset);for(var v=c?typeof l[0]!="number":l.length/4===h,d=this.attributes.position,p=this.attributes.color,g=this.attributes.offset,m=this.attributes.normal,y=this.indices,_=this._vertexOffset,x,w=0;w1&&(d.copy(_,_-1),p.copy(_,_-1),_++);else{var T;if(w0){Ke.sub(t,n,o),Ke.sub(e,a,n),Ke.normalize(t,t),Ke.normalize(e,e),Ke.add(i,t,e),Ke.normalize(i,i);var A=u/2*Math.min(1/Ke.dot(t,i),2);r[0]=-i[1],r[1]=i[0],T=A}else Ke.sub(t,a,n),Ke.normalize(t,t),r[0]=-t[1],r[1]=t[0],T=u/2}else Ke.sub(t,n,o),Ke.normalize(t,t),r[0]=-t[1],r[1]=t[0],T=u/2;m.set(_,r),m.set(_+1,r),g.set(_,T),g.set(_+1,-T),Ke.copy(o,n),d.set(_,n),d.set(_+1,n),p.set(_,x),p.set(_+1,x),_+=2}if(this.useNativeLine)p.set(_,x),d.set(_,n),_++;else if(w>0){var D=this._faceOffset*3,y=this.indices;y[D]=_-4,y[D+1]=_-3,y[D+2]=_-2,y[D+3]=_-3,y[D+4]=_-1,y[D+5]=_-2,this._faceOffset+=2}}this._vertexOffset=_}}}}(),setItemColor:function(t,e){for(var r=this._itemVertexOffsets[t],i=t5e4?this.jitterTolerence=10:r>5e3?this.jitterTolerence=1:this.jitterTolerence=.1,r>100?this.scaling=2:this.scaling=10,t)for(var e in F8)t[e]!=null&&(this[e]=t[e]);if(this.repulsionByDegree)for(var i=this._positionSourceTex.pixels,n=0;nt};rr.prototype._swapTexture=function(){var t=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=t;var t=this._forcePrevTex;this._forcePrevTex=this._forceTex,this._forceTex=t;var t=this._globalSpeedPrevTex;this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=t};rr.prototype._initFromSource=function(t){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(t),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(t),t.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(t)};rr.prototype._resize=function(t,e){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach(function(r){this[r].width=t,this[r].height=e,this[r].dirty()},this)};rr.prototype.dispose=function(t){this._framebuffer.dispose(t),this._copyPass.dispose(t),this._nodeRepulsionPass.dispose(t),this._positionPass.dispose(t),this._globalSpeedPass.dispose(t),this._edgeForceMesh.geometry.dispose(t),this._weightedSumMesh.geometry.dispose(t),this._positionSourceTex.dispose(t),this._positionTex.dispose(t),this._positionPrevTex.dispose(t),this._forceTex.dispose(t),this._forcePrevTex.dispose(t),this._weightedSumTex.dispose(t),this._globalSpeedTex.dispose(t),this._globalSpeedPrevTex.dispose(t)};function Sit(){var t={create:function(){return new Float32Array(2)},dist:function(l,u){var f=u[0]-l[0],h=u[1]-l[1];return Math.sqrt(f*f+h*h)},len:function(l){var u=l[0],f=l[1];return Math.sqrt(u*u+f*f)},scaleAndAdd:function(l,u,f,h){return l[0]=u[0]+f[0]*h,l[1]=u[1]+f[1]*h,l},scale:function(l,u,f){return l[0]=u[0]*f,l[1]=u[1]*f,l},add:function(l,u,f){return l[0]=u[0]+f[0],l[1]=u[1]+f[1],l},sub:function(l,u,f){return l[0]=u[0]-f[0],l[1]=u[1]-f[1],l},normalize:function(l,u){var f=u[0],h=u[1],c=f*f+h*h;return c>0&&(c=1/Math.sqrt(c),l[0]=u[0]*c,l[1]=u[1]*c),l},negate:function(l,u){return l[0]=-u[0],l[1]=-u[1],l},copy:function(l,u){return l[0]=u[0],l[1]=u[1],l},set:function(l,u,f){return l[0]=u,l[1]=f,l}};function e(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}var r=e.prototype;r.beforeUpdate=function(){for(var l=0;l=l&&this.bbox[1]<=u&&this.bbox[3]>=u},r.setBBox=function(l,u,f,h){this.bbox[0]=l,this.bbox[1]=u,this.bbox[2]=f,this.bbox[3]=h,this.size=(f-l+h-u)/2},r._newSubRegion=function(){var l=this.subRegions[this.nSubRegions];return l||(l=new e,this.subRegions[this.nSubRegions]=l),this.nSubRegions++,l},r._addNodeToSubRegion=function(l){var u=this.findSubRegion(l.position[0],l.position[1]),f=this.bbox;if(!u){var h=(f[0]+f[2])/2,c=(f[1]+f[3])/2,v=(f[2]-f[0])/2,d=(f[3]-f[1])/2,p=l.position[0]>=h?1:0,g=l.position[1]>=c?1:0,u=this._newSubRegion();u.setBBox(p*v+f[0],g*d+f[1],(p+1)*v+f[0],(g+1)*d+f[1])}u.addNode(l)},r._updateCenterOfMass=function(l){this.centerOfMass==null&&(this.centerOfMass=new Float32Array(2));var u=this.centerOfMass[0]*this.mass,f=this.centerOfMass[1]*this.mass;u+=l.position[0]*l.mass,f+=l.position[1]*l.mass,this.mass+=l.mass,this.centerOfMass[0]=u/this.mass,this.centerOfMass[1]=f/this.mass};function i(){this.position=new Float32Array(2),this.force=t.create(),this.forcePrev=t.create(),this.mass=1,this.inDegree=0,this.outDegree=0}function n(l,u){this.source=l,this.target=u,this.weight=1}function a(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new e,this.rootRegion.centerOfMass=t.create(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}var o=a.prototype;o.initNodes=function(l,u,f){var h=u.length;this.nodes.length=0;for(var c=typeof f<"u",v=0;v0&&(this.strongGravityMode?this.applyNodeStrongGravity(h):this.applyNodeGravity(h))}for(var u=0;u0&&(_=Math.min(_/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=_;for(var u=0;u0&&(x=Math.min(w*x,10)/w,t.scaleAndAdd(f.position,f.position,f.force,x))}},o.applyRegionToNodeRepulsion=function(){var l=t.create();return function(f,h){if(f.node)this.applyNodeToNodeRepulsion(f.node,h,!0);else{t.sub(l,h.position,f.centerOfMass);var c=l[0]*l[0]+l[1]*l[1];if(c>this.barnesHutTheta*f.size*f.size){var v=this.scaling*h.mass*f.mass/c;t.scaleAndAdd(h.force,h.force,l,v)}else for(var d=0;d0)d=this.scaling*f.mass*h.mass/(p*p);else if(p<0)d=this.scaling*100*f.mass*h.mass;else return}else d=this.scaling*f.mass*h.mass/v;t.scaleAndAdd(f.force,f.force,l,d),t.scaleAndAdd(h.force,h.force,l,-d)}}}}(),o.applyEdgeAttraction=function(){var l=t.create();return function(f){var h=f.source,c=f.target;t.sub(l,h.position,c.position);var v=t.len(l),d;this.edgeWeightInfluence===0?d=1:this.edgeWeightInfluence===1?d=f.weight:d=Math.pow(f.weight,this.edgeWeightInfluence);var p;this.preventOverlap&&(v=v-h.size-c.size,v<=0)||(this.linLogMode?p=-d*Math.log(v+1)/(v+1):p=-d,t.scaleAndAdd(h.force,h.force,l,p),t.scaleAndAdd(c.force,c.force,l,-p))}}(),o.applyNodeGravity=function(){var l=t.create();return function(u){t.sub(l,this.gravityCenter,u.position);var f=t.len(l);t.scaleAndAdd(u.force,u.force,l,this.gravity*u.mass/(f+1))}}(),o.applyNodeStrongGravity=function(){var l=t.create();return function(u){t.sub(l,this.gravityCenter,u.position),t.scaleAndAdd(u.force,u.force,l,this.gravity*u.mass)}}(),o.updateBBox=function(){for(var l=1/0,u=1/0,f=-1/0,h=-1/0,c=0;c5e4?e.jitterTolerence=10:a>5e3?e.jitterTolerence=1:e.jitterTolerence=.1,a>100?e.scaling=2:e.scaling=10,a>1e3?e.barnesHutOptimize=!0:e.barnesHutOptimize=!1,t)for(var r in y7)t[r]!=null&&(e[r]=t[r]);if(!e.gravityCenter){for(var o=[1/0,1/0],s=[-1/0,-1/0],l=0;lt};l1.prototype.getNodePosition=function(t,e){if(e||(e=new Float32Array(this._nodes.length*2)),this._positionArr)for(var r=0;r0?1.1:.9,a=Math.max(Math.min(this._zoom*n,this.maxZoom),this.minZoom);n=a/this._zoom;var o=this._convertPos(r,i),s=(o.x-this._dx)*(n-1),l=(o.y-this._dy)*(n-1);this._dx-=s,this._dy-=l,this._zoom=a,this._needsUpdate=!0}}},dispose:function(){var t=this.zr;t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("globalout",this._mouseUpHandler),t.animation.off("frame",this._update)}});const bit="@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end";var Ws=Ye.vec2;N.Shader.import(bit);var Tit=1;const Ait=Yt.extend({type:"graphGL",__ecgl__:!0,init:function(t,e){this.groupGL=new N.Node,this.viewGL=new pe("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new G2(!0,e),this._forceEdgesMesh=new N.Mesh({material:new N.Material({shader:N.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new N.Geometry({attributes:{node:new N.Geometry.Attribute("node","float",2),color:new N.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:N.Mesh.LINES}),this._edgesMesh=new N.Mesh({material:new N.Material({shader:N.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Cd({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new wit({zr:e.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(t,e,r){this.groupGL.add(this._pointsBuilder.rootNode),this._model=t,this._api=r,this._initLayout(t,e,r),this._pointsBuilder.update(t,e,r),this._forceLayoutInstance instanceof rr||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(t,r),this._control.off("update"),this._control.on("update",function(){r.dispatchAction({type:"graphGLRoam",seriesId:t.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)},this),this._control.setZoom(Zt.firstNotNull(t.get("zoom"),1)),this._control.setOffset(t.get("offset")||[0,0]);var i=this._pointsBuilder.getPointsMesh();if(i.off("mousemove",this._mousemoveHandler),i.off("mouseout",this._mouseOutHandler,this),r.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,t.get("focusNodeAdjacency")){var n=t.get("focusNodeAdjacencyOn");n==="click"?r.getZr().on("click",this._clickHandler):n==="mouseover"&&(i.on("mousemove",this._mousemoveHandler,this),i.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1)}this._lastMouseOverDataIndex=-1},_clickHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?e!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._mouseOutHandler(t),this._lastMouseOverDataIndex=e}},_mouseOutHandler:function(t){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(t,e){var r=this._forceEdgesMesh.geometry,i=e.getEdgeData(),n=0,a=this._forceLayoutInstance,o=i.count()*2;r.attributes.node.init(o),r.attributes.color.init(o),i.each(function(s){var l=t[s];r.attributes.node.set(n,a.getNodeUV(l.node1)),r.attributes.node.set(n+1,a.getNodeUV(l.node2));var u=hr(i,l.dataIndex),f=N.parseColor(u);f[3]*=Zt.firstNotNull(lr(i,l.dataIndex),1),r.attributes.color.set(n,f),r.attributes.color.set(n+1,f),n+=2}),r.dirty()},_updateMeshLinesGeometry:function(){var e=this._model.getEdgeData(),t=this._edgesMesh.geometry,e=this._model.getEdgeData(),r=this._model.getData().getLayout("points");t.resetOffset(),t.setVertexCount(e.count()*t.getLineVertexCount()),t.setTriangleCount(e.count()*t.getLineTriangleCount());var i=[],n=[],a=["lineStyle","width"];this._originalEdgeColors=new Float32Array(e.count()*4),this._edgeIndicesMap=new Float32Array(e.count()),e.each(function(o){var s=e.graph.getEdgeByIndex(o),l=s.node1.dataIndex*2,u=s.node2.dataIndex*2;i[0]=r[l],i[1]=r[l+1],n[0]=r[u],n[1]=r[u+1];var f=hr(e,s.dataIndex),h=N.parseColor(f);h[3]*=Zt.firstNotNull(lr(e,s.dataIndex),1);var c=e.getItemModel(s.dataIndex),v=Zt.firstNotNull(c.get(a),1)*this._api.getDevicePixelRatio();t.addLine(i,n,h,v);for(var d=0;d<4;d++)this._originalEdgeColors[s.dataIndex*4+d]=h[d];this._edgeIndicesMap[s.dataIndex]=o},this),t.dirty()},_updateForceNodesGeometry:function(t){for(var e=this._pointsBuilder.getPointsMesh(),r=[],i=0;i=d&&(u._syncNodePosition(t),v=0),a.getZr().refresh(),E2(function(){p(g)})})}};E2(function(){u._forceLayoutInstanceToDispose&&(u._forceLayoutInstanceToDispose.dispose(n.layer.renderer),u._forceLayoutInstanceToDispose=null),p(f)}),this._layouting=!0}}},stopLayout:function(t,e,r,i){i&&i.from!=null&&i.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(i&&i.beforeLayout||(this._syncNodePosition(t),this._updateAfterLayout(t,e,r)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(t){var e=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);t.getData().setLayout("points",e),t.setNodePosition(e)},_updateAfterLayout:function(t,e,r){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(t,e,r),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(t,e,r,i){var n=this._model.getData();this._downplayAll();var a=i.dataIndex,o=n.graph,s=[],l=o.getNodeByIndex(a);s.push(l),l.edges.forEach(function(f){f.dataIndex<0||(f.node1!==l&&s.push(f.node1),f.node2!==l&&s.push(f.node2))},this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach(function(f){this._pointsBuilder.highlight(n,f.dataIndex)},this),this._pointsBuilder.updateLabels(s.map(function(f){return f.dataIndex}));var u=[];l.edges.forEach(function(f){f.dataIndex>=0&&(this._highlightEdge(f.dataIndex),u.push(f))},this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(t,e,r,i){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(t){var e=this._model.getEdgeData().getItemModel(t),r=N.parseColor(e.get("emphasis.lineStyle.color")||e.get("lineStyle.color")),i=Zt.firstNotNull(e.get("emphasis.lineStyle.opacity"),e.get("lineStyle.opacity"),1);r[3]*=i,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],r)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach(function(t){this._pointsBuilder.downplay(this._model.getData(),t.dataIndex)},this),this._focusEdges&&this._focusEdges.forEach(function(t){this._downplayEdge(t.dataIndex)},this)},_downplayEdge:function(t){var e=this._getColor(t,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)},_setEdgeFade:function(){var t=[];return function(e,r){this._getColor(e,t),t[3]*=r,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[e],t)}}(),_getColor:function(t,e){for(var r=0;r<4;r++)e[r]=this._originalEdgeColors[t*4+r];return e},_fadeOutEdgesAll:function(t){var e=this._model.getData().graph;e.eachEdge(function(r){this._setEdgeFade(r.dataIndex,t)},this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(t,e){this.viewGL.setViewport(0,0,e.getWidth(),e.getHeight(),e.getDevicePixelRatio());for(var r=this.viewGL.camera,i=t.getData(),n=i.getLayout("points"),a=Ws.create(1/0,1/0),o=Ws.create(-1/0,-1/0),s=[],l=0;lr.left&&fr.top)){var h=Math.max(o[0]-a[0],10),c=h/e.getWidth()*e.getHeight();h*=1.4,c*=1.4,a[0]-=h*.2,r.left=a[0],r.top=u-c/2,r.bottom=u+c/2,r.right=h+a[0],r.near=0,r.far=100}},dispose:function(){var t=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(t),this.groupGL.removeAll(),this._layoutId=-1,this._pointsBuilder.dispose()},remove:function(){this.groupGL.removeAll(),this._control.dispose()}});function Xs(t){return t instanceof Array||(t=[t,t]),t}function Cit(t){t.registerChartView(Ait),t.registerSeriesModel(J6),t.registerVisual(function(r){const i={};r.eachSeriesByType("graphGL",function(n){var a=n.getCategoriesData(),o=n.getData(),s={};a.each(function(l){var u=a.getName(l);s["ec-"+u]=l;var f=a.getItemModel(l),h=f.getModel("itemStyle").getItemStyle();h.fill||(h.fill=n.getColorFromPalette(u,i)),a.setItemVisual(l,"style",h);var c=["symbol","symbolSize","symbolKeepAspect"];for(let d=0;d65535?new Uint32Array(i*3):new Uint16Array(i*3))},addLine:function(t){var e=this._vertexOffset;this.attributes.position.set(e,[t[0],t[1],1]),this.attributes.position.set(e+1,[t[0],t[1],-1]),this.attributes.position.set(e+2,[t[0],t[1],2]),this.attributes.position.set(e+3,[t[0],t[1],-2]),this.setTriangleIndices(this._faceOffset++,[e,e+1,e+2]),this.setTriangleIndices(this._faceOffset++,[e+1,e+2,e+3]),this._vertexOffset+=4}});const Mit="@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n";ft.import(Mit);function Lit(t){var e=document.createElement("canvas");e.width=e.height=t;var r=e.getContext("2d");return r.fillStyle="#fff",r.arc(t/2,t/2,t/2,0,Math.PI*2),r.fill(),e}var Wh=function(){this.motionBlurFactor=.99,this.vectorFieldTexture=new Gt({type:lt.FLOAT,flipY:!1}),this.particleLife=[5,20],this._particleType="point",this._particleSize=1,this.particleColor=[1,1,1,1],this.particleSpeedScaling=1,this._thisFrameTexture=null,this._particlePass=null,this._spawnTexture=null,this._particleTexture0=null,this._particleTexture1=null,this._particlePointsMesh=null,this._surfaceFrameBuffer=null,this._elapsedTime=0,this._scene=null,this._camera=null,this._lastFrameTexture=null,this._supersampling=1,this._downsampleTextures=[],this._width=512,this._height=512,this.init()};Wh.prototype={constructor:Wh,init:function(){var t={type:lt.FLOAT,minFilter:lt.NEAREST,magFilter:lt.NEAREST,useMipmap:!1};this._spawnTexture=new Gt(t),this._particleTexture0=new Gt(t),this._particleTexture1=new Gt(t),this._frameBuffer=new We({depthBuffer:!1}),this._particlePass=new qe({fragment:ft.source("ecgl.vfParticle.particle.fragment")}),this._particlePass.setUniform("velocityTexture",this.vectorFieldTexture),this._particlePass.setUniform("spawnTexture",this._spawnTexture),this._downsamplePass=new qe({fragment:ft.source("clay.compositor.downsample")});var e=new sr({renderOrder:10,material:new R1({shader:new ft(ft.source("ecgl.vfParticle.renderPoints.vertex"),ft.source("ecgl.vfParticle.renderPoints.fragment"))}),mode:sr.POINTS,geometry:new qt({dynamic:!0,mainAttribute:"texcoord0"})}),r=new sr({renderOrder:10,material:new R1({shader:new ft(ft.source("ecgl.vfParticle.renderLines.vertex"),ft.source("ecgl.vfParticle.renderLines.fragment"))}),geometry:new Eit,culling:!1}),i=new sr({material:new R1({shader:new ft(ft.source("ecgl.color.vertex"),ft.source("ecgl.color.fragment"))}),geometry:new D5});i.material.enableTexture("diffuseMap"),this._particlePointsMesh=e,this._particleLinesMesh=r,this._lastFrameFullQuadMesh=i,this._camera=new y4,this._thisFrameTexture=new Gt,this._lastFrameTexture=new Gt},setParticleDensity:function(t,e){for(var r=t*e,i=new Float32Array(r*4),n=0,a=this.particleLife,o=0;o0?t[t.length-1]:this._lastFrameTexture},setRegion:function(t){this._particlePass.setUniform("region",t)},resize:function(t,e){this._lastFrameTexture.width=t*this._supersampling,this._lastFrameTexture.height=e*this._supersampling,this._thisFrameTexture.width=t*this._supersampling,this._thisFrameTexture.height=e*this._supersampling,this._width=t,this._height=e},setParticleSize:function(t){var e=this._getParticleMesh();if(t<=2){e.material.disableTexture("spriteTexture"),e.material.transparent=!1;return}this._spriteTexture||(this._spriteTexture=new Gt),(!this._spriteTexture.image||this._spriteTexture.image.width!==t)&&(this._spriteTexture.image=Lit(t),this._spriteTexture.dirty()),e.material.transparent=!0,e.material.enableTexture("spriteTexture"),e.material.set("spriteTexture",this._spriteTexture),this._particleSize=t},setGradientTexture:function(t){var e=this._getParticleMesh().material;e[t?"enableTexture":"disableTexture"]("gradientTexture"),e.setUniform("gradientTexture",t)},setColorTextureImage:function(t,e){var r=this._getParticleMesh().material;r.setTextureImage("colorTexture",t,e,{flipY:!0})},setParticleType:function(t){this._particleType=t},clearFrame:function(t){var e=this._frameBuffer;e.attach(this._lastFrameTexture),e.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),e.unbind(t)},setSupersampling:function(t){this._supersampling=t,this.resize(this._width,this._height)},_updateDownsampleTextures:function(t,e){for(var r=this._downsampleTextures,i=Math.max(Math.floor(Math.log(this._supersampling/e.getDevicePixelRatio())/Math.log(2)),0),n=2,a=this._width*this._supersampling,o=this._height*this._supersampling,s=0;s=359;s&&(n[0]>0&&(n[0]=0),a[0]1?(e.material.shader!==this._meshLinesShader&&e.material.attachShader(this._meshLinesShader),e.mode=N.Mesh.TRIANGLES):(e.material.shader!==this._nativeLinesShader&&e.material.attachShader(this._nativeLinesShader),e.mode=N.Mesh.LINES),r=r||0,i=i||n.count(),s.resetOffset();var f=0,h=0,c=[],v=[],d=[],p=[],g=[],m=.3,y=.7;function _(){v[0]=c[0]*y+p[0]*m-(c[1]-p[1])*a,v[1]=c[1]*y+p[1]*m-(p[0]-c[0])*a,d[0]=c[0]*m+p[0]*y-(c[1]-p[1])*a,d[1]=c[1]*m+p[1]*y-(p[0]-c[0])*a}if(o||a!==0)for(var x=r;x{var o=l4(e.value),s={grid:{bottom:0,left:0,right:"0"},series:[{radius:["30%","60%"],center:["50%","50%"],type:"pie",roseType:"area",label:{normal:{show:!0,formatter:["{b|{b}}","{c|{c}%}"].join("\n"),rich:{c:{color:"yellow",fontSize:18,fontFamily:"等线",fontWeight:"bold"},b:{color:"rgba(255,255,255,.75)",fontSize:14,height:20}},position:"outside"},emphasis:{show:!0}},itemStyle:{borderRadius:3,borderWidth:2},labelLine:{normal:{show:!0},emphasis:{show:!0}},name:"饼图1",data:[{value:20,name:"0-6岁"},{value:22,name:"7-17岁"},{value:28,name:"18-40岁"},{value:15,name:"41-60岁"},{value:15,name:"60岁以上"}]}]};o.setOption(s)};return F1(()=>{r.map(o=>{i.push(o.name),n.push(o.value)}),a()}),(o,s)=>(jt(),he("div",kit,[at("div",{style:{height:"100%"},ref_key:"peoplePie",ref:e},null,512)]))}}),zit=T4(Fit,[["__scopeId","data-v-87df4956"]]);function Git(t,e,r,i){var n,a=!1,o=0;function s(){n&&clearTimeout(n)}function l(){s(),a=!0}typeof e!="boolean"&&(i=r,r=e,e=void 0);function u(){for(var f=arguments.length,h=new Array(f),c=0;ct?p():e!==!0&&(n=setTimeout(i?g:p,i===void 0?t-d:t))}return u.cancel=l,u}function Vit(t){const e=D2();e&&Object.assign(e.proxy,t)}const Hit={modelValue:{type:Boolean,default:!0},list:{type:Array,required:!0,default:[]},step:{type:Number,default:1},limitScrollNum:{type:Number,default:3},hover:{type:Boolean,default:!1},direction:{type:String,default:"up"},singleHeight:{type:Number,default:0},singleWidth:{type:Number,default:0},singleWaitTime:{type:Number,default:1e3},isRemUnit:{type:Boolean,default:!1},isWatch:{type:Boolean,default:!0},delay:{type:Number,default:0},ease:{type:[String,Object],default:"ease-in"},count:{type:Number,default:-1},copyNum:{type:Number,default:1},wheel:{type:Boolean,default:!1},singleLine:{type:Boolean,default:!1}};globalThis.window.cancelAnimationFrame=function(){return globalThis.window.cancelAnimationFrame||globalThis.window.webkitCancelAnimationFrame||globalThis.window.mozCancelAnimationFrame||globalThis.window.oCancelAnimationFrame||globalThis.window.msCancelAnimationFrame||function(t){return globalThis.window.clearTimeout(t)}}();globalThis.window.requestAnimationFrame=function(){return globalThis.window.requestAnimationFrame||globalThis.window.webkitRequestAnimationFrame||globalThis.window.mozRequestAnimationFrame||globalThis.window.oRequestAnimationFrame||globalThis.window.msRequestAnimationFrame||function(t){return globalThis.window.setTimeout(t,1e3/60)}}();function Uit(t){t&&typeof t!="boolean"&&t.length>100&&console.warn("数据达到了".concat(t.length,"条有点多哦~,可能会造成部分老旧浏览器卡顿。"))}const Wit=be({name:"vue3-seamless-scroll",inheritAttrs:!1,props:Hit,emits:["stop","count","move"],setup(t,{slots:e,emit:r,attrs:i}){const n=t,a=Ft(null),o=Ft(null),s=Ft(null),l=Ft(null),u=Ft(null),f=Ft(0),h=Ft(0),c=Ft(0),v=Ft(0),d=Ft(!1),p=Ft(0),g=Wt(()=>n.list?n.list.length>=n.limitScrollNum:!1),m=Wt(()=>({width:f.value?"".concat(f.value,"px"):"auto",transform:"translate(".concat(c.value,"px,").concat(v.value,"px)"),transition:"all ".concat(typeof n.ease=="string"?n.ease:"cubic-bezier("+n.ease.x1+","+n.ease.y1+","+n.ease.x2+","+n.ease.y2+")"," ").concat(n.delay,"ms"),overflow:"hidden",display:n.singleLine?"flex":"block"})),y=Wt(()=>n.direction=="left"||n.direction=="right"),_=Wt(()=>y.value?{float:"left",overflow:"hidden",display:n.singleLine?"flex":"block",flexShrink:n.singleLine?0:1}:{overflow:"hidden"}),x=Wt(()=>n.isRemUnit?parseInt(globalThis.window.getComputedStyle(globalThis.document.documentElement,null).fontSize):1),w=Wt(()=>n.singleWidth*x.value),S=Wt(()=>n.singleHeight*x.value),b=Wt(()=>{let $,W=n.step;return y.value?$=w.value:$=S.value,$>0&&$%W>0&&console.error("如果设置了单步滚动,step 需是单步大小的约数,否则无法保证单步滚动结束的位置是否准确。~~~~~"),W}),T=()=>{cancelAnimationFrame(l.value),l.value=null},A=($,W,V)=>{l.value=requestAnimationFrame(function(){const K=h.value/2,Y=f.value/2;if($==="up"?(Math.abs(v.value)>=K&&(v.value=0,p.value+=1,r("count",p.value)),v.value-=W):$==="down"?(v.value>=0&&(v.value=K*-1,p.value+=1,r("count",p.value)),v.value+=W):$==="left"?(Math.abs(c.value)>=Y&&(c.value=0,p.value+=1,r("count",p.value)),c.value-=W):$==="right"&&(c.value>=0&&(c.value=Y*-1,p.value+=1,r("count",p.value)),c.value+=W),V)return;let{singleWaitTime:q}=n;u.value&&clearTimeout(u.value),S.value?Math.abs(v.value)%S.value{D()},q):D():w.value&&Math.abs(c.value)%w.value{D()},q):D()})},D=()=>{if(T(),d.value||!g.value||p.value===n.count){r("stop",p.value),p.value=0;return}A(n.direction,b.value,!1)},C=()=>{if(Uit(n.list),y.value){let $=o.value.offsetWidth;$=$*2+1,f.value=$}g.value?(h.value=s.value.offsetHeight,n.modelValue&&D()):(T(),v.value=c.value=0)},M=()=>{d.value=!1,D()},L=()=>{d.value=!0,u.value&&clearTimeout(u.value),T()},I=Wt(()=>n.hover&&n.modelValue&&g.value),P=Git(30,$=>{T();const W=S.value?S.value:15;$.deltaY<0&&A("down",W,!0),$.deltaY>0&&A("up",W,!0)}),R=$=>{P($)},B=()=>{T(),d.value=!1,C()};Vit({Reset:()=>{B()}}),J1(()=>n.list,()=>{n.isWatch&&S9(()=>{B()})},{deep:!0}),J1(()=>n.modelValue,$=>{$?M():L()}),J1(()=>n.count,$=>{$!==0&&M()}),BI(()=>{T(),clearTimeout(u.value)}),F1(()=>{g.value&&C()});const{default:z,html:G}=e,U=new Array(n.copyNum).fill(null),Z=()=>we($o,null,[we("div",{ref:o,style:_.value},[z&&z()]),g.value?U.map(()=>G&&typeof G=="function"?we("div",{style:_.value},[G()]):we("div",{style:_.value},[z&&z()])):null]);return()=>we("div",{ref:a,class:i.class},[n.wheel&&n.hover?we("div",{ref:s,style:m.value,onMouseenter:()=>{I.value&&L()},onMouseleave:()=>{I.value&&M()},onWheel:$=>{I.value&&R($)}},[Z()]):we("div",{ref:s,style:m.value,onMouseenter:()=>{I.value&&L()},onMouseleave:()=>{I.value&&M()}},[Z()])])}}),Xit=t=>(P0("data-v-f4a29e9a"),t=t(),R0(),t),Yit={class:"boxnav"},Zit=Xit(()=>at("div",{class:"listhead"},[at("span",null,"序号"),at("span",null,"医院名"),at("span",null,"床位数"),at("span",null,"就诊人数")],-1)),Qit={class:"listnav scrollDiv"},jit={class:"item"},qit=be({__name:"hospital",setup(t){const e=Ft(!0),r=Ft([{index:1,name:"湖口县中医医院",bad:854,visit:242},{index:2,name:"建民医院",bad:854,visit:242},{index:3,name:"湖口县人民医院",bad:854,visit:242},{index:4,name:"潘思宏诊所",bad:854,visit:242},{index:5,name:"湖口县中医医院新园区",bad:854,visit:242},{index:6,name:"湖口县人民医院新园区",bad:854,visit:242},{index:7,name:"潘郭华诊所",bad:854,visit:242},{index:8,name:"殷智诊所",bad:854,visit:242},{index:9,name:"庐山市人民医院",bad:854,visit:242}]);return Qi({hospitalList:[{index:1,name:"湖口县中医医院",bad:854,visit:242},{index:2,name:"建民医院",bad:854,visit:242},{index:3,name:"湖口县人民医院",bad:854,visit:242},{index:4,name:"潘思宏诊所",bad:854,visit:242},{index:5,name:"湖口县中医医院新园区",bad:854,visit:242},{index:6,name:"湖口县人民医院新园区",bad:854,visit:242},{index:7,name:"潘郭华诊所",bad:854,visit:242},{index:8,name:"殷智诊所",bad:854,visit:242},{index:9,name:"庐山市人民医院",bad:854,visit:242}]}),F1(()=>{}),(i,n)=>(jt(),he("div",Yit,[Zit,at("div",Qit,[we(vt(Wit),{class:"scroll",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=a=>e.value=a),list:r.value,step:.3,hover:!0,"limit-scroll-num":3,wheel:!0},{default:Qe(()=>[at("ul",null,[(jt(!0),he($o,null,w9(r.value,a=>(jt(),he("li",jit,[at("span",null,Mr(a.index),1),at("span",null,Mr(a.name),1),at("span",null,Mr(a.bad),1),at("span",null,Mr(a.visit),1)]))),256))])]),_:1},8,["modelValue","list"])])]))}}),Kit=T4(qit,[["__scopeId","data-v-f4a29e9a"]]);var qw;const dn=typeof window<"u";dn&&((qw=window==null?void 0:window.navigator)!=null&&qw.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function $it(t){return typeof t=="function"?t():vt(t)}function Jit(t){return FI()?(yb(t),!0):!1}function Kw(t,e,r={}){const{immediate:i=!0}=r,n=Ft(!1);let a=null;function o(){a&&(clearTimeout(a),a=null)}function s(){n.value=!1,o()}function l(...u){o(),n.value=!0,a=setTimeout(()=>{n.value=!1,a=null,t(...u)},$it(e))}return i&&(n.value=!0,dn&&l()),Jit(s),{isPending:kI(n),start:l,stop:s}}var tnt=typeof global=="object"&&global&&global.Object===Object&&global,ent=typeof self=="object"&&self&&self.Object===Object&&self,Dd=tnt||ent||Function("return this")(),b4=Dd.Symbol,vI=Object.prototype,rnt=vI.hasOwnProperty,int=vI.toString,k6=b4?b4.toStringTag:void 0;function nnt(t){var e=rnt.call(t,k6),r=t[k6];try{t[k6]=void 0;var i=!0}catch(a){}var n=int.call(t);return i&&(e?t[k6]=r:delete t[k6]),n}var ant=Object.prototype,ont=ant.toString;function snt(t){return ont.call(t)}var lnt="[object Null]",unt="[object Undefined]",$w=b4?b4.toStringTag:void 0;function dI(t){return t==null?t===void 0?unt:lnt:$w&&$w in Object(t)?nnt(t):snt(t)}function fnt(t){return t!=null&&typeof t=="object"}var hnt="[object Symbol]";function Ed(t){return typeof t=="symbol"||fnt(t)&&dI(t)==hnt}function cnt(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r-1}function Jnt(t,e){var r=this.__data__,i=R5(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function $4(t){var e=-1,r=t==null?0:t.length;for(this.clear();++et===void 0,bat=t=>typeof t=="boolean",L0=t=>typeof t=="number",Tat=t=>_7(t)?!Number.isNaN(Number(t)):!1;class Aat extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function Cat(t,e){throw new Aat("[".concat(t,"] ").concat(e))}const yI=(t="")=>t.split(" ").filter(e=>!!e.trim()),rb=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},Dat=(t,e)=>{!t||!e.trim()||t.classList.add(...yI(e))},Eat=(t,e)=>{!t||!e.trim()||t.classList.remove(...yI(e))},Mat=(t,e)=>{var r;if(!dn||!t||!e)return"";let i=zI(e);i==="float"&&(i="cssFloat");try{const n=t.style[i];if(n)return n;const a=(r=document.defaultView)==null?void 0:r.getComputedStyle(t,"");return a?a[i]:""}catch(n){return t.style[i]}};function I0(t,e="px"){if(!t)return"";if(L0(t)||Tat(t))return"".concat(t).concat(e);if(_7(t))return t}let Ys;const Lat=t=>{var e;if(!dn)return 0;if(Ys!==void 0)return Ys;const r=document.createElement("div");r.className="".concat(t,"-scrollbar__wrap"),r.style.visibility="hidden",r.style.width="100px",r.style.position="absolute",r.style.top="-9999px",document.body.appendChild(r);const i=r.offsetWidth;r.style.overflow="scroll";const n=document.createElement("div");n.style.width="100%",r.appendChild(n);const a=n.offsetWidth;return(e=r.parentNode)==null||e.removeChild(r),Ys=i-a,Ys};/*! Element Plus Icons Vue v2.3.1 */var Iat=be({name:"Check",__name:"check",setup(t){return(e,r)=>(jt(),he("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[at("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Pat=Iat,Rat=be({name:"CircleCheck",__name:"circle-check",setup(t){return(e,r)=>(jt(),he("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[at("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),at("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Nat=Rat,Oat=be({name:"CircleClose",__name:"circle-close",setup(t){return(e,r)=>(jt(),he("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[at("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),at("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Bat=Oat,kat=be({name:"Close",__name:"close",setup(t){return(e,r)=>(jt(),he("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[at("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),_I=kat,Fat=be({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,r)=>(jt(),he("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[at("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),zat=Fat;const xI="__epPropKey",Gr=t=>t,Gat=t=>Zh(t)&&!!t[xI],Vat=(t,e)=>{if(!Zh(t)||Gat(t))return t;const{values:r,required:i,default:n,type:a,validator:o}=t,l={type:a,required:!!i,validator:r||o?u=>{let f=!1,h=[];if(r&&(h=Array.from(r),Od(t,"default")&&h.push(n),f||(f=h.includes(u))),o&&(f||(f=o(u))),!f&&h.length>0){const c=[...new Set(h)].map(v=>JSON.stringify(v)).join(", ");GI("Invalid prop: validation failed".concat(e?' for prop "'.concat(e,'"'):"",". Expected one of [").concat(c,"], got value ").concat(JSON.stringify(u),"."))}return f}:void 0,[xI]:!0};return Od(t,"default")&&(l.default=n),l},ga=t=>_at(Object.entries(t).map(([e,r])=>[e,Vat(r,e)])),Hat=Gr([String,Object,Function]),Uat={Close:_I},J4=(t,e)=>(t.install=r=>{for(const i of[t,...Object.values({})])r.component(i.name,i)},t),Wat=(...t)=>e=>{t.forEach(r=>{_b(r)?r(e):r.value=e})},SI={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},wI="update:modelValue";var _9=(t=>(t[t.TEXT=1]="TEXT",t[t.CLASS=2]="CLASS",t[t.STYLE=4]="STYLE",t[t.PROPS=8]="PROPS",t[t.FULL_PROPS=16]="FULL_PROPS",t[t.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",t[t.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",t[t.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",t[t.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",t[t.NEED_PATCH=512]="NEED_PATCH",t[t.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",t[t.HOISTED=-1]="HOISTED",t[t.BAIL=-2]="BAIL",t))(_9||{});const F6=t=>t,Xat=({from:t,replacement:e,scope:r,version:i,ref:n,type:a="API"},o)=>{J1(()=>vt(o),s=>{},{immediate:!0})},Yat=(t,e,r,i)=>{let n={offsetX:0,offsetY:0};const a=u=>{const f=u.clientX,h=u.clientY,{offsetX:c,offsetY:v}=n,d=t.value.getBoundingClientRect(),p=d.left,g=d.top,m=d.width,y=d.height,_=document.documentElement.clientWidth,x=document.documentElement.clientHeight,w=-p+c,S=-g+v,b=_-p-m+c,T=x-g-y+v,A=C=>{let M=c+C.clientX-f,L=v+C.clientY-h;i!=null&&i.value||(M=Math.min(Math.max(M,w),b),L=Math.min(Math.max(L,S),T)),n={offsetX:M,offsetY:L},t.value&&(t.value.style.transform="translate(".concat(I0(M),", ").concat(I0(L),")"))},D=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",D)};document.addEventListener("mousemove",A),document.addEventListener("mouseup",D)},o=()=>{e.value&&t.value&&e.value.addEventListener("mousedown",a)},s=()=>{e.value&&t.value&&e.value.removeEventListener("mousedown",a)},l=()=>{n={offsetX:0,offsetY:0},t.value&&(t.value.style.transform="none")};return F1(()=>{VI(()=>{r.value?o():s()})}),N0(()=>{s()}),{resetPostion:l}};var Zat={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const Qat=t=>(e,r)=>jat(e,r,vt(t)),jat=(t,e,r)=>yat(r,t,t).replace(/\{(\w+)\}/g,(i,n)=>{var a;return"".concat((a=e==null?void 0:e[n])!=null?a:"{".concat(n,"}"))}),qat=t=>{const e=Wt(()=>vt(t).name),r=xb(t)?t:Ft(t);return{lang:e,locale:r,t:Qat(t)}},Kat=Symbol("localeContextKey"),$at=t=>{const e=Ai(Kat,Ft());return qat(Wt(()=>e.value||Zat))},x9="el",Jat="is-",qa=(t,e,r,i,n)=>{let a="".concat(t,"-").concat(e);return r&&(a+="-".concat(r)),i&&(a+="__".concat(i)),n&&(a+="--".concat(n)),a},t2t=Symbol("namespaceContextKey"),bI=t=>{const e=D2()?Ai(t2t,Ft(x9)):Ft(x9);return Wt(()=>vt(e)||x9)},J2=(t,e)=>{const r=bI();return{namespace:r,b:(p="")=>qa(r.value,t,p,"",""),e:p=>p?qa(r.value,t,"",p,""):"",m:p=>p?qa(r.value,t,"","",p):"",be:(p,g)=>p&&g?qa(r.value,t,p,g,""):"",em:(p,g)=>p&&g?qa(r.value,t,"",p,g):"",bm:(p,g)=>p&&g?qa(r.value,t,p,"",g):"",bem:(p,g,m)=>p&&g&&m?qa(r.value,t,p,g,m):"",is:(p,...g)=>{const m=g.length>=1?g[0]:!0;return p&&m?"".concat(Jat).concat(p):""},cssVar:p=>{const g={};for(const m in p)p[m]&&(g["--".concat(r.value,"-").concat(m)]=p[m]);return g},cssVarName:p=>"--".concat(r.value,"-").concat(p),cssVarBlock:p=>{const g={};for(const m in p)p[m]&&(g["--".concat(r.value,"-").concat(t,"-").concat(m)]=p[m]);return g},cssVarBlockName:p=>"--".concat(r.value,"-").concat(t,"-").concat(p)}},e2t=(t,e={})=>{xb(t)||Cat("[useLockscreen]","You need to pass a ref param to this function");const r=e.ns||J2("popup"),i=Wt(()=>r.bm("parent","hidden"));if(!dn||rb(document.body,i.value))return;let n=0,a=!1,o="0";const s=()=>{setTimeout(()=>{Eat(document==null?void 0:document.body,i.value),a&&document&&(document.body.style.width=o)},200)};J1(t,l=>{if(!l){s();return}a=!rb(document.body,i.value),a&&(o=document.body.style.width),n=Lat(r.namespace.value);const u=document.documentElement.clientHeight0&&(u||f==="scroll")&&a&&(document.body.style.width="calc(100% - ".concat(n,"px)")),Dat(document.body,i.value)}),yb(()=>s())},TI=t=>{if(!t)return{onClick:G5,onMousedown:G5,onMouseup:G5};let e=!1,r=!1;return{onClick:o=>{e&&r&&t(o),e=r=!1},onMousedown:o=>{e=o.target===o.currentTarget},onMouseup:o=>{r=o.target===o.currentTarget}}},ib={prefix:Math.floor(Math.random()*1e4),current:0},r2t=Symbol("elIdInjection"),i2t=()=>D2()?Ai(r2t,ib):ib,nb=t=>{const e=i2t(),r=bI();return Wt(()=>vt(t)||"".concat(r.value,"-id-").concat(e.prefix,"-").concat(e.current++))};let Fo=[];const ab=t=>{const e=t;e.key===SI.esc&&Fo.forEach(r=>r(e))},n2t=t=>{F1(()=>{Fo.length===0&&document.addEventListener("keydown",ab),dn&&Fo.push(t)}),N0(()=>{Fo=Fo.filter(e=>e!==t),Fo.length===0&&dn&&document.removeEventListener("keydown",ab)})},ob={current:0},sb=Ft(0),a2t=2e3,lb=Symbol("elZIndexContextKey"),o2t=Symbol("zIndexContextKey"),s2t=t=>{const e=D2()?Ai(lb,ob):ob,r=D2()?Ai(o2t,void 0):void 0,i=Wt(()=>{const o=vt(r);return L0(o)?o:a2t}),n=Wt(()=>i.value+sb.value),a=()=>(e.current++,sb.value=e.current,n.value);return!dn&&Ai(lb),{initialZIndex:i,currentZIndex:n,nextZIndex:a}},l2t=Symbol(),ub=Ft();function u2t(t,e=void 0){const r=D2()?Ai(l2t,ub):ub;return Wt(()=>{var i,n;return(n=(i=r.value)==null?void 0:i[t])!=null?n:e})}var ma=(t,e)=>{const r=t.__vccOpts||t;for(const[i,n]of e)r[i]=n;return r};const f2t=ga({size:{type:Gr([Number,String])},color:{type:String}}),h2t=be({name:"ElIcon",inheritAttrs:!1}),c2t=be({...h2t,props:f2t,setup(t){const e=t,r=J2("icon"),i=Wt(()=>{const{size:n,color:a}=e;return!n&&!a?{}:{fontSize:wat(n)?void 0:I0(n),"--color":a}});return(n,a)=>(jt(),he("i",Sb({class:vt(r).b(),style:vt(i)},n.$attrs),[br(n.$slots,"default")],16))}});var v2t=ma(c2t,[["__file","icon.vue"]]);const AI=J4(v2t),V8="focus-trap.focus-after-trapped",H8="focus-trap.focus-after-released",d2t="focus-trap.focusout-prevented",fb={cancelable:!0,bubbles:!1},p2t={cancelable:!0,bubbles:!1},hb="focusAfterTrapped",cb="focusAfterReleased",CI=Symbol("elFocusTrap"),Id=Ft(),O5=Ft(0),Pd=Ft(0);let Zs=0;const DI=t=>{const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const n=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||n?NodeFilter.FILTER_SKIP:i.tabIndex>=0||i===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e},vb=(t,e)=>{for(const r of t)if(!g2t(r,e))return r},g2t=(t,e)=>{if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},m2t=t=>{const e=DI(t),r=vb(e,t),i=vb(e.reverse(),t);return[r,i]},y2t=t=>t instanceof HTMLInputElement&&"select"in t,kn=(t,e)=>{if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),Pd.value=window.performance.now(),t!==r&&y2t(t)&&e&&t.select()}};function db(t,e){const r=[...t],i=t.indexOf(e);return i!==-1&&r.splice(i,1),r}const _2t=()=>{let t=[];return{push:i=>{const n=t[0];n&&i!==n&&n.pause(),t=db(t,i),t.unshift(i)},remove:i=>{var n,a;t=db(t,i),(a=(n=t[0])==null?void 0:n.resume)==null||a.call(n)}}},x2t=(t,e=!1)=>{const r=document.activeElement;for(const i of t)if(kn(i,e),document.activeElement!==r)return},pb=_2t(),S2t=()=>O5.value>Pd.value,Qs=()=>{Id.value="pointer",O5.value=window.performance.now()},gb=()=>{Id.value="keyboard",O5.value=window.performance.now()},w2t=()=>(F1(()=>{Zs===0&&(document.addEventListener("mousedown",Qs),document.addEventListener("touchstart",Qs),document.addEventListener("keydown",gb)),Zs++}),N0(()=>{Zs--,Zs<=0&&(document.removeEventListener("mousedown",Qs),document.removeEventListener("touchstart",Qs),document.removeEventListener("keydown",gb))}),{focusReason:Id,lastUserFocusTimestamp:O5,lastAutomatedFocusTimestamp:Pd}),js=t=>new CustomEvent(d2t,{...p2t,detail:t}),b2t=be({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[hb,cb,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const r=Ft();let i,n;const{focusReason:a}=w2t();n2t(d=>{t.trapped&&!o.paused&&e("release-requested",d)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=d=>{if(!t.loop&&!t.trapped||o.paused)return;const{key:p,altKey:g,ctrlKey:m,metaKey:y,currentTarget:_,shiftKey:x}=d,{loop:w}=t,S=p===SI.tab&&!g&&!m&&!y,b=document.activeElement;if(S&&b){const T=_,[A,D]=m2t(T);if(A&&D){if(!x&&b===D){const M=js({focusReason:a.value});e("focusout-prevented",M),M.defaultPrevented||(d.preventDefault(),w&&kn(A,!0))}else if(x&&[A,T].includes(b)){const M=js({focusReason:a.value});e("focusout-prevented",M),M.defaultPrevented||(d.preventDefault(),w&&kn(D,!0))}}else if(b===T){const M=js({focusReason:a.value});e("focusout-prevented",M),M.defaultPrevented||d.preventDefault()}}};Qh(CI,{focusTrapRef:r,onKeydown:s}),J1(()=>t.focusTrapEl,d=>{d&&(r.value=d)},{immediate:!0}),J1([r],([d],[p])=>{d&&(d.addEventListener("keydown",s),d.addEventListener("focusin",f),d.addEventListener("focusout",h)),p&&(p.removeEventListener("keydown",s),p.removeEventListener("focusin",f),p.removeEventListener("focusout",h))});const l=d=>{e(hb,d)},u=d=>e(cb,d),f=d=>{const p=vt(r);if(!p)return;const g=d.target,m=d.relatedTarget,y=g&&p.contains(g);t.trapped||m&&p.contains(m)||(i=m),y&&e("focusin",d),!o.paused&&t.trapped&&(y?n=g:kn(n,!0))},h=d=>{const p=vt(r);if(!(o.paused||!p))if(t.trapped){const g=d.relatedTarget;!xat(g)&&!p.contains(g)&&setTimeout(()=>{if(!o.paused&&t.trapped){const m=js({focusReason:a.value});e("focusout-prevented",m),m.defaultPrevented||kn(n,!0)}},0)}else{const g=d.target;g&&p.contains(g)||e("focusout",d)}};async function c(){await S9();const d=vt(r);if(d){pb.push(o);const p=d.contains(document.activeElement)?i:document.activeElement;if(i=p,!d.contains(p)){const m=new Event(V8,fb);d.addEventListener(V8,l),d.dispatchEvent(m),m.defaultPrevented||S9(()=>{let y=t.focusStartEl;_7(y)||(kn(y),document.activeElement!==y&&(y="first")),y==="first"&&x2t(DI(d),!0),(document.activeElement===p||y==="container")&&kn(d)})}}}function v(){const d=vt(r);if(d){d.removeEventListener(V8,l);const p=new CustomEvent(H8,{...fb,detail:{focusReason:a.value}});d.addEventListener(H8,u),d.dispatchEvent(p),!p.defaultPrevented&&(a.value=="keyboard"||!S2t()||d.contains(document.activeElement))&&kn(i!=null?i:document.body),d.removeEventListener(H8,u),pb.remove(o)}}return F1(()=>{t.trapped&&c(),J1(()=>t.trapped,d=>{d?c():v()})}),N0(()=>{t.trapped&&v(),r.value&&(r.value.removeEventListener("keydown",s),r.value.removeEventListener("focusin",f),r.value.removeEventListener("focusout",h),r.value=void 0)}),{onKeydown:s}}});function T2t(t,e,r,i,n,a){return br(t.$slots,"default",{handleKeydown:t.onKeydown})}var A2t=ma(b2t,[["render",T2t],["__file","focus-trap.vue"]]);const C2t=ga({to:{type:Gr([String,Object]),required:!0},disabled:Boolean}),D2t=be({__name:"teleport",props:C2t,setup(t){return(e,r)=>e.disabled?br(e.$slots,"default",{key:0}):(jt(),nn(HI,{key:1,to:e.to},[br(e.$slots,"default")],8,["to"]))}});var E2t=ma(D2t,[["__file","teleport.vue"]]);const M2t=J4(E2t),EI=Symbol("rowContextKey"),L2t=["start","center","end","space-around","space-between","space-evenly"],I2t=["top","middle","bottom"],P2t=ga({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:L2t,default:"start"},align:{type:String,values:I2t}}),R2t=be({name:"ElRow"}),N2t=be({...R2t,props:P2t,setup(t){const e=t,r=J2("row"),i=Wt(()=>e.gutter);Qh(EI,{gutter:i});const n=Wt(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft="-".concat(e.gutter/2,"px")),o}),a=Wt(()=>[r.b(),r.is("justify-".concat(e.justify),e.justify!=="start"),r.is("align-".concat(e.align),!!e.align)]);return(o,s)=>(jt(),nn(O0(o.tag),{class:Fe(vt(a)),style:q1(vt(n))},{default:Qe(()=>[br(o.$slots,"default")]),_:3},8,["class","style"]))}});var O2t=ma(N2t,[["__file","row.vue"]]);const MI=J4(O2t),B2t=ga({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Gr([Number,Object]),default:()=>F6({})},sm:{type:Gr([Number,Object]),default:()=>F6({})},md:{type:Gr([Number,Object]),default:()=>F6({})},lg:{type:Gr([Number,Object]),default:()=>F6({})},xl:{type:Gr([Number,Object]),default:()=>F6({})}}),k2t=be({name:"ElCol"}),F2t=be({...k2t,props:B2t,setup(t){const e=t,{gutter:r}=Ai(EI,{gutter:Wt(()=>0)}),i=J2("col"),n=Wt(()=>{const o={};return r.value&&(o.paddingLeft=o.paddingRight="".concat(r.value/2,"px")),o}),a=Wt(()=>{const o=[];return["span","offset","pull","push"].forEach(u=>{const f=e[u];L0(f)&&(u==="span"?o.push(i.b("".concat(e[u]))):f>0&&o.push(i.b("".concat(u,"-").concat(e[u]))))}),["xs","sm","md","lg","xl"].forEach(u=>{L0(e[u])?o.push(i.b("".concat(u,"-").concat(e[u]))):Zh(e[u])&&Object.entries(e[u]).forEach(([f,h])=>{o.push(f!=="span"?i.b("".concat(u,"-").concat(f,"-").concat(h)):i.b("".concat(u,"-").concat(h)))})}),r.value&&o.push(i.is("guttered")),[i.b(),o]});return(o,s)=>(jt(),nn(O0(o.tag),{class:Fe(vt(a)),style:q1(vt(n))},{default:Qe(()=>[br(o.$slots,"default")]),_:3},8,["class","style"]))}});var z2t=ma(F2t,[["__file","col.vue"]]);const LI=J4(z2t),G2t=ga({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:Gr([String,Array,Object])},zIndex:{type:Gr([String,Number])}}),V2t={click:t=>t instanceof MouseEvent},H2t="overlay";var U2t=be({name:"ElOverlay",props:G2t,emits:V2t,setup(t,{slots:e,emit:r}){const i=J2(H2t),n=l=>{r("click",l)},{onClick:a,onMousedown:o,onMouseup:s}=TI(t.customMaskEvent?void 0:n);return()=>t.mask?we("div",{class:[i.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:a,onMousedown:o,onMouseup:s},[br(e,"default")],_9.STYLE|_9.CLASS|_9.PROPS,["onClick","onMouseup","onMousedown"]):UI("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[br(e,"default")])}});const W2t=U2t,II=Symbol("dialogInjectionKey"),PI=ga({center:Boolean,alignCenter:Boolean,closeIcon:{type:Hat},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),X2t={close:()=>!0},Y2t=be({name:"ElDialogContent"}),Z2t=be({...Y2t,props:PI,emits:X2t,setup(t,{expose:e}){const r=t,{t:i}=$at(),{Close:n}=Uat,{dialogRef:a,headerRef:o,bodyId:s,ns:l,style:u}=Ai(II),{focusTrapRef:f}=Ai(CI),h=Wt(()=>[l.b(),l.is("fullscreen",r.fullscreen),l.is("draggable",r.draggable),l.is("align-center",r.alignCenter),{[l.m("center")]:r.center}]),c=Wat(f,a),v=Wt(()=>r.draggable),d=Wt(()=>r.overflow),{resetPostion:p}=Yat(a,o,v,d);return e({resetPostion:p}),(g,m)=>(jt(),he("div",{ref:vt(c),class:Fe(vt(h)),style:q1(vt(u)),tabindex:"-1"},[at("header",{ref_key:"headerRef",ref:o,class:Fe([vt(l).e("header"),{"show-close":g.showClose}])},[br(g.$slots,"header",{},()=>[at("span",{role:"heading","aria-level":g.ariaLevel,class:Fe(vt(l).e("title"))},Mr(g.title),11,["aria-level"])]),g.showClose?(jt(),he("button",{key:0,"aria-label":vt(i)("el.dialog.close"),class:Fe(vt(l).e("headerbtn")),type:"button",onClick:y=>g.$emit("close")},[we(vt(AI),{class:Fe(vt(l).e("close"))},{default:Qe(()=>[(jt(),nn(O0(g.closeIcon||vt(n))))]),_:1},8,["class"])],10,["aria-label","onClick"])):Jo("v-if",!0)],2),at("div",{id:vt(s),class:Fe(vt(l).e("body"))},[br(g.$slots,"default")],10,["id"]),g.$slots.footer?(jt(),he("footer",{key:0,class:Fe(vt(l).e("footer"))},[br(g.$slots,"footer")],2)):Jo("v-if",!0)],6))}});var Q2t=ma(Z2t,[["__file","dialog-content.vue"]]);const j2t=ga({...PI,appendToBody:Boolean,appendTo:{type:Gr([String,Object]),default:"body"},beforeClose:{type:Gr(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),q2t={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[wI]:t=>bat(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},K2t=(t,e)=>{var r;const n=D2().emit,{nextZIndex:a}=s2t();let o="";const s=nb(),l=nb(),u=Ft(!1),f=Ft(!1),h=Ft(!1),c=Ft((r=t.zIndex)!=null?r:a());let v,d;const p=u2t("namespace",x9),g=Wt(()=>{const P={},R="--".concat(p.value,"-dialog");return t.fullscreen||(t.top&&(P["".concat(R,"-margin-top")]=t.top),t.width&&(P["".concat(R,"-width")]=I0(t.width))),P}),m=Wt(()=>t.alignCenter?{display:"flex"}:{});function y(){n("opened")}function _(){n("closed"),n(wI,!1),t.destroyOnClose&&(h.value=!1)}function x(){n("close")}function w(){d==null||d(),v==null||v(),t.openDelay&&t.openDelay>0?{stop:v}=Kw(()=>A(),t.openDelay):A()}function S(){v==null||v(),d==null||d(),t.closeDelay&&t.closeDelay>0?{stop:d}=Kw(()=>D(),t.closeDelay):D()}function b(){function P(R){R||(f.value=!0,u.value=!1)}t.beforeClose?t.beforeClose(P):S()}function T(){t.closeOnClickModal&&b()}function A(){dn&&(u.value=!0)}function D(){u.value=!1}function C(){n("openAutoFocus")}function M(){n("closeAutoFocus")}function L(P){var R;((R=P.detail)==null?void 0:R.focusReason)==="pointer"&&P.preventDefault()}t.lockScroll&&e2t(u);function I(){t.closeOnPressEscape&&b()}return J1(()=>t.modelValue,P=>{P?(f.value=!1,w(),h.value=!0,c.value=Sat(t.zIndex)?a():c.value++,S9(()=>{n("open"),e.value&&(e.value.scrollTop=0)})):u.value&&S()}),J1(()=>t.fullscreen,P=>{e.value&&(P?(o=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=o)}),F1(()=>{t.modelValue&&(u.value=!0,h.value=!0,w())}),{afterEnter:y,afterLeave:_,beforeLeave:x,handleClose:b,onModalClick:T,close:S,doClose:D,onOpenAutoFocus:C,onCloseAutoFocus:M,onCloseRequested:I,onFocusoutPrevented:L,titleId:s,bodyId:l,closed:f,style:g,overlayDialogStyle:m,rendered:h,visible:u,zIndex:c}},$2t=be({name:"ElDialog",inheritAttrs:!1}),J2t=be({...$2t,props:j2t,emits:q2t,setup(t,{expose:e}){const r=t,i=WI();Xat({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},Wt(()=>!!i.title));const n=J2("dialog"),a=Ft(),o=Ft(),s=Ft(),{visible:l,titleId:u,bodyId:f,style:h,overlayDialogStyle:c,rendered:v,zIndex:d,afterEnter:p,afterLeave:g,beforeLeave:m,handleClose:y,onModalClick:_,onOpenAutoFocus:x,onCloseAutoFocus:w,onCloseRequested:S,onFocusoutPrevented:b}=K2t(r,a);Qh(II,{dialogRef:a,headerRef:o,bodyId:f,ns:n,rendered:v,style:h});const T=TI(_),A=Wt(()=>r.draggable&&!r.fullscreen);return e({visible:l,dialogContentRef:s,resetPostion:()=>{s.value.resetPostion()}}),(C,M)=>(jt(),nn(vt(M2t),{to:C.appendTo,disabled:C.appendTo!=="body"?!1:!C.appendToBody},{default:Qe(()=>[we(XI,{name:"dialog-fade",onAfterEnter:vt(p),onAfterLeave:vt(g),onBeforeLeave:vt(m),persisted:""},{default:Qe(()=>[YI(we(vt(W2t),{"custom-mask-event":"",mask:C.modal,"overlay-class":C.modalClass,"z-index":vt(d)},{default:Qe(()=>[at("div",{role:"dialog","aria-modal":"true","aria-label":C.title||void 0,"aria-labelledby":C.title?void 0:vt(u),"aria-describedby":vt(f),class:Fe("".concat(vt(n).namespace.value,"-overlay-dialog")),style:q1(vt(c)),onClick:vt(T).onClick,onMousedown:vt(T).onMousedown,onMouseup:vt(T).onMouseup},[we(vt(A2t),{loop:"",trapped:vt(l),"focus-start-el":"container",onFocusAfterTrapped:vt(x),onFocusAfterReleased:vt(w),onFocusoutPrevented:vt(b),onReleaseRequested:vt(S)},{default:Qe(()=>[vt(v)?(jt(),nn(Q2t,Sb({key:0,ref_key:"dialogContentRef",ref:s},C.$attrs,{center:C.center,"align-center":C.alignCenter,"close-icon":C.closeIcon,draggable:vt(A),overflow:C.overflow,fullscreen:C.fullscreen,"show-close":C.showClose,title:C.title,"aria-level":C.headerAriaLevel,onClose:vt(y)}),ZI({header:Qe(()=>[C.$slots.title?br(C.$slots,"title",{key:1}):br(C.$slots,"header",{key:0,close:vt(y),titleId:vt(u),titleClass:vt(n).e("title")})]),default:Qe(()=>[br(C.$slots,"default")]),_:2},[C.$slots.footer?{name:"footer",fn:Qe(()=>[br(C.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):Jo("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[QI,vt(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var tot=ma(J2t,[["__file","dialog.vue"]]);const RI=J4(tot),eot=ga({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:t=>t>=0&&t<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:Gr(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:Gr([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Gr(Function),default:t=>"".concat(t,"%")}}),rot=be({name:"ElProgress"}),iot=be({...rot,props:eot,setup(t){const e=t,r={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},i=J2("progress"),n=Wt(()=>{const _={width:"".concat(e.percentage,"%"),animationDuration:"".concat(e.duration,"s")},x=y(e.percentage);return x.includes("gradient")?_.background=x:_.backgroundColor=x,_}),a=Wt(()=>(e.strokeWidth/e.width*100).toFixed(1)),o=Wt(()=>["circle","dashboard"].includes(e.type)?Number.parseInt("".concat(50-Number.parseFloat(a.value)/2),10):0),s=Wt(()=>{const _=o.value,x=e.type==="dashboard";return"\n M 50 50\n m 0 ".concat(x?"":"-").concat(_,"\n a ").concat(_," ").concat(_," 0 1 1 0 ").concat(x?"-":"").concat(_*2,"\n a ").concat(_," ").concat(_," 0 1 1 0 ").concat(x?"":"-").concat(_*2,"\n ")}),l=Wt(()=>2*Math.PI*o.value),u=Wt(()=>e.type==="dashboard"?.75:1),f=Wt(()=>{const _=-1*l.value*(1-u.value)/2;return"".concat(_,"px")}),h=Wt(()=>({strokeDasharray:"".concat(l.value*u.value,"px, ").concat(l.value,"px"),strokeDashoffset:f.value})),c=Wt(()=>({strokeDasharray:"".concat(l.value*u.value*(e.percentage/100),"px, ").concat(l.value,"px"),strokeDashoffset:f.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),v=Wt(()=>{let _;return e.color?_=y(e.percentage):_=r[e.status]||r.default,_}),d=Wt(()=>e.status==="warning"?zat:e.type==="line"?e.status==="success"?Nat:Bat:e.status==="success"?Pat:_I),p=Wt(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),g=Wt(()=>e.format(e.percentage));function m(_){const x=100/_.length;return _.map((S,b)=>_7(S)?{color:S,percentage:(b+1)*x}:S).sort((S,b)=>S.percentage-b.percentage)}const y=_=>{var x;const{color:w}=e;if(_b(w))return w(_);if(_7(w))return w;{const S=m(w);for(const b of S)if(b.percentage>_)return b.color;return(x=S[S.length-1])==null?void 0:x.color}};return(_,x)=>(jt(),he("div",{class:Fe([vt(i).b(),vt(i).m(_.type),vt(i).is(_.status),{[vt(i).m("without-text")]:!_.showText,[vt(i).m("text-inside")]:_.textInside}]),role:"progressbar","aria-valuenow":_.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[_.type==="line"?(jt(),he("div",{key:0,class:Fe(vt(i).b("bar"))},[at("div",{class:Fe(vt(i).be("bar","outer")),style:q1({height:"".concat(_.strokeWidth,"px")})},[at("div",{class:Fe([vt(i).be("bar","inner"),{[vt(i).bem("bar","inner","indeterminate")]:_.indeterminate},{[vt(i).bem("bar","inner","striped")]:_.striped},{[vt(i).bem("bar","inner","striped-flow")]:_.stripedFlow}]),style:q1(vt(n))},[(_.showText||_.$slots.default)&&_.textInside?(jt(),he("div",{key:0,class:Fe(vt(i).be("bar","innerText"))},[br(_.$slots,"default",{percentage:_.percentage},()=>[at("span",null,Mr(vt(g)),1)])],2)):Jo("v-if",!0)],6)],6)],2)):(jt(),he("div",{key:1,class:Fe(vt(i).b("circle")),style:q1({height:"".concat(_.width,"px"),width:"".concat(_.width,"px")})},[(jt(),he("svg",{viewBox:"0 0 100 100"},[at("path",{class:Fe(vt(i).be("circle","track")),d:vt(s),stroke:"var(".concat(vt(i).cssVarName("fill-color-light"),", #e5e9f2)"),"stroke-linecap":_.strokeLinecap,"stroke-width":vt(a),fill:"none",style:q1(vt(h))},null,14,["d","stroke","stroke-linecap","stroke-width"]),at("path",{class:Fe(vt(i).be("circle","path")),d:vt(s),stroke:vt(v),fill:"none",opacity:_.percentage?1:0,"stroke-linecap":_.strokeLinecap,"stroke-width":vt(a),style:q1(vt(c))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(_.showText||_.$slots.default)&&!_.textInside?(jt(),he("div",{key:2,class:Fe(vt(i).e("text")),style:q1({fontSize:"".concat(vt(p),"px")})},[br(_.$slots,"default",{percentage:_.percentage},()=>[_.status?(jt(),nn(vt(AI),{key:1},{default:Qe(()=>[(jt(),nn(O0(vt(d))))]),_:1})):(jt(),he("span",{key:0},Mr(vt(g)),1))])],6)):Jo("v-if",!0)],10,["aria-valuenow"]))}});var not=ma(iot,[["__file","progress.vue"]]);const aot=J4(not),oot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACUlJREFUeF7t3VFi4jgQhGF8spmcbCcnm8zJvJiFbCYBLJuSIuMvr5HbUpV+tVoGPBz8UYACNxUYaEMBCtxWACBmBwXuKAAQ04MCADEHKLBOARlknW6u2okCANmJ0Ya5TgGArNPNVTtRACA7Mdow1ykAkHW6uWonCgBkJ0Yb5joFALJON1ftRAGA7MRow1ynAEDW6eaqnSgAkI6MHsfx59SdYRjeOurWrrsCkG+0fxzHX+fb/3OjGxMor4D5PpMA8g3an8G4BcWtHk2gXID6hl7v85YAaej7SjA+9/BFRmlnGkAaaR2C49Jb2aSRbwBpIHQYDpA08OxyC4BUFvt8MvW70m1styoJC5DKwl7Cj+M4wXE6vq3wZ6tVQdSPIWWQigJXzh62WhW9k0EaiFs5e1xG8DYMw0uD4ezyFjJIJdsbZY9T74fjA5JKw9h9WMJWmgKVTq5u9VYtUslHgFQSttH2Sh1SyT81SGVhGwOiDqnkpwxSSdjxuMeqFPpaWIBUEhsglYSVQSoJ2zgsQCoJDpBKwjYOC5BKgjvFqiRs47AAqSR4Y0B8JquSjwCpJOwUtlWh7kFhPRMBUk/bCZDpG4BLvzm4tEceEi5VbEF7gCwQa03T2llE9ljjSvk1ACnXalXLyllE7bHKlfKLAFKu1eqWlSCxtVrtSPmFACnX6qGW4eci4HjIjfKLAVKu1cMtQ5kEHA87UR4AIOVaRVqevycynWyt+RouOCIulAcBSLlW0ZYLQHmdbuxH46LyFwcDSLFU9RpefpP3U1aZPqHrN3rryV4UGSBFMmm0VwUAslfnjbtIAYAUyaTRXhUASMj5cx2x5mQq1IP3MKe6Rf2SkRUgD+h4fq7xY+WR7QN3Lr7U+0WKpbreECArBAw98Ftx54cu8QxlhXwAWSDaRsH4OEIZZYHfp63qwva7bf4EcHz0TjYpnMkAKRAq/EHDgjs2aQKSApkBMiPSk8JxGTVIZvwHyB2BnmxbdWukILkzBwByQ5yWv85ekOlrN/HNxBsKA+Q2IDXfDFV7wi+NL4sApHzO7Cx7qEdsscrhmFo+eWGuFlkwHWyxPom10+xxUsFPCH0lByAA8QDRFqs8p+50e6UOUaSXQVL7lxDLevF9rWyz/tbeFuvrFqvlm6G+j4RbK6Y35v6lDEA+yLHnAv2DDB4afhADIAD5nEsAApDr+wsZ5KQLQAACkDvFD0AAAhCAlJ2PqEEeq0FOX2E9h5h+0aT226TKXD0cPvZr6e8AyyAySCyDTD8P+jJF6+y7I++fzl3x4BMgAAGILVZZMrbFenCLJYOUTbSttgIIQDwHuUMvQAACEICUJfgVDwoV6WXSbraVDCKDyCAySNkCJoOcdHLM65jXMa9j3rJF0xbLFssWyxarbLWwxbLF+jxTZBAZRAaRQWSQMgVkEBnkzkyxxQIIQAAyl0wc8zrmdczrmHdunfjv/4p0RboiXZFetlqoQdQgahA1yNxqoQZRg6hB1CBz64Qa5ItCtli2WLZYtlhzS6ctli2WLZYt1tw6YYtli3V9jsggMogMIoPIIGUKeFDoQaEHhWWsOMVyiuUUyynW3GqhBlGDqEHUIHPrhFMsp1hOsWYp8WleRboiXZE+u1CcGijSFemKdEX63GqhSFekK9IV6XPrhCJdka5In6VEka5IV6Qr0mcXCkX6/xKpQdQgahA1SNmiaYv1/FusXwtfTy2DyCC3V4/x+D7nsrXl1GoLb5haBMgwDBZNgMQAeV9tO35P+hJA3oFfsEg8dVOrxSd7F0707gGZhrcgK74eE8gElL+zAgC5MhXGcfx93D79nJklf+3VF4JVewL+NdEL+yZ7XHEFINcBmeD45w4kX1bawklYG4xL/Gv9m8Y0gX/tT+a4IQxA7kzZ84cXp4n14/hyyz9T01tbkAAgb8fwr+fuXABdC9TNCX8e0wT/9Hd3TGtv/kzXASTkZgKQYRhezjXDksJaRgh5eC0MQELiAiQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkCkJCQnYUBSMgQgISE7CwMQEKGACQkZGdhABIyBCAhITsLA5CQIQAJCdlZGICEDAFISMjOwgAkZAhAQkJ2FgYgIUMAEhKyszAACRkyjuPPw+Hw+4Fwr8Mw/JquD8D2MgzD2wN9celZAYAEp8J4nNkPhHuf1AB5QMXwpQAJCpoC5JxFVsM2HFNRcFi7DkXIoP0PrPxvwzC8fOzKA7B9iRUc4u5CASRs+cqJ/aVmeKCmUX8EPQVIUMyVBfZ7cf65Kysy0s1Y4WHuJhxAKli9YPWfndALIJmNVWGoTx8SIBUtPk/uH4fDYToCvvxNx69/Lke6pbcfx/FyhPxwrNJ7anc4AKTRLJiySurZRDJWo+Fv9jYA2ax1Ot5CAYC0UNk9NqsAQDZrnY63UAAgLVR2j80qAJDNWqfjLRQASAuV3WOzCgBks9bpeAsFANJCZffYrAIA2ax1Ot5CAYC0UNk9NqsAQDZrnY63UAAgLVR2j80qAJDNWqfjLRQASAuV3WOzCvwLY3N4I396xMQAAAAASUVORK5CYII=",sot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACxtJREFUeF7tnWGamzgQRM3JkjlZkpNlcjJ2GIMXY7DUrRIC+uXXfmvRoCo9uiUB0934hwIosKlAhzYogALbCgAIowMF3igAIAwPFAAQxgAK+BQgg/h046ggCgBIEKPppk8BAPHpxlFBFACQIEbTTZ8CAOLTjaOCKAAgQYymmz4FAMSnG0cFUQBAghhNN30KAIhPtypH9X3/cwjcdd1nlRMQ1KwAgJgl0x3Q9/3vMdqvjagDKH+ARqe5NRKAWBUTtB/B2IJi6wyfXdd9CE5PCIMCAGIQq7TpWEL9LYzzp+u6KfMUhuLwlAIAklJI9Lsza2ydHUhEvqTCAEhKIcHvosyxvBIgEXiTCgEgKYUKf68Ex3RVQFLoT+pwAEkpVPh73/fDnON7+bbGv+5rQlIjLjHvCiBuxZFQOXuQRSp6N4UGkIoi184eDxPJItVcBJBK0u6UPcgilfwjg1QWFkAqC7xTeDJIJaH3Kq8osyoZOIYFkEr6AkglYXcOCyCVBAeQSsLuHBZAKgkOIJWE3TksgFQSHEAqCbtzWACpJLj44cTUVfIofEoh5+8A4hQudRiApBQ6x+8AUtGn/ouSiuHnoT94TbeO0gBSR9fvqDtlEcqrih4CSEVxR0hqZxGyR0UPAaSiuDtkEbJHZf8ApLLAIyRV3gnhXZD65gFIfY2n+YgaEkqrHbwDkB1Enk4h2jz8/lYWq1b7GAcg++j8OEvhyhbvoO/sF4DsLPg4JxneUR8+HJf7rvrwdcVhQs4nSXf2C0B2Fnx5uvHFqgGUH7Pf/k3/zUfi2hoEIG315+wHVwBADm4Ql9dWAQBpqz9nP7gCALKTQdPf/lCejkm7Us31WABSQeNxKXeYdOeuUpVeBX9HpFTBjeMBRCRs4f6G6Cq+w7CRKFQTQArFnC3TWv8gTuGZk4fzIGNSonQDAElrtNniQFnjXS94ZqvAYwBxincSOKbe8YiK02cAcQh3MjiAxOHxdAiAGMU7KRxAYvQZQByC7fxBascVZh3CnCRLpnsjMohBrB2/UmK4KnNTVrcMkgFIplgnL62WvWTSnuk7gGQIdZHS6qmnvM+eYTwlVp5IF8seTNjzbGcOkquT6F3y3NPt1o4skpaaEiuh0RXLq1mXWdFK+A8gsQFhsg4g6TT6rsVVy6uxzyz5AkgxILW/rVt2gYVHMw95LyAl1ht9Lj7/YDUr4+YCIO8BUX8uNMOS3ZswD3kjOYC8B8RaXs0/7LbX67ZTD9znpszaHgQAsqGNo7x6THgdxxanjfkgdywskEU2HACQbUCs5VVTQMYPWv8euuPY+QcQALHdpB134cemm+NY28Wtt34Mck8Go8xaF5UMsqJL6QBr9Vj8osyyzp/YVV8ZCwCyDshQqli+UtK6vJp6Mc9i1j5QZgFIXiXjKJFal1cvexqOeQi76gCSBuSs5dXYs6dBbi31mIe8jg9KrIUmDkCOUl5992QxD6HMSt8T37YAkFdArMu7JXV/oX2rh89Xs6yAUGYtJAWQV0Dcqz+OuUtVQMY9EVN/KLOeLQGQmR4l5ZVnMNagY6XMsmZEVrNmxgDIMyDWwXSo+cesKyVlH4AAyPq927rqc7vdjrK8u+wQu+qi9EwGGYV0lFfLFSNTrS/ybytM0XLv/Lmuytd5+PAA8j8gVymvWO4VYgcgfkCOWl5Nw6NkufcpOwrH2+lCAcj98fDh5aYhg1j+nQYQ5wobDy/yZcU7Dw5Ajrp69QQ4L1FZ7nfrbckgd0Cs84+iVaJy27IjlCz3sqtOBnlkEOsK1NHLq5d5iKfMYledvw9SVF55Bl32vV/TkOXeQh3Dl1iO8uoU849pXPB0bxkhAPL1ZpFRwrOUV2vLvebVuuhlVmhAHKtXy91z6+TeyKKk+dOzVY7HaUI/mxUdEOsAP1V5RZlVfoMBkNvN8gXEeXllLlfK7XJHYFfdKV1YQDzl1YGf3k3ZX1pmhd1VjwxI0euojlo+NYir/s6uuk/eyICEmH+I5iFhd9VDAhKsvGK515c8vo8CkEzxCkuUzLNUbcauukPeqICEKq8osxxkjIdEBaRk9/xMy7vLkcFyr5GVcIB45h8XKK9e5iHD/3CsxIVb7gWQ9B2ltHZPn2HHFoUPLwLIjl41OZXjq+dn3T3f0rfkJapwz2VFzCDWDcKzPb2buvGU7KqTQVLqXuF3Q+29LK+sq19HlGvZp+wbRsRH38NlkHFymjsorlZe3Te/uu7J98wbRrjyKuxG4QhJKhssS5EzL+9uLvdm3jB41OSItUDta3ozYX+5Wzpeza19+SXx1/o33ACGv8u4fPw/ZOZ4bK6WqHyVY8e9kaH0+NzqU2YZchpJtuYTkxZjKbapx2k6WnihIecgVs08m4vWczRoH25FyqMxgGSodrHyaupx6NIpw/b7gkZuw8jtLgpI2Im3ZSwDSEKti5ZXq8u9loETpS2ABAaEP5STxhxA0oCk9kvSKh+3BfOQhDcAkgbE+u7IcXFYubKIj49YDAKQN2pdef4x6zZZ5M0YAJD3gFy5vGK5NyOVAAiA8PcIySAZt4pFkyDlFcu9TNLtcAxHRAKE5d7tMUKJtaHNRXfPt0YCE/UNZQBkG5BLL+8uu81y7/pAAJAVXYKVV6xmMUm3zUOClVcAAiBmQEKVV5M6lFmv44QSK/Dy7sptg5eoFqIAyCsguV88saWlc7RmNQtA3o/UoPOPSRReogKQJCAh5x/MQ1jmTRY5QZd3l7pQZs0UYQ4yE2MExPJnodeg+7HybakknMPjHotGwzeqrP+WMazHD+2HMiv8534eGdWjIMdsK+DNQs7PgT5dCMu0+pFJBhFrCiBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4ABEbACBiQRuHAxCxAQAiFrRxOAARGwAgYkEbhwMQsQEAIha0cTgAERsAIGJBG4cDELEBACIWtHE4AKlgQN/3vTHsZ9d1H/NjHDFuXdfhp1H4VHMETSnk+L3v+7+32+2n4dA1QH7fbrdfJTEMx9J0QwEAqTA0vhKIdXB/dF33ucggxTEqdC1cSACpZLkhi7xkj+mSDKBtxqjUvTBhAaSS1eNkfSiR3pVayYGdCdpLBqrUrXBhAaSy5WMW+LEAZSin/n3NqYcyKvlvI8Zw3J/cGMmT0GBVAQDZcWAMWWU517CeXhHDes7I7QEksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PakAgCQlokFkBQAksvv0PanAfyPSgxQmo/tjAAAAAElFTkSuQmCC",lot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACLZJREFUeF7t3Q12m0gQRWGxsolXlmRldlbGuB0UO4pkiaIw/fP5nDmZzKgLuMXt14AkTyc/CCBwk8CEDQII3CZAEGcHAp8QIIjTAwGCOAcQiBGQIDFuRg1CgCAHNnqe5x8Xm//vw99/Lf/+Mk3Ty4G7OfSmCfLF7V+kKCJ8W7npIsnPMoYwK8lteDlBNsB7dOg8z0WG8s/3R8fced2bLERJoukifX+Qt7awJEaWGJebIcrOrZUgOwHeWYzLvS5pcnk9s9ORjVWWIDv0+4vlOB8BSXboJUGSoR4kx/koyh2vp+RDGrocQRLbP8/zc+DuVOIevJUiSSJRgiTBPDg5XJMk9fGyDEESwFYmh2uShJ6eSxBkI8zlGUdZWtX448J9Y1cIshFgJdcdt47C9cjG/hJkA8DK08NSa0NvLbES4FWeHn+OcHp9iphwuEOWAC7Y9kbSQ4oE+ytBNoJrJT2Ww3SxHuy3BAmCm1/v7QaHHjLMMiuGnSABbo0tryyzAj22xNoArbHlFUE29FqCBOA1KohnIoFeEyQArbXrjz/LBbd7V3ebIKuRnU4ECUBrdAhBAo0jSABao0MIsrJxjd7BOh/lky96WNdwgqzj9fZqCRKA1ugQggQaR5AAtEaHECTQuEYFcZs30GuCBKB5DhKA1ugQggQaV+lHbO8diQS5R+jK/ydIAFqjgriDFeg1QQLQWryT5d28sUYTJMat3OotX/W513fuBvfq5jDLqyBRggTBNSaI5VWwzwQJgluWWS2kiPTY0GOCbIDXSIpIjw09JsgGeA2kiPTY2F+CbARY+R0t6bGxvwTZCLDiFCFHQm8JkgCxQkl8zU9SXwmSBLIiSciR2FOCJMKsQBJyJPeTIMlAD5SEHDv0kiA7QF0kOf9e9PLn3j8uyHciTJCdwJ7L7vwwUWrs3D+C7Ax4J1GI8UV9I8gXgf4gynnpVf7TmuXXz+U32L588S4PvTmCHNj+5SuEzntwTZY3GXxVz3FNIshx7G25AQIEaaBJdvE4AgQ5jr0tN0CAIA00yS4eR4Agx7G35QYIEKSBJtnF4wgQ5Dj2ttwAAYI00CS7eBwBghzH3pYbIECQBppkF48jQJDj2NtyAwQI0kCT7OJxBAhyHHtbboAAQRpokl08jgBBAuyXt6mv+SxHYCupQ7xtPoiTIA+CWz46W17dyq88uHZk5w9blU8k+uDVA70nyB1InYhxSxai3Ok/QT4BtPMXLjwwf33JS3y+/RPMBLkBp9HfZBs1yrfA3yBHkCtgBpPjDwG/x/Dfk4EgF0xGlWPBIEkuzgeCfAAyyDXHvWWYa5IPhAiywFiebTzfO3sG+f8kWRpNkHdBihwtPfzb01WCEOT9/JIeV10jSfnSvj2noVZqD35hfqtNBCHI73ODINcdcdtXghQ5ynWHi/Prjgz/e0eGX2IR5NOF8PDLLILM84/G36G756UeQfak20JtDwclyGcEJIgE+ez8kCAtzPJ77qMEkSAS5BMCBCEIQQgSDWFLrCi5XsZJEAkiQSRIdD6TIFFyvYyTIBJEgkiQ6HwmQaLkehknQSSIBJEg0flMgkTJ9TJOgkgQCSJBovOZBImS62WcBJEgEkSCROczCRIl18s4CSJBJIgEic5nEiRKrpdxEkSCSBAJEp3PJEiUXC/jJIgEkSASJDqfSZAouV7GSRAJIkEkSHQ+kyBRcr2MkyASRIJIkOh8JkGi5HoZJ0EkiASRINH5TIJEyfUyToJIEAkiQaLzmQSJkutlnASRIBJEgkTnMwkSJdfLOAkiQSSIBInOZxIkSq6XcRJEgkgQCRKdzyRIlFwv4ySIBJEgEiQ6n0mQKLlexkkQCSJBJEh0PpMgUXK9jJMgEkSCSJDofCZBouR6GSdBJIgEkSDR+UyCRMn1Mk6CSBAJIkGi85kEiZLrZZwEkSASRIJE5zMJEiXXyzgJIkEkiASJzmcSJEqul3ESRIJIEAkSnc+epml6iQ7uYdzUw0FsOYZ5nr+dTqfnLTU6HkuQjpv78KHNr+ush1880AunaRp+Ah0eQDnf53kuCVKSxM87gZdpmp5GB0KQ34L8eP3j++gnw8XxD7+8KjwIspwVlll/6SE9FhwEeRdEirw7Ij0I8u+CSoq8MZEeH04NCfIBhlu+p5M7V39PnAS5CJLBL9gtrS7OB4JcuXU1qCTkuHIuEOTGvd2BllvlrSTlTYlDv6Xk1i1+gtx5+NH5Q8Th361779kXQe4R+v0gsTxlLw8Se3naTowH+u5B4YOQzi9bRCl/PT91b0GYsnT6tRxDuYVrKbWi7xJkBaxrL635WsUt243N9VaT7QBLhVofMBJke38lyHaGBElgWGsJgiR0RoIkQKy0BEESGkOQBIiVliBIQmMIkgCx0hIESWgMQRIgVlqCIAmNIUgCxEpLECShMQRJgFhpCYIkNIYgCRArLUGQhMYQJAFipSUIktAYgiRArLQEQRIaQ5AEiJWWIEhCYwiSALHSEgRJaAxBEiBWWoIgCY0hSALESksQJKExBEmAWGkJgiQ0hiAJECstQZCExhAkAWKlJQiS0BiCJECstARBEhpDkASIlZYgSEJjCJIAsdISBEloDEESIFZagiAJjSFIAsRKSxAkoTEESYBYaQmCJDSGIAkQKy1BkITGECQBYqUlCJLQGIIkQKy0BEESGkOQBIiVliBIQmMIkgCx0hIESWgMQRIgVlqCIAmNIUgCxEpLECShMQRJgFhpCYIkNIYgCRArLUGQhMYQJAFipSUIktAYgiRArLQEQRIaQ5AEiJWWIEhCYwiSALHSEgRJaAxBEiBWWoIgCY0hSALESksQJKExBEmAWGkJgiQ0hiAJECstQZCExhAkAWKlJQiS0BiCJECstARBEhpDkASIlZYgSEJj5nl+TiiTXmKapqf0ooMVJMhgDXe46wgQZB0vrx6MAEEGa7jDXUeAIOt4efVgBAgyWMMd7joCBFnHy6sHI/A/MQ429mWzRzEAAAAASUVORK5CYII=",uot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACS1JREFUeF7tnQt2m0gQRcXKkqwszsrirIwYCRysSILqfk1XUdfnzBlPBkpwHzdVfCQNF34gAIGnBAbYQAACzwkgCEcHBF4QQBAODwggCMcABMoI0EHKuLFWEgII0jHocRy/r15+/fvyx+/TL8MwXP/Nz/EEEORg5rMUP+eXfSTFsy36NcvydvAmp345BDkg/pUUFiFebdmvYRgQ5YDsEKQx5HEcpwN56RjqV0MUNdG7egjSCHBjMe63GlEa5YggDcAeLMeyB0jSIEsEEUMdx/H35XJRnWtYtw5JrMQ2lkcQIdDOcnxeGh6G4Ydwt1KXQhBR/J3Gqmdb/44kmmARRMDRmRyckwgyXUogSCVMp3IgSWWuCCICOH4YIirVpMzwcUexSeEkRYFXEbTz7sFJe0W2dBABPO/dY7WLP3jgsSxwOkgZt0uQ7kEXKcyXDlIJLlD3uO4p5yJlgdNBCrgF6x7LHjJmFWSNIAXQggrCzcOCrBGkAFq08epznuaSrzltBDEim9/8ND2QGPGHMcuYGoIYgSGIEVjwxRHEGGDQ8w9O1I05c5m3EFhwQXi/iDF3OogRGIIYgQVfHEGMASKIEVjwxRHEGGDwk3RGLGPeCGIEFlwQLvMa80YQIzAEMQILvjiCFATInfQCaEFXQZCC4Jx8eol1yzn/sBKbnoIuWCf9KkHHLAQpOHIRpABaREF4P0hB0HSQMmjTWsHGLLpHYdR0kEJwwboIghTmjCCF4AJ1EeSoyBhBKuBF6CKce1QEzDlIHby5i7T8gpzaDaR7VBKkg1QCdDxq8R50QbYIIoDoUBLkEOWKICKQzs5HeChRlCuCiEDOXWT6ZqmeH+gwfZ/6dN7B96qLckUQEch1mU5vqmKsapAlgjSA2uHqFlerGuWIII3AriSZfm31PemMVA3zm0ojSGPAjURBjANyQ5CDIC8vM1/pmk7kvxV8VfRVimtonIQflhwd5DDU/7/QfDK//h+TOMvPn/mX6xUppOgTFIL04c6rBiGAIEGCYjP7EECQPtx51SAEECRIUGxmHwII0oc7rxqEAIIECYrN7EMAQfpw51WDEECQIEGxmX0IIEgf7rxqEAIIEiQoNrMPAQTpw51XDUIAQYIExWb2IYAgfbjzqkEIIEiQoNjMPgQQRMR99V4PUcWqMtP70/nghiqEt5URRACx04c0bG05H+KwRWjH/0eQHZBeLeJUjmWT+TCHynwRpBKgc0HoIpX5IkglwABf6MmnLFZkjCAV8Jx3j2XP6CIVGSNIBbwggkwf+EDOhTkDrhDctFqA8WrZO8aswpwRpBBclO4x7x5jVmHOCFIILti33DJmFeaMIAXgnH0XyN49YMzaS2q1HIIUQAs2XnE1qyDjZRUEKYAX6OT8y95xNcseNoIYmQXtHlzNMuZMBykEFlwQrmYZc6eDGIFFHa9Wu8nJuiFzBDHACt49GLMMWTNiFcA6iSCMWYbs6SAGWCcYr+gihrynRRFkJ7CTdA/uiezMmxHLCCraoyUbu8eYtTN/OshOUCcarxizdmbOiLUT1MnGK8asnbkjyE5QJ+we1z3n0ZPtA4ARa4NR0Cd3t5O/LcFNww1SCLItyNvHmwd/7j3igi3HyTqC1B2yZx2vPi9j8n71lwcIHeQFnpOenN/vMWPWi2MAQRCEMQtBysass49XKyp0kSeHCB3kCZgk49Wy9wiCILYukkwQxiwEMQsy2tYIvzRd5EGEjFgPoCTrHgsBvioBQfb9LX+yJ3f37fTlwpiFIPuOlURXr7gnwp30fVIsSyUdr5bdp4vcHS6cg9wBSdw9riR4wvfrAYEgKx7Juwf3RDgHeT1uIciVD2PW6jChg3ztINnufTz8G4Mx6x8WBJlZ0D2+uMJNwxkHgiDIoy7CmIUgX4+L7Fev7i1hzLoRoYPcvozzzG+rtd0I+rc0YxaC3I4GBHnoEGMWgnwKwtWrx30mfRdJP2LRPV5OYOmf8EWQD0NKh/QE66Ufs1ILcvIPhVP5m3rMyi4IV6+2NUrdRbILwni1LUjqJ3zTCsLJ+Q4zuCeS90YhgpgESTtmZe4gjFcGR7I+epJSELqHwYzkYxaCFB0rKVdKOWZlFYTxqszxdPdE0gnCeFVmxrwWglThC7By0g+FUyWTbszK2EEYr+p0SdVFUgnCeFVnxrx2qi6STRC6R70jCFLP0F8FntyVZpJmzErTQRivpIKk6SKZBGG8EjqS5dGTFIIwXgnNSPboSRZBeGOU3pEU71fPIsjvjw9l/q4/RlJXTHEekkUQzj8auJzhPARBGhw4WUoiyEmS5nN32wSJIG24Hl4VQZog5xykCdYORXmCtwl0rmI1wdqhKII0gY4gTbB2KMqNQjn0FHJM1FJcxZp2lGexpJLwsKIUp5NiSCIJIk33SNVBlkMDSaokSdM5FkppRqz1YYEkZklSdY01nZSCrLrJ9HzW9M+3+c94XutyeV8dIJMY6/82mxV9hdSCqMJzeiMyxY08VYbP6iCIgDCCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBIIgAotMSCCIIBkEEEJ2WQBBBMAgigOi0BIIIgkEQAUSnJRBEEAyCCCA6LYEggmAQRADRaQkEEQSDIAKITksgiCAYBBFAdFoCQQTBjOP4JiijLvE+DMO7umi2egiSLXH210QAQUy4WDgbAQTJljj7ayKAICZcLJyNAIJkS5z9NRFAEBMuFs5G4C+HcFj2qmcdhAAAAABJRU5ErkJggg==",fot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADD5JREFUeF7tnWl64zYMhuWbTE4y9ckmOVmck2Ru4o5kO160EAS4gNTrH+3ThiKpD3gFgNRyGPhVVeDz+/zfNIHD8OdhIpf/Nwyn6Z/n4Wv81/Ht8F51sjsc/LDDc3ZxyhMYFyhuMEjndRqBARapXLZ2AGLTL/poAxjzsc7DB6BEmyDqAACJksvW+PPv+VMRMUKDno6/DsdQI/6uUwBAdLpFHXWNGiMc+X7n4Xh8O1xqFn7JFACQZFIud/T5fX5/KcDzjUjKlVxbAEku6b3DIpHjdf5EkqQWBZCkcj539vn3fM7Y/WrXx18H7JpIeIRMJORrN5kKculsKdylSgXaAUgiIR+7KVp3rM2fVCuJZQEkiYw+UquXUyGKJLAtgCQQ0V30uE2IKGK2LoCYJZxFjxybgdpZEkW0yl2PAxCjgAvFeZWVq9XTIIqYLAwgJvleokfJTUHpvAFEqtRiOwAxydcAIMNAmmWwMYAYxFtIrzzVH7fpAYjBxgBiEA9AEorntCsASWiYWreWhE6BW09CCq3/HUD02s2OBJCEYjrpCkASGqLy/VdrZ0INYrAxgBjEowZJKJ7TrgAkoWFcRhAeojJZGEBM8s32QcY3leR9tDZ2vgASq9hTewAxyecfEFawbAYGEJt+SytZnjYLKdCN9gUQo4CzQv3yQjgfaRbpldm6AGKWcN6Bl2Kd9MpuXACxazhPszxEEaJHEssCSBIZ3UURao9EdgWQREIudVPr1hNSq3RGBZB0WvpItXhAKqlFASSpnAupVsmnDKk7klsTQJJLughJ/qVfIkcWSwJIFlmXO820/EtBntGGAJJR3MXCPV3KNX5pavyADp88yGhDAMko7lbX19eT/lZ8UAcwCtoMQAqKvTbUBMv4OwwjMOPv+SOe4/85Dx/jv4gYZQ0GIGX1ZrTGFACQxgzGdMsqACBl9Wa0xhQAkMYMxnTLKgAgCfWevkl4K7LvBfdthNvfEo741NV9ufc8fF3/cqKot8kNIAb9rkCMu+Sa5VrDyIpD76tglxUzfiIFAEQk073R9cu1fxT7F5EjZW4OMCKBAUQgUzdQrJ3rBRbSsQV9AGQDEBcf4xQAnKwJUWUmJYAseFf3ESNEFLfN/ygEIA/OsnswXsEBlAFAhmEAjEBI2TEouwdkd3VGKL1a//sunzvZNSCZHmDSu2ALR+4smuwSkGtK5ePthy1AsePaZHeAkFIlI3IXD27tChDgSAbHvaPOXxaxG0CAIwMcty47hmQXgFCMZ4Sjc0i6BwQ4CsDRMSRdAwIcBeHoFJJuAaHmqABHh5B0CQhwVITjMnQ3u+7dAQIc1eG4TKCTHff+APl7PjtxEabRASRdAUJR7pDJxvdIugGE1MohHB3UI10AAhxu4Wi+HgEQ577VzfQaTbWaB4To0QxCTS79tg8Iq1bNEDI0GEWaBoTo0Q4b15k2F0XaBoTo0RwhrUWRZgExRo/pabjRu8aXOz+8Y3d8pSi/ZQVGzb4SvIe4qSjSLiDa6LGxu2uErlewZo/Wmp/pb6gWaRIQiyMffx02z5nd+GfO1/QyQtJMFNkXIIJ7gwDkAZCAXhatQhcqL+G4TUCU6ZXEKJbo5MWoqeYh0ktpi1aK9eYAUTuwIHqMjqXuP5VXOupHCMj4fjHN17OaSLPaA0R/xfo4vh2CX1f61PbvyLFTTUUEyPjZucOgewlfA8V6U4BYCkOJsacIAiA/fGXXTBjVUwGv6ac1QN6HwxC/VyE0hAVAjfjujxFe4Q3Fuvs0qy1A/p51+a7U0JZ0wb23KyZYQDdplFLMPskhrQGiepxWagQiyItPCQExpaYRYyTx+MhOmgHE4rwRgOhSuEjRm2ke4bzq2i1ijBq6tQSI1nnFeS5LvLMIIlr5u0YQXfrr/BVBAPLgEwACIK9Rqh1AtMuvwhUs41WwRvTPP2Yh7aQpcP4Tno8AII8RRLtKVsNyZcYskp4CSAJjGorAmDxatUqW4PS8dlEEEM/3ZRFBniMIgDyjCiBeL12P87Is8ca8I1YdpVoQUTlHafpjWuBwvNTbRAQpAYhpDKXztXAYgDRgJePVSVSDAMiyIwAIgEwKAEhVQEQXsRqu2kqKpd1FF3+nwhSlaliu1JjC+sCkX8R+S6nTvo0DIFclTAYubbWS4wFISbV1Y5mcV3h1Mo2hO602jgIQ/3YyOS+A2AwMIDb9ShwNICVUXhmjxAVGOEYNFahBbjUI92Et+5/QeUtcxABkRYES4hueq65ht3JjAkg5rbUjAYhWuQTHAUgCETN3UQgQblRctqPohsUSNsrsZovdU4PcaxAAAZCZAgACIKELMxEkpFDtv5cI39zqvmplAKkNQGh8AAkplPXvAJJV3gSdA0gCEQ1dSG55L2EjwymoD6UG4Vb3oPMASFCiug1Mz2oI1vFN/deVpsjoQkAsn0HgeRCrJdVFtOBmOwDZto4EkLGHnDay+o/2+CZSrKv4qldbSowLIIkA+T6rHmyT2Ejr4Nbj2gFE82kCQXo1wafp26p8S8cLovDtdKLvaRPaqJZczQBydWT5FSpCeAAJuF8MIDEXmwgbAYhQAdFyYqTwAJIOkIeIPH4JbP3jnpE2ErpH8mZNRZDHs59AGX/3T7Kd/r3C8kvyoc5XFUXQJZe+oQ4jIkguG9VSq1lAUgoGIGkjSErb1O4LQPg2etgHlREk3LH/FgACIGEvBZCwRj23IMUixVpTgAhCBAlf+4ggYY16bkEECUYQt/dK5fZLIggRJOxjjexZhE8kvgWAAEjYawAkrFHPLUixSLEo0jd8AEAABEAARJ8EkGLptevhSCIIEYQIQgTRX8uIIHrtejiS292JIESQ7Qiif+FAD1eI0DkQQUIK9f13IggRhAhCBNFf5Yggeu16OJIIEowgx+Pb4dSDrWPPgVtNroqp3+kUq3iL7bmbt0WrpZ0zgGzoCSBpna3F3gAEQJYUIMW6p1iqNze2eDGInbPnNx/GnktsewABkKDPAEhQov4bRL8ys39Jfs4QQHZk7LVT5YbFVScQfWGqVxcixbqlWMo3k/fqGA/nBSA7MHLwFNksJIKwirWBCYCsiLPj20xGRUix7ikWd/QuMQIgwexjFw2IIEQQUqwA6k5206fPOExTvX/aod5Fase3mZBivbhddUAWnLH68jOA1Ls4eRu56mbhRq5fc1573iQkgswjSLX7sbYcEUDqXUpZxXrQ3qsj1kyziCD14HQ3sldHrDivXe+ik2K9plgVbzfZTLHqzQtA3F3GK06o5l6IS0B2vklIBJlHkGq76QBS8cq4MTRFupO9EAABEJ8KAMi6XXa+SUiKteAatZZ6PUaQvS/xAgiAbEZ1AOF295mDEEHukgAIgMwBqbTn4DDF2v0eCCnWUor1fa6y1OsOEPZAJu9gmdfJXgiA+FzkBJDlQv1c2lwAUlpx2XgAAiDLnsIeCCnW2jWkxkqWtwjCCtbFO4ggTvZCAESW8pRuBSDLK1nvpV+Y4AwQlnivfgEgTpZ6XQHCEu+PVwAIgMwVABAACeWypV8B5CyC7Pajna9+QQRZIaX0SpYnQFjBujsFgADITAEAAZBQhjWUfpOIowjCCtaDdxBB1iJI4ZsW3QBCgf7kEQACIM8KAAiABPOra4OSK1mOIggrWKRYMkRKrmR5AYQC/dk3SLE2WAEQ2YWk51YAsgVIwULdSQRhBevFHwAEQO4KUKDPvAFAAvlBqULdRQQBEACJzZdL1SEeAKFAn3sHESQcQYp8dQpAYi9dZdoDSAiQQoW6A0Ao0Bd8AUAEF6ISdUh1QKg/Fj0BQGSAZE+zAERgiApNAEQgeolCvTYgFOjLjgAgEkAK1CEAIjBEhSYAIhC9xLcLqwJC/bHqBQAiAGRskjnN2lxByg4ogACIkIPVZlkBEThozpU06o917yCCCMnJeRWXOGhGQNn/2PABABECki3NEkSPaexcCwXC8SNk6qopgESYM4OTRl29M7xIImr8CKm6aQogkaZMConiEwMpUy1JahcpT3fNAURh0iRXcgUct6kmGv/j+HZ4V5z+rg4BEKW5DZHkNFzy/pNy6OkwEyQGOC1zbvFYADFaLcJRk4DxON2IsW+HJZ+DUT73hwNIIhNNzjr+DsPvYRj+u3Y7OuTXv/8+WSPG1jQfxv6z0g4wlHYGEKVwXg+bUr8LoD8pXE44veqQal7/A0k3DjKeVrGjAAAAAElFTkSuQmCC",NI=t=>(P0("data-v-6c25d3d0"),t=t(),R0(),t),hot={class:"tit"},cot=NI(()=>at("div",{class:"boxnav people-content"},[at("div",null,[at("div",null,"18-44岁平均身高"),at("div",{class:"man-box"},[at("div",{class:"man-box-item"},[at("img",{src:oot,alt:""}),at("div",null,"169.7厘米")]),at("div",{class:"man-box-item"},[at("img",{src:sot,alt:""}),at("div",null,"158.1厘米")])]),at("div",null,"与2015年相比分别增加"),at("div",null,[at("span",{class:"largText"},"1.2厘米"),t4(" 和 "),at("span",{class:"largText"},"0.8厘米")])]),at("div",null,[at("div",null,"6-17岁平均身高"),at("div",{style:{"margin-top":"15px"}},"与2015年相比分别增加"),at("div",{class:"man-box"},[at("div",{class:"man-box-item"},[at("img",{src:lot,alt:""}),at("div",{class:"largText"},"1.6厘米")]),at("div",{class:"man-box-item"},[at("img",{src:uot,alt:""}),at("div",{class:"largText"},"1厘米")])])])],-1)),vot={class:"tit"},dot=NI(()=>at("div",{class:"weight-text"},[at("span",null,"超重肥胖率继续上升"),at("img",{src:fot,alt:""})],-1)),pot={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},got={class:"tit"},mot=be({__name:"townDialog",setup(t,{expose:e}){const r=Ft(!1),i=Ft({}),n=f=>{r.value=!0,i.value=f,setTimeout(()=>{s(),l()},100)},a=Ft(),o=Ft(),s=()=>{var f=l4(a.value),c={color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#00fefb"},{offset:1,color:"#0063ce"}],global:!1},grid:{top:"30%",left:10,right:0,bottom:"30%"},xAxis:{type:"category",axisTick:!1,axisLine:{lineStyle:{color:"rgba(255, 129, 109,.1)",width:1}},axisLabel:{interval:0,color:"#08DFFE",fontSize:12},data:["成年居民","6-17岁","6岁以下"]},yAxis:{show:!1,type:"value",interval:1,axisLine:{lineStyle:{color:"rgba(255, 129, 109, 0.1)",width:1}},axisLabel:{color:"#fff"},splitArea:{areaStyle:{color:"rgba(255,255,255,.5)"}},splitLine:{show:!0,lineStyle:{color:"rgba(255, 129, 109, 0.1)",width:.5,type:"dashed"}}},series:[{data:[50,19,10.4],type:"bar",barWidth:"40%",label:{show:!0,color:"#08DFFE",fontWeight:"bolder",fontSize:12,position:"top"}}]};f.setOption(c)},l=()=>{var f=l4(o.value);let h=["#0090FF","#36CE9E","#FFC005","#FF515A","#8B5CFF","#00CA69"],c={backgroundColor:"rgba(0,0,0,0.2)",color:h,legend:{right:10,left:0,top:10,textStyle:{color:"#fff"}},tooltip:{trigger:"axis",formatter:function(v){let d="";return v.forEach(p=>{d+='
\n \n ').concat(p.seriesName,".").concat(p.name,'\n ').concat(p.value,"\n ").concat(p.componentIndex===1?"岁":"%")}),d},extraCssText:"background: #fff; border-radius: 0;box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);color: #333;",axisPointer:{type:"shadow",shadowStyle:{color:"rgba(0,0,0,.2)",shadowColor:"rgba(225,225,225,1)",shadowBlur:5}}},grid:{top:"10%",bottom:0,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,axisLabel:{formatter:"{value}年",rotate:30,textStyle:{color:"#fff"}},axisLine:{lineStyle:{color:"#fff"}},data:["2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020","2021","2022","2023"]}],yAxis:[{type:"value",name:"单位:万千瓦时",axisLabel:{textStyle:{color:"#fff"}},nameTextStyle:{color:"#fff",fontSize:12,lineHeight:40},splitLine:{show:!1},axisLine:{show:!1},axisTick:{show:!1}}],series:[{name:"疫苗接种率",type:"line",symbolSize:8,zlevel:3,lineStyle:{normal:{color:h[0],shadowBlur:3,shadowColor:u(h[0],.5),shadowOffsetY:8}},areaStyle:{normal:{color:new ei(0,0,0,1,[{offset:0,color:u(h[0],.3)},{offset:1,color:u(h[0],.1)}],!1),shadowColor:u(h[0],.1),shadowBlur:10}},data:[72.6,78.8,71.3,83.2,64.2,79.2,85.2,86.2,84.5,82.6,87.2,88.2,89.2,90.2]},{name:"居民人均寿命",type:"line",symbolSize:8,zlevel:3,lineStyle:{normal:{color:h[1],shadowBlur:3,shadowColor:u(h[1],.5),shadowOffsetY:8}},areaStyle:{normal:{color:new ei(0,0,0,1,[{offset:0,color:u(h[1],.3)},{offset:1,color:u(h[1],.1)}],!1),shadowColor:u(h[1],.1),shadowBlur:10}},data:[65.4,68.6,70.58,73.2,73.3,73.4,75.6,73.5,73.6,76.8,73.7,73.8,73.9,83.8]},{name:"重大疾病发病率",type:"line",symbolSize:8,zlevel:3,lineStyle:{normal:{color:h[2],shadowBlur:3,shadowColor:u(h[2],.5),shadowOffsetY:8}},areaStyle:{normal:{color:new ei(0,0,0,1,[{offset:0,color:u(h[2],.3)},{offset:1,color:u(h[2],.1)}],!1),shadowColor:u(h[2],.1),shadowBlur:10}},data:[45.4,28.6,20.58,13.2,13.3,13.4,25.6,23.5,13.6,16.8,43.7,3.8,3.9,13.8]}]};f.setOption(c)},u=(f,h)=>{let c="";return/^#[\da-f]{6}$/i.test(f)&&(c="rgba(".concat(parseInt("0x"+f.slice(1,3)),",").concat(parseInt("0x"+f.slice(3,5)),",").concat(parseInt("0x"+f.slice(5,7)),",").concat(h,")")),c};return e({show:n}),(f,h)=>{var p;const c=LI,v=MI,d=RI;return jt(),nn(d,{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=g=>r.value=g),title:((p=i.value)==null?void 0:p.name)+"健康大数据",class:"hukou-dialog",width:"60%"},{footer:Qe(()=>[]),default:Qe(()=>{var g;return[at("div",null,[we(v,{gutter:20},{default:Qe(()=>[we(c,{span:15,class:"box card fadeIn delay06",style:{height:"200px"}},{default:Qe(()=>{var m;return[at("div",hot,Mr((m=i.value)==null?void 0:m.name)+"人更高了",1),cot]}),_:1}),we(c,{span:8,class:"box card fadeIn delay06",style:{"margin-left":"20px",height:"200px",position:"relative"}},{default:Qe(()=>{var m;return[at("div",vot,Mr((m=i.value)==null?void 0:m.name)+"人更胖了",1),dot,at("div",{class:"user-container layout-pd",ref_key:"weightRef",ref:a,style:{height:"200px"}},null,512)]}),_:1})]),_:1}),at("div",pot,[at("div",got,Mr((g=i.value)==null?void 0:g.name)+"人更健康了",1),at("div",{class:"user-container layout-pd",ref_key:"geneRef",ref:o,style:{height:"200px"}},null,512)])])]}),_:1},8,["modelValue","title"])}}}),yot=T4(mot,[["__scopeId","data-v-6c25d3d0"]]),_ot=be({__name:"gene",setup(t){const e=Ft();Qi({charts:{theme:"",bgColor:"",color:"#303133"}});const r=()=>{var i=l4(e.value),a={color:"#04CFE4",grid:{top:20,left:10,right:0,bottom:40},xAxis:{type:"category",axisTick:!1,axisLine:{lineStyle:{color:"rgba(255, 129, 109,.1)",width:1}},axisLabel:{interval:0,color:"#08DFFE",rotate:30,fontSize:12},data:["肝癌","肺癌","胃癌","结直肠癌","食管癌","胰腺癌","脑胶质瘤","肾癌","膀胱癌","前列腺癌"]},yAxis:{show:!1,type:"value",interval:1,axisLine:{lineStyle:{color:"rgba(255, 129, 109, 0.1)",width:1}},axisLabel:{color:"#fff"},splitArea:{areaStyle:{color:"rgba(255,255,255,.5)"}},splitLine:{show:!0,lineStyle:{color:"rgba(255, 129, 109, 0.1)",width:.5,type:"dashed"}}},series:[{data:[1.23,.86,2.11,1.23,.92,1.92,2.92,.32,.12,2.92],type:"pictorialBar",barCategoryGap:"0%",symbol:"path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z",label:{show:!0,position:"top",color:"#08DFFE",fontWeight:"bolder",fontSize:12,formatter:o=>o.data+"%"},itemStyle:{normal:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#9A11FF"},{offset:1,color:"#08DFFE"}],global:!1}},emphasis:{opacity:1}}}]};i.setOption(a)};return F1(()=>{r()}),(i,n)=>(jt(),he("div",{class:"boxnav",ref_key:"geneRef",ref:e,style:{padding:"0 10px"}},null,512))}});fG({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(t){return{fill:t.get("color")}},visualDrawType:"fill",optionUpdated:function(){var t=this.option;t.gridSize=Math.max(Math.floor(t.gridSize),4)},getInitialData:function(t,e){var r=V4(t.data,{coordDimensions:["value"]}),i=new Le(r,this);return i.initData(t.data),i},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}});hG({type:"wordCloud",render:function(t,e,r){var i=this.group;i.removeAll();var n=t.getData(),a=t.get("gridSize");t.layoutInstance.ondraw=function(o,s,l,u){var f=n.getItemModel(l),h=f.getModel("textStyle"),c=new Ht({style:Zl(h),scaleX:1/u.info.mu,scaleY:1/u.info.mu,x:(u.gx+u.info.gw/2)*a,y:(u.gy+u.info.gh/2)*a,rotation:u.rot});c.setStyle({x:u.info.fillTextOffsetX,y:u.info.fillTextOffsetY+s*.5,text:o,verticalAlign:"middle",fill:n.getItemVisual(l,"style").fill,fontSize:s}),i.add(c),n.setItemGraphicEl(l,c),c.ensureState("emphasis").style=Zl(f.getModel(["emphasis","textStyle"]),{state:"emphasis"}),c.ensureState("blur").style=Zl(f.getModel(["blur","textStyle"]),{state:"blur"}),Kn(c,f.get(["emphasis","focus"]),f.get(["emphasis","blurScope"])),c.stateTransition={duration:t.get("animation")?t.get(["stateAnimation","duration"]):0,easing:t.get(["stateAnimation","easing"])},c.__highDownDispatcher=!0},this._model=t},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}});/*! * wordcloud2.js * http://timdream.org/wordcloud2.js/ * * Copyright 2011 - 2019 Tim Guan-tin Chien and contributors. * Released under the MIT license */window.setImmediate||(window.setImmediate=function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var r=[void 0],i="zero-timeout-message",n=function(o){var s=r.length;return r.push(o),window.postMessage(i+s.toString(36),"*"),s};return window.addEventListener("message",function(o){if(!(typeof o.data!="string"||o.data.substr(0,i.length)!==i)){o.stopImmediatePropagation();var s=parseInt(o.data.substr(i.length),36);r[s]&&(r[s](),r[s]=void 0)}},!0),window.clearImmediate=function(o){r[o]&&(r[o]=void 0)},n}()||function(r){window.setTimeout(r,0)}}());window.clearImmediate||(window.clearImmediate=function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(r){window.clearTimeout(r)}}());var Rd=function(){var e=document.createElement("canvas");if(!e||!e.getContext)return!1;var r=e.getContext("2d");return!(!r||!r.getImageData||!r.fillText||!Array.prototype.some||!Array.prototype.push)}(),Yh=function(){if(Rd){for(var e=document.createElement("canvas").getContext("2d"),r=20,i,n;r;){if(e.font=r.toString(10)+"px sans-serif",e.measureText("W").width===i&&e.measureText("m").width===n)return r+1;i=e.measureText("W").width,n=e.measureText("m").width,r--}return 0}}(),xot=function(t){if(Array.isArray(t)){var e=t.slice();return e.splice(0,2),e}else return[]},Sot=function(e){for(var r,i,n=e.length;n;)r=Math.floor(Math.random()*n),i=e[--n],e[n]=e[r],e[r]=i;return e},Po={},B5=function(e,r){if(!Rd)return;var i=Math.floor(Math.random()*Date.now());Array.isArray(e)||(e=[e]),e.forEach(function(W,V){if(typeof W=="string"){if(e[V]=document.getElementById(W),!e[V])throw new Error("The element id specified is not found.")}else if(!W.tagName&&!W.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")});var n={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,layoutAnimation:!0,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(r)for(var a in r)a in n&&(n[a]=r[a]);if(typeof n.weightFactor!="function"){var o=n.weightFactor;n.weightFactor=function(V){return V*o}}if(typeof n.shape!="function")switch(n.shape){case"circle":default:n.shape="circle";break;case"cardioid":n.shape=function(V){return 1-Math.sin(V)};break;case"diamond":n.shape=function(V){var K=V%(2*Math.PI/4);return 1/(Math.cos(K)+Math.sin(K))};break;case"square":n.shape=function(V){return Math.min(1/Math.abs(Math.cos(V)),1/Math.abs(Math.sin(V)))};break;case"triangle-forward":n.shape=function(V){var K=V%(2*Math.PI/3);return 1/(Math.cos(K)+Math.sqrt(3)*Math.sin(K))};break;case"triangle":case"triangle-upright":n.shape=function(V){var K=(V+Math.PI*3/2)%(2*Math.PI/3);return 1/(Math.cos(K)+Math.sqrt(3)*Math.sin(K))};break;case"pentagon":n.shape=function(V){var K=(V+.955)%(2*Math.PI/5);return 1/(Math.cos(K)+.726543*Math.sin(K))};break;case"star":n.shape=function(V){var K=(V+.955)%(2*Math.PI/10);return(V+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-K)+3.07768*Math.sin(2*Math.PI/10-K)):1/(Math.cos(K)+3.07768*Math.sin(K))};break}n.gridSize=Math.max(Math.floor(n.gridSize),4);var s=n.gridSize,l=s-n.maskGapWidth,u=Math.abs(n.maxRotation-n.minRotation),f=Math.min(n.maxRotation,n.minRotation),h=n.rotationStep,c,v,d,p,g,m,y;function _(W,V){return"hsl("+(Math.random()*360).toFixed()+","+(Math.random()*30+70).toFixed()+"%,"+(Math.random()*(V-W)+W).toFixed()+"%)"}switch(n.color){case"random-dark":y=function(){return _(10,50)};break;case"random-light":y=function(){return _(50,90)};break;default:typeof n.color=="function"&&(y=n.color);break}var x;typeof n.fontWeight=="function"&&(x=n.fontWeight);var w=null;typeof n.classes=="function"&&(w=n.classes);var S=!1,b=[],T,A=function(V){var K=V.currentTarget,Y=K.getBoundingClientRect(),q,et;V.touches?(q=V.touches[0].clientX,et=V.touches[0].clientY):(q=V.clientX,et=V.clientY);var nt=q-Y.left,J=et-Y.top,ut=Math.floor(nt*(K.width/Y.width||1)/s),_t=Math.floor(J*(K.height/Y.height||1)/s);return b[ut]?b[ut][_t]:null},D=function(V){var K=A(V);if(T!==K){if(T=K,!K){n.hover(void 0,void 0,V);return}n.hover(K.item,K.dimension,V)}},C=function(V){var K=A(V);K&&(n.click(K.item,K.dimension,V),V.preventDefault())},M=[],L=function(V){if(M[V])return M[V];var K=V*8,Y=K,q=[];for(V===0&&q.push([p[0],p[1],0]);Y--;){var et=1;n.shape!=="circle"&&(et=n.shape(Y/K*2*Math.PI)),q.push([p[0]+V*et*Math.cos(-Y/K*2*Math.PI),p[1]+V*et*Math.sin(-Y/K*2*Math.PI)*n.ellipticity,Y/K*2*Math.PI])}return M[V]=q,q},I=function(){return n.abortThreshold>0&&new Date().getTime()-m>n.abortThreshold},P=function(){return n.rotateRatio===0||Math.random()>n.rotateRatio?0:u===0?f:f+Math.round(Math.random()*u/h)*h},R=function(V,K,Y,q){var et=n.weightFactor(K);if(et<=n.minSize)return!1;var nt=1;etFi[1]&&(Fi[1]=ya),SnFi[2]&&(Fi[2]=Sn);break t}}return{mu:nt,occupied:Nd,bounds:Fi,gw:Ne,gh:Te,fillTextOffsetX:De,fillTextOffsetY:Qt,fillTextWidth:St,fillTextHeight:bt,fontSize:et}},B=function(V,K,Y,q,et){for(var nt=et.length;nt--;){var J=V+et[nt][0],ut=K+et[nt][1];if(J>=v||ut>=d||J<0||ut<0){if(!n.drawOutOfBound)return!1;continue}if(!c[J][ut])return!1}return!0},O=function(V,K,Y,q,et,nt,J,ut,_t,St){var bt=Y.fontSize,Pt;y?Pt=y(q,et,bt,nt,J,St):Pt=n.color;var ae;x?ae=x(q,et,bt,St):ae=n.fontWeight;var Ie;w?Ie=w(q,et,bt,St):Ie=n.classes,e.forEach(function(Se){if(Se.getContext){var De=Se.getContext("2d"),Qt=Y.mu;De.save(),De.scale(1/Qt,1/Qt),De.font=ae+" "+(bt*Qt).toString(10)+"px "+n.fontFamily,De.fillStyle=Pt,De.translate((V+Y.gw/2)*s*Qt,(K+Y.gh/2)*s*Qt),ut!==0&&De.rotate(-ut),De.textBaseline="middle",De.fillText(q,Y.fillTextOffsetX*Qt,(Y.fillTextOffsetY+bt*.5)*Qt),De.restore()}else{var Te=document.createElement("span"),Ne="";Ne="rotate("+-ut/Math.PI*180+"deg) ",Y.mu!==1&&(Ne+="translateX(-"+Y.fillTextWidth/4+"px) scale("+1/Y.mu+")");var d1={position:"absolute",display:"block",font:ae+" "+bt*Y.mu+"px "+n.fontFamily,left:(V+Y.gw/2)*s+Y.fillTextOffsetX+"px",top:(K+Y.gh/2)*s+Y.fillTextOffsetY+"px",width:Y.fillTextWidth+"px",height:Y.fillTextHeight+"px",lineHeight:bt+"px",whiteSpace:"nowrap",transform:Ne,webkitTransform:Ne,msTransform:Ne,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};Pt&&(d1.color=Pt),Te.textContent=q;for(var to in d1)Te.style[to]=d1[to];if(_t)for(var E3 in _t)Te.setAttribute(E3,_t[E3]);Ie&&(Te.className+=Ie),Se.appendChild(Te)}})},z=function(V,K,Y,q,et){if(!(V>=v||K>=d||V<0||K<0)){if(c[V][K]=!1,Y){var nt=e[0].getContext("2d");nt.fillRect(V*s,K*s,l,l)}S&&(b[V][K]={item:et,dimension:q})}},G=function(V,K,Y,q,et,nt){var J=et.occupied,ut=n.drawMask,_t;ut&&(_t=e[0].getContext("2d"),_t.save(),_t.fillStyle=n.maskColor);var St;if(S){var bt=et.bounds;St={x:(V+bt[3])*s,y:(K+bt[0])*s,w:(bt[1]-bt[3]+1)*s,h:(bt[2]-bt[0]+1)*s}}for(var Pt=J.length;Pt--;){var ae=V+J[Pt][0],Ie=K+J[Pt][1];ae>=v||Ie>=d||ae<0||Ie<0||z(ae,Ie,ut,St,nt)}ut&&_t.restore()},U=function W(V,K){if(K>20)return null;var Y,q,et;Array.isArray(V)?(Y=V[0],q=V[1]):(Y=V.word,q=V.weight,et=V.attributes);var nt=P(),J=xot(V),ut=R(Y,q,nt,J);if(!ut||I())return!1;if(!n.drawOutOfBound&&!n.shrinkToFit){var _t=ut.bounds;if(_t[1]-_t[3]+1>v||_t[2]-_t[0]+1>d)return!1}for(var St=g+1,bt=function(Se){var De=Math.floor(Se[0]-ut.gw/2),Qt=Math.floor(Se[1]-ut.gh/2),Te=ut.gw,Ne=ut.gh;return B(De,Qt,Te,Ne,ut.occupied)?(O(De,Qt,ut,Y,q,g-St,Se[2],nt,et,J),G(De,Qt,Te,Ne,ut,V),{gx:De,gy:Qt,rot:nt,info:ut}):!1};St--;){var Pt=L(g-St);n.shuffle&&(Pt=[].concat(Pt),Sot(Pt));for(var ae=0;ae=n.list.length){Pt(Po[i]),Z("wordcloudstop",!1),Se("wordcloudstart",De),delete Po[i];return}m=new Date().getTime();var Te=U(n.list[et],0),Ne=!Z("wordclouddrawn",!0,{item:n.list[et],drawn:Te});if(I()||Ne){Pt(Po[i]),n.abort(),Z("wordcloudabort",!1),Z("wordcloudstop",!1),Se("wordcloudstart",De);return}et++,Po[i]=bt(Qt,n.wait)}},n.wait)}};$()};B5.isSupported=Rd;B5.minFontSize=Yh;if(!B5.isSupported)throw new Error("Sorry your browser not support wordCloud");function wot(t){for(var e=t.getContext("2d"),r=e.getImageData(0,0,t.width,t.height),i=e.createImageData(r),n=0,a=0,o=0;o128){var l=r.data[o]+r.data[o+1]+r.data[o+2];n+=l,++a}}for(var u=n/a,o=0;ou?(i.data[o]=0,i.data[o+1]=0,i.data[o+2]=0,i.data[o+3]=0):(i.data[o]=255,i.data[o+1]=255,i.data[o+2]=255,i.data[o+3]=255)}e.putImageData(i,0,0)}TC(function(t,e){t.eachSeriesByType("wordCloud",function(r){var i=Re(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),n=r.get("keepAspect"),a=r.get("maskImage"),o=a?a.width/a.height:1;n&&bot(i,o);var s=r.getData(),l=document.createElement("canvas");l.width=i.width,l.height=i.height;var u=l.getContext("2d");if(a)try{u.drawImage(a,0,0,l.width,l.height),wot(l)}catch(g){console.error("Invalid mask image"),console.error(g.toString())}var f=r.get("sizeRange"),h=r.get("rotationRange"),c=s.getDataExtent("value"),v=Math.PI/180,d=r.get("gridSize");B5(l,{list:s.mapArray("value",function(g,m){var y=s.getItemModel(m);return[s.getName(m),y.get("textStyle.fontSize",!0)||oe(g,c,f),m]}).sort(function(g,m){return m[1]-g[1]}),fontFamily:r.get("textStyle.fontFamily")||r.get("emphasis.textStyle.fontFamily")||t.get("textStyle.fontFamily"),fontWeight:r.get("textStyle.fontWeight")||r.get("emphasis.textStyle.fontWeight")||t.get("textStyle.fontWeight"),gridSize:d,ellipticity:i.height/i.width,minRotation:h[0]*v,maxRotation:h[1]*v,clearCanvas:!a,rotateRatio:1,rotationStep:r.get("rotationStep")*v,drawOutOfBound:r.get("drawOutOfBound"),shrinkToFit:r.get("shrinkToFit"),layoutAnimation:r.get("layoutAnimation"),shuffle:!1,shape:r.get("shape")});function p(g){var m=g.detail.item;g.detail.drawn&&r.layoutInstance.ondraw&&(g.detail.drawn.gx+=i.x/d,g.detail.drawn.gy+=i.y/d,r.layoutInstance.ondraw(m[0],m[1],m[2],g.detail.drawn))}l.addEventListener("wordclouddrawn",p),r.layoutInstance&&r.layoutInstance.dispose(),r.layoutInstance={ondraw:null,dispose:function(){l.removeEventListener("wordclouddrawn",p),l.addEventListener("wordclouddrawn",function(g){g.preventDefault()})}}})});c5(function(t){var e=(t||{}).series;!X(e)&&(e=e?[e]:[]);var r=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];E(e,function(n){if(n&&n.type==="wordCloud"){var a=n.textStyle||{};i(a.normal),i(a.emphasis)}});function i(n){n&&E(r,function(a){n.hasOwnProperty(a)&&(n["text"+SB(a)]=n[a])})}});function bot(t,e){var r=t.width,i=t.height;r>i*e?(t.x+=(r-i*e)/2,t.width=i*e):(t.y+=(i-r/e)/2,t.height=r/e)}const OI=t=>(P0("data-v-a56edc48"),t=t(),R0(),t),Tot={class:"boxnav"},Aot=["onClick"],Cot=OI(()=>at("div",null,"当年随访数 726,789",-1)),Dot=OI(()=>at("div",null,"血压控制率 86.23%",-1)),Eot={style:{color:"#aaa","font-size":"12px",margin:"20px 0 5px 0"}},Mot=be({__name:"cancer",setup(t){Ft(!0);const e=Ft(""),r=Ft(!1),i=Ft();Ft();const n=Ft([{name:"缺血性心脏病",top:"40%",left:"50%",fontSize:"29px",color:"rgb(255, 78, 105)"},{name:"中风",top:"46%",left:"80%",fontSize:"20px",color:"rgb(255, 123, 2)"},{name:"慢性阻塞性肺病",top:"57%",left:"59%",fontSize:"20px",color:"rgb(92, 39, 254)"},{name:"下呼吸道感染",top:"23%",left:"50%",fontSize:"20px",color:"rgb(59, 196, 199)"},{name:"新生儿疾病",top:"61%",left:"23%",fontSize:"20px",color:"rgb(255, 123, 2)"},{name:"气管癌、支气管癌、肺癌",top:"74%",left:"53%",fontSize:"15px",color:"rgb(29, 229, 226)"},{name:"阿尔兹海默症",top:"86%",left:"59%",fontSize:"15px",color:"#aaa"},{name:"腹泻",top:"25%",left:"26%",fontSize:"15px",color:"rgb(8, 199, 146)"},{name:"糖尿病",top:"10%",left:"50%",fontSize:"12px",color:"rgb(92, 39, 254)"},{name:"肾病",top:"11%",left:"40%",fontSize:"12px",color:"#58D5FF"}]);Qi({charts:{theme:"",bgColor:"",color:"#303133"}});const a=s=>{e.value=s,r.value=!0,setTimeout(()=>{o()},100)},o=()=>{var s=l4(i.value),u={legend:{orient:"vertical",top:"center",right:"5%",textStyle:{color:"#fff",fontSize:14}},graphic:{elements:[{type:"image",z:6,style:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAeUUlEQVR4Xu1da5gcRbl+v55kQSAGrxAu3sAblwCigiLnEUVuigpCNJmeQAQJkJBMdc8u4lGY6FEkO909CQkQBQOZnkSDiooCghIfPagoIiDgUUFQuSNKDCDuZvo7T2PwWdfsVk1Pd0/PdPWf/VHf9f3qnZntqvqKoB+NgEZgQgRIY6MR0AhMjIAmiJ4dGoFJENAE0dNDI6AJoueARiAaAvobJBpuWisnCGiC5KTQOs1oCGiCRMNNa+UEAU2QnBRapxkNAU2QaLhprZwgoAmSk0LrNKMhoAkSDTetlRMENEG6WGjPu2pHYNMMbMYMo2DszMCMIODNBuG+gOi+bbYZuG/BgllPdTHE3LvWBElpCtSHr5jZgnF8waD3ICQCYwYRtpW6J3ocAd8P8H0g3EdsbHjyqd99v1qtbpbqaoGOEdAE6RjCiQ24buNQA3Q4M30I4L1jdDUK8HeY6LtTAvxwUcW8O0bb2tQYBDRBYp4O9framUErOMUADmdgr5jNT2TuVgA/pIKxulyec0dKPnPhRhMkpjLXas1XFihYSKCFDIWfTjH5HWuGgGcZvKLFxopKpfiHBFzkzqQmSIclX7Vq/fSnN42eRcQLAezUobm41B9lphXbT5t64fz5szbGZTSPdjRBOqh63W0uZPBCMF7fgZnkVAm/IdCKslVckZyT/rasCRKhvq7b2NNgupCBoyKop65CwHUB8VmWVbondec97lATpM0C1mvNI5n4EgCvalO12+L3E9Pp5Urxu90OpJf8a4K0US3P8RcA6PWfKwuFba5sI+1ci2qCKJa/7jZdZhaK4pkWIyKvbBWtTAeZkeA0QRQK4dUa3wLRsQqivSPCfLWolN7fOwF3J1JNEAnunuN7AMrdKU/iXuvCNvviWzEppDRBJkHWq/lHg3BNUuBnwi7jGFExr81ELBkMQhNkgqJ43po3IjDyscfJCPYSYu6vMzg/ux6SJshWSlCtrtpu+gu3vwmM/bteoTQCINy28W9PH1Ktzn8mDXe95EMTZCvV8hx/NYCTe6mQMcR6ubDNeTHY6SsTmiDjyukMN6qGQef1VZUVkwkCXmIPlqqK4rkQ0wQZU+Zabe0bChT8BMCOuaj++CQZT4wGmw8aGjr53lzmv5WkNUHGgFJ3/YuZcXrOJ4d+9TtmAmiCbAHDG268EwZtyDk5ANBmGMFBQpTCQ1i5fzRBnieI07wK4A/mfkaEFCFaXbaKH9VYAJogANzhNR8hw1inJ8QYBILg3WJw7o15x0QTBEDd8X/CwMF5nwxj82fgKss2j887JrknSL225kgm47q8T4St5U9BcHB5cO7NecYm9wTxnKYDsN76vVUWUFXYxSWaIDlGwHP8OwHE2bOqf9Ak3CwsM9c/PXP9DbKs1jwwIL6lf2Z0/Jm0GHtXctyYLtcE8ZzmeQDrrRWT8+oTwjbPj596vWEx1wRxHf8WAg7sjVJ1Kcqc/8zKLUE8rzEDAT3UpWnXU24HWgMzFgzNeqSngo4p2NwSpO7472Pg6phw7GszBBxbts1v93WSEySXZ4J8jIEv5LHo7eZMwGll2/xiu3r9IJ9bgnhO81MAf7ofiph8DnSusIufSd5P9jzkmSAXAXxG9kqSxYjoYmEXz8xiZEnHlGOCNK4CSO/eVZph/A1hl45TEu0zodwSRG9QVJ/JBPy0bJtvU9foH8ncEsRz/PsBvLJ/SploJn8QttlrzbpjASTPBPkHgIFYUOx/IyPCNrfp/zT/M8PcEqTu+n9mxkvyWPR2cybCE2XLfGm7ev0gn1uC6F28bU3fu4Rt7tOWRp8I55cgNf8GEA7vkzommwbje6Jihve75+7JL0Fcfw0YpdxVPErChIawzLlRVHtdJ7cEcWv+UiIM9noB04ifGcNWxRxKw1fWfOSXIG5TELObtYJkMR4msiyrGN6TkrsntwRZ5jY/EjDrVj8KU94gmr3YKn5ZQbTvRHJLEN1JsY25HPBhYrD0gzY0+kY0twQJK+g5jccAelnfVDORRPhxYZdenojpHjCaa4K4NX8lEXK5S1V1bjLjIqtihtdf5/LJN0Fc/whifDeXlVdMmglHWpZ5vaJ434nlmiDVatWYPm2PR/TPrInmNT++cdO9O1er1aDvZr5iQrkmSIiR6/hfIOBjinjlSoyBL1q2eVqukh6XrCbIcGMWGfSVPE+CCb8/Av6wNVhan2dsck+Qi85vvugfA/wrALvmeSJsJfcHtxmhfc88p/jXPOOSe4I89zOr5n+cCLntHrg1AjDjHKtifj7P5Ahz1wQBcN55K3fY8YU7/hRg3cT6OUbQXU/+7cmDlyxZ8JQmSN4R2JK/6/qnE+NiDQfAhDMsy7xEY6G/Qf5tDriOfxMBb8/zxGDgx5ZtHpJnDMbmrn9ijUHDqzVmg2htricH8xxRKelNnFsmgSbIODZ4Nf8aEI7OJUkY14qKeUwuc58gaU2Q8QRZ6h+CAl8P0Hb5mij8DFp0hBgyb8pX3pNnqwmyFXw8xw83563I2URZKGxzZc5ylqarCTIBRK7TuJRAp0gR7AMBBl9m2aVT+yCV2FPQBJkE0rrj38J9fgMVAb8o2+abY59ZfWJQE0RSSM/xWwCMPqn3+DQCYZuFPs0tlrQ0QSQw1oevmMlG4fZY0M6YEQpa+5UHT7ojY2FlKhxNEIVyDA+veXnBMH5FQF8cPWXgsVYQ7Ds4OPcxhfRzLaIJ0kb5607jUu7xf9wJfFlZ/0OuXHVNEGWo/inouo2FxHRhm2qZEGfisyyrlLfX1x1hrwkSAb7whtwAuIiA3SOop67CwJ8M4My83lTbCeCaIBHRc11/XwMkmHleRBOpqBHR6gDsWZYZHgrTT5sIaIK0Cdh4cW94zbvYMBYSkKk7/Bi4ioJghRice2OHKeZaXRMkpvK7rn8cgRaC+V0xmYxmhuhGBq+wLPOqaAa01lgENEFing/ucGMeFWg+GAfFbHpyc4SbucWrrMHS6lT99rkzTZCEClwfXnMQG4WjQHx0YmQh3AymayloXVcenHtzQqnk2qwmSArlX7as+drWSPBBMugDADo9rXcTB/zNwoDxjcWLi79LIfxcu9AESbn85523fmDatNEZRDzDYGNnUGsGgBkM2jn8uyWchwn8CICHwYWHAwoeYaaHN22a+vCSJbNGUg451+40QXJdfp28DAFNEBlCejzXCGiC5Lr8OnkZApogMoT0eK4R0ATJdfl18jIENEFkCOnxXCOgCZLr8uvkZQhogsgQ0uO5RkATJNfl18nLEOgbgqxfv77wwAMje1HA+5Bh7AVgRzDvGP5lwg4yIEB0ihDF30vlEhTwvMabQvNClG5N0I3UtOc1XwPmy2SCxAivR3gSRE+GfzkI7maD7txtt4G7Z82aFXaD6fmnpwmyatXV2z3z1MZ5IMwGYyaAaZErwnycqJS+EVk/BsW607wnNFO2i3vGYC6yCa/W+CCIOtkuvwmEO8BYt90O01fPn3/sM5GD6bJiTxJk5dL1O48URuYBdDLAr4sDQ2acZ1XMT8dhK4qNes2/mAmnh7rEuKRcMc+IYicOHbfmn0uEJXHYAui3AF8+0BpYvWBoVri/rKeeniOI5zXei4DqAOL9lCV8VVjmid2o3jLXPy5gfH2sb4Nw/OIuHXryXP9KME6IGYt7YHBZiNJ3YrabqLmeIkjdbZ7CzJcmgwj/duOm3fauVg/bnIz9rVutVldtN33aDhsBnvLvErR546anpler81P9eVKtbpgyfdoDdwEUyzfz+KyJ6NSyVZT+f5NmDSbz1TME8Wr+EAgXJAkcMd5arpg/T9LHeNue618DnuA+EsK1wkr3vo56zX8LE36WKAaMs0XFXJqoj5iM9wRBvJp/AghXxpTzhGaY6FQrxU83t7ZGEBnuZHkxB5ZVmeslnfvz9l23eQol9i09JgvGiaJifjWtvKL6yTxBli69fI+phSnPvd1J+mFguWWbi5P2E9r3vDVvRGDcreTLCPYSYu6vlWQ7FHIdfxkBizo0o6Q+2tq859DQyfcqCXdJKNMEOfHE9YW3HzRyCwj7p4EPARvKtplKV5K649/FQLheI30IuLtsm6lcUV13/BsZOEwaVBwCjNt+fPPAm6+8MrtrJpkmSN31L2b+56vPVB7GEyOtwsyzz579UJL+vFqjDqL2vqmYl4lKqZxkXBdcsG6XgULrDhBekqSfsbaJcEnZ6t4rbVmemSVI3fE/xsAXZAnEPc7ER1tW6bq47T5vz3UbRxHTtVHsZzm2KPk8r0PAaWXb/GInNpLSzTJBfsLAwUklPqHdhN+weI4fbs/YPmJeTwvblG+biWg8jTeFWwuNgJ+WbfNtEcNOVC2TBPFqzRKI1ySa+UTGmZuiUjKT8O05jasA+mBntvkbwi4l0ubUqzV8EBU7iy+iNtNcUSk2ImonppZNgrj+BjDemVjWkxkmukNYxf3i9l131s5nBJfEYZdgnF6256yKw9ZYG57bvB3M4Z629B/CD4RlpvNyoI3sMkcQz/NPQJD8msekHIn5ajLHWbe7gdYf26iLVDRA4RW2PftPUkFFgUxcNWfgRCGytTaSOYLUHf9aBo5SrGsyYkymqBSbcRl3ncatBDogLnuhHQb/0rJLz22Pj+Pxas0iiP04bEW1QcB1Zds8Oqp+EnqZIkgnb3hiBmepsM2z47BZr/nnM+Hjcdgab4MYny9XzHPisO05friNZygOW53YSPpNXbuxZYogntP8PMCxTMx2gfg3+Zj2QNVra9/BFPyoo1gkysTGoeXKnP/t1Meke8I6Nd6WPl0g7GIiHyhthbFFOGME8cMO5W+NkkjMOg8K29ytU5ue4z8B4MWd2pHo/0XYZscLe57jPwBg14RjVTH/M2Gb6V4dMUlUmSHI8pq/V4twlwqCqcgYfJgQpR9E9eU5/loAs6Pqt6m3TtjmnDZ1/iXueY13IqANUfXj1isw9l5UMdX2qcXtfJy9zBDEc/wFADJzAyuBFpft4vIo+Htes4gg5X94DTKFiPZioe40FzF4WZRcE9JZKGxzZUK22zKbHYIkc4qtLTDGCjP4MivCfeLnn9980bYD/JfIjjtQfHaEXnzOOcW/tmvCdRqXUpbuf+/i6c7x2GWCIGFHkgf/OPJompvk5JOIfibsYtu/heuOfxMDb5fbj1+CgB+XbbPtC3o8p3kzwFn43++foDCe2PUVAztloTNKJgiy5Zz5t+OfMtEtEvCsMXXgFYsWzXpc1Yrn+P8N4H9U5ROS+6Swzc+q2l6+fP3LgtGRPzKwrapOKnIGvy8L59czQZC623CZSaQCfBtOCMYJZXvO11RUPK+5PwL+pYps4jIGHSBE8TYVP3Vn7YcYQeZO9hGxV7ZKlkoOScpkgiBezf9lWoei2gGTGZ+2KuZ5KjpezX8QhF1UZBOXYTwkKqbSK1u35i8hwrmJx9SuA8ZtomLGuvug3RBC+a4TxHUbexJTRi+jVNs5u3zp5Xu0UjoWrFrkQmvznosUjrPGs8NYNar25Jj4tZZVSuW49USRZYEgC4npwvagS0eaQPeqdjn0HD9sirZTOpFJvTwqbDO8FFT6hN0cGbyHVLALAkx8lmWVuvrqv+sE8Rz/mwDe3wX8lVwyGftY1hzpAma2PonVvvlcd+3exMGdSkB0R+hbwjbDq7O79mSBIH/rqKduwtAx0XzLKkqP/tbdxiAzZaLXExEPla3SsAwa122eRsyxnyuR+W1jfJOwzRe2IR+7aFcJUqs13lMguj72rOI1uFLY5kKZSc/zD0GAjjcNyvwojRt4hxDmTTJZz/HDny/hDobMPi3mIyqV0g3dCrCrBPGchgNQ11/lScD/kbDN/5IVaNWqVVOfeWr7EZlcGuPb7fD0wPz580dlvjzH/yGAQ2Vy3R1nV9glu1sxdJkgzTsBTqXfUwcAPyls80Uq+nXH706jiTHBtdMAwXP8cFtKeIdKhh+6S9jFfboVYNcIksQx1MRAVNzZ6zlNB+AufyOSK+yi9BM3azt4J6td3MeL25knXSNIt/petQPOGNlPCNs8X6abhVVp1dV/z/HDk4ifk+WUhfFu9s3qGkE81/8aGMdnoQCyGIj5y+VKSXq2Y/lyf7fWKGJrpCCLa2vjhanYfdEiMzz8NOlTrzXWMdFHZHKZGCd8XVjmh7oRS9cI4jqNhwmktJjVDWDG+mTgbkuxN67n+PcBeFWXYr5f2OarVXy7jn8XKfYGVrGXpAyDH7Hs0owkfUxkuysEycInbbtgq561qDt+k4HIp/vajWusPAFry7YpbfzWzTMrUfNT/WaMaj9TBHFd/zgad+VY3InFbY+JP2xZpfUyu67b6NrWGdWtGa7bmEVMX5HlkqVxJhxvdeFKuq58g9Td5meZ+RNZKoAsFiI4ZcusyOSW1ZoHBsS3yOSSGDeY3ry4UvyFzHbd9WvMkL7pktlJc5yIPle2iuF5m1SfrhDEc5rXA/yeVDPt2BndIOziETIzG6obptw+7cFNaR9ACg947bdp12mHKdyx2M/4y+rT7niXCNL4K0AZX6D6DyiVd8i6jn8jpXUJzZYwGdhgKV7+k7Gdx4pzlp8UdklpwVbRoJJY6gTJ9vmPyTGbiimvX2h/5LcyZD3HD4/dpv1z4LPCNj8pi22F8+XXjWLzb2RyWRzvxvmQ1Ani1RqzQRT2jOq5hwM+yxqUn09Y5jSPCcCp3gdugN672C5eIwPVHW4sJCOb529ksYN5jqiU1knlYhRInyCZ2I4RGcHLhW3Ok2m77vpdiUeki3UyO+2MMw3sZlmzHpTpeI6/GsDJMrnnxgNO7joCI0qjOrVtNEq5KQp1gSC9sIN0QvRuFbZ5oAq2nuOHnQHfqCIbg8yvhW0qXQjqOX74lkutK3zAh4nB6N0lJ8vLc3yOkLfSzuoIdidU6QJBms8A/II4k0jR1mZhm1NV/NWd5qUMPkVFtlMZAl1WtounqtjxHD/cBj9FRTb8BskWQejvwi5upxR7TEKpEmTZ8Jp9AsP4VUyxd8WMajd1111zCrFxaRpBMgWnWtbcy2S+2u42nzmCAEYQ7Lt4cG5qx4RTJYg73JhHBn1JVsgsj6u2AvK8xpsQkHTRLpZcDT5QiNKtMlttt/jJIEE44I9ag6Xw/6hUnlQJUq/5K5lwZiqZJeWE6GphFaVNJqrV6pQdp+35GAOJvrsn4K9Pbrrn5dVqdbMsZc9tfgvMx8rknh8PAl6iKtuunGGQUr+x8XaJcVG5YqZ2TDhVgniO/zMAb2kXzIzJ/0HYptJuXddpfIdAxyQZP4OvsezSe1V8eI5/P4BXqshmWObnwjZT6yOcKkHqbjNg5lR9JlHogW0Hpi1YMCu873zSJ6VevUq9eFeuXL/DyLMjm2QxZ32ciLhsFY204kxtsrrumjcTGz9PK7Ek/RiE4xcr7Cz1av7RIEgX7zqKlXGMqJjXymwsc/3jgh7bQT1RTkzBWyxrbiobQlMjyDLXPz1gXCwrZC+MM+MSq2KeIYv1wgvX7bJ5pCVdvJPZmWx8ykBh17POmv2QzIZb8y8mwukyuV4YNwhnLLbMWO6cl+WbGkE8xw9fQ35UFlAvjLdzD0dbC3PtJ6+8cNnNe0vaT0uq8SVhmymtMUljiUfAc/w7AOwbj7WuW3lK2OY0lSjqTvNCBksbz6nYGi9DoBVlu3iWiq7n+OH/HzuoyPaAzK+Ebc5MI85UvkGWL79mm9boX55NI6HUfBi0hxDF38v8eU7zZIATem9P84RdvFwag9d8DQK+VybXS+OFqS/edtGiY/6RdMypEKReu+IdTIVE7wtPGqj//PTm08t2SdrXdrmz7oAWWtJFvCjxF1B40yJ7tvTSnrrTmM+gVH6zR8kjig5x69By5aTEW72mQhDP8csAvChAZFaH8VVRMU+UxRfev/jQn5674izWy3UIeGiX3QdeoXKPn1fzrwThBFmsPTYuhG3Wk445FYJ0s9NHYgASfiMs8w0q9l2n8VUCxdrXicFfs+yS0qT3XP//wHi9Sqy9IqPawaXTfFIhiOf44QbFrvVX7RSkifSFbSrh5ziNsw3Q5+OMIwB/3LZLF6jYjLi1XMV0N2XuFLaZ+EsfpQJ3ioLnNEcBVtti3amzFPWpUDi4XJ59s8yl6zaOIibpYp7MzthxJj7askrXyXTq9XUHcav1U5lc743TZmEXlY4edJJb4gTp5TPocmD5XGGXPiOTu+CCdbsMTGmFLUnj2iIRjGwu7H722fIFQs9pfAqgT8ti7MXxNM6oJ06QuuO/j4Gre7EAspjb7CQSvnE5RGZTcfwmYZvvUJHtRocVlbjikCHg2LJtfjsOWxPZSJwgntOsACy9DizJJBO0/Wdhmy9TsR/v1QjqZ7M9x38cwEtVYuw9GRoUdrGWZNyJE8R1GpcSKJVtAUkCNZHtjZtGX1CtzpMugro1/yQiSBf1VHJgxslWxbxCJlutrt52+rSpf5fJ9eo4gy+z7JLSUeOoOSZOEM/x4/xpETXPxPSYjPdb1hzpT0jPa+6PgKWLekqBGnSAEMXbZLKuu/ZY4uBbMrkeHlf+qRk1x+QJUvP/DMJLogbYA3oXCttcJIuzWq0a06e99rfo+E5yunfjpt+9rlqtBjKfnuMvB6C0V0tmK5PjjCdExUz052OiBFn+uS+9rLXNwGOZBDeuoJjvEJXSfirmPKfpAyy9nmByW9QUdtFU8ldr3A6iVDb1qcSThEzhHyMvX/SJj4b/ZyXyJEoQ120cSkzhTap9+7Rzws2r+UMgKC3uTQgY42xRMZXuY++XE5yTTR4m/i/LKiW2zy9RgjiO/zED+ELfsmNLYqqXTNZrzSOZWLq4NxlexHRUuVL8rgzTnrokVZbMJOMBcJptm1/swMSkqokSpEfuQe8YWw6CU61BeV8qz2vMQEC/A7B9RKdPw+DXClF6WKbvDq85hYx0+nLJYkl2PNl71JMliOt/GwyljhvJgpi49a8I21S6ENOr+TeAcHikiBjfExVT6V4Vz/G/DODDkfz0khLhO8Iy35dUyIkSpO407+GO39oklXqcdvlBYZd2U7HY2beq+qel5zQeAGhXlZh6WYZA95bt4p5J5ZAYQVatWjX1mae2H0kq8KzZVd3ZW3eacxksXeTbWn4EOqlsF9eo5N6nO3i3mvp2Ozw9MH/+/LDncOxPYgRxXX9fYoTn0HPxqN4P6C1t7o9CxAXDFh0ghuQLhN28J7EbxWbCTMsyE+n5nBhB6k7zRAZLb4XtBqBJ+GTGOVbFlJ75CBvn1d1m+MHR7vmYO8tWcWb4WlkWv1vzP06E82Vy/TJOoFllu3hlEvkkRhDPaX4K4L7cZr3VQhDdKKziu1WKVHf8BgNKi33P2yPAL9tmScW+5za/D+Z3qcj2hwydK+yi9NhBlFwTI0hfHrOdBGFmPGtVTKV7T+puY5CZlBb7/kUQ4qGyVVLaFe3W/L8TYdsoE6IXdZI8fpsYQRJumJbJOu66+8AUlSYKy13/iBZDutg3NskC4chFlnm9LPGwScSDfxqRdnqX2emxceUGeu3mlSRBngaQ6m1A7SYfu7xin9ylS1fvPLUwNfynUnWj3Z9HW6P7Dg3Ne0QWcyr9gGVBpD/+jLDNqIuvk0abCEHyss1hPLLM7FmVkqUyPzyneT3ASot+AN0g7OIRKnbdWsMlIqEi208yo63New4NnRx7c7xECOINX3E4jMIN/VQAxVyUO224Nb9GBFvFLjMcq2JWVGT7tYOMLHcmHG8pdNyX2Rk/nghB6q5/JjNWthtMP8irLhh6XrOEgJUW/WDQXCGKDRV88rRAOBaP8DYse7BUVcGoHZlECOI6/jICpIeI2gm0Z2QN3kVlM6HjNPYzQNJTgWHeAXh/2y7dLsNgy2ZI6VUIMju9OM7AVZZtHh937IkQxKv514FwZNzB9oI9Ap9UtktK3wye27gdLDnQRHyHsNQOZNWdxlwGRdrG0gvYTh4j3SsS2JOVCEHqjv97Bl7d+6C3n0E7C3qu4zdIsmDIgG8pLhBGWYBsP8Psaqj+vG0ng0QIktffwVuAf1TY5s4qRVBriaTe2sZz/PA18E4qvvtRRvXgWju5x06Q5cv9F7ZGsbGdIPpNVvWTzHX9I0iyYMiEIy2FBcIQw5x/MIHAHyjbpVi7uMROENdtvpVbwTGGYXAQBLHb7wUyFaYWvl4uz5HuZK7X1+7UGm1NetdhYWrh4nJ5zqOyvOv1tTNbo63Y/0mV+c3aeNxvsnI5gbNWVB1PdhHQBMlubXRkGUBAEyQDRdAhZBcBTZDs1kZHlgEENEEyUAQdQnYR0ATJbm10ZBlAQBMkA0XQIWQXAU2Q7NZGR5YBBDRBMlAEHUJ2EdAEyW5tdGQZQEATJANF0CFkFwFNkOzWRkeWAQT+H9OJzVCAQ9C3AAAAAElFTkSuQmCC",width:25,shadowBlur:0,shadowColor:"#000",shadowOffsetX:"1",shadowOffsetY:"1"},left:"25%",top:"40%",position:[20,100]}]},series:[{name:"title",type:"pie",radius:["35%","90%"],center:["30%","50%"],color:[new ei(.3,1,.8,.1,[{offset:0,color:"#09b094"},{offset:1,color:"#015648"}]),new ei(.1,0,.1,1,[{offset:0,color:"#f09913"},{offset:1,color:"#6b4100"}]),new ei(1,.5,0,.7,[{offset:0,color:"#c2352c"},{offset:1,color:"#6f0700"}])],label:{show:!1},labelLine:{normal:{smooth:!0,length:10,lineStyle:{width:1.5}}},itemStyle:{normal:{borderColor:"#2b2a38",borderWidth:3}},data:[{value:20,name:"一级管理"},{value:20,name:"二级管理"},{value:20,name:"三级管理"}]},{type:"pie",radius:["35%","90%"],center:["30%","50%"],z:0,data:[{hoverOffset:1,value:100,itemStyle:{color:"rgba(251, 200, 79, 1)",shadowBlur:20,shadowColor:"#241210"},label:{show:!1},labelLine:{normal:{smooth:!0,lineStyle:{width:0}}},hoverAnimation:!1}]},{type:"pie",radius:["25%","0%"],center:["30%","50%"],z:0,data:[{hoverOffset:1,value:100,itemStyle:{color:"#3d3c4a"},label:{show:!1},labelLine:{normal:{smooth:!0,lineStyle:{width:0}}},hoverAnimation:!1}]}]};s.setOption(u)};return F1(()=>{}),(s,l)=>{const u=LI,f=MI,h=aot,c=RI;return jt(),he("div",Tot,[(jt(!0),he($o,null,w9(n.value,(v,d)=>(jt(),he("div",{class:"cancerNameItem",onClick:p=>a(v.name),key:d,style:q1(v)},Mr(v.name),13,Aot))),128)),we(c,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=v=>r.value=v),title:e.value+"健康管理","append-to-body":!0,class:"cancer-dialog",width:"500"},{default:Qe(()=>[we(f,null,{default:Qe(()=>[we(u,{span:14},{default:Qe(()=>[at("div",{style:{height:"150px"},ref_key:"cancerRef",ref:i},null,512)]),_:1}),we(u,{span:10,style:{color:"#fff","line-height":"2","padding-top":"34px"}},{default:Qe(()=>[Cot,Dot]),_:1})]),_:1}),at("div",Eot,Mr(e.value)+" 患者规范管理率",1),we(h,{class:"cancer-progress",percentage:83.67,"stroke-width":15,striped:""})]),_:1},8,["modelValue","title"])])}}}),Lot=T4(Mot,[["__scopeId","data-v-a56edc48"]]),Iot={key:1,class:"count-flop-content"},Pot={key:0,class:"count-flop-unit"},Rot=be({__name:"countFlop",props:{val:{type:Number,default:()=>0},suffix:{type:String,default:()=>""}},setup(t){const e=t,r=Qi({value:[0,0,0,0],numberList:[0,1,2,3,4,5,6,7,8,9],compKey:0});J1(()=>e.val,()=>{i()}),F1(()=>{i()});const i=()=>{let n=e.val.toString().split("");if(n.length<4)for(let a=n.length;a<4;a++)n.unshift("0");r.value=n};return(n,a)=>(jt(),he("div",{class:"count-flop",key:r.compKey},[(jt(!0),he($o,null,w9(r.value,(o,s)=>(jt(),he("div",{class:Fe(o!="."?"data_cage":"count-flop-point"),key:s},[o!="."?(jt(),he("div",{key:0,class:Fe(["count-flop-content",["rolling_"+o]])},[(jt(!0),he($o,null,w9(r.numberList,(l,u)=>(jt(),he("div",{key:u,class:"count-flop-num"},Mr(l),1))),128))],2)):(jt(),he("div",Iot,"."))],2))),128)),t.suffix?(jt(),he("div",Pot,Mr(t.suffix),1)):Jo("",!0)]))}}),mb=T4(Rot,[["__scopeId","data-v-3ffbc59f"]]),v1=t=>(P0("data-v-76147bb7"),t=t(),R0(),t),Not=v1(()=>at("div",{class:"videobg style1"},null,-1)),Oot={class:"mainbox",style:{width:"100%",height:"100%"}},Bot={class:"head fadeInDown"},kot=v1(()=>at("h1",null,[at("span",null,"湖口县全民健康大数据平台")],-1)),Fot={class:"timebox"},zot={style:{height:"calc(100vh - 85px)",padding:"15px 15px 15px 15px"}},Got={style:{width:"27%"}},Vot=jh('
湖口县概况
  • 总面积

    673平方公里

  • 户籍人口

    28.67万人

  • 常住人口

    22.06万人

  • 邮政编码

    332500

',1),Hot={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},Uot=v1(()=>at("div",{class:"tit"},"居民构成",-1)),Wot={class:"boxnav"},Xot={class:"box card fadeIn delay06",style:{height:"calc(34%)"}},Yot=v1(()=>at("div",{class:"tit"},"医院就诊监控",-1)),Zot={style:{width:"46%"}},Qot={class:"fadeIn delay06",style:{height:"calc(100% - 10px)"}},jot=jh('
',1),qot={class:"maptabs"},Kot=v1(()=>at("a",{href:"#"},"健康数据",-1)),$ot=[Kot],Jot=v1(()=>at("a",{href:"#"},"人口分布",-1)),t4t=[Jot],e4t=jh('
  • 13153

    癌症患者管理数
  • 84.8%

    癌症患者就诊率
  • 13

    服务医院(家)
  • 71.15%

    电子健康档案开发率
',2),r4t={style:{width:"27%"}},i4t={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},n4t=v1(()=>at("div",{class:"tit"},"出生死亡人口监控",-1)),a4t={class:"boxnav",id:"echarts2"},o4t={class:"born-box"},s4t=v1(()=>at("span",{class:"p_a01"},"今日出生人口",-1)),l4t=v1(()=>at("div",{class:"p_a01",style:{"font-size":"12px"}},[t4(" 环比 "),at("img",{src:oP,height:"16",style:{"vertical-align":"sub"},alt:""}),t4(" 3% ")],-1)),u4t={class:"born-box"},f4t=v1(()=>at("span",{class:"p_a01"},"今日死亡人口",-1)),h4t=v1(()=>at("div",{class:"p_a01",style:{"font-size":"12px"}},[t4(" 环比 "),at("img",{src:sP,height:"16",style:{"vertical-align":"sub"},alt:""}),t4(" 3% ")],-1)),c4t={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},v4t=v1(()=>at("div",{class:"tit"},"基因健康风险数据",-1)),d4t={class:"box card fadeIn delay06",style:{height:"calc(33.33% - 10px)"}},p4t=v1(()=>at("div",{class:"tit"},"高危疾病排名TOP10",-1)),g4t=be({__name:"home",setup(t){const e=Ft(null),r=Ft(),i=Ft({双钟镇:[116.23,29.7],流泗镇:[116.36,29.73809724307942],马影镇:[116.29,29.68],武山镇:[116.34,29.55],城山镇:[116.191,29.601],大垅乡:[116.37,29.69],凰村镇:[116.308,29.706],张青乡:[116.33,29.652],均桥镇:[116.31,29.592],付垅乡:[116.34,29.61],舜德乡:[116.19,29.52],流芳乡:[116.248,29.52]}),n=Qi({list:[],born:16,die:28,time:"",weekday:"",mapdata1:[{name:"双钟镇",value:150},{name:"流泗镇",value:190},{name:"马影镇",value:120},{name:"武山镇",value:40},{name:"城山镇",value:110},{name:"均桥镇",value:60},{name:"凰村镇",value:70},{name:"大垅乡",value:80},{name:"张青乡",value:50},{name:"付垅乡",value:30},{name:"舜德乡",value:60},{name:"流芳乡",value:90}],mapdata2:[{name:"双钟镇",value:210},{name:"流泗镇",value:190},{name:"马影镇",value:220},{name:"武山镇",value:140},{name:"城山镇",value:110},{name:"均桥镇",value:160},{name:"凰村镇",value:70},{name:"大垅乡",value:180},{name:"张青乡",value:50},{name:"付垅乡",value:130},{name:"舜德乡",value:90},{name:"流芳乡",value:120}]}),a=Ft(0);F1(()=>{l(),e.value=setTimeout(o,1e3),setInterval(()=>{n.born++},2e4),setInterval(()=>{n.die++},21e3)});function o(){clearTimeout(b);let d=new Date;var p=d.getFullYear(),g=d.getMonth()+1,m=["星期天","星期一","星期二","星期三","星期四","星期五","星期六"],y=d.getDate(),_=d.getHours(),x=d.getMinutes(),w=d.getSeconds(),S=d.getDay(),b=null;n.time=p+"-"+g+"-"+T(y)+" "+T(_)+":"+T(x)+":"+T(w),n.weekday=m[S];function T(A){return A<10?"0"+A:A}b=setTimeout(o,1e3)}const s=d=>{a.value=d,f(d===0?n.mapdata1:n.mapdata2,z8)},l=()=>{f(n.mapdata1,z8)};var u=function(d){for(var p=[],g=0;g=20&&(y="#3c8fda"),d[w].value>=40&&(y="#397dce"),d[w].value>=60&&(y="#366ec3"),d[w].value>=80&&(y="#335eb8"),d[w].value>=100&&(y="#304ead"),d[w].value>=120&&(y="#2e40a3"),d[w].value>=140&&(y="#2b339a"),m.push({name:d[w].name,height:d[w].value/15,itemStyle:{borderWidth:0,color:y}});CC("湖口",p);var _={projection:"perspective",autoRotateDirection:"cw",distance:165,minDistance:40,maxDistance:200,alpha:40,beta:0,center:[-5,-5,0]};let x={tooltip:{},geo3D:{type:"map3D",name:"地图",shading:"realistic",regions:m,zlevel:0,regionHeight:20,map:"湖口",label:{show:!1},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#005eda"},emphasis:{label:{show:!1},itemStyle:{color:"rgb(0, 192, 255)"}},light:{main:{color:"#00d2ff",intensity:1.1,shadow:!0,shadowQuality:"high",alpha:55,beta:30},ambient:{color:"#fff",intensity:.5}},viewControl:_},series:[{type:"map3D",name:"模拟数据",shading:"realistic",zlevel:5,regionHeight:5,map:"湖口",label:{show:!0,formatter:function(w){return w.data.value?w.name+":"+w.data.value:w.name+":0"},distance:0,textStyle:{color:"#fff",fontFamily:"苹方",background:"rgba(0,0,0,0.4)",fontSize:14}},itemStyle:{color:"transparent"},emphasis:{label:{show:!0},itemStyle:{color:"transparent"}},viewControl:_,data:d}]};x.series=x.series.concat(await h()),g.setOption(x),window.addEventListener("resize",function(){g.resize()})}const h=async()=>{let d="流泗镇";var p=[],g=[[{name:"双钟镇",value:0}],[{name:"流泗镇",value:0}],[{name:"马影镇",value:0}],[{name:"武山镇",value:0}],[{name:"城山镇",value:0}],[{name:"大垅乡",value:0}],[{name:"凰村镇",value:0}],[{name:"张青乡",value:0}],[{name:"均桥镇",value:0}],[{name:"付垅乡",value:0}],[{name:"舜德乡",value:0}],[{name:"流芳乡",value:0}]];return[[d,g]].forEach(function(m,y){p.push({type:"lines3D",coordinateSystem:"geo3D",regionHeight:10,effect:{show:!0,period:2,trailLength:.15,symbol:"arrow",symbolSize:9,color:"#fcdd6e",trailOpacity:1,trailColor:"rgba(255, 255, 255, 0.5)"},lineStyle:{width:1,color:"rgba(118 , 192, 234, 1)",opacity:1,normal:{show:!0,width:1,opacity:1,curveness:.3,color:"#fcdd6e"}},blendMode:"lighter",data:u(m[1])}),p.push({type:"scatter3D",coordinateSystem:"geo3D",zlevel:1,rippleEffect:{period:4,brushType:"stroke",scale:3,color:"#fcdd6e"},label:{normal:{show:!1,position:"right",fontSize:13},emphasis:{show:!1}},showEffectOn:"render",hoverAnimation:!0,symbol:"circle",symbolSize:function(_){return 10},itemStyle:{normal:{show:!1,color:"#fce182"}},data:c(m[1])},{type:"scatter3D",coordinateSystem:"geo3D",zlevel:2,rippleEffect:{period:4,brushType:"stroke",scale:4,color:"#38ff85"},label:{normal:{show:!1,position:"right",color:"#38ff85",formatter:"{b}",textStyle:{color:"#38ff85"}},emphasis:{show:!1,color:"#38ff85"}},symbol:"circle",symbolSize:15,itemStyle:{color:"#38ff85"},data:[{name:m[0],value:[116.36,29.79].concat([10])}]})}),p},c=d=>{for(var p=[],g=0;g{r.value.show(d)};return(d,p)=>(jt(),he($o,null,[Not,at("div",Oot,[at("div",Bot,[kot,at("div",Fot,[t4(Mr(n.time),1),at("span",null,Mr(n.weekday),1)])]),at("ul",zot,[at("li",Got,[Vot,at("div",Hot,[Uot,at("div",Wot,[we(zit)])]),at("div",Xot,[Yot,we(Kit)])]),at("li",Zot,[at("div",Qot,[jot,at("div",qot,[at("ul",null,[at("li",{class:Fe(a.value==1?"active":""),onClick:p[0]||(p[0]=g=>s(1))},$ot,2),at("li",{class:Fe(a.value==0?"active":""),onClick:p[1]||(p[1]=g=>s(0))},t4t,2)])]),e4t])]),at("li",r4t,[at("div",i4t,[n4t,at("div",a4t,[at("div",o4t,[s4t,we(mb,{val:n.born},null,8,["val"]),l4t]),at("div",u4t,[f4t,we(mb,{val:n.die},null,8,["val"]),h4t])])]),at("div",c4t,[v4t,we(_ot)]),at("div",d4t,[p4t,we(Lot)])])]),we(yot,{ref_key:"townRef",ref:r},null,512)])],64))}}),_4t=T4(g4t,[["__scopeId","data-v-76147bb7"]]);export{_4t as default};