>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[u]+":0",i[l]+":0",n[1-u]+":auto",i[1-l]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function J_(r,t,e){for(var n=e?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],u=!0,l=0;l<4;l++){var f=r[l].getBoundingClientRect(),h=2*l,v=f.left,c=f.top;o.push(v,c),u=u&&a&&v===a[h]&&c===a[h+1],s.push(r[l].offsetLeft,r[l].offsetTop)}return u&&i?i:(t.srcCoords=o,t[n]=e?fh(s,o):fh(o,s))}function yp(r){return r.nodeName.toUpperCase()==="CANVAS"}var t1=/([&<>"'])/g,e1={"&":"&","<":"<",">":">",'"':""","'":"'"};function Bt(r){return r==null?"":(r+"").replace(t1,function(t,e){return e1[e]})}var r1=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ms=[],n1=U.browser.firefox&&+U.browser.version.split(".")[0]<39;function Gu(r,t,e,n){return e=e||{},n?ch(r,t,e):n1&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):ch(r,t,e),e}function ch(r,t,e){if(U.domSupported&&r.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(yp(r)){var a=r.getBoundingClientRect();e.zrX=n-a.left,e.zrY=i-a.top;return}else if(Uu(ms,r,n,i)){e.zrX=ms[0],e.zrY=ms[1];return}}e.zrX=e.zrY=0}function Ul(r){return r||window.event}function re(r,t,e){if(t=Ul(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Gu(r,o,t,e)}else{Gu(r,t,t,e);var a=i1(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&r1.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function i1(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var i=Math.abs(n!==0?n:e),a=n>0?-1:n<0?1:e>0?-1:1;return 3*i*a}function a1(r,t,e,n){r.addEventListener(t,e,n)}function o1(r,t,e,n){r.removeEventListener(t,e,n)}var mp=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0},s1=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:e,event:t},o=0,s=i.length;o1&&n&&n.length>1){var a=vh(n)/vh(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=u1(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Mn(){return[1,0,0,1,0,0]}function Gl(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function l1(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function An(r,t,e){var n=t[0]*e[0]+t[2]*e[1],i=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],u=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=u,r}function Wu(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Wl(r,t,e,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],u=t[3],l=t[5],f=Math.sin(e),h=Math.cos(e);return r[0]=i*h+s*f,r[1]=-i*f+s*h,r[2]=a*h+u*f,r[3]=-a*f+h*u,r[4]=h*(o-n[0])+f*(l-n[1])+n[0],r[5]=h*(l-n[1])-f*(o-n[0])+n[1],r}function f1(r,t,e){var n=e[0],i=e[1];return r[0]=t[0]*n,r[1]=t[1]*i,r[2]=t[2]*n,r[3]=t[3]*i,r[4]=t[4]*n,r[5]=t[5]*i,r}function Yl(r,t){var e=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],u=e*o-a*n;return u?(u=1/u,r[0]=o*u,r[1]=-a*u,r[2]=-n*u,r[3]=e*u,r[4]=(n*s-o*i)*u,r[5]=(a*i-e*s)*u,r):null}var ot=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,n){t.x=e,t.y=n},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},r.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},r.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},r.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},r.lerp=function(t,e,n,i){var a=1-i;t.x=a*e.x+i*n.x,t.y=a*e.y+i*n.y},r}(),aa=Math.min,oa=Math.max,gr=new ot,yr=new ot,mr=new ot,_r=new ot,Yn=new ot,$n=new ot,tt=function(){function r(t,e,n,i){n<0&&(t=t+n,n=-n),i<0&&(e=e+i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return r.prototype.union=function(t){var e=aa(t.x,this.x),n=aa(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=oa(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=oa(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,a=Mn();return Wu(a,a,[-e.x,-e.y]),f1(a,a,[n,i]),Wu(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,u=t.x,l=t.x+t.width,f=t.y,h=t.y+t.height,v=!(ad&&(d=_,yd&&(d=w,g=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,n){if(!n){t!==e&&r.copy(t,e);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=e.x*i+o,t.y=e.y*a+s,t.width=e.width*i,t.height=e.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}gr.x=mr.x=e.x,gr.y=_r.y=e.y,yr.x=_r.x=e.x+e.width,yr.y=mr.y=e.y+e.height,gr.transform(n),_r.transform(n),yr.transform(n),mr.transform(n),t.x=aa(gr.x,yr.x,mr.x,_r.x),t.y=aa(gr.y,yr.y,mr.y,_r.y);var u=oa(gr.x,yr.x,mr.x,_r.x),l=oa(gr.y,yr.y,mr.y,_r.y);t.width=u-t.x,t.height=l-t.y},r}(),_p="silent";function h1(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:c1}}function c1(){mp(this.event)}var v1=function(r){it(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Oe),Xn=function(){function r(t,e){this.x=t,this.y=e}return r}(),d1=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ws=new tt(0,0,0,0),wp=function(r){it(t,r);function t(e,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Xn(0,0),s.storage=e,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new v1,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new Z_(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(D(d1,function(n){e.on&&e.on(n,this[n],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var n=e.zrX,i=e.zrY,a=Sp(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var u=this._hovered=a?new Xn(n,i):this.findHover(n,i),l=u.target,f=this.proxy;f.setCursor&&f.setCursor(l?l.cursor:"default"),s&&l!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(u,"mousemove",e),l&&l!==s&&this.dispatchToElement(u,"mouseover",e)},t.prototype.mouseout=function(e){var n=e.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Xn(0,0)},t.prototype.dispatch=function(e,n){var i=this[e];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var n=this.proxy;n.setCursor&&n.setCursor(e)},t.prototype.dispatchToElement=function(e,n,i){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+n,s=h1(n,e,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(u){typeof u[o]=="function"&&u[o].call(u,s),u.trigger&&u.trigger(n,s)}))}},t.prototype.findHover=function(e,n,i){var a=this.storage.getDisplayList(),o=new Xn(e,n);if(dh(a,o,e,n,i),this._pointerSize&&!o.target){for(var s=[],u=this._pointerSize,l=u/2,f=new tt(e-l,n-l,u,u),h=a.length-1;h>=0;h--){var v=a[h];v!==i&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(ws.copy(v.getBoundingRect()),v.transform&&ws.applyTransform(v.transform),ws.intersect(f)&&s.push(v))}if(s.length)for(var c=4,d=Math.PI/12,y=Math.PI*2,p=0;p4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function p1(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?_p:!0}return!1}function dh(r,t,e,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=p1(o,e,n))&&(!t.topTarget&&(t.topTarget=o),s!==_p)){t.target=o;break}}}function Sp(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var bp=32,qn=7;function g1(r){for(var t=0;r>=bp;)t|=r&1,r>>=1;return r+t}function ph(r,t,e,n){var i=t+1;if(i===e)return 1;if(n(r[i++],r[t])<0){for(;i=0;)i++;return i-t}function y1(r,t,e){for(e--;t>>1,i(a,r[u])<0?s=u:o=u+1;var l=n-o;switch(l){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;l>0;)r[o+l]=r[o+l-1],l--}r[o]=a}}function Ss(r,t,e,n,i,a){var o=0,s=0,u=1;if(a(r,t[e+i])>0){for(s=n-i;u0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}else{for(s=i+1;us&&(u=s);var l=o;o=i-u,u=i-l}for(o++;o>>1);a(r,t[e+f])>0?o=f+1:u=f}return u}function bs(r,t,e,n,i,a){var o=0,s=0,u=1;if(a(r,t[e+i])<0){for(s=i+1;us&&(u=s);var l=o;o=i-u,u=i-l}else{for(s=n-i;u=0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}for(o++;o>>1);a(r,t[e+f])<0?u=f:o=f+1}return u}function m1(r,t){var e=qn,n,i,a=0,o=[];n=[],i=[];function s(c,d){n[a]=c,i[a]=d,a+=1}function u(){for(;a>1;){var c=a-2;if(c>=1&&i[c-1]<=i[c]+i[c+1]||c>=2&&i[c-2]<=i[c]+i[c-1])i[c-1]i[c+1])break;f(c)}}function l(){for(;a>1;){var c=a-2;c>0&&i[c-1]=qn||T>=qn);if(M)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(g=0;g=0;g--)r[S+g]=r[b+g];r[w]=o[_];return}for(var T=e;;){var M=0,x=0,C=!1;do if(t(o[_],r[m])<0){if(r[w--]=r[m--],M++,x=0,--d===0){C=!0;break}}else if(r[w--]=o[_--],x++,M=0,--p===1){C=!0;break}while((M|x)=0;g--)r[S+g]=r[b+g];if(d===0){C=!0;break}}if(r[w--]=o[_--],--p===1){C=!0;break}if(x=p-Ss(r[m],o,0,p,p-1,t),x!==0){for(w-=x,_-=x,p-=x,S=w+1,b=_+1,g=0;g=qn||x>=qn);if(C)break;T<0&&(T=0),T+=2}if(e=T,e<1&&(e=1),p===1){for(w-=d,m-=d,S=w+1,b=m+1,g=d-1;g>=0;g--)r[S+g]=r[b+g];r[w]=o[_]}else{if(p===0)throw new Error;for(b=w-(p-1),g=0;gs&&(u=s),gh(r,e,e+u,e+a,t),a=u}o.pushRun(e,a),o.mergeRuns(),i-=a,e+=a}while(i!==0);o.forceMergeRuns()}}var Kt=1,hi=2,_n=4,yh=!1;function Ts(){yh||(yh=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function mh(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var _1=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=mh}return r.prototype.traverse=function(t,e){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(Ts(),f.z=0),isNaN(f.z2)&&(Ts(),f.z2=0),isNaN(f.zlevel)&&(Ts(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var v=t.getTextGuideLine();v&&this._updateAndAddDisplayable(v,e,n);var c=t.getTextContent();c&&this._updateAndAddDisplayable(c,e,n)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),lo;lo=U.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var _i={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)))},elasticOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-_i.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?_i.bounceIn(r*2)*.5:_i.bounceOut(r*2-1)*.5+.5}},sa=Math.pow,or=Math.sqrt,fo=1e-8,Tp=1e-4,_h=or(3),ua=1/3,De=zn(),ae=zn(),Ln=zn();function ir(r){return r>-fo&&rfo||r<-fo}function Tt(r,t,e,n,i){var a=1-i;return a*a*(a*r+3*i*t)+i*i*(i*n+3*a*e)}function wh(r,t,e,n,i){var a=1-i;return 3*(((t-r)*a+2*(e-t)*i)*a+(n-e)*i*i)}function ho(r,t,e,n,i,a){var o=n+3*(t-e)-r,s=3*(e-t*2+r),u=3*(t-r),l=r-i,f=s*s-3*o*u,h=s*u-9*o*l,v=u*u-3*s*l,c=0;if(ir(f)&&ir(h))if(ir(s))a[0]=0;else{var d=-u/s;d>=0&&d<=1&&(a[c++]=d)}else{var y=h*h-4*f*v;if(ir(y)){var p=h/f,d=-s/o+p,g=-p/2;d>=0&&d<=1&&(a[c++]=d),g>=0&&g<=1&&(a[c++]=g)}else if(y>0){var m=or(y),_=f*s+1.5*o*(-h+m),w=f*s+1.5*o*(-h-m);_<0?_=-sa(-_,ua):_=sa(_,ua),w<0?w=-sa(-w,ua):w=sa(w,ua);var d=(-s-(_+w))/(3*o);d>=0&&d<=1&&(a[c++]=d)}else{var b=(2*f*s-3*o*h)/(2*or(f*f*f)),S=Math.acos(b)/3,T=or(f),M=Math.cos(S),d=(-s-2*T*M)/(3*o),g=(-s+T*(M+_h*Math.sin(S)))/(3*o),x=(-s+T*(M-_h*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[c++]=d),g>=0&&g<=1&&(a[c++]=g),x>=0&&x<=1&&(a[c++]=x)}}return c}function Cp(r,t,e,n,i){var a=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,u=0;if(ir(o)){if(xp(a)){var l=-s/a;l>=0&&l<=1&&(i[u++]=l)}}else{var f=a*a-4*o*s;if(ir(f))i[0]=-a/(2*o);else if(f>0){var h=or(f),l=(-a+h)/(2*o),v=(-a-h)/(2*o);l>=0&&l<=1&&(i[u++]=l),v>=0&&v<=1&&(i[u++]=v)}}return u}function co(r,t,e,n,i,a){var o=(t-r)*i+r,s=(e-t)*i+t,u=(n-e)*i+e,l=(s-o)*i+o,f=(u-s)*i+s,h=(f-l)*i+l;a[0]=r,a[1]=o,a[2]=l,a[3]=h,a[4]=h,a[5]=f,a[6]=u,a[7]=n}function w1(r,t,e,n,i,a,o,s,u,l,f){var h,v=.005,c=1/0,d,y,p,g;De[0]=u,De[1]=l;for(var m=0;m<1;m+=.05)ae[0]=Tt(r,e,i,o,m),ae[1]=Tt(t,n,a,s,m),p=Dn(De,ae),p=0&&p=0&&l<=1&&(i[u++]=l)}}else{var f=o*o-4*a*s;if(ir(f)){var l=-o/(2*a);l>=0&&l<=1&&(i[u++]=l)}else if(f>0){var h=or(f),l=(-o+h)/(2*a),v=(-o-h)/(2*a);l>=0&&l<=1&&(i[u++]=l),v>=0&&v<=1&&(i[u++]=v)}}return u}function Dp(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function vo(r,t,e,n,i){var a=(t-r)*n+r,o=(e-t)*n+t,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=e}function T1(r,t,e,n,i,a,o,s,u){var l,f=.005,h=1/0;De[0]=o,De[1]=s;for(var v=0;v<1;v+=.05){ae[0]=Ft(r,e,i,v),ae[1]=Ft(t,n,a,v);var c=Dn(De,ae);c=0&&c=1?1:ho(0,n,a,1,u,s)&&Tt(0,i,o,1,s[0])}}}var D1=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Gt,this.ondestroy=t.ondestroy||Gt,this.onrestart=t.onrestart||Gt,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var u=i%n;this._startTime=t-u,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=$(t)?t:_i[t]||Mp(t)},r}(),Ap=function(){function r(t){this.value=t}return r}(),M1=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new Ap(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),Ji=function(){function r(t){this._list=new M1,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=n.head;n.remove(u),delete i[u.key],a=u.value,this._lastRemovedEntry=u}s?s.value=e:s=new Ap(e),s.key=t,n.insertEntry(s),i[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],n=this._list;if(e!=null)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),bh={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 sr(r){return r=Math.round(r),r<0?0:r>255?255:r}function Yu(r){return r<0?0:r>1?1:r}function xs(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?sr(parseFloat(t)/100*255):sr(parseInt(t,10))}function wi(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Yu(parseFloat(t)/100):Yu(parseFloat(t))}function Cs(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function la(r,t,e){return r+(t-r)*e}function ee(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function $u(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var Lp=new Ji(20),fa=null;function an(r,t){fa&&$u(fa,t),fa=Lp.put(r,fa||t.slice())}function ur(r,t){if(r){t=t||[];var e=Lp.get(r);if(e)return $u(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in bh)return $u(t,bh[n]),an(r,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){ee(t,0,0,0,1);return}return ee(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),an(r,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){ee(t,0,0,0,1);return}return ee(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),an(r,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var u=n.substr(0,o),l=n.substr(o+1,s-(o+1)).split(","),f=1;switch(u){case"rgba":if(l.length!==4)return l.length===3?ee(t,+l[0],+l[1],+l[2],1):ee(t,0,0,0,1);f=wi(l.pop());case"rgb":if(l.length>=3)return ee(t,xs(l[0]),xs(l[1]),xs(l[2]),l.length===3?f:wi(l[3])),an(r,t),t;ee(t,0,0,0,1);return;case"hsla":if(l.length!==4){ee(t,0,0,0,1);return}return l[3]=wi(l[3]),Th(l,t),an(r,t),t;case"hsl":if(l.length!==3){ee(t,0,0,0,1);return}return Th(l,t),an(r,t),t;default:return}}ee(t,0,0,0,1)}}function Th(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=wi(r[1]),i=wi(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],ee(t,sr(Cs(o,a,e+1/3)*255),sr(Cs(o,a,e)*255),sr(Cs(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function xh(r,t){var e=ur(r);if(e){for(var n=0;n<3;n++)e[n]=e[n]*(1-t)|0,e[n]>255?e[n]=255:e[n]<0&&(e[n]=0);return $l(e,e.length===4?"rgba":"rgb")}}function A1(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=ur(t[i]),s=ur(t[a]),u=n-i,l=$l([sr(la(o[0],s[0],u)),sr(la(o[1],s[1],u)),sr(la(o[2],s[2],u)),Yu(la(o[3],s[3],u))],"rgba");return e?{color:l,leftIndex:i,rightIndex:a,value:n}:l}}function $l(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function po(r,t){var e=ur(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var Ch=new Ji(100);function Dh(r){if(z(r)){var t=Ch.get(r);return t||(t=xh(r,-.1),Ch.put(r,t)),t}else if(Vo(r)){var e=k({},r);return e.colorStops=G(r.colorStops,function(n){return{offset:n.offset,color:xh(n.color,-.1)}}),e}return r}function L1(r){return r.type==="linear"}function E1(r){return r.type==="radial"}(function(){return U.hasGlobalWindow&&$(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var Xu=Array.prototype.slice;function ze(r,t,e){return(t-r)*e+r}function Ds(r,t,e,n){for(var i=t.length,a=0;an?t:r,a=Math.min(e,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var u=a;u=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=Ah,u=e;if(Wt(e)){var l=O1(e);s=l,(l===1&&!pt(e[0])||l===2&&!pt(e[0][0]))&&(o=!0)}else if(pt(e)&&!uo(e))s=ca;else if(z(e))if(!isNaN(+e))s=ca;else{var f=ur(e);f&&(u=f,s=ci)}else if(Vo(e)){var h=k({},u);h.colorStops=G(e.colorStops,function(c){return{offset:c.offset,color:ur(c.color)}}),L1(e)?s=qu:E1(e)&&(s=Zu),u=h}a===0?this.valType=s:(s!==this.valType||s===Ah)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:u,rawValue:e,percent:0};return n&&(v.easing=n,v.easingFunc=$(n)?n:_i[n]||Mp(n)),i.push(v),v},r.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(y,p){return y.time-p.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,u=va(i),l=Lh(i),f=0;f=0&&!(o[f].percent<=e);f--);f=v(f,s-2)}else{for(f=h;fe);f++);f=v(f-1,s-2)}d=o[f+1],c=o[f]}if(c&&d){this._lastFr=f,this._lastFrP=e;var p=d.percent-c.percent,g=p===0?1:v((e-c.percent)/p,1);d.easingFunc&&(g=d.easingFunc(g));var m=n?this._additiveValue:l?Zn:t[u];if((va(a)||l)&&!m&&(m=this._additiveValue=[]),this.discrete)t[u]=g<1?c.rawValue:d.rawValue;else if(va(a))a===Za?Ds(m,c[i],d[i],g):P1(m,c[i],d[i],g);else if(Lh(a)){var _=c[i],w=d[i],b=a===qu;t[u]={type:b?"linear":"radial",x:ze(_.x,w.x,g),y:ze(_.y,w.y,g),colorStops:G(_.colorStops,function(T,M){var x=w.colorStops[M];return{offset:ze(T.offset,x.offset,g),color:qa(Ds([],T.color,x.color,g))}}),global:w.global},b?(t[u].x2=ze(_.x2,w.x2,g),t[u].y2=ze(_.y2,w.y2,g)):t[u].r=ze(_.r,w.r,g)}else if(l)Ds(m,c[i],d[i],g),n||(t[u]=qa(m));else{var S=ze(c[i],d[i],g);n?this._additiveValue=S:t[u]=S}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;e===ca?t[n]=t[n]+i:e===ci?(ur(t[n],Zn),ha(Zn,Zn,i,1),t[n]=qa(Zn)):e===Za?ha(t[n],t[n],i,1):e===Ep&&Mh(t[n],t[n],i,1)},r}(),Xl=function(){function r(t,e,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i){Hl("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,vt(e),n)},r.prototype.whenWithKeys=function(t,e,n,i){for(var a=this._tracks,o=0;o0&&u.addKeyframe(0,Xa(l),i),this._trackKeys.push(s)}u.addKeyframe(t,Xa(e[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function Tn(){return new Date().getTime()}var N1=function(r){it(t,r);function t(e){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var n=e.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(e){if(e.animation){var n=e.prev,i=e.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var n=e.getClip();n&&this.removeClip(n),e.animation=null},t.prototype.update=function(e){for(var n=Tn()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,e||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(lo(n),!e._paused&&e.update())}lo(n)},t.prototype.start=function(){this._running||(this._time=Tn(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Tn(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Tn()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var n=e.next;e.prev=e.next=e.animation=null,e=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,n){n=n||{},this.start();var i=new Xl(e,n.loop);return this.addAnimator(i),i},t}(Oe),B1=300,Ms=U.domSupported,As=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=G(r,function(i){var a=i.replace("mouse","pointer");return e.hasOwnProperty(a)?a:i});return{mouse:r,touch:t,pointer:n}}(),Eh={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Ph=!1;function Ku(r){var t=r.pointerType;return t==="pen"||t==="touch"}function F1(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Ls(r){r&&(r.zrByTouch=!0)}function z1(r,t){return re(r.dom,new H1(r,t),!0)}function Pp(r,t){for(var e=t,n=!1;e&&e.nodeType!==9&&!(n=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return n}var H1=function(){function r(t,e){this.stopPropagation=Gt,this.stopImmediatePropagation=Gt,this.preventDefault=Gt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),ge={mousedown:function(r){r=re(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=re(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=re(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=re(this.dom,r);var t=r.toElement||r.relatedTarget;Pp(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Ph=!0,r=re(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Ph||(r=re(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=re(this.dom,r),Ls(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),ge.mousemove.call(this,r),ge.mousedown.call(this,r)},touchmove:function(r){r=re(this.dom,r),Ls(r),this.handler.processGesture(r,"change"),ge.mousemove.call(this,r)},touchend:function(r){r=re(this.dom,r),Ls(r),this.handler.processGesture(r,"end"),ge.mouseup.call(this,r),+new Date-+this.__lastTouchMomentOh||r<-Oh}var Sr=[],on=[],Ps=Mn(),Rs=Math.abs,ql=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return wr(this.rotation)||wr(this.x)||wr(this.y)||wr(this.scaleX-1)||wr(this.scaleY-1)||wr(this.skewX)||wr(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(Ih(n),this.invTransform=null);return}n=n||Mn(),e?this.getLocalTransform(n):Ih(n),t&&(e?An(n,t,n):l1(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Sr);var n=Sr[0]<0?-1:1,i=Sr[1]<0?-1:1,a=((Sr[0]-n)*e+n)/Sr[0]||0,o=((Sr[1]-i)*e+i)/Sr[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Mn(),Yl(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Mn(),An(on,t.invTransform,e),e=on);var n=this.originX,i=this.originY;(n||i)&&(Ps[4]=n,Ps[5]=i,An(on,e,Ps),on[4]-=n,on[5]-=i,e=on),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&fe(n,n,i),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&fe(n,n,i),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&Rs(t[0]-1)>1e-10&&Rs(t[3]-1)>1e-10?Math.sqrt(Rs(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){Y1(this,t)},r.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,u=t.anchorY,l=t.rotation||0,f=t.x,h=t.y,v=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||u){var d=n+s,y=i+u;e[4]=-d*a-v*y*o,e[5]=-y*o-c*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=c*a,e[2]=v*o,l&&Wl(e,e,l),e[4]+=n+f,e[5]+=i+h,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),Oi=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Y1(r,t){for(var e=0;e=0?parseFloat(r)/100*t:parseFloat(r):r}function Ip(r,t,e){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,u=e.x,l=e.y,f="left",h="top";if(n instanceof Array)u+=Zr(n[0],e.width),l+=Zr(n[1],e.height),f=null,h=null;else switch(n){case"left":u-=i,l+=s,f="right",h="middle";break;case"right":u+=i+o,l+=s,h="middle";break;case"top":u+=o/2,l-=i,f="center",h="bottom";break;case"bottom":u+=o/2,l+=a+i,f="center";break;case"inside":u+=o/2,l+=s,f="center",h="middle";break;case"insideLeft":u+=i,l+=s,h="middle";break;case"insideRight":u+=o-i,l+=s,f="right",h="middle";break;case"insideTop":u+=o/2,l+=i,f="center";break;case"insideBottom":u+=o/2,l+=a-i,f="center",h="bottom";break;case"insideTopLeft":u+=i,l+=i;break;case"insideTopRight":u+=o-i,l+=i,f="right";break;case"insideBottomLeft":u+=i,l+=a-i,h="bottom";break;case"insideBottomRight":u+=o-i,l+=a-i,f="right",h="bottom";break}return r=r||{},r.x=u,r.y=l,r.align=f,r.verticalAlign=h,r}var Is="__zr_normal__",Os=Oi.concat(["ignore"]),$1=Fn(Oi,function(r,t){return r[t]=!0,r},{ignore:!1}),sn={},X1=new tt(0,0,0,0),Go=function(){function r(t){this.id=cp(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=e.innerTransformable,o=void 0,s=void 0,u=!1;a.parent=i?this:null;var l=!1;if(a.copyTransform(e),n.position!=null){var f=X1;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(sn,n,f):Ip(sn,n,f),a.x=sn.x,a.y=sn.y,o=sn.align,s=sn.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var v=void 0,c=void 0;h==="center"?(v=f.width*.5,c=f.height*.5):(v=Zr(h[0],f.width),c=Zr(h[1],f.height)),l=!0,a.originX=-a.x+v+(i?0:f.x),a.originY=-a.y+c+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var d=n.offset;d&&(a.x+=d[0],a.y+=d[1],l||(a.originX=-d[0],a.originY=-d[1]));var y=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,m=void 0,_=void 0;y&&this.canBeInsideText()?(g=n.insideFill,m=n.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(g),_=!0)):(g=n.outsideFill,m=n.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(g),_=!0)),g=g||"#000",(g!==p.fill||m!==p.stroke||_!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(u=!0,p.fill=g,p.stroke=m,p.autoStroke=_,p.align=o,p.verticalAlign=s,e.setDefaultTextStyle(p)),e.__dirty|=Kt,u&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?tl:Ju},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&ur(e);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,$l(n,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},k(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(H(t))for(var n=t,i=vt(n),a=0;a0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Is,!1,t)},r.prototype.useState=function(t,e,n,i){var a=t===Is,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,u=this.stateTransition;if(!(ut(s,t)>=0&&(e||s.length===1))){var l;if(this.stateProxy&&!a&&(l=this.stateProxy(t)),l||(l=this.states&&this.states[t]),!l&&!a){Hl("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(l);var f=!!(l&&l.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,l,this._normalState,e,!n&&!this.__inHover&&u&&u.duration>0,u);var h=this._textContent,v=this._textGuide;return h&&h.useState(t,e,n,f),v&&v.useState(t,e,n,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Kt),l}}},r.prototype.useStates=function(t,e,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var u=0;u0,d);var y=this._textContent,p=this._textGuide;y&&y.useStates(t,e,v),p&&p.useStates(t,e,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Kt)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},r.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),a=ut(i,t),o=ut(i,e)>=0;a>=0?o?i.splice(a,1):i[a]=e:n&&!o&&i.push(e),this.useStates(i)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,a=[],o=0;o0&&e.during&&a[0].during(function(d,y){e.during(y)});for(var v=0;v0||i.force&&!o.length){var M=void 0,x=void 0,C=void 0;if(s){x={},v&&(M={});for(var w=0;w<_;w++){var g=y[w];x[g]=e[g],v?M[g]=n[g]:e[g]=n[g]}}else if(v){C={};for(var w=0;w<_;w++){var g=y[w];C[g]=Xa(e[g]),Z1(e,n,g)}}var b=new Xl(e,!1,!1,h?At(d,function(E){return E.targetName===t}):null);b.targetName=t,i.scope&&(b.scope=i.scope),v&&M&&b.whenWithKeys(0,M,y),C&&b.whenWithKeys(0,C,y),b.whenWithKeys(l??500,s?x:n,y).delay(f||0),r.addAnimator(b,t),o.push(b)}}var $t=function(r){it(t,r);function t(e){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var n=this._children,i=0;i=0&&(i.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var i=ut(this._children,e);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(e,n){var i=this._children,a=i[n];if(e&&e!==this&&e.parent!==this&&e!==a){i[n]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var n=this.__zr;n&&n!==e.__zr&&e.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(e){var n=this.__zr,i=this._children,a=ut(i,e);return a<0?this:(i.splice(a,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/u*l+o}function Rt(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return z(r)?rw(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function wt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),Np),r=(+r).toFixed(t),e?r:+r}function He(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return nw(r)}function nw(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,i=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function iw(r,t){var e=Math.log,n=Math.LN10,i=Math.floor(e(r[1]-r[0])/n),a=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function aw(r,t){var e=Math.max(He(r),He(t)),n=r+t;return e>Np?n:wt(n,e)}function Bp(r){var t=Math.PI*2;return(r%t+t)%t}function yo(r){return r>-Fh&&r=10&&t++,t}function Fp(r,t){var e=jl(r),n=Math.pow(10,e),i=r/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,r=a*n,e>=-20?+r.toFixed(e<0?-e:0):r}function mo(r){var t=parseFloat(r);return t==r&&(t!==0||!z(r)||r.indexOf("x")<=0)?t:NaN}function uw(r){return!isNaN(mo(r))}function zp(){return Math.round(Math.random()*9)}function Hp(r,t){return t===0?r:Hp(t,r%t)}function Hh(r,t){return r==null?t:t==null?r:r*t/Hp(r,t)}function zt(r){throw new Error(r)}function Vh(r,t,e){return(t-r)*e+r}var Vp="series\0",lw="\0_ec_\0";function It(r){return r instanceof Array?r:r==null?[]:[r]}function Uh(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var n=0,i=e.length;n=0||a&&ut(a,u)<0)){var l=n.getShallow(u,t);l!=null&&(o[r[s][0]]=l)}}return o}}var Rw=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Iw=Ni(Rw),Ow=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Iw(this,t,e)},r}(),el=new Ji(50);function kw(r){if(typeof r=="string"){var t=el.get(r);return t&&t.image}else return r}function Xp(r,t,e,n,i){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=el.get(r),o={hostEl:e,cb:n,cbPayload:i};return a?(t=a.image,!Yo(t)&&a.pending.push(o)):(t=Bn.loadImage(r,Wh,Wh),t.__zrImageSrc=r,el.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function Wh(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;u++)s-=o;var l=jt(e,t);return l>s&&(e="",l=0),s=r-l,i.ellipsis=e,i.ellipsisWidth=l,i.contentWidth=s,i.containerWidth=r,i}function Zp(r,t,e){var n=e.containerWidth,i=e.font,a=e.contentWidth;if(!n){r.textLine="",r.isTruncated=!1;return}var o=jt(t,i);if(o<=n){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var u=s===0?Bw(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,u),o=jt(t,i)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function Bw(r,t,e,n){for(var i=0,a=0,o=r.length;ad&&l){var y=Math.floor(d/s);f=f||v.length>y,v=v.slice(0,y)}if(r&&a&&h!=null)for(var p=qp(h,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g={},m=0;ms&&zs(e,r.substring(s,l),t,o),zs(e,u[2],t,o,u[1]),s=Fs.lastIndex}si){var R=e.lines.length;S>0?(_.tokens=_.tokens.slice(0,S),g(_,b,w),e.lines=e.lines.slice(0,m+1)):e.lines=e.lines.slice(0,m),e.isTruncated=e.isTruncated||e.lines.length0&&d+n.accumWidth>n.width&&(f=t.split(`
+`),l=!0),n.accumWidth=d}else{var y=Kp(t,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=y.accumWidth+c,h=y.linesWidths,f=y.lines}}else f=t.split(`
+`);for(var p=0;p=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Gw=Fn(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function Ww(r){return Uw(r)?!!Gw[r]:!0}function Kp(r,t,e,n,i){for(var a=[],o=[],s="",u="",l=0,f=0,h=0;he:i+f+c>e){f?(s||u)&&(d?(s||(s=u,u="",l=0,f=l),a.push(s),o.push(f-l),u+=v,l+=c,s="",f=l):(u&&(s+=u,u="",l=0),a.push(s),o.push(f),s=v,f=c)):d?(a.push(u),o.push(l),u=v,l=c):(a.push(v),o.push(c));continue}f+=c,d?(u+=v,l+=c):(u&&(s+=u,u="",l=0),s+=v)}return!a.length&&!s&&(s=r,u="",l=0),u&&(s+=u),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var rl="__zr_style_"+Math.round(Math.random()*10),Wr={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},$o={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Wr[rl]=!0;var $h=["z","z2","invisible"],Yw=["invisible"],ra=function(r){it(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=vt(e),i=0;i1e-4){s[0]=r-e,s[1]=t-n,u[0]=r+e,u[1]=t+n;return}if(da[0]=Gs(i)*e+r,da[1]=Us(i)*n+t,pa[0]=Gs(a)*e+r,pa[1]=Us(a)*n+t,l(s,da,pa),f(u,da,pa),i=i%Tr,i<0&&(i=i+Tr),a=a%Tr,a<0&&(a=a+Tr),i>a&&!o?a+=Tr:ii&&(ga[0]=Gs(c)*e+r,ga[1]=Us(c)*n+t,l(s,ga,s),f(u,ga,u))}var J={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},xr=[],Cr=[],be=[],Xe=[],Te=[],xe=[],Ws=Math.min,Ys=Math.max,Dr=Math.cos,Mr=Math.sin,Be=Math.abs,nl=Math.PI,rr=nl*2,$s=typeof Float32Array<"u",Kn=[];function Xs(r){var t=Math.round(r/nl*1e8)/1e8;return t%2*nl}function Kw(r,t){var e=Xs(r[0]);e<0&&(e+=rr);var n=e-r[0],i=r[1];i+=n,!t&&i-e>=rr?i=e+rr:t&&e-i>=rr?i=e-rr:!t&&e>i?i=e+(rr-Xs(e-i)):t&&e0&&(this._ux=Be(n/go/t)||0,this._uy=Be(n/go/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(J.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var n=Be(t-this._xi),i=Be(e-this._yi),a=n>this._ux||i>this._uy;if(this.addData(J.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,n,i,a,o){return this._drawPendingPt(),this.addData(J.C,t,e,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(J.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,a,o){this._drawPendingPt(),Kn[0]=i,Kn[1]=a,Kw(Kn,o),i=Kn[0],a=Kn[1];var s=a-i;return this.addData(J.A,t,e,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,a,o),this._xi=Dr(a)*n+t,this._yi=Mr(a)*n+e,this},r.prototype.arcTo=function(t,e,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,a),this},r.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(J.R,t,e,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(J.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&$s&&(this.data=new Float32Array(e));for(var n=0;nf.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){be[0]=be[1]=Te[0]=Te[1]=Number.MAX_VALUE,Xe[0]=Xe[1]=xe[0]=xe[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,i=0,a=0,o;for(o=0;on||Be(_)>i||v===e-1)&&(y=Math.sqrt(m*m+_*_),a=p,o=g);break}case J.C:{var w=t[v++],b=t[v++],p=t[v++],g=t[v++],S=t[v++],T=t[v++];y=S1(a,o,w,b,p,g,S,T,10),a=S,o=T;break}case J.Q:{var w=t[v++],b=t[v++],p=t[v++],g=t[v++];y=x1(a,o,w,b,p,g,10),a=p,o=g;break}case J.A:var M=t[v++],x=t[v++],C=t[v++],A=t[v++],E=t[v++],R=t[v++],P=R+E;v+=1,d&&(s=Dr(E)*C+M,u=Mr(E)*A+x),y=Ys(C,A)*Ws(rr,Math.abs(R)),a=Dr(P)*C+M,o=Mr(P)*A+x;break;case J.R:{s=a=t[v++],u=o=t[v++];var I=t[v++],O=t[v++];y=I*2+O*2;break}case J.Z:{var m=s-a,_=u-o;y=Math.sqrt(m*m+_*_),a=s,o=u;break}}y>=0&&(l[h++]=y,f+=y)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,u,l,f,h,v,c=e<1,d,y,p=0,g=0,m,_=0,w,b;if(!(c&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,y=this._pathLen,m=e*y,!m)))t:for(var S=0;S0&&(t.lineTo(w,b),_=0),T){case J.M:s=l=n[S++],u=f=n[S++],t.moveTo(l,f);break;case J.L:{h=n[S++],v=n[S++];var x=Be(h-l),C=Be(v-f);if(x>i||C>a){if(c){var A=d[g++];if(p+A>m){var E=(m-p)/A;t.lineTo(l*(1-E)+h*E,f*(1-E)+v*E);break t}p+=A}t.lineTo(h,v),l=h,f=v,_=0}else{var R=x*x+C*C;R>_&&(w=h,b=v,_=R)}break}case J.C:{var P=n[S++],I=n[S++],O=n[S++],V=n[S++],B=n[S++],F=n[S++];if(c){var A=d[g++];if(p+A>m){var E=(m-p)/A;co(l,P,O,B,E,xr),co(f,I,V,F,E,Cr),t.bezierCurveTo(xr[1],Cr[1],xr[2],Cr[2],xr[3],Cr[3]);break t}p+=A}t.bezierCurveTo(P,I,O,V,B,F),l=B,f=F;break}case J.Q:{var P=n[S++],I=n[S++],O=n[S++],V=n[S++];if(c){var A=d[g++];if(p+A>m){var E=(m-p)/A;vo(l,P,O,E,xr),vo(f,I,V,E,Cr),t.quadraticCurveTo(xr[1],Cr[1],xr[2],Cr[2]);break t}p+=A}t.quadraticCurveTo(P,I,O,V),l=O,f=V;break}case J.A:var X=n[S++],at=n[S++],et=n[S++],ht=n[S++],ct=n[S++],gt=n[S++],ce=n[S++],dr=!n[S++],rn=et>ht?et:ht,qt=Be(et-ht)>.001,bt=ct+gt,W=!1;if(c){var A=d[g++];p+A>m&&(bt=ct+gt*(m-p)/A,W=!0),p+=A}if(qt&&t.ellipse?t.ellipse(X,at,et,ht,ce,ct,bt,dr):t.arc(X,at,rn,ct,bt,dr),W)break t;M&&(s=Dr(ct)*et+X,u=Mr(ct)*ht+at),l=Dr(bt)*et+X,f=Mr(bt)*ht+at;break;case J.R:s=l=n[S],u=f=n[S+1],h=n[S++],v=n[S++];var K=n[S++],pr=n[S++];if(c){var A=d[g++];if(p+A>m){var Et=m-p;t.moveTo(h,v),t.lineTo(h+Ws(Et,K),v),Et-=K,Et>0&&t.lineTo(h+K,v+Ws(Et,pr)),Et-=pr,Et>0&&t.lineTo(h+Ys(K-Et,0),v+pr),Et-=K,Et>0&&t.lineTo(h,v+Ys(pr-Et,0));break t}p+=A}t.rect(h,v,K,pr);break;case J.Z:if(c){var A=d[g++];if(p+A>m){var E=(m-p)/A;t.lineTo(l*(1-E)+s*E,f*(1-E)+u*E);break t}p+=A}t.closePath(),l=s,f=u}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=J,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();function un(r,t,e,n,i,a,o){if(i===0)return!1;var s=i,u=0,l=r;if(o>t+s&&o>n+s||or+s&&a>e+s||at+h&&f>n+h&&f>a+h&&f>s+h||fr+h&&l>e+h&&l>i+h&&l>o+h||lt+l&&u>n+l&&u>a+l||ur+l&&s>e+l&&s>i+l||se||f+l