import{_ as O}from"./tslib.891692d0.js";var Mo=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Do=function(){function e(){this.browser=new Mo,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window!="undefined"}return e}(),Dt=new Do;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Dt.wxa=!0,Dt.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?Dt.worker=!0:!Dt.hasGlobalWindow||"Deno"in window?(Dt.node=!0,Dt.svgSupported=!0):xo(navigator.userAgent,Dt);function xo(e,t){var r=t.browser,i=e.match(/Firefox\/([\d.]+)/),n=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);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),t.svgSupported=typeof SVGRect!="undefined",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document!="undefined";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}var X=Dt,ji=12,Ao="sans-serif",tr=ji+"px "+Ao,Eo=20,Io=100,Fo="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Oo(e){var t={};if(typeof JSON=="undefined")return t;for(var r=0;r=0)s=o*r.length;else for(var h=0;h>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[h]+":0",n[f]+":0",i[1-h]+":auto",n[1-f]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function hs(e,t,r){for(var i=r?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],h=!0,f=0;f<4;f++){var u=e[f].getBoundingClientRect(),l=2*f,v=u.left,c=u.top;o.push(v,c),h=h&&a&&v===a[l]&&c===a[l+1],s.push(e[f].offsetLeft,e[f].offsetTop)}return h&&n?n:(t.srcCoords=o,t[i]=r?vn(s,o):vn(o,s))}function Ma(e){return e.nodeName.toUpperCase()==="CANVAS"}var fs=/([&<>"'])/g,us={"&":"&","<":"<",">":">",'"':""","'":"'"};function Mu(e){return e==null?"":(e+"").replace(fs,function(t,r){return us[r]})}var ls=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qe=[],vs=X.browser.firefox&&+X.browser.version.split(".")[0]<39;function Oi(e,t,r,i){return r=r||{},i?dn(e,t,r):vs&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):dn(e,t,r),r}function dn(e,t,r){if(X.domSupported&&e.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(Ma(e)){var a=e.getBoundingClientRect();r.zrX=i-a.left,r.zrY=n-a.top;return}else if(Fi(Qe,e,i,n)){r.zrX=Qe[0],r.zrY=Qe[1];return}}r.zrX=r.zrY=0}function nn(e){return e||window.event}function lt(e,t,r){if(t=nn(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Oi(e,o,t,r)}else{Oi(e,t,t,r);var a=cs(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&ls.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function cs(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,i=e.deltaY;if(r==null||i==null)return t;var n=Math.abs(i!==0?i:r),a=i>0?-1:i<0?1:r>0?-1:1;return 3*n*a}function ds(e,t,r,i){e.addEventListener(t,r,i)}function ps(e,t,r,i){e.removeEventListener(t,r,i)}var _s=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},gs=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,i){return this._doTrack(t,r,i),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,i){var n=t.touches;if(!!n){for(var a={points:[],touches:[],target:r,event:t},o=0,s=n.length;o1&&i&&i.length>1){var a=pn(i)/pn(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=ys(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Xr(){return[1,0,0,1,0,0]}function ms(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ws(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Je(e,t,r){var i=t[0]*r[0]+t[2]*r[1],n=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],h=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=i,e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=h,e}function _n(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function Ts(e,t,r,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],h=t[3],f=t[5],u=Math.sin(r),l=Math.cos(r);return e[0]=n*l+s*u,e[1]=-n*u+s*l,e[2]=a*l+h*u,e[3]=-a*u+l*h,e[4]=l*(o-i[0])+u*(f-i[1])+i[0],e[5]=l*(f-i[1])-u*(o-i[0])+i[1],e}function bs(e,t,r){var i=r[0],n=r[1];return e[0]=t[0]*i,e[1]=t[1]*n,e[2]=t[2]*i,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*n,e}function Cs(e,t){var r=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],h=r*o-a*i;return h?(h=1/h,e[0]=o*h,e[1]=-a*h,e[2]=-i*h,e[3]=r*h,e[4]=(i*s-o*n)*h,e[5]=(a*n-r*s)*h,e):null}var Ls=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,i=this.y-t.y;return Math.sqrt(r*r+i*i)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,i=this.y-t.y;return r*r+i*i},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(!!t){var r=this.x,i=this.y;return this.x=t[0]*r+t[2]*i+t[4],this.y=t[1]*r+t[3]*i+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,i){t.x=r,t.y=i},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,i){t.x=r.x+i.x,t.y=r.y+i.y},e.sub=function(t,r,i){t.x=r.x-i.x,t.y=r.y-i.y},e.scale=function(t,r,i){t.x=r.x*i,t.y=r.y*i},e.scaleAndAdd=function(t,r,i,n){t.x=r.x+i.x*n,t.y=r.y+i.y*n},e.lerp=function(t,r,i,n){var a=1-n;t.x=a*r.x+n*i.x,t.y=a*r.y+n*i.y},e}(),H=Ls,ne=Math.min,ae=Math.max,Ft=new H,Ot=new H,Bt=new H,Ht=new H,Dr=new H,xr=new H,Ss=function(){function e(t,r,i,n){i<0&&(t=t+i,i=-i),n<0&&(r=r+n,n=-n),this.x=t,this.y=r,this.width=i,this.height=n}return e.prototype.union=function(t){var r=ne(t.x,this.x),i=ne(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=ae(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=ae(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=r,this.y=i},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,i=t.width/r.width,n=t.height/r.height,a=Xr();return _n(a,a,[-r.x,-r.y]),bs(a,a,[i,n]),_n(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,h=t.x,f=t.x+t.width,u=t.y,l=t.y+t.height,v=!(a_&&(_=m,y_&&(_=w,p=i.x&&t<=i.x+i.width&&r>=i.y&&r<=i.y+i.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height},e.applyTransform=function(t,r,i){if(!i){t!==r&&e.copy(t,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];t.x=r.x*n+o,t.y=r.y*a+s,t.width=r.width*n,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Ft.x=Bt.x=r.x,Ft.y=Ht.y=r.y,Ot.x=Ht.x=r.x+r.width,Ot.y=Bt.y=r.y+r.height,Ft.transform(i),Ht.transform(i),Ot.transform(i),Bt.transform(i),t.x=ne(Ft.x,Ot.x,Bt.x,Ht.x),t.y=ne(Ft.y,Ot.y,Bt.y,Ht.y);var h=ae(Ft.x,Ot.x,Bt.x,Ht.x),f=ae(Ft.y,Ot.y,Bt.y,Ht.y);t.width=h-t.x,t.height=f-t.y},e}(),k=Ss,Da="silent";function Ps(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Rs}}function Rs(){_s(this.event)}var Ms=function(e){O(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Sr),Ar=function(){function e(t,r){this.x=t,this.y=r}return e}(),Ds=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],je=new k(0,0,0,0),xa=function(e){O(t,e);function t(r,i,n,a,o){var s=e.call(this)||this;return s._hovered=new Ar(0,0),s.storage=r,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new Ms,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new ns(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(tt(Ds,function(i){r.on&&r.on(i,this[i],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var i=r.zrX,n=r.zrY,a=Aa(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var h=this._hovered=a?new Ar(i,n):this.findHover(i,n),f=h.target,u=this.proxy;u.setCursor&&u.setCursor(f?f.cursor:"default"),s&&f!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(h,"mousemove",r),f&&f!==s&&this.dispatchToElement(h,"mouseover",r)},t.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})},t.prototype.resize=function(){this._hovered=new Ar(0,0)},t.prototype.dispatch=function(r,i){var n=this[r];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var i=this.proxy;i.setCursor&&i.setCursor(r)},t.prototype.dispatchToElement=function(r,i,n){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+i,s=Ps(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(h){typeof h[o]=="function"&&h[o].call(h,s),h.trigger&&h.trigger(i,s)}))}},t.prototype.findHover=function(r,i,n){var a=this.storage.getDisplayList(),o=new Ar(r,i);if(gn(a,o,r,i,n),this._pointerSize&&!o.target){for(var s=[],h=this._pointerSize,f=h/2,u=new k(r-f,i-f,h,h),l=a.length-1;l>=0;l--){var v=a[l];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(je.copy(v.getBoundingRect()),v.transform&&je.applyTransform(v.transform),je.intersect(u)&&s.push(v))}if(s.length)for(var c=4,_=Math.PI/12,y=Math.PI*2,d=0;d4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function xs(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var i=e,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,r))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?Da:!0}return!1}function gn(e,t,r,i,n){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==n&&!o.ignore&&(s=xs(o,r,i))&&(!t.topTarget&&(t.topTarget=o),s!==Da)){t.target=o;break}}}function Aa(e,t,r){var i=e.painter;return t<0||t>i.getWidth()||r<0||r>i.getHeight()}var As=xa,Ea=32,Er=7;function Es(e){for(var t=0;e>=Ea;)t|=e&1,e>>=1;return e+t}function yn(e,t,r,i){var n=t+1;if(n===r)return 1;if(i(e[n++],e[t])<0){for(;n=0;)n++;return n-t}function Is(e,t,r){for(r--;t>>1,n(a,e[h])<0?s=h:o=h+1;var f=i-o;switch(f){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;f>0;)e[o+f]=e[o+f-1],f--}e[o]=a}}function ti(e,t,r,i,n,a){var o=0,s=0,h=1;if(a(e,t[r+n])>0){for(s=i-n;h0;)o=h,h=(h<<1)+1,h<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}else{for(s=n+1;hs&&(h=s);var f=o;o=n-h,h=n-f}for(o++;o>>1);a(e,t[r+u])>0?o=u+1:h=u}return h}function ri(e,t,r,i,n,a){var o=0,s=0,h=1;if(a(e,t[r+n])<0){for(s=n+1;hs&&(h=s);var f=o;o=n-h,h=n-f}else{for(s=i-n;h=0;)o=h,h=(h<<1)+1,h<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}for(o++;o>>1);a(e,t[r+u])<0?h=u:o=u+1}return h}function Fs(e,t){var r=Er,i,n,a=0,o=[];i=[],n=[];function s(c,_){i[a]=c,n[a]=_,a+=1}function h(){for(;a>1;){var c=a-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]n[c+1])break;u(c)}}function f(){for(;a>1;){var c=a-2;c>0&&n[c-1]=Er||b>=Er);if(C)break;L<0&&(L=0),L+=2}if(r=L,r<1&&(r=1),_===1){for(p=0;p=0;p--)e[T+p]=e[L+p];e[w]=o[m];return}for(var b=r;;){var C=0,S=0,R=!1;do if(t(o[m],e[g])<0){if(e[w--]=e[g--],C++,S=0,--_===0){R=!0;break}}else if(e[w--]=o[m--],S++,C=0,--d===1){R=!0;break}while((C|S)=0;p--)e[T+p]=e[L+p];if(_===0){R=!0;break}}if(e[w--]=o[m--],--d===1){R=!0;break}if(S=d-ti(e[g],o,0,d,d-1,t),S!==0){for(w-=S,m-=S,d-=S,T=w+1,L=m+1,p=0;p=Er||S>=Er);if(R)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),d===1){for(w-=_,g-=_,T=w+1,L=g+1,p=_-1;p>=0;p--)e[T+p]=e[L+p];e[w]=o[m]}else{if(d===0)throw new Error;for(L=w-(d-1),p=0;ps&&(h=s),mn(e,r,r+h,r+a,t),a=h}o.pushRun(r,a),o.mergeRuns(),n-=a,r+=a}while(n!==0);o.forceMergeRuns()}}var J=1,kr=2,ur=4,wn=!1;function ei(){wn||(wn=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Tn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Bs=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Tn}return e.prototype.traverse=function(t,r){for(var i=0;i0&&(u.__clipPaths=[]),isNaN(u.z)&&(ei(),u.z=0),isNaN(u.z2)&&(ei(),u.z2=0),isNaN(u.zlevel)&&(ei(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var l=t.getDecalElement&&t.getDecalElement();l&&this._updateAndAddDisplayable(l,r,i);var v=t.getTextGuideLine();v&&this._updateAndAddDisplayable(v,r,i);var c=t.getTextContent();c&&this._updateAndAddDisplayable(c,r,i)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,i=t.length;r=0&&this._roots.splice(n,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Hs=Bs,Ia;Ia=X.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Bi=Ia,Pe={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,i=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=i/4):t=i*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)))},elasticOut:function(e){var t,r=.1,i=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=i/4):t=i*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/i)+1)},elasticInOut:function(e){var t,r=.1,i=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=i/4):t=i*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Pe.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Pe.bounceIn(e*2)*.5:Pe.bounceOut(e*2-1)*.5+.5}},Fa=Pe,oe=Math.pow,It=Math.sqrt,Ie=1e-8,Oa=1e-4,bn=It(3),se=1/3,bt=Lr(),ot=Lr(),mr=Lr();function Et(e){return e>-Ie&&eIe||e<-Ie}function W(e,t,r,i,n){var a=1-n;return a*a*(a*e+3*n*t)+n*n*(n*i+3*a*r)}function Cn(e,t,r,i,n){var a=1-n;return 3*(((t-e)*a+2*(r-t)*n)*a+(i-r)*n*n)}function Ha(e,t,r,i,n,a){var o=i+3*(t-r)-e,s=3*(r-t*2+e),h=3*(t-e),f=e-n,u=s*s-3*o*h,l=s*h-9*o*f,v=h*h-3*s*f,c=0;if(Et(u)&&Et(l))if(Et(s))a[0]=0;else{var _=-h/s;_>=0&&_<=1&&(a[c++]=_)}else{var y=l*l-4*u*v;if(Et(y)){var d=l/u,_=-s/o+d,p=-d/2;_>=0&&_<=1&&(a[c++]=_),p>=0&&p<=1&&(a[c++]=p)}else if(y>0){var g=It(y),m=u*s+1.5*o*(-l+g),w=u*s+1.5*o*(-l-g);m<0?m=-oe(-m,se):m=oe(m,se),w<0?w=-oe(-w,se):w=oe(w,se);var _=(-s-(m+w))/(3*o);_>=0&&_<=1&&(a[c++]=_)}else{var L=(2*u*s-3*o*l)/(2*It(u*u*u)),T=Math.acos(L)/3,b=It(u),C=Math.cos(T),_=(-s-2*b*C)/(3*o),p=(-s+b*(C+bn*Math.sin(T)))/(3*o),S=(-s+b*(C-bn*Math.sin(T)))/(3*o);_>=0&&_<=1&&(a[c++]=_),p>=0&&p<=1&&(a[c++]=p),S>=0&&S<=1&&(a[c++]=S)}}return c}function za(e,t,r,i,n){var a=6*r-12*t+6*e,o=9*t+3*i-3*e-9*r,s=3*t-3*e,h=0;if(Et(o)){if(Ba(a)){var f=-s/a;f>=0&&f<=1&&(n[h++]=f)}}else{var u=a*a-4*o*s;if(Et(u))n[0]=-a/(2*o);else if(u>0){var l=It(u),f=(-a+l)/(2*o),v=(-a-l)/(2*o);f>=0&&f<=1&&(n[h++]=f),v>=0&&v<=1&&(n[h++]=v)}}return h}function Fe(e,t,r,i,n,a){var o=(t-e)*n+e,s=(r-t)*n+t,h=(i-r)*n+r,f=(s-o)*n+o,u=(h-s)*n+s,l=(u-f)*n+f;a[0]=e,a[1]=o,a[2]=f,a[3]=l,a[4]=l,a[5]=u,a[6]=h,a[7]=i}function zs(e,t,r,i,n,a,o,s,h,f,u){var l,v=.005,c=1/0,_,y,d,p;bt[0]=h,bt[1]=f;for(var g=0;g<1;g+=.05)ot[0]=W(e,r,n,o,g),ot[1]=W(t,i,a,s,g),d=yr(bt,ot),d=0&&d=0&&f<=1&&(n[h++]=f)}}else{var u=o*o-4*a*s;if(Et(u)){var f=-o/(2*a);f>=0&&f<=1&&(n[h++]=f)}else if(u>0){var l=It(u),f=(-o+l)/(2*a),v=(-o-l)/(2*a);f>=0&&f<=1&&(n[h++]=f),v>=0&&v<=1&&(n[h++]=v)}}return h}function ka(e,t,r){var i=e+r-2*t;return i===0?.5:(e-t)/i}function Oe(e,t,r,i,n){var a=(t-e)*i+e,o=(r-t)*i+t,s=(o-a)*i+a;n[0]=e,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=r}function $s(e,t,r,i,n,a,o,s,h){var f,u=.005,l=1/0;bt[0]=o,bt[1]=s;for(var v=0;v<1;v+=.05){ot[0]=G(e,r,n,v),ot[1]=G(t,i,a,v);var c=yr(bt,ot);c=0&&c=1?1:Ha(0,i,a,1,h,s)&&W(0,n,o,1,s[0])}}}var Gs=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||gr,this.ondestroy=t.ondestroy||gr,this.onrestart=t.onrestart||gr,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var i=this._life,n=t-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 h=n%i;this._startTime=t-h,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=We(t)?t:Fa[t]||Na(t)},e}(),Xs=Gs,$a=function(){function e(t){this.value=t}return e}(),qs=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new $a(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,i=t.next;r?r.next=i:this.head=i,i?i.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Zs=function(){function e(t){this._list=new qs,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var h=i.head;i.remove(h),delete n[h.key],a=h.value,this._lastRemovedEntry=h}s?s.value=r:s=new $a(r),s.key=t,i.insertEntry(s),n[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],i=this._list;if(r!=null)return r!==i.tail&&(i.remove(r),i.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Xe=Zs,Sn={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 qr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Pn(e){return e<0?0:e>1?1:e}function ii(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?qr(parseFloat(t)/100*255):qr(parseInt(t,10))}function Zr(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Pn(parseFloat(t)/100):Pn(parseFloat(t))}function ni(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function nt(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}function Hi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Wa=new Xe(20),he=null;function nr(e,t){he&&Hi(he,t),he=Wa.put(e,he||t.slice())}function wr(e,t){if(!!e){t=t||[];var r=Wa.get(e);if(r)return Hi(t,r);e=e+"";var i=e.replace(/ /g,"").toLowerCase();if(i in Sn)return Hi(t,Sn[i]),nr(e,t),t;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)){nt(t,0,0,0,1);return}return nt(t,(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),nr(e,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){nt(t,0,0,0,1);return}return nt(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),nr(e,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var h=i.substr(0,o),f=i.substr(o+1,s-(o+1)).split(","),u=1;switch(h){case"rgba":if(f.length!==4)return f.length===3?nt(t,+f[0],+f[1],+f[2],1):nt(t,0,0,0,1);u=Zr(f.pop());case"rgb":if(f.length>=3)return nt(t,ii(f[0]),ii(f[1]),ii(f[2]),f.length===3?u:Zr(f[3])),nr(e,t),t;nt(t,0,0,0,1);return;case"hsla":if(f.length!==4){nt(t,0,0,0,1);return}return f[3]=Zr(f[3]),Rn(f,t),nr(e,t),t;case"hsl":if(f.length!==3){nt(t,0,0,0,1);return}return Rn(f,t),nr(e,t),t;default:return}}nt(t,0,0,0,1)}}function Rn(e,t){var r=(parseFloat(e[0])%360+360)%360/360,i=Zr(e[1]),n=Zr(e[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],nt(t,qr(ni(o,a,r+1/3)*255),qr(ni(o,a,r)*255),qr(ni(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Mn(e,t){var r=wr(e);if(r){for(var i=0;i<3;i++)t<0?r[i]=r[i]*(1-t)|0:r[i]=(255-r[i])*t+r[i]|0,r[i]>255?r[i]=255:r[i]<0&&(r[i]=0);return Ya(r,r.length===4?"rgba":"rgb")}}function Ya(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function Be(e,t){var r=wr(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}var Dn=new Xe(100);function Du(e){if(Ee(e)){var t=Dn.get(e);return t||(t=Mn(e,-.1),Dn.put(e,t)),t}else if(Ye(e)){var r=z({},e);return r.colorStops=br(e.colorStops,function(i){return{offset:i.offset,color:Mn(i.color,-.1)}}),r}return e}function Us(e){return e.type==="linear"}function Vs(e){return e.type==="radial"}(function(){return X.hasGlobalWindow&&We(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer!="undefined"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}})();var zi=Array.prototype.slice;function Pt(e,t,r){return(t-e)*r+e}function ai(e,t,r,i){for(var n=t.length,a=0;ai?t:e,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 h=a;h=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=An,h=r;if(Ct(r)){var f=js(r);s=f,(f===1&&!Le(r[0])||f===2&&!Le(r[0][0]))&&(o=!0)}else if(Le(r)&&!Go(r))s=ue;else if(Ee(r))if(!isNaN(+r))s=ue;else{var u=wr(r);u&&(h=u,s=Nr)}else if(Ye(r)){var l=z({},h);l.colorStops=br(r.colorStops,function(c){return{offset:c.offset,color:wr(c.color)}}),Us(r)?s=ki:Vs(r)&&(s=Ni),h=l}a===0?this.valType=s:(s!==this.valType||s===An)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:h,rawValue:r,percent:0};return i&&(v.easing=i,v.easingFunc=We(i)?i:Fa[i]||Na(i)),n.push(v),v},e.prototype.prepare=function(t,r){var i=this.keyframes;this._needsSort&&i.sort(function(y,d){return y.time-d.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,h=le(n),f=En(n),u=0;u=0&&!(o[u].percent<=r);u--);u=v(u,s-2)}else{for(u=l;ur);u++);u=v(u-1,s-2)}_=o[u+1],c=o[u]}if(!!(c&&_)){this._lastFr=u,this._lastFrP=r;var d=_.percent-c.percent,p=d===0?1:v((r-c.percent)/d,1);_.easingFunc&&(p=_.easingFunc(p));var g=i?this._additiveValue:f?Ir:t[h];if((le(a)||f)&&!g&&(g=this._additiveValue=[]),this.discrete)t[h]=p<1?c.rawValue:_.rawValue;else if(le(a))a===De?ai(g,c[n],_[n],p):Qs(g,c[n],_[n],p);else if(En(a)){var m=c[n],w=_[n],L=a===ki;t[h]={type:L?"linear":"radial",x:Pt(m.x,w.x,p),y:Pt(m.y,w.y,p),colorStops:br(m.colorStops,function(b,C){var S=w.colorStops[C];return{offset:Pt(b.offset,S.offset,p),color:Me(ai([],b.color,S.color,p))}}),global:w.global},L?(t[h].x2=Pt(m.x2,w.x2,p),t[h].y2=Pt(m.y2,w.y2,p)):t[h].r=Pt(m.r,w.r,p)}else if(f)ai(g,c[n],_[n],p),i||(t[h]=Me(g));else{var T=Pt(c[n],_[n],p);i?this._additiveValue=T:t[h]=T}i&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,i=this.propName,n=this._additiveValue;r===ue?t[i]=t[i]+n:r===Nr?(wr(t[i],Ir),fe(Ir,Ir,n,1),t[i]=Me(Ir)):r===De?fe(t[i],t[i],n,1):r===Ga&&xn(t[i],t[i],n,1)},e}(),rh=function(){function e(t,r,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&n){en("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,i){return this.whenWithKeys(t,r,rt(r),i)},e.prototype.whenWithKeys=function(t,r,i,n){for(var a=this._tracks,o=0;o0&&h.addKeyframe(0,Re(f),n),this._trackKeys.push(s)}h.addKeyframe(t,Re(r[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,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,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}(),an=rh;function dr(){return new Date().getTime()}var eh=function(e){O(t,e);function t(r){var i=e.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 t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var i=r.getClip();i&&this.addClip(i)},t.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}},t.prototype.removeAnimator=function(r){var i=r.getClip();i&&this.removeClip(i),r.animation=null},t.prototype.update=function(r){for(var i=dr()-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())},t.prototype._startLoop=function(){var r=this;this._running=!0;function i(){r._running&&(Bi(i),!r._paused&&r.update())}Bi(i)},t.prototype.start=function(){this._running||(this._time=dr(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=dr(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=dr()-this._pauseStart,this._paused=!1)},t.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},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,i){i=i||{},this.start();var n=new an(r,i.loop);return this.addAnimator(n),n},t}(Sr),ih=eh,nh=300,oi=X.domSupported,si=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=br(e,function(n){var a=n.replace("mouse","pointer");return r.hasOwnProperty(a)?a:n});return{mouse:e,touch:t,pointer:i}}(),In={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Fn=!1;function $i(e){var t=e.pointerType;return t==="pen"||t==="touch"}function ah(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function hi(e){e&&(e.zrByTouch=!0)}function oh(e,t){return lt(e.dom,new sh(e,t),!0)}function Xa(e,t){for(var r=t,i=!1;r&&r.nodeType!==9&&!(i=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return i}var sh=function(){function e(t,r){this.stopPropagation=gr,this.stopImmediatePropagation=gr,this.preventDefault=gr,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),vt={mousedown:function(e){e=lt(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=lt(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=lt(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=lt(this.dom,e);var t=e.toElement||e.relatedTarget;Xa(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Fn=!0,e=lt(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Fn||(e=lt(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=lt(this.dom,e),hi(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),vt.mousemove.call(this,e),vt.mousedown.call(this,e)},touchmove:function(e){e=lt(this.dom,e),hi(e),this.handler.processGesture(e,"change"),vt.mousemove.call(this,e)},touchend:function(e){e=lt(this.dom,e),hi(e),this.handler.processGesture(e,"end"),vt.mouseup.call(this,e),+new Date-+this.__lastTouchMomentHn||e<-Hn}var kt=[],ar=[],ui=Xr(),li=Math.abs,Za=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return zt(this.rotation)||zt(this.x)||zt(this.y)||zt(this.scaleX-1)||zt(this.scaleY-1)||zt(this.skewX)||zt(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),i=this.transform;if(!(r||t)){i&&(Bn(i),this.invTransform=null);return}i=i||Xr(),r?this.getLocalTransform(i):Bn(i),t&&(r?Je(i,t,i):ws(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(kt);var i=kt[0]<0?-1:1,n=kt[1]<0?-1:1,a=((kt[0]-i)*r+i)/kt[0]||0,o=((kt[1]-n)*r+n)/kt[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Xr(),Cs(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(!!t){var r=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=i,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(!!this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Xr(),Je(ar,t.invTransform,r),r=ar);var i=this.originX,n=this.originY;(i||n)&&(ui[4]=i,ui[5]=n,Je(ar,r,ui),ar[4]-=i,ar[5]-=n,r=ar),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var i=[t,r],n=this.invTransform;return n&&Gr(i,i,n),i},e.prototype.transformCoordToGlobal=function(t,r){var i=[t,r],n=this.transform;return n&&Gr(i,i,n),i},e.prototype.getLineScale=function(){var t=this.transform;return t&&li(t[0]-1)>1e-10&&li(t[3]-1)>1e-10?Math.sqrt(li(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){ch(this,t)},e.getLocalTransform=function(t,r){r=r||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,h=t.anchorY,f=t.rotation||0,u=t.x,l=t.y,v=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||h){var _=i+s,y=n+h;r[4]=-_*a-v*y*o,r[5]=-y*o-c*_*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=c*a,r[2]=v*o,f&&Ts(r,r,f),r[4]+=i+u,r[5]+=n+l,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),Qr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ch(e,t){for(var r=0;r=0?parseFloat(e)/100*t:parseFloat(e):e}function ph(e,t,r){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,h=r.x,f=r.y,u="left",l="top";if(i instanceof Array)h+=Kr(i[0],r.width),f+=Kr(i[1],r.height),u=null,l=null;else switch(i){case"left":h-=n,f+=s,u="right",l="middle";break;case"right":h+=n+o,f+=s,l="middle";break;case"top":h+=o/2,f-=n,u="center",l="bottom";break;case"bottom":h+=o/2,f+=a+n,u="center";break;case"inside":h+=o/2,f+=s,u="center",l="middle";break;case"insideLeft":h+=n,f+=s,l="middle";break;case"insideRight":h+=o-n,f+=s,u="right",l="middle";break;case"insideTop":h+=o/2,f+=n,u="center";break;case"insideBottom":h+=o/2,f+=a-n,u="center",l="bottom";break;case"insideTopLeft":h+=n,f+=n;break;case"insideTopRight":h+=o-n,f+=n,u="right";break;case"insideBottomLeft":h+=n,f+=a-n,l="bottom";break;case"insideBottomRight":h+=o-n,f+=a-n,u="right",l="bottom";break}return e=e||{},e.x=h,e.y=f,e.align=u,e.verticalAlign=l,e}var vi="__zr_normal__",ci=Qr.concat(["ignore"]),_h=$e(Qr,function(e,t){return e[t]=!0,e},{ignore:!1}),or={},gh=new k(0,0,0,0),sn=function(){function e(t){this.id=ba(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,i){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=r.innerTransformable,o=void 0,s=void 0,h=!1;a.parent=n?this:null;var f=!1;if(a.copyTransform(r),i.position!=null){var u=gh;i.layoutRect?u.copy(i.layoutRect):u.copy(this.getBoundingRect()),n||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(or,i,u):ph(or,i,u),a.x=or.x,a.y=or.y,o=or.align,s=or.verticalAlign;var l=i.origin;if(l&&i.rotation!=null){var v=void 0,c=void 0;l==="center"?(v=u.width*.5,c=u.height*.5):(v=Kr(l[0],u.width),c=Kr(l[1],u.height)),f=!0,a.originX=-a.x+v+(n?0:u.x),a.originY=-a.y+c+(n?0:u.y)}}i.rotation!=null&&(a.rotation=i.rotation);var _=i.offset;_&&(a.x+=_[0],a.y+=_[1],f||(a.originX=-_[0],a.originY=-_[1]));var y=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,d=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),p=void 0,g=void 0,m=void 0;y&&this.canBeInsideText()?(p=i.insideFill,g=i.insideStroke,(p==null||p==="auto")&&(p=this.getInsideTextFill()),(g==null||g==="auto")&&(g=this.getInsideTextStroke(p),m=!0)):(p=i.outsideFill,g=i.outsideStroke,(p==null||p==="auto")&&(p=this.getOutsideFill()),(g==null||g==="auto")&&(g=this.getOutsideStroke(p),m=!0)),p=p||"#000",(p!==d.fill||g!==d.stroke||m!==d.autoStroke||o!==d.align||s!==d.verticalAlign)&&(h=!0,d.fill=p,d.stroke=g,d.autoStroke=m,d.align=o,d.verticalAlign=s,r.setDefaultTextStyle(d)),r.__dirty|=J,h&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Xi:Gi},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),i=typeof r=="string"&&wr(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,Ya(i,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},z(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(At(t))for(var i=t,n=rt(i),a=0;a0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(vi,!1,t)},e.prototype.useState=function(t,r,i,n){var a=t===vi,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,h=this.stateTransition;if(!(Tt(s,t)>=0&&(r||s.length===1))){var f;if(this.stateProxy&&!a&&(f=this.stateProxy(t)),f||(f=this.states&&this.states[t]),!f&&!a){en("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(f);var u=!!(f&&f.hoverLayer||n);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,f,this._normalState,r,!i&&!this.__inHover&&h&&h.duration>0,h);var l=this._textContent,v=this._textGuide;return l&&l.useState(t,r,i,u),v&&v.useState(t,r,i,u),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~J),f}}},e.prototype.useStates=function(t,r,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var h=0;h0,_);var y=this._textContent,d=this._textGuide;y&&y.useStates(t,r,v),d&&d.useStates(t,r,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~J)}},e.prototype.isSilent=function(){for(var t=this.silent,r=this.parent;!t&&r;){if(r.silent){t=!0;break}r=r.parent}return t},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var i=this.currentStates.slice();i.splice(r,1),this.useStates(i)}},e.prototype.replaceState=function(t,r,i){var n=this.currentStates.slice(),a=Tt(n,t),o=Tt(n,r)>=0;a>=0?o?n.splice(a,1):n[a]=r:i&&!o&&n.push(r),this.useStates(n)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},i,n=0;n=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var i=this.animators,n=i.length,a=[],o=0;o0&&r.during&&a[0].during(function(_,y){r.during(y)});for(var v=0;v0||n.force&&!o.length){var C=void 0,S=void 0,R=void 0;if(s){S={},v&&(C={});for(var w=0;w=0&&(n.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,i){var n=Tt(this._children,r);return n>=0&&this.replaceAt(i,n),this},t.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},t.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()},t.prototype.remove=function(r){var i=this.__zr,n=this._children,a=Tt(n,r);return a<0?this:(n.splice(a,1),r.parent=null,i&&r.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,i=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},e.prototype.on=function(t,r,i){return this._disposed||this.handler.on(t,r,i),this},e.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},e.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r=o;h++)s-=o;var f=et(r,t);return f>s&&(r="",f=0),s=e-f,n.ellipsis=r,n.ellipsisWidth=f,n.contentWidth=s,n.containerWidth=e,n}function to(e,t,r){var i=r.containerWidth,n=r.font,a=r.contentWidth;if(!i){e.textLine="",e.isTruncated=!1;return}var o=et(t,n);if(o<=i){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=r.maxIterations){t+=r.ellipsis;break}var h=s===0?Mh(t,a,r.ascCharWidth,r.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,h),o=et(t,n)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function Mh(e,t,r,i){for(var n=0,a=0,o=e.length;a_&&f){var y=Math.floor(_/s);u=u||v.length>y,v=v.slice(0,y)}if(e&&a&&l!=null)for(var d=ja(l,n,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),p={},g=0;gs&&gi(r,e.substring(s,f),t,o),gi(r,h[2],t,o,h[1]),s=_i.lastIndex}sn){var F=r.lines.length;T>0?(m.tokens=m.tokens.slice(0,T),p(m,L,w),r.lines=r.lines.slice(0,g+1)):r.lines=r.lines.slice(0,g),r.isTruncated=r.isTruncated||r.lines.length0&&_+i.accumWidth>i.width&&(u=t.split(` `),f=!0),i.accumWidth=_}else{var y=ro(t,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=y.accumWidth+c,l=y.linesWidths,u=y.lines}}else u=t.split(` `);for(var d=0;d=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Fh=$e(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function Oh(e){return Ih(e)?!!Fh[e]:!0}function ro(e,t,r,i,n){for(var a=[],o=[],s="",h="",f=0,u=0,l=0;lr:n+u+c>r){u?(s||h)&&(_?(s||(s=h,h="",f=0,u=f),a.push(s),o.push(u-f),h+=v,f+=c,s="",u=f):(h&&(s+=h,h="",f=0),a.push(s),o.push(u),s=v,u=c)):_?(a.push(h),o.push(f),h=v,f=c):(a.push(v),o.push(c));continue}u+=c,_?(h+=v,f+=c):(h&&(s+=h,h="",f=0),s+=v)}return!a.length&&!s&&(s=e,h="",f=0),h&&(s+=h),s&&(a.push(s),o.push(u)),a.length===1&&(u+=n),{accumWidth:u,lines:a,linesWidths:o}}var Zi="__zr_style_"+Math.round(Math.random()*10),jt={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ze={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};jt[Zi]=!0;var Wn=["z","z2","invisible"],Bh=["invisible"],Hh=function(e){O(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var i=rt(r),n=0;n1e-4){s[0]=e-r,s[1]=t-i,h[0]=e+r,h[1]=t+i;return}if(ve[0]=Ti(n)*r+e,ve[1]=wi(n)*i+t,ce[0]=Ti(a)*r+e,ce[1]=wi(a)*i+t,f(s,ve,ce),u(h,ve,ce),n=n%Nt,n<0&&(n=n+Nt),a=a%Nt,a<0&&(a=a+Nt),n>a&&!o?a+=Nt:nn&&(de[0]=Ti(c)*r+e,de[1]=wi(c)*i+t,f(s,de,s),u(h,de,h))}var I={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},$t=[],Wt=[],gt=[],Rt=[],yt=[],mt=[],bi=Math.min,Ci=Math.max,Yt=Math.cos,Gt=Math.sin,St=Math.abs,Ui=Math.PI,xt=Ui*2,Li=typeof Float32Array!="undefined",Fr=[];function Si(e){var t=Math.round(e/Ui*1e8)/1e8;return t%2*Ui}function Wh(e,t){var r=Si(e[0]);r<0&&(r+=xt);var i=r-e[0],n=e[1];n+=i,!t&&n-r>=xt?n=r+xt:t&&r-n>=xt?n=r-xt:!t&&r>n?n=r+(xt-Si(r-n)):t&&r0&&(this._ux=St(i/He/t)||0,this._uy=St(i/He/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(I.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var i=St(t-this._xi),n=St(r-this._yi),a=i>this._ux||n>this._uy;if(this.addData(I.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,i,n,a,o){return this._drawPendingPt(),this.addData(I.C,t,r,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,i,n,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,i,n){return this._drawPendingPt(),this.addData(I.Q,t,r,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,r,i,n),this._xi=i,this._yi=n,this},e.prototype.arc=function(t,r,i,n,a,o){this._drawPendingPt(),Fr[0]=n,Fr[1]=a,Wh(Fr,o),n=Fr[0],a=Fr[1];var s=a-n;return this.addData(I.A,t,r,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,i,n,a,o),this._xi=Yt(a)*i+t,this._yi=Gt(a)*i+r,this},e.prototype.arcTo=function(t,r,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,i,n,a),this},e.prototype.rect=function(t,r,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,i,n),this.addData(I.R,t,r,i,n),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(I.Z);var t=this._ctx,r=this._x0,i=this._y0;return t&&t.closePath(),this._xi=r,this._yi=i,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var r=t.length;!(this.data&&this.data.length===r)&&Li&&(this.data=new Float32Array(r));for(var i=0;iu.length&&(this._expandData(),u=this.data);for(var l=0;l0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){gt[0]=gt[1]=yt[0]=yt[1]=Number.MAX_VALUE,Rt[0]=Rt[1]=mt[0]=mt[1]=-Number.MAX_VALUE;var t=this.data,r=0,i=0,n=0,a=0,o;for(o=0;oi||St(m)>n||v===r-1)&&(y=Math.sqrt(g*g+m*m),a=d,o=p);break}case I.C:{var w=t[v++],L=t[v++],d=t[v++],p=t[v++],T=t[v++],b=t[v++];y=ks(a,o,w,L,d,p,T,b,10),a=T,o=b;break}case I.Q:{var w=t[v++],L=t[v++],d=t[v++],p=t[v++];y=Ws(a,o,w,L,d,p,10),a=d,o=p;break}case I.A:var C=t[v++],S=t[v++],R=t[v++],P=t[v++],M=t[v++],F=t[v++],D=F+M;v+=1,_&&(s=Yt(M)*R+C,h=Gt(M)*P+S),y=Ci(R,P)*bi(xt,Math.abs(F)),a=Yt(D)*R+C,o=Gt(D)*P+S;break;case I.R:{s=a=t[v++],h=o=t[v++];var B=t[v++],x=t[v++];y=B*2+x*2;break}case I.Z:{var g=s-a,m=h-o;y=Math.sqrt(g*g+m*m),a=s,o=h;break}}y>=0&&(f[l++]=y,u+=y)}return this._pathLen=u,u},e.prototype.rebuildPath=function(t,r){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,h,f,u,l,v,c=r<1,_,y,d=0,p=0,g,m=0,w,L;if(c&&(this._pathSegLen||this._calculateLength(),_=this._pathSegLen,y=this._pathLen,g=r*y,!g))return;t:for(var T=0;T0&&(t.lineTo(w,L),m=0),b){case I.M:s=f=i[T++],h=u=i[T++],t.moveTo(f,u);break;case I.L:{l=i[T++],v=i[T++];var S=St(l-f),R=St(v-u);if(S>n||R>a){if(c){var P=_[p++];if(d+P>g){var M=(g-d)/P;t.lineTo(f*(1-M)+l*M,u*(1-M)+v*M);break t}d+=P}t.lineTo(l,v),f=l,u=v,m=0}else{var F=S*S+R*R;F>m&&(w=l,L=v,m=F)}break}case I.C:{var D=i[T++],B=i[T++],x=i[T++],N=i[T++],V=i[T++],Lt=i[T++];if(c){var P=_[p++];if(d+P>g){var M=(g-d)/P;Fe(f,D,x,V,M,$t),Fe(u,B,N,Lt,M,Wt),t.bezierCurveTo($t[1],Wt[1],$t[2],Wt[2],$t[3],Wt[3]);break t}d+=P}t.bezierCurveTo(D,B,x,N,V,Lt),f=V,u=Lt;break}case I.Q:{var D=i[T++],B=i[T++],x=i[T++],N=i[T++];if(c){var P=_[p++];if(d+P>g){var M=(g-d)/P;Oe(f,D,x,M,$t),Oe(u,B,N,M,Wt),t.quadraticCurveTo($t[1],Wt[1],$t[2],Wt[2]);break t}d+=P}t.quadraticCurveTo(D,B,x,N),f=x,u=N;break}case I.A:var ct=i[T++],it=i[T++],$=i[T++],dt=i[T++],pt=i[T++],er=i[T++],Pr=i[T++],Rr=!i[T++],ee=$>dt?$:dt,ft=St($-dt)>.001,Z=pt+er,A=!1;if(c){var P=_[p++];d+P>g&&(Z=pt+er*(g-d)/P,A=!0),d+=P}if(ft&&t.ellipse?t.ellipse(ct,it,$,dt,Pr,pt,Z,Rr):t.arc(ct,it,ee,pt,Z,Rr),A)break t;C&&(s=Yt(pt)*$+ct,h=Gt(pt)*dt+it),f=Yt(Z)*$+ct,u=Gt(Z)*dt+it;break;case I.R:s=f=i[T],h=u=i[T+1],l=i[T++],v=i[T++];var E=i[T++],Mr=i[T++];if(c){var P=_[p++];if(d+P>g){var _t=g-d;t.moveTo(l,v),t.lineTo(l+bi(_t,E),v),_t-=E,_t>0&&t.lineTo(l+E,v+bi(_t,Mr)),_t-=Mr,_t>0&&t.lineTo(l+Ci(E-_t,0),v+Mr),_t-=E,_t>0&&t.lineTo(l,v+Ci(Mr-_t,0));break t}d+=P}t.rect(l,v,E,Mr);break;case I.Z:if(c){var P=_[p++];if(d+P>g){var M=(g-d)/P;t.lineTo(f*(1-M)+s*M,u*(1-M)+h*M);break t}d+=P}t.closePath(),f=s,u=h}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.CMD=I,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function sr(e,t,r,i,n,a,o){if(n===0)return!1;var s=n,h=0,f=e;if(o>t+s&&o>i+s||oe+s&&a>r+s||at+l&&u>i+l&&u>a+l&&u>s+l||ue+l&&f>r+l&&f>n+l&&f>o+l||ft+f&&h>i+f&&h>a+f||he+f&&s>r+f&&s>n+f||sr||u+fn&&(n+=Or);var v=Math.atan2(h,s);return v<0&&(v+=Or),v>=i&&v<=n||v+Or>=i&&v+Or<=n}function Xt(e,t,r,i,n,a){if(a>t&&a>i||an?s:0}var Mt=Cr.CMD,qt=Math.PI*2,qh=1e-4;function Zh(e,t){return Math.abs(e-t)t&&f>i&&f>a&&f>s||f1&&Uh(),c=W(t,i,a,s,at[0]),v>1&&(_=W(t,i,a,s,at[1]))),v===2?dt&&s>i&&s>a||s=0&&f<=1){for(var u=0,l=G(t,i,a,f),v=0;vr||s<-r)return 0;var h=Math.sqrt(r*r-s*s);U[0]=-h,U[1]=h;var f=Math.abs(i-n);if(f<1e-4)return 0;if(f>=qt-1e-4){i=0,n=qt;var u=a?1:-1;return o>=U[0]+e&&o<=U[1]+e?u:0}if(i>n){var l=i;i=n,n=l}i<0&&(i+=qt,n+=qt);for(var v=0,c=0;c<2;c++){var _=U[c];if(_+e>o){var y=Math.atan2(s,_),u=a?1:-1;y<0&&(y=qt+y),(y>=i&&y<=n||y+qt>=i&&y+qt<=n)&&(y>Math.PI/2&&y1&&(r||(s+=Xt(h,f,u,l,i,n))),d&&(h=a[_],f=a[_+1],u=h,l=f),y){case Mt.M:u=a[_++],l=a[_++],h=u,f=l;break;case Mt.L:if(r){if(sr(h,f,a[_],a[_+1],t,i,n))return!0}else s+=Xt(h,f,a[_],a[_+1],i,n)||0;h=a[_++],f=a[_++];break;case Mt.C:if(r){if(Yh(h,f,a[_++],a[_++],a[_++],a[_++],a[_],a[_+1],t,i,n))return!0}else s+=Vh(h,f,a[_++],a[_++],a[_++],a[_++],a[_],a[_+1],i,n)||0;h=a[_++],f=a[_++];break;case Mt.Q:if(r){if(Gh(h,f,a[_++],a[_++],a[_],a[_+1],t,i,n))return!0}else s+=Qh(h,f,a[_++],a[_++],a[_],a[_+1],i,n)||0;h=a[_++],f=a[_++];break;case Mt.A:var p=a[_++],g=a[_++],m=a[_++],w=a[_++],L=a[_++],T=a[_++];_+=1;var b=!!(1-a[_++]);v=Math.cos(L)*m+p,c=Math.sin(L)*w+g,d?(u=v,l=c):s+=Xt(h,f,v,c,i,n);var C=(i-p)*w/m+p;if(r){if(Xh(p,g,w,L,L+T,b,t,C,n))return!0}else s+=Kh(p,g,w,L,L+T,b,C,n);h=Math.cos(L+T)*m+p,f=Math.sin(L+T)*w+g;break;case Mt.R:u=h=a[_++],l=f=a[_++];var S=a[_++],R=a[_++];if(v=u+S,c=l+R,r){if(sr(u,l,v,l,t,i,n)||sr(v,l,v,c,t,i,n)||sr(v,c,u,c,t,i,n)||sr(u,c,u,l,t,i,n))return!0}else s+=Xt(v,l,v,c,i,n),s+=Xt(u,c,u,l,i,n);break;case Mt.Z:if(r){if(sr(h,f,u,l,t,i,n))return!0}else s+=Xt(h,f,u,l,i,n);h=u,f=l;break}}return!r&&!Zh(f,l)&&(s+=Xt(h,f,u,l,i,n)||0),s!==0}function Jh(e,t,r){return eo(e,0,!1,t,r)}function jh(e,t,r,i){return eo(e,t,!0,r,i)}var io=rr({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},jt),tf={style:rr({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ze.style)},Pi=Qr.concat(["invisible","culling","z","z2","zlevel","parent"]),rf=function(e){O(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(h){r.buildPath(h,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.5?Gi:i>.2?vh:Xi}else if(r)return Xi}return Gi},t.prototype.getInsideTextStroke=function(r){var i=this.style.fill;if(Ee(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=Be(r,0)0))},t.prototype.hasFill=function(){var r=this.style,i=r.fill;return i!=null&&i!=="none"},t.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&ur)&&(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 h=i.strokeNoScale?this.getLineScale():1,f=i.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;f=Math.max(f,u==null?4:u)}h>1e-10&&(s.width+=f/h,s.height+=f/h,s.x-=f/h/2,s.y-=f/h/2)}return s}return r},t.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 h=o.lineWidth,f=o.strokeNoScale?this.getLineScale():1;if(f>1e-10&&(this.hasFill()||(h=Math.max(h,this.strokeContainThreshold)),jh(s,h/f,r,i)))return!0}if(this.hasFill())return Jh(s,r,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ur,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,i){r==="shape"?this.setShape(i):e.prototype.attrKV.call(this,r,i)},t.prototype.setShape=function(r,i){var n=this.shape;return n||(n=this.shape={}),typeof r=="string"?n[r]=i:z(n,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ur)},t.prototype.createStyle=function(r){return Ge(io,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var i=this._normalState;r.shape&&!i.shape&&(i.shape=z({},this.shape))},t.prototype._applyStateObj=function(r,i,n,a,o,s){e.prototype._applyStateObj.call(this,r,i,n,a,o,s);var h=!(i&&a),f;if(i&&i.shape?o?a?f=i.shape:(f=z({},n.shape),z(f,i.shape)):(f=z({},a?this.shape:n.shape),z(f,i.shape)):h&&(f=n.shape),f)if(o){this.shape=z({},this.shape);for(var u={},l=rt(f),v=0;v0},t.prototype.hasFill=function(){var r=this.style,i=r.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(r){return Ge(ef,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var i=r.text;i!=null?i+="":i="";var n=dh(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},t.initDefaultProps=function(){var r=t.prototype;r.dirtyRectTolerance=10}(),t}(re);no.prototype.type="tspan";var Vi=no,nf=rr({x:0,y:0},jt),af={style:rr({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ze.style)};function of(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var ao=function(e){O(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return Ge(nf,r)},t.prototype._getSize=function(r){var i=this.style,n=i[r];if(n!=null)return n;var a=of(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},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return af},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new k(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(re);ao.prototype.type="image";var oo=ao;function sf(e,t){var r=t.x,i=t.y,n=t.width,a=t.height,o=t.r,s,h,f,u;n<0&&(r=r+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=h=f=u=o:o instanceof Array?o.length===1?s=h=f=u=o[0]:o.length===2?(s=f=o[0],h=u=o[1]):o.length===3?(s=o[0],h=u=o[1],f=o[2]):(s=o[0],h=o[1],f=o[2],u=o[3]):s=h=f=u=0;var l;s+h>n&&(l=s+h,s*=n/l,h*=n/l),f+u>n&&(l=f+u,f*=n/l,u*=n/l),h+f>a&&(l=h+f,h*=a/l,f*=a/l),s+u>a&&(l=s+u,s*=a/l,u*=a/l),e.moveTo(r+s,i),e.lineTo(r+n-h,i),h!==0&&e.arc(r+n-h,i+h,h,-Math.PI/2,0),e.lineTo(r+n,i+a-f),f!==0&&e.arc(r+n-f,i+a-f,f,0,Math.PI/2),e.lineTo(r+u,i+a),u!==0&&e.arc(r+u,i+a-u,u,Math.PI/2,Math.PI),e.lineTo(r,i+s),s!==0&&e.arc(r+s,i+s,s,Math.PI,Math.PI*1.5)}var pr=Math.round;function hf(e,t,r){if(!!t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;e.x1=i,e.x2=n,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(pr(i*2)===pr(n*2)&&(e.x1=e.x2=_r(i,s,!0)),pr(a*2)===pr(o*2)&&(e.y1=e.y2=_r(a,s,!0))),e}}function ff(e,t,r){if(!!t){var i=t.x,n=t.y,a=t.width,o=t.height;e.x=i,e.y=n,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=_r(i,s,!0),e.y=_r(n,s,!0),e.width=Math.max(_r(i+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(_r(n+o,s,!1)-e.y,o===0?0:1)),e}}function _r(e,t,r){if(!t)return e;var i=pr(e*2);return(i+pr(t))%2===0?i/2:(i+(r?1:-1))/2}var uf=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),lf={},so=function(e){O(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new uf},t.prototype.buildPath=function(r,i){var n,a,o,s;if(this.subPixelOptimize){var h=ff(lf,i,this.style);n=h.x,a=h.y,o=h.width,s=h.height,h.r=i.r,i=h}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?sf(r,i):r.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(q);so.prototype.type="rect";var vf=so,Zn={fill:"#000"},Un=2,cf={style:rr({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},Ze.style)},ho=function(e){O(t,e);function t(r){var i=e.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Zn,i.attr(r),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,M=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),F=o.calculatedLineHeight,D=0;D=0&&(D=T[F],D.align==="right");)this._placeToken(D,r,C,p,M,"right",m),S-=D.width,M-=D.width,F--;for(P+=(a-(P-d)-(g-M)-S)/2;R<=F;)D=T[R],this._placeToken(D,r,C,p,P+D.width/2,"center",m),P+=D.width,R++;p+=C}},t.prototype._placeToken=function(r,i,n,a,o,s,h){var f=i.rich[r.styleName]||{};f.text=r.text;var u=r.verticalAlign,l=a+n/2;u==="top"?l=a+r.height/2:u==="bottom"&&(l=a+n-r.height/2);var v=!r.isLineHolder&&Ri(f);v&&this._renderBackground(f,i,s==="right"?o-r.width:s==="center"?o-r.width/2:o,l-r.height/2,r.width,r.height);var c=!!f.backgroundColor,_=r.textPadding;_&&(o=ta(o,s,_),l-=r.height/2-_[0]-r.innerHeight/2);var y=this._getOrCreateChild(Vi),d=y.createStyle();y.useStyle(d);var p=this._defaultStyle,g=!1,m=0,w=jn("fill"in f?f.fill:"fill"in i?i.fill:(g=!0,p.fill)),L=Jn("stroke"in f?f.stroke:"stroke"in i?i.stroke:!c&&!h&&(!p.autoStroke||g)?(m=Un,p.stroke):null),T=f.textShadowBlur>0||i.textShadowBlur>0;d.text=r.text,d.x=o,d.y=l,T&&(d.shadowBlur=f.textShadowBlur||i.textShadowBlur||0,d.shadowColor=f.textShadowColor||i.textShadowColor||"transparent",d.shadowOffsetX=f.textShadowOffsetX||i.textShadowOffsetX||0,d.shadowOffsetY=f.textShadowOffsetY||i.textShadowOffsetY||0),d.textAlign=s,d.textBaseline="middle",d.font=r.font||tr,d.opacity=Se(f.opacity,i.opacity,1),Qn(d,f),L&&(d.lineWidth=Se(f.lineWidth,i.lineWidth,m),d.lineDash=j(f.lineDash,i.lineDash),d.lineDashOffset=i.lineDashOffset||0,d.stroke=L),w&&(d.fill=w);var b=r.contentWidth,C=r.contentHeight;y.setBoundingRect(new k($r(d.x,b,d.textAlign),lr(d.y,C,d.textBaseline),b,C))},t.prototype._renderBackground=function(r,i,n,a,o,s){var h=r.backgroundColor,f=r.borderWidth,u=r.borderColor,l=h&&h.image,v=h&&!l,c=r.borderRadius,_=this,y,d;if(v||r.lineHeight||f&&u){y=this._getOrCreateChild(vf),y.useStyle(y.createStyle()),y.style.fill=null;var p=y.shape;p.x=n,p.y=a,p.width=o,p.height=s,p.r=c,y.dirtyShape()}if(v){var g=y.style;g.fill=h||null,g.fillOpacity=j(r.fillOpacity,1)}else if(l){d=this._getOrCreateChild(oo),d.onload=function(){_.dirtyStyle()};var m=d.style;m.image=h.image,m.x=n,m.y=a,m.width=o,m.height=s}if(f&&u){var g=y.style;g.lineWidth=f,g.stroke=u,g.strokeOpacity=j(r.strokeOpacity,1),g.lineDash=r.borderDash,g.lineDashOffset=r.borderDashOffset||0,y.strokeContainThreshold=0,y.hasFill()&&y.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var w=(y||d).style;w.shadowBlur=r.shadowBlur||0,w.shadowColor=r.shadowColor||"transparent",w.shadowOffsetX=r.shadowOffsetX||0,w.shadowOffsetY=r.shadowOffsetY||0,w.opacity=Se(r.opacity,i.opacity,1)},t.makeFont=function(r){var i="";return gf(r)&&(i=[r.fontStyle,r.fontWeight,_f(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),i&&zr(i)||r.textFont||r.font},t}(re),df={left:!0,right:1,center:1},pf={top:1,bottom:1,middle:1},Vn=["fontStyle","fontWeight","fontSize","fontFamily"];function _f(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?ji+"px":e+"px"}function Qn(e,t){for(var r=0;r1&&(o*=Mi(_),s*=Mi(_));var y=(n===a?-1:1)*Mi((o*o*(s*s)-o*o*(c*c)-s*s*(v*v))/(o*o*(c*c)+s*s*(v*v)))||0,d=y*o*c/s,p=y*-s*v/o,g=(e+r)/2+ge(l)*d-_e(l)*p,m=(t+i)/2+_e(l)*d+ge(l)*p,w=na([1,0],[(v-d)/o,(c-p)/s]),L=[(v-d)/o,(c-p)/s],T=[(-1*v-d)/o,(-1*c-p)/s],b=na(L,T);if(Qi(L,T)<=-1&&(b=Br),Qi(L,T)>=1&&(b=0),b<0){var C=Math.round(b/Br*1e6)/1e6;b=Br*2+C%2*Br}u.addData(f,g,m,o,s,w,b,l,a)}var bf=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Cf=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Lf(e){var t=new Cr;if(!e)return t;var r=0,i=0,n=r,a=i,o,s=Cr.CMD,h=e.match(bf);if(!h)return t;for(var f=0;fD*D+B*B&&(C=R,S=P),{cx:C,cy:S,x0:-u,y0:-l,x1:C*(n/L-1),y1:S*(n/L-1)}}function Df(e){var t;if(Vr(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function xf(e,t){var r,i=Wr(t.r,0),n=Wr(t.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 h=t.startAngle,f=t.endAngle;if(!(isNaN(h)||isNaN(f))){var u=t.cx,l=t.cy,v=!!t.clockwise,c=oa(f-h),_=c>Di&&c%Di;if(_>ut&&(c=_),!(i>ut))e.moveTo(u,l);else if(c>Di-ut)e.moveTo(u+i*fr(h),l+i*Zt(h)),e.arc(u,l,i,h,f,!v),n>ut&&(e.moveTo(u+n*fr(f),l+n*Zt(f)),e.arc(u,l,n,f,h,v));else{var y=void 0,d=void 0,p=void 0,g=void 0,m=void 0,w=void 0,L=void 0,T=void 0,b=void 0,C=void 0,S=void 0,R=void 0,P=void 0,M=void 0,F=void 0,D=void 0,B=i*fr(h),x=i*Zt(h),N=n*fr(f),V=n*Zt(f),Lt=c>ut;if(Lt){var ct=t.cornerRadius;ct&&(r=Df(ct),y=r[0],d=r[1],p=r[2],g=r[3]);var it=oa(i-n)/2;if(m=wt(it,p),w=wt(it,g),L=wt(it,y),T=wt(it,d),S=b=Wr(m,w),R=C=Wr(L,T),(b>ut||C>ut)&&(P=i*fr(f),M=i*Zt(f),F=n*fr(h),D=n*Zt(h),cut){var ft=wt(p,S),Z=wt(g,S),A=ye(F,D,B,x,i,ft,v),E=ye(P,M,N,V,i,Z,v);e.moveTo(u+A.cx+A.x0,l+A.cy+A.y0),S0&&e.arc(u+A.cx,l+A.cy,ft,Y(A.y0,A.x0),Y(A.y1,A.x1),!v),e.arc(u,l,i,Y(A.cy+A.y1,A.cx+A.x1),Y(E.cy+E.y1,E.cx+E.x1),!v),Z>0&&e.arc(u+E.cx,l+E.cy,Z,Y(E.y1,E.x1),Y(E.y0,E.x0),!v))}else e.moveTo(u+B,l+x),e.arc(u,l,i,h,f,!v);if(!(n>ut)||!Lt)e.lineTo(u+N,l+V);else if(R>ut){var ft=wt(y,R),Z=wt(d,R),A=ye(N,V,P,M,n,-Z,v),E=ye(B,x,F,D,n,-ft,v);e.lineTo(u+A.cx+A.x0,l+A.cy+A.y0),R0&&e.arc(u+A.cx,l+A.cy,Z,Y(A.y0,A.x0),Y(A.y1,A.x1),!v),e.arc(u,l,n,Y(A.cy+A.y1,A.cx+A.x1),Y(E.cy+E.y1,E.cx+E.x1),v),ft>0&&e.arc(u+E.cx,l+E.cy,ft,Y(E.y1,E.x1),Y(E.y0,E.x0),!v))}else e.lineTo(u+N,l+V),e.arc(u,l,n,f,h,v)}e.closePath()}}}var Af=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),_o=function(e){O(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Af},t.prototype.buildPath=function(r,i){xf(r,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(q);_o.prototype.type="sector";var zu=_o,Ef=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),go=function(e){O(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Ef},t.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)},t}(q);go.prototype.type="ring";var ku=go;function If(e,t,r,i){var n=[],a=[],o=[],s=[],h,f,u,l;if(i){u=[1/0,1/0],l=[-1/0,-1/0];for(var v=0,c=e.length;v=2){if(i){var a=If(n,i,r,t.smoothConstraint);e.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(r?o:o-1);s++){var h=a[s*2],f=a[s*2+1],u=n[(s+1)%o];e.bezierCurveTo(h[0],h[1],f[0],f[1],u[0],u[1])}}else{e.moveTo(n[0][0],n[0][1]);for(var s=1,l=n.length;sVt[1]){if(s=!1,a)return s;var u=Math.abs(Vt[0]-Ut[1]),l=Math.abs(Ut[0]-Vt[1]);Math.min(u,l)>n.len()&&(u=0&&Kt(h)?h:.5;var f=e.createRadialGradient(o,s,0,o,s,h);return f}function Ki(e,t,r){for(var i=t.type==="radial"?Kf(e,t,r):Qf(e,t,r),n=t.colorStops,a=0;a0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Le(e)?[e]:Vr(e)?e:null}function So(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&jf(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(r){var n=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;n&&n!==1&&(r=br(r,function(a){return a/n}),i/=n)}return[r,i]}var tu=new Cr(!0);function ze(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function ha(e){return typeof e=="string"&&e!=="none"}function ke(e){var t=e.fill;return t!=null&&t!=="none"}function fa(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function ua(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function Ji(e,t,r){var i=Ja(t.image,t.__image,r);if(qe(i)){var n=e.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Vo),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function ru(e,t,r,i){var n,a=ze(r),o=ke(r),s=r.strokePercent,h=s<1,f=!t.path;(!t.silent||h)&&f&&t.createPathProxy();var u=t.path||tu,l=t.__dirty;if(!i){var v=r.fill,c=r.stroke,_=o&&!!v.colorStops,y=a&&!!c.colorStops,d=o&&!!v.image,p=a&&!!c.image,g=void 0,m=void 0,w=void 0,L=void 0,T=void 0;(_||y)&&(T=t.getBoundingRect()),_&&(g=l?Ki(e,v,T):t.__canvasFillGradient,t.__canvasFillGradient=g),y&&(m=l?Ki(e,c,T):t.__canvasStrokeGradient,t.__canvasStrokeGradient=m),d&&(w=l||!t.__canvasFillPattern?Ji(e,v,t):t.__canvasFillPattern,t.__canvasFillPattern=w),p&&(L=l||!t.__canvasStrokePattern?Ji(e,c,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),_?e.fillStyle=g:d&&(w?e.fillStyle=w:o=!1),y?e.strokeStyle=m:p&&(L?e.strokeStyle=L:a=!1)}var b=t.getGlobalScale();u.setScale(b[0],b[1],t.segmentIgnoreThreshold);var C,S;e.setLineDash&&r.lineDash&&(n=So(t),C=n[0],S=n[1]);var R=!0;(f||l&ur)&&(u.setDPR(e.dpr),h?u.setContext(null):(u.setContext(e),R=!1),u.reset(),t.buildPath(u,t.shape,i),u.toStatic(),t.pathUpdated()),R&&u.rebuildPath(e,h?s:1),C&&(e.setLineDash(C),e.lineDashOffset=S),i||(r.strokeFirst?(a&&ua(e,r),o&&fa(e,r)):(o&&fa(e,r),a&&ua(e,r))),C&&e.setLineDash([])}function eu(e,t,r){var i=t.__image=Ja(r.image,t.__image,t,t.onload);if(!(!i||!qe(i))){var n=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),h=i.width/i.height;if(o==null&&s!=null?o=s*h:s==null&&o!=null?s=o/h:o==null&&s==null&&(o=i.width,s=i.height),r.sWidth&&r.sHeight){var f=r.sx||0,u=r.sy||0;e.drawImage(i,f,u,r.sWidth,r.sHeight,n,a,o,s)}else if(r.sx&&r.sy){var f=r.sx,u=r.sy,l=o-f,v=s-u;e.drawImage(i,f,u,l,v,n,a,o,s)}else e.drawImage(i,n,a,o,s)}}function iu(e,t,r){var i,n=r.text;if(n!=null&&(n+=""),n){e.font=r.font||tr,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(i=So(t),a=i[0],o=i[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(ze(r)&&e.strokeText(n,r.x,r.y),ke(r)&&e.fillText(n,r.x,r.y)):(ke(r)&&e.fillText(n,r.x,r.y),ze(r)&&e.strokeText(n,r.x,r.y)),a&&e.setLineDash([])}}var la=["shadowBlur","shadowOffsetX","shadowOffsetY"],va=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Po(e,t,r,i,n){var a=!1;if(!i&&(r=r||{},t===r))return!1;if(i||t.opacity!==r.opacity){K(e,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?jt.opacity:o}(i||t.blend!==r.blend)&&(a||(K(e,n),a=!0),e.globalCompositeOperation=t.blend||jt.blend);for(var s=0;s=s)}}for(var l=this.__startIndex;l15)break}}D.prevElClipPaths&&p.restore()};if(g)if(g.length===0)C=d.__endIndex;else for(var R=c.dpr,P=0;P0&&t>n[0]){for(h=0;ht);h++);s=i[n[h]]}if(n.splice(h+1,0,t),i[t]=r,!r.virtual)if(s){var f=s.dom;f.nextSibling?o.insertBefore(r.dom,f.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var i=this._zlevelList,n=0;n0?Ce:0),this._needsManuallyCompositing),u.__builtin__||en("ZLevel "+f+" has been used by unkown layer "+u.id),u!==a&&(u.__used=!0,u.__startIndex!==h&&(u.__dirty=!0),u.__startIndex=h,u.incremental?u.__drawIndex=-1:u.__drawIndex=h,r(h),a=u),n.__dirty&J&&!n.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=h))}r(h),this.eachBuiltinLayer(function(l,v){!l.__used&&l.getElementCount()>0&&(l.__dirty=!0,l.__startIndex=l.__endIndex=l.__drawIndex=0),l.__dirty&&l.__drawIndex<0&&(l.__drawIndex=l.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,tt(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var i=this._layerConfig;i[t]?Hr(i[t],r,!0):i[t]=r;for(var n=0;n