/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var _h=function(r,e){return _h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},_h(r,e)};function O(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_h(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function zN(r,e,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(f){try{u(i.next(f))}catch(h){o(h)}}function l(f){try{u(i.throw(f))}catch(h){o(h)}}function u(f){f.done?a(f.value):n(f.value).then(s,l)}u((i=i.apply(r,[])).next())})}function VN(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(f){return l([u,f])}}function l(u){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,n=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function FN(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var i=t.call(r),n,a=[],o;try{for(;(e===void 0||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function GN(r,e,t){if(arguments.length===2)for(var i=0,n=e.length,a;i1||s(c,v)})})}function s(c,v){try{l(i[c](v))}catch(d){h(a[0][3],d)}}function l(c){c.value instanceof Sh?Promise.resolve(c.value.v).then(u,f):h(a[0][2],c)}function u(c){s("next",c)}function f(c){s("throw",c)}function h(c,v){c(v),a.shift(),a.length&&s(a[0][0],a[0][1])}}function WN(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof vd=="function"?vd(r):r[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(a){t[a]=r[a]&&function(o){return new Promise(function(s,l){o=r[a](o),n(s,l,o.done,o.value)})}}function n(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}var Rb=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Eb=function(){function r(){this.browser=new Rb,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),nt=new Eb;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(nt.wxa=!0,nt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?nt.worker=!0:!nt.hasGlobalWindow||"Deno"in window?(nt.node=!0,nt.svgSupported=!0):kb(navigator.userAgent,nt);function kb(r,e){var t=e.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(t.firefox=!0,t.version=i[1]),n&&(t.ie=!0,t.version=n[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var Hv=12,Ob="sans-serif",ln=Hv+"px "+Ob,Bb=20,Nb=100,zb="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Vb(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function vT(r,e,t){for(var i=t?"invTrans":"trans",n=e[i],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,c=f.left,v=f.top;o.push(c,v),l=l&&a&&c===a[h]&&v===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[i]=t?gd(s,o):gd(o,s))}function o_(r){return r.nodeName.toUpperCase()==="CANVAS"}var cT=/([&<>"'])/g,dT={"&":"&","<":"<",">":">",'"':""","'":"'"};function ue(r){return r==null?"":(r+"").replace(cT,function(e,t){return dT[t]})}var pT=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Lu=[],gT=nt.browser.firefox&&+nt.browser.version.split(".")[0]<39;function Ah(r,e,t,i){return t=t||{},i?md(r,e,t):gT&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):md(r,e,t),t}function md(r,e,t){if(nt.domSupported&&r.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(o_(r)){var a=r.getBoundingClientRect();t.zrX=i-a.left,t.zrY=n-a.top;return}else if(Mh(Lu,r,i,n)){t.zrX=Lu[0],t.zrY=Lu[1];return}}t.zrX=t.zrY=0}function Zv(r){return r||window.event}function Ae(r,e,t){if(e=Zv(e),e.zrX!=null)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Ah(r,o,e,t)}else{Ah(r,e,e,t);var a=yT(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&pT.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function yT(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,i=r.deltaY;if(t==null||i==null)return e;var n=Math.abs(i!==0?i:t),a=i>0?-1:i<0?1:t>0?-1:1;return 3*n*a}function Dh(r,e,t,i){r.addEventListener(e,t,i)}function mT(r,e,t,i){r.removeEventListener(e,t,i)}var Vr=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function _d(r){return r.which===2||r.which===3}var _T=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,i){var n=e.touches;if(n){for(var a={points:[],touches:[],target:t,event:e},o=0,s=n.length;o1&&i&&i.length>1){var a=Sd(i)/Sd(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=ST(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function $e(){return[1,0,0,1,0,0]}function Ul(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function s_(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Br(r,e,t){var i=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function pi(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function dn(r,e,t,i){i===void 0&&(i=[0,0]);var n=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),h=Math.cos(t);return r[0]=n*h+s*f,r[1]=-n*f+s*h,r[2]=a*h+l*f,r[3]=-a*f+h*l,r[4]=h*(o-i[0])+f*(u-i[1])+i[0],r[5]=h*(u-i[1])-f*(o-i[0])+i[1],r}function l_(r,e,t){var i=t[0],n=t[1];return r[0]=e[0]*i,r[1]=e[1]*n,r[2]=e[2]*i,r[3]=e[3]*n,r[4]=e[4]*i,r[5]=e[5]*n,r}function la(r,e){var t=e[0],i=e[2],n=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=t*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-t*s)*l,r):null}var Q=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.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 e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,i=this.y;return this.x=e[0]*t+e[2]*i+e[4],this.y=e[1]*t+e[3]*i+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,i){e.x=t,e.y=i},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,i){e.x=t.x+i.x,e.y=t.y+i.y},r.sub=function(e,t,i){e.x=t.x-i.x,e.y=t.y-i.y},r.scale=function(e,t,i){e.x=t.x*i,e.y=t.y*i},r.scaleAndAdd=function(e,t,i,n){e.x=t.x+i.x*n,e.y=t.y+i.y*n},r.lerp=function(e,t,i,n){var a=1-n;e.x=a*t.x+n*i.x,e.y=a*t.y+n*i.y},r}(),Uo=Math.min,Xo=Math.max,Si=new Q,xi=new Q,wi=new Q,bi=new Q,_a=new Q,Sa=new Q,ot=function(){function r(e,t,i,n){i<0&&(e=e+i,i=-i),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=i,this.height=n}return r.prototype.union=function(e){var t=Uo(e.x,this.x),i=Uo(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Xo(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Xo(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=t,this.y=i},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,i=e.width/t.width,n=e.height/t.height,a=$e();return pi(a,a,[-t.x,-t.y]),l_(a,a,[i,n]),pi(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,f=e.y,h=e.y+e.height,c=!(ad&&(d=_,pd&&(d=S,y=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},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(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,i){if(!i){e!==t&&r.copy(e,t);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];e.x=t.x*n+o,e.y=t.y*a+s,e.width=t.width*n,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Si.x=wi.x=t.x,Si.y=bi.y=t.y,xi.x=bi.x=t.x+t.width,xi.y=wi.y=t.y+t.height,Si.transform(i),bi.transform(i),xi.transform(i),wi.transform(i),e.x=Uo(Si.x,xi.x,wi.x,bi.x),e.y=Uo(Si.y,xi.y,wi.y,bi.y);var l=Xo(Si.x,xi.x,wi.x,bi.x),u=Xo(Si.y,xi.y,wi.y,bi.y);e.width=l-e.x,e.height=u-e.y},r}(),u_="silent";function xT(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:wT}}function wT(){Vr(this.event)}var bT=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Be),xa=function(){function r(e,t){this.x=e,this.y=t}return r}(),TT=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Pu=new ot(0,0,0,0),f_=function(r){O(e,r);function e(t,i,n,a,o){var s=r.call(this)||this;return s._hovered=new xa(0,0),s.storage=t,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new bT,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new lT(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(C(TT,function(i){t.on&&t.on(i,this[i],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var i=t.zrX,n=t.zrY,a=h_(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new xa(i,n):this.findHover(i,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var i=t.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new xa(0,0)},e.prototype.dispatch=function(t,i){var n=this[t];n&&n.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)},e.prototype.dispatchToElement=function(t,i,n){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+i,s=xT(i,t,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},e.prototype.findHover=function(t,i,n){var a=this.storage.getDisplayList(),o=new xa(t,i);if(xd(a,o,t,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new ot(t-u,i-u,l,l),h=a.length-1;h>=0;h--){var c=a[h];c!==n&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(Pu.copy(c.getBoundingRect()),c.transform&&Pu.applyTransform(c.transform),Pu.intersect(f)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function CT(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(e,t))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?u_:!0}return!1}function xd(r,e,t,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=CT(o,t,i))&&(!e.topTarget&&(e.topTarget=o),s!==u_)){e.target=o;break}}}function h_(r,e,t){var i=r.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var v_=32,wa=7;function MT(r){for(var e=0;r>=v_;)e|=r&1,r>>=1;return r+e}function wd(r,e,t,i){var n=e+1;if(n===t)return 1;if(i(r[n++],r[e])<0){for(;n=0;)n++;return n-e}function AT(r,e,t){for(t--;e>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){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(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function Ru(r,e,t,i,n,a){var o=0,s=0,l=1;if(a(r,e[t+n])>0){for(s=i-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);a(r,e[t+f])>0?o=f+1:l=f}return l}function Eu(r,e,t,i,n,a){var o=0,s=0,l=1;if(a(r,e[t+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);a(r,e[t+f])<0?l=f:o=f+1}return l}function DT(r,e){var t=wa,i,n,a=0,o=[];i=[],n=[];function s(v,d){i[a]=v,n[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]n[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&n[v-1]=wa||b>=wa);if(T)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),d===1){for(y=0;y=0;y--)r[x+y]=r[w+y];r[S]=o[_];return}for(var b=t;;){var T=0,M=0,A=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,M=0,--d===0){A=!0;break}}else if(r[S--]=o[_--],M++,T=0,--g===1){A=!0;break}while((T|M)=0;y--)r[x+y]=r[w+y];if(d===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(M=g-Ru(r[m],o,0,g,g-1,e),M!==0){for(S-=M,_-=M,g-=M,x=S+1,w=_+1,y=0;y=wa||M>=wa);if(A)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),g===1){for(S-=d,m-=d,x=S+1,w=m+1,y=d-1;y>=0;y--)r[x+y]=r[w+y];r[S]=o[_]}else{if(g===0)throw new Error;for(w=S-(g-1),y=0;ys&&(l=s),bd(r,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),n-=a,t+=a}while(n!==0);o.forceMergeRuns()}}var xe=1,Xa=2,Vn=4,Td=!1;function ku(){Td||(Td=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Cd(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var LT=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Cd}return r.prototype.traverse=function(e,t){for(var i=0;i0&&(f.__clipPaths=[]),isNaN(f.z)&&(ku(),f.z=0),isNaN(f.z2)&&(ku(),f.z2=0),isNaN(f.zlevel)&&(ku(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,i);var c=e.getTextGuideLine();c&&this._updateAndAddDisplayable(c,t,i);var v=e.getTextContent();v&&this._updateAndAddDisplayable(v,t,i)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,i=e.length;t=0&&this._roots.splice(n,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}(),il;il=nt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var ro={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 e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)))},elasticOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-ro.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?ro.bounceIn(r*2)*.5:ro.bounceOut(r*2-1)*.5+.5}},Zo=Math.pow,vi=Math.sqrt,nl=1e-8,c_=1e-4,Md=vi(3),$o=1/3,fr=sa(),Pe=sa(),Xn=sa();function li(r){return r>-nl&&rnl||r<-nl}function Bt(r,e,t,i,n){var a=1-n;return a*a*(a*r+3*n*e)+n*n*(n*i+3*a*t)}function Ad(r,e,t,i,n){var a=1-n;return 3*(((e-r)*a+2*(t-e)*n)*a+(i-t)*n*n)}function al(r,e,t,i,n,a){var o=i+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(li(f)&&li(h))if(li(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var p=h*h-4*f*c;if(li(p)){var g=h/f,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y)}else if(p>0){var m=vi(p),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Zo(-_,$o):_=Zo(_,$o),S<0?S=-Zo(-S,$o):S=Zo(S,$o);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var w=(2*f*s-3*o*h)/(2*vi(f*f*f)),x=Math.acos(w)/3,b=vi(f),T=Math.cos(x),d=(-s-2*b*T)/(3*o),y=(-s+b*(T+Md*Math.sin(x)))/(3*o),M=(-s+b*(T-Md*Math.sin(x)))/(3*o);d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y),M>=0&&M<=1&&(a[v++]=M)}}return v}function p_(r,e,t,i,n){var a=6*t-12*e+6*r,o=9*e+3*i-3*r-9*t,s=3*e-3*r,l=0;if(li(o)){if(d_(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var f=a*a-4*o*s;if(li(f))n[0]=-a/(2*o);else if(f>0){var h=vi(f),u=(-a+h)/(2*o),c=(-a-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function gi(r,e,t,i,n,a){var o=(e-r)*n+r,s=(t-e)*n+e,l=(i-t)*n+t,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=i}function g_(r,e,t,i,n,a,o,s,l,u,f){var h,c=.005,v=1/0,d,p,g,y;fr[0]=l,fr[1]=u;for(var m=0;m<1;m+=.05)Pe[0]=Bt(r,t,n,o,m),Pe[1]=Bt(e,i,a,s,m),g=Un(fr,Pe),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*a*s;if(li(f)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=vi(f),u=(-o+h)/(2*a),c=(-o-h)/(2*a);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function y_(r,e,t){var i=r+t-2*e;return i===0?.5:(r-e)/i}function ol(r,e,t,i,n){var a=(e-r)*i+r,o=(t-e)*i+e,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=t}function m_(r,e,t,i,n,a,o,s,l){var u,f=.005,h=1/0;fr[0]=o,fr[1]=s;for(var c=0;c<1;c+=.05){Pe[0]=$t(r,t,n,c),Pe[1]=$t(e,i,a,c);var v=Un(fr,Pe);v=0&&v=1?1:al(0,i,a,1,l,s)&&Bt(0,n,o,1,s[0])}}}var kT=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Jt,this.ondestroy=e.ondestroy||Jt,this.onrestart=e.onrestart||Jt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var i=this._life,n=e-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=J(e)?e:ro[e]||__(e)},r}(),S_=function(){function r(e){this.value=e}return r}(),OT=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new S_(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),Bo=function(){function r(e){this._list=new OT,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var i=this._list,n=this._map,a=null;if(n[e]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new S_(t),s.key=e,i.insertEntry(s),n[e]=s}return a},r.prototype.get=function(e){var t=this._map[e],i=this._list;if(t!=null)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),Ld={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 qe(r){return r=Math.round(r),r<0?0:r>255?255:r}function BT(r){return r=Math.round(r),r<0?0:r>360?360:r}function co(r){return r<0?0:r>1?1:r}function Ou(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?qe(parseFloat(e)/100*255):qe(parseInt(e,10))}function ji(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?co(parseFloat(e)/100):co(parseFloat(e))}function Bu(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function ui(r,e,t){return r+(e-r)*t}function Me(r,e,t,i,n){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function Lh(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var x_=new Bo(20),qo=null;function Sn(r,e){qo&&Lh(qo,e),qo=x_.put(r,qo||e.slice())}function Ee(r,e){if(r){e=e||[];var t=x_.get(r);if(t)return Lh(e,t);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in Ld)return Lh(e,Ld[i]),Sn(r,e),e;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){Me(e,0,0,0,1);return}return Me(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),Sn(r,e),e}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){Me(e,0,0,0,1);return}return Me(e,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),Sn(r,e),e}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Me(e,+u[0],+u[1],+u[2],1):Me(e,0,0,0,1);f=ji(u.pop());case"rgb":if(u.length>=3)return Me(e,Ou(u[0]),Ou(u[1]),Ou(u[2]),u.length===3?f:ji(u[3])),Sn(r,e),e;Me(e,0,0,0,1);return;case"hsla":if(u.length!==4){Me(e,0,0,0,1);return}return u[3]=ji(u[3]),Ih(u,e),Sn(r,e),e;case"hsl":if(u.length!==3){Me(e,0,0,0,1);return}return Ih(u,e),Sn(r,e),e;default:return}}Me(e,0,0,0,1)}}function Ih(r,e){var t=(parseFloat(r[0])%360+360)%360/360,i=ji(r[1]),n=ji(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return e=e||[],Me(e,qe(Bu(o,a,t+1/3)*255),qe(Bu(o,a,t)*255),qe(Bu(o,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function NT(r){if(r){var e=r[0]/255,t=r[1]/255,i=r[2]/255,n=Math.min(e,t,i),a=Math.max(e,t,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var f=((a-e)/6+o/2)/o,h=((a-t)/6+o/2)/o,c=((a-i)/6+o/2)/o;e===a?l=c-h:t===a?l=1/3+f-c:i===a&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function Id(r,e){var t=Ee(r);if(t){for(var i=0;i<3;i++)t[i]=t[i]*(1-e)|0,t[i]>255?t[i]=255:t[i]<0&&(t[i]=0);return Nr(t,t.length===4?"rgba":"rgb")}}function Nu(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var i=r*(e.length-1),n=Math.floor(i),a=Math.ceil(i),o=e[n],s=e[a],l=i-n;return t[0]=qe(ui(o[0],s[0],l)),t[1]=qe(ui(o[1],s[1],l)),t[2]=qe(ui(o[2],s[2],l)),t[3]=co(ui(o[3],s[3],l)),t}}function zT(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var i=r*(e.length-1),n=Math.floor(i),a=Math.ceil(i),o=Ee(e[n]),s=Ee(e[a]),l=i-n,u=Nr([qe(ui(o[0],s[0],l)),qe(ui(o[1],s[1],l)),qe(ui(o[2],s[2],l)),co(ui(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}function zu(r,e,t,i){var n=Ee(r);if(r)return n=NT(n),e!=null&&(n[0]=BT(e)),t!=null&&(n[1]=ji(t)),i!=null&&(n[2]=ji(i)),Nr(Ih(n),"rgba")}function VT(r,e){var t=Ee(r);if(t&&e!=null)return t[3]=co(e),Nr(t,"rgba")}function Nr(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function sl(r,e){var t=Ee(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var Pd=new Bo(100);function Rd(r){if(W(r)){var e=Pd.get(r);return e||(e=Id(r,-.1),Pd.put(r,e)),e}else if(Wl(r)){var t=z({},r);return t.colorStops=G(r.colorStops,function(i){return{offset:i.offset,color:Id(i.color,-.1)}}),t}return r}function FT(r){return r.type==="linear"}function GT(r){return r.type==="radial"}(function(){return nt.hasGlobalWindow&&J(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 Ph=Array.prototype.slice;function Dr(r,e,t){return(e-r)*t+r}function Vu(r,e,t,i){for(var n=e.length,a=0;ai?e:r,a=Math.min(t,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)i.length=o;else for(var l=a;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=kd,l=t;if(ie(t)){var u=UT(t);s=u,(u===1&&!bt(t[0])||u===2&&!bt(t[0][0]))&&(o=!0)}else if(bt(t)&&!rl(t))s=Jo;else if(W(t))if(!isNaN(+t))s=Jo;else{var f=Ee(t);f&&(l=f,s=Za)}else if(Wl(t)){var h=z({},l);h.colorStops=G(t.colorStops,function(v){return{offset:v.offset,color:Ee(v.color)}}),FT(t)?s=Rh:GT(t)&&(s=Eh),l=h}a===0?this.valType=s:(s!==this.valType||s===kd)&&(o=!0),this.discrete=this.discrete||o;var c={time:e,value:l,rawValue:t,percent:0};return i&&(c.easing=i,c.easingFunc=J(i)?i:ro[i]||__(i)),n.push(c),c},r.prototype.prepare=function(e,t){var i=this.keyframes;this._needsSort&&i.sort(function(p,g){return p.time-g.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Qo(n),u=Od(n),f=0;f=0&&!(o[f].percent<=t);f--);f=c(f,s-2)}else{for(f=h;ft);f++);f=c(f-1,s-2)}d=o[f+1],v=o[f]}if(v&&d){this._lastFr=f,this._lastFrP=t;var g=d.percent-v.percent,y=g===0?1:c((t-v.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=i?this._additiveValue:u?ba:e[l];if((Qo(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?v.rawValue:d.rawValue;else if(Qo(a))a===Hs?Vu(m,v[n],d[n],y):HT(m,v[n],d[n],y);else if(Od(a)){var _=v[n],S=d[n],w=a===Rh;e[l]={type:w?"linear":"radial",x:Dr(_.x,S.x,y),y:Dr(_.y,S.y,y),colorStops:G(_.colorStops,function(b,T){var M=S.colorStops[T];return{offset:Dr(b.offset,M.offset,y),color:Gs(Vu([],b.color,M.color,y))}}),global:S.global},w?(e[l].x2=Dr(_.x2,S.x2,y),e[l].y2=Dr(_.y2,S.y2,y)):e[l].r=Dr(_.r,S.r,y)}else if(u)Vu(m,v[n],d[n],y),i||(e[l]=Gs(m));else{var x=Dr(v[n],d[n],y);i?this._additiveValue=x:e[l]=x}i&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,i=this.propName,n=this._additiveValue;t===Jo?e[i]=e[i]+n:t===Za?(Ee(e[i],ba),Ko(ba,ba,n,1),e[i]=Gs(ba)):t===Hs?Ko(e[i],e[i],n,1):t===w_&&Ed(e[i],e[i],n,1)},r}(),$v=function(){function r(e,t,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){Uv("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}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(e){this._target=e},r.prototype.when=function(e,t,i){return this.whenWithKeys(e,t,yt(t),i)},r.prototype.whenWithKeys=function(e,t,i,n){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,io(u),n),this._trackKeys.push(s)}l.addKeyframe(e,io(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),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(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,i=0;i0)){this._started=1;for(var t=this,i=[],n=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function Hn(){return new Date().getTime()}var ZT=function(r){O(e,r);function e(t){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,t=t||{},i.stage=t.stage||{},i}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var i=t.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(t){if(t.animation){var i=t.prev,n=t.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var i=t.getClip();i&&this.removeClip(i),t.animation=null},e.prototype.update=function(t){for(var i=Hn()-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,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function i(){t._running&&(il(i),!t._paused&&t.update())}il(i)},e.prototype.start=function(){this._running||(this._time=Hn(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Hn(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Hn()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var i=t.next;t.prev=t.next=t.animation=null,t=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,i){i=i||{},this.start();var n=new $v(t,i.loop);return this.addAnimator(n),n},e}(Be),$T=300,Fu=nt.domSupported,Gu=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=G(r,function(n){var a=n.replace("mouse","pointer");return t.hasOwnProperty(a)?a:n});return{mouse:r,touch:e,pointer:i}}(),Bd={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Nd=!1;function kh(r){var e=r.pointerType;return e==="pen"||e==="touch"}function qT(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 Hu(r){r&&(r.zrByTouch=!0)}function KT(r,e){return Ae(r.dom,new JT(r,e),!0)}function b_(r,e){for(var t=e,i=!1;t&&t.nodeType!==9&&!(i=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return i}var JT=function(){function r(e,t){this.stopPropagation=Jt,this.stopImmediatePropagation=Jt,this.preventDefault=Jt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),He={mousedown:function(r){r=Ae(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Ae(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Ae(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Ae(this.dom,r);var e=r.toElement||r.relatedTarget;b_(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Nd=!0,r=Ae(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Nd||(r=Ae(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Ae(this.dom,r),Hu(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),He.mousemove.call(this,r),He.mousedown.call(this,r)},touchmove:function(r){r=Ae(this.dom,r),Hu(r),this.handler.processGesture(r,"change"),He.mousemove.call(this,r)},touchend:function(r){r=Ae(this.dom,r),Hu(r),this.handler.processGesture(r,"end"),He.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<$T&&He.click.call(this,r)},pointerdown:function(r){He.mousedown.call(this,r)},pointermove:function(r){kh(r)||He.mousemove.call(this,r)},pointerup:function(r){He.mouseup.call(this,r)},pointerout:function(r){kh(r)||He.mouseout.call(this,r)}};C(["click","dblclick","contextmenu"],function(r){He[r]=function(e){e=Ae(this.dom,e),this.trigger(r,e)}});var Oh={pointermove:function(r){kh(r)||Oh.mousemove.call(this,r)},pointerup:function(r){Oh.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function QT(r,e){var t=e.domHandlers;nt.pointerEventsSupported?C(Gu.pointer,function(i){Ws(e,i,function(n){t[i].call(r,n)})}):(nt.touchEventsSupported&&C(Gu.touch,function(i){Ws(e,i,function(n){t[i].call(r,n),qT(e)})}),C(Gu.mouse,function(i){Ws(e,i,function(n){n=Zv(n),e.touching||t[i].call(r,n)})}))}function jT(r,e){nt.pointerEventsSupported?C(Bd.pointer,t):nt.touchEventsSupported||C(Bd.mouse,t);function t(i){function n(a){a=Zv(a),b_(r,a.target)||(a=KT(r,a),e.domHandlers[i].call(r,a))}Ws(e,i,n,{capture:!0})}}function Ws(r,e,t,i){r.mounted[e]=t,r.listenerOpts[e]=i,Dh(r.domTarget,e,t,i)}function Wu(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&mT(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var zd=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),tC=function(r){O(e,r);function e(t,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=i,n._localHandlerScope=new zd(t,He),Fu&&(n._globalHandlerScope=new zd(document,Oh)),QT(n,n._localHandlerScope),n}return e.prototype.dispose=function(){Wu(this._localHandlerScope),Fu&&Wu(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Fu&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var i=this._globalHandlerScope;t?jT(this,i):Wu(i)}},e}(Be),T_=1;nt.hasGlobalWindow&&(T_=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ll=T_,Bh=.4,Nh="#333",zh="#ccc",eC="#eee",Vd=Ul,Fd=5e-5;function Ti(r){return r>Fd||r<-Fd}var Ci=[],xn=[],Yu=$e(),Uu=Math.abs,Ir=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Ti(this.rotation)||Ti(this.x)||Ti(this.y)||Ti(this.scaleX-1)||Ti(this.scaleY-1)||Ti(this.skewX)||Ti(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),i=this.transform;if(!(t||e)){i&&(Vd(i),this.invTransform=null);return}i=i||$e(),t?this.getLocalTransform(i):Vd(i),e&&(t?Br(i,e,i):s_(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ci);var i=Ci[0]<0?-1:1,n=Ci[1]<0?-1:1,a=((Ci[0]-i)*t+i)/Ci[0]||0,o=((Ci[1]-n)*t+n)/Ci[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||$e(),la(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),a=Math.PI/2+n-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||$e(),Br(xn,e.invTransform,t),t=xn);var i=this.originX,n=this.originY;(i||n)&&(Yu[4]=i,Yu[5]=n,Br(xn,t,Yu),xn[4]-=i,xn[5]-=n,t=xn),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var i=[e,t],n=this.invTransform;return n&&Ht(i,i,n),i},r.prototype.transformCoordToGlobal=function(e,t){var i=[e,t],n=this.transform;return n&&Ht(i,i,n),i},r.prototype.getLineScale=function(){var e=this.transform;return e&&Uu(e[0]-1)>1e-10&&Uu(e[3]-1)>1e-10?Math.sqrt(Uu(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){rC(this,e)},r.getLocalTransform=function(e,t){t=t||[];var i=e.originX||0,n=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,h=e.y,c=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(i||n||s||l){var d=i+s,p=n+l;t[4]=-d*a-c*p*o,t[5]=-p*o-v*d*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=v*a,t[2]=c*o,u&&dn(t,t,u),t[4]+=i+f,t[5]+=n+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),pr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function rC(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function ul(r,e,t){var i=e.position||"inside",n=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,f="left",h="top";if(i instanceof Array)l+=Je(i[0],t.width),u+=Je(i[1],t.height),f=null,h=null;else switch(i){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=a-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=a-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var Xu="__zr_normal__",Zu=pr.concat(["ignore"]),iC=dr(pr,function(r,e){return r[e]=!0,r},{ignore:!1}),wn={},nC=new ot(0,0,0,0),Xl=function(){function r(e){this.id=e_(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,i){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,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(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(t),i.position!=null){var f=nC;i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(wn,i,f):ul(wn,i,f),a.x=wn.x,a.y=wn.y,o=wn.align,s=wn.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=Je(h[0],f.width),v=Je(h[1],f.height)),u=!0,a.originX=-a.x+c+(n?0:f.x),a.originY=-a.y+v+(n?0:f.y)}}i.rotation!=null&&(a.rotation=i.rotation);var d=i.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var p=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;p&&this.canBeInsideText()?(y=i.insideFill,m=i.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=i.outsideFill,m=i.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=xe,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?zh:Nh},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),i=typeof t=="string"&&Ee(t);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,Nr(i,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},z(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if($(e))for(var i=e,n=yt(i),a=0;a0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(Xu,!1,e)},r.prototype.useState=function(e,t,i,n){var a=e===Xu,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(ut(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){Uv("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!i&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(e,t,i,f),c&&c.useState(e,t,i,f),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~xe),u}}},r.prototype.useStates=function(e,t,i){if(!e.length)this.clearStates();else{var n=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,t,c),g&&g.useStates(e,t,c),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~xe)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var i=this.currentStates.slice();i.splice(t,1),this.useStates(i)}},r.prototype.replaceState=function(e,t,i){var n=this.currentStates.slice(),a=ut(n,e),o=ut(n,t)>=0;a>=0?o?n.splice(a,1):n[a]=t:i&&!o&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},i,n=0;n=0&&a.splice(o,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var i=this.animators,n=i.length,a=[],o=0;o0&&t.during&&a[0].during(function(d,p){t.during(p)});for(var c=0;c0||n.force&&!o.length){var T=void 0,M=void 0,A=void 0;if(s){M={},c&&(T={});for(var S=0;S<_;S++){var y=p[S];M[y]=t[y],c?T[y]=i[y]:t[y]=i[y]}}else if(c){A={};for(var S=0;S<_;S++){var y=p[S];A[y]=io(t[y]),oC(t,i,y)}}var w=new $v(t,!1,!1,h?wt(d,function(L){return L.targetName===e}):null);w.targetName=e,n.scope&&(w.scope=n.scope),c&&T&&w.whenWithKeys(0,T,p),A&&w.whenWithKeys(0,A,p),w.whenWithKeys(u??500,s?M:i,p).delay(f||0),r.addAnimator(w,e),o.push(w)}}var it=function(r){O(e,r);function e(t){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var i=this._children,n=0;n=0&&(n.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,i){var n=ut(this._children,t);return n>=0&&this.replaceAt(i,n),this},e.prototype.replaceAt=function(t,i){var n=this._children,a=n[i];if(t&&t!==this&&t.parent!==this&&t!==a){n[i]=t,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var i=this.__zr;i&&i!==t.__zr&&t.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(t){var i=this.__zr,n=this._children,a=ut(n,t);return a<0?this:(n.splice(a,1),t.parent=null,i&&t.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,i=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},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(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.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(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,i){return this._disposed||this.handler.on(e,t,i),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}function Z(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return W(r)?cC(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function It(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),A_),r=(+r).toFixed(e),t?r:+r}function Pr(r){return r.sort(function(e,t){return e-t}),r}function Rr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return dC(r)}function dC(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),i=t>0?+e.slice(t+1):0,n=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function D_(r,e){var t=Math.log,i=Math.LN10,n=Math.floor(t(r[1]-r[0])/i),a=Math.round(t(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function pC(r,e){var t=dr(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(t===0)return[];for(var i=Math.pow(10,e),n=G(r,function(v){return(isNaN(v)?0:v)/t*i*100}),a=i*100,o=G(n,function(v){return Math.floor(v)}),s=dr(o,function(v,d){return v+d},0),l=G(n,function(v,d){return v-o[d]});su&&(u=l[h],f=h);++o[f],l[f]=0,++s}return G(o,function(v){return v/i})}function gC(r,e){var t=Math.max(Rr(r),Rr(e)),i=r+e;return t>A_?i:It(i,t)}function L_(r){var e=Math.PI*2;return(r%e+e)%e}function fl(r){return r>-Yd&&r=10&&e++,e}function I_(r,e){var t=Kv(r),i=Math.pow(10,t),n=r/i,a;return n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10,r=a*i,t>=-20?+r.toFixed(t<0?-t:0):r}function Ud(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,i=0;i=0||a&&ut(a,l)<0)){var u=i.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var HC=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],WC=jn(HC),YC=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return WC(this,e,t)},r}(),Vh=new Bo(50);function UC(r){if(typeof r=="string"){var e=Vh.get(r);return e&&e.image}else return r}function G_(r,e,t,i,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=Vh.get(r),o={hostEl:t,cb:i,cbPayload:n};return a?(e=a.image,!$l(e)&&a.pending.push(o)):(e=oa.loadImage(r,qd,qd),e.__zrImageSrc=r,Vh.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function qd(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=we(t,e);return u>s&&(t="",u=0),s=r-u,n.ellipsis=t,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function W_(r,e,t){var i=t.containerWidth,n=t.font,a=t.contentWidth;if(!i){r.textLine="",r.isTruncated=!1;return}var o=we(e,n);if(o<=i){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?ZC(e,a,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=we(e,n)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function ZC(r,e,t,i){for(var n=0,a=0,o=r.length;ad&&u){var p=Math.floor(d/s);f=f||c.length>p,c=c.slice(0,p)}if(r&&a&&h!=null)for(var g=H_(h,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),y={},m=0;ms&&Ju(t,r.substring(s,u),e,o),Ju(t,l[2],e,o,l[1]),s=Ku.lastIndex}sn){var I=t.lines.length;x>0?(_.tokens=_.tokens.slice(0,x),y(_,w,S),t.lines=t.lines.slice(0,m+1)):t.lines=t.lines.slice(0,m),t.isTruncated=t.isTruncated||t.lines.length0&&d+i.accumWidth>i.width&&(f=e.split(` `),u=!0),i.accumWidth=d}else{var p=Y_(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=p.accumWidth+v,h=p.linesWidths,f=p.lines}}else f=e.split(` `);for(var g=0;g=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var jC=dr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function tM(r){return QC(r)?!!jC[r]:!0}function Y_(r,e,t,i,n){for(var a=[],o=[],s="",l="",u=0,f=0,h=0;ht:n+f+v>t){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=c,f=v)):d?(a.push(l),o.push(u),l=c,u=v):(a.push(c),o.push(v));continue}f+=v,d?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=n),{accumWidth:f,lines:a,linesWidths:o}}var Fh="__zr_style_"+Math.round(Math.random()*10),tn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ql={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};tn[Fh]=!0;var Jd=["z","z2","invisible"],eM=["invisible"],yr=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var i=yt(t),n=0;n1e-4){s[0]=r-t,s[1]=e-i,l[0]=r+t,l[1]=e+i;return}if(jo[0]=ef(n)*t+r,jo[1]=tf(n)*i+e,ts[0]=ef(a)*t+r,ts[1]=tf(a)*i+e,u(s,jo,ts),f(l,jo,ts),n=n%Ai,n<0&&(n=n+Ai),a=a%Ai,a<0&&(a=a+Ai),n>a&&!o?a+=Ai:nn&&(es[0]=ef(v)*t+r,es[1]=tf(v)*i+e,u(s,es,s),f(l,es,l))}var St={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Di=[],Li=[],rr=[],$r=[],ir=[],nr=[],rf=Math.min,nf=Math.max,Ii=Math.cos,Pi=Math.sin,Cr=Math.abs,Gh=Math.PI,ii=Gh*2,af=typeof Float32Array<"u",Ta=[];function of(r){var e=Math.round(r/Gh*1e8)/1e8;return e%2*Gh}function tc(r,e){var t=of(r[0]);t<0&&(t+=ii);var i=t-r[0],n=r[1];n+=i,!e&&n-t>=ii?n=t+ii:e&&t-n>=ii?n=t-ii:!e&&t>n?n=t+(ii-of(t-n)):e&&t0&&(this._ux=Cr(i/ll/e)||0,this._uy=Cr(i/ll/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},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(e,t){return this._drawPendingPt(),this.addData(St.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var i=Cr(e-this._xi),n=Cr(t-this._yi),a=i>this._ux||n>this._uy;if(this.addData(St.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,i,n,a,o){return this._drawPendingPt(),this.addData(St.C,e,t,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,i,n){return this._drawPendingPt(),this.addData(St.Q,e,t,i,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(e,t,i,n,a,o){this._drawPendingPt(),Ta[0]=n,Ta[1]=a,tc(Ta,o),n=Ta[0],a=Ta[1];var s=a-n;return this.addData(St.A,e,t,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,i,n,a,o),this._xi=Ii(a)*i+e,this._yi=Pi(a)*i+t,this},r.prototype.arcTo=function(e,t,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,i,n,a),this},r.prototype.rect=function(e,t,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,i,n),this.addData(St.R,e,t,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(St.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&e.closePath(),this._xi=t,this._yi=i,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&af&&(this.data=new Float32Array(t));for(var i=0;if.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){rr[0]=rr[1]=ir[0]=ir[1]=Number.MAX_VALUE,$r[0]=$r[1]=nr[0]=nr[1]=-Number.MAX_VALUE;var e=this.data,t=0,i=0,n=0,a=0,o;for(o=0;oi||Cr(_)>n||c===t-1)&&(p=Math.sqrt(m*m+_*_),a=g,o=y);break}case St.C:{var S=e[c++],w=e[c++],g=e[c++],y=e[c++],x=e[c++],b=e[c++];p=IT(a,o,S,w,g,y,x,b,10),a=x,o=b;break}case St.Q:{var S=e[c++],w=e[c++],g=e[c++],y=e[c++];p=RT(a,o,S,w,g,y,10),a=g,o=y;break}case St.A:var T=e[c++],M=e[c++],A=e[c++],D=e[c++],L=e[c++],I=e[c++],P=I+L;c+=1,d&&(s=Ii(L)*A+T,l=Pi(L)*D+M),p=nf(A,D)*rf(ii,Math.abs(I)),a=Ii(P)*A+T,o=Pi(P)*D+M;break;case St.R:{s=a=e[c++],l=o=e[c++];var R=e[c++],E=e[c++];p=R*2+E*2;break}case St.Z:{var m=s-a,_=l-o;p=Math.sqrt(m*m+_*_),a=s,o=l;break}}p>=0&&(u[h++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,f,h,c,v=t<1,d,p,g=0,y=0,m,_=0,S,w;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=t*p,!m)))t:for(var x=0;x0&&(e.lineTo(S,w),_=0),b){case St.M:s=u=i[x++],l=f=i[x++],e.moveTo(u,f);break;case St.L:{h=i[x++],c=i[x++];var M=Cr(h-u),A=Cr(c-f);if(M>n||A>a){if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;e.lineTo(u*(1-L)+h*L,f*(1-L)+c*L);break t}g+=D}e.lineTo(h,c),u=h,f=c,_=0}else{var I=M*M+A*A;I>_&&(S=h,w=c,_=I)}break}case St.C:{var P=i[x++],R=i[x++],E=i[x++],N=i[x++],k=i[x++],B=i[x++];if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;gi(u,P,E,k,L,Di),gi(f,R,N,B,L,Li),e.bezierCurveTo(Di[1],Li[1],Di[2],Li[2],Di[3],Li[3]);break t}g+=D}e.bezierCurveTo(P,R,E,N,k,B),u=k,f=B;break}case St.Q:{var P=i[x++],R=i[x++],E=i[x++],N=i[x++];if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;ol(u,P,E,L,Di),ol(f,R,N,L,Li),e.quadraticCurveTo(Di[1],Li[1],Di[2],Li[2]);break t}g+=D}e.quadraticCurveTo(P,R,E,N),u=E,f=N;break}case St.A:var F=i[x++],H=i[x++],X=i[x++],tt=i[x++],st=i[x++],vt=i[x++],Ot=i[x++],oe=!i[x++],Yt=X>tt?X:tt,Et=Cr(X-tt)>.001,At=st+vt,et=!1;if(v){var D=d[y++];g+D>m&&(At=st+vt*(m-g)/D,et=!0),g+=D}if(Et&&e.ellipse?e.ellipse(F,H,X,tt,Ot,st,At,oe):e.arc(F,H,Yt,st,At,oe),et)break t;T&&(s=Ii(st)*X+F,l=Pi(st)*tt+H),u=Ii(At)*X+F,f=Pi(At)*tt+H;break;case St.R:s=u=i[x],l=f=i[x+1],h=i[x++],c=i[x++];var ct=i[x++],er=i[x++];if(v){var D=d[y++];if(g+D>m){var zt=m-g;e.moveTo(h,c),e.lineTo(h+rf(zt,ct),c),zt-=ct,zt>0&&e.lineTo(h+ct,c+rf(zt,er)),zt-=er,zt>0&&e.lineTo(h+nf(ct-zt,0),c+er),zt-=ct,zt>0&&e.lineTo(h,c+nf(er-zt,0));break t}g+=D}e.rect(h,c,ct,er);break;case St.Z:if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;e.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break t}g+=D}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=St,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function bn(r,e,t,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>e+s&&o>i+s||or+s&&a>t+s||ae+h&&f>i+h&&f>a+h&&f>s+h||fr+h&&u>t+h&&u>n+h&&u>o+h||ue+u&&l>i+u&&l>a+u||lr+u&&s>t+u&&s>n+u||st||f+un&&(n+=Ca);var c=Math.atan2(l,s);return c<0&&(c+=Ca),c>=i&&c<=n||c+Ca>=i&&c+Ca<=n}function Lr(r,e,t,i,n,a){if(a>e&&a>i||an?s:0}var qr=Fr.CMD,Ri=Math.PI*2,uM=1e-4;function fM(r,e){return Math.abs(r-e)e&&u>i&&u>a&&u>s||u1&&hM(),v=Bt(e,i,a,s,Le[0]),c>1&&(d=Bt(e,i,a,s,Le[1]))),c===2?ge&&s>i&&s>a||s=0&&u<=1){for(var f=0,h=$t(e,i,a,u),c=0;ct||s<-t)return 0;var l=Math.sqrt(t*t-s*s);ee[0]=-l,ee[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=Ri-1e-4){i=0,n=Ri;var f=a?1:-1;return o>=ee[0]+r&&o<=ee[1]+r?f:0}if(i>n){var h=i;i=n,n=h}i<0&&(i+=Ri,n+=Ri);for(var c=0,v=0;v<2;v++){var d=ee[v];if(d+r>o){var p=Math.atan2(s,d),f=a?1:-1;p<0&&(p=Ri+p),(p>=i&&p<=n||p+Ri>=i&&p+Ri<=n)&&(p>Math.PI/2&&p1&&(t||(s+=Lr(l,u,f,h,i,n))),g&&(l=a[d],u=a[d+1],f=l,h=u),p){case qr.M:f=a[d++],h=a[d++],l=f,u=h;break;case qr.L:if(t){if(bn(l,u,a[d],a[d+1],e,i,n))return!0}else s+=Lr(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case qr.C:if(t){if(oM(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,i,n))return!0}else s+=vM(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case qr.Q:if(t){if(sM(l,u,a[d++],a[d++],a[d],a[d+1],e,i,n))return!0}else s+=cM(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case qr.A:var y=a[d++],m=a[d++],_=a[d++],S=a[d++],w=a[d++],x=a[d++];d+=1;var b=!!(1-a[d++]);c=Math.cos(w)*_+y,v=Math.sin(w)*S+m,g?(f=c,h=v):s+=Lr(l,u,c,v,i,n);var T=(i-y)*S/_+y;if(t){if(lM(y,m,S,w,w+x,b,e,T,n))return!0}else s+=dM(y,m,S,w,w+x,b,T,n);l=Math.cos(w+x)*_+y,u=Math.sin(w+x)*S+m;break;case qr.R:f=l=a[d++],h=u=a[d++];var M=a[d++],A=a[d++];if(c=f+M,v=h+A,t){if(bn(f,h,c,h,e,i,n)||bn(c,h,c,v,e,i,n)||bn(c,v,f,v,e,i,n)||bn(f,v,f,h,e,i,n))return!0}else s+=Lr(c,h,c,v,i,n),s+=Lr(f,v,f,h,i,n);break;case qr.Z:if(t){if(bn(l,u,f,h,e,i,n))return!0}else s+=Lr(l,u,f,h,i,n);l=f,u=h;break}}return!t&&!fM(u,h)&&(s+=Lr(l,u,f,h,i,n)||0),s!==0}function pM(r,e,t){return X_(r,0,!1,e,t)}function gM(r,e,t,i){return X_(r,e,!0,t,i)}var Z_=q({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},tn),yM={style:q({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ql.style)},sf=pr.concat(["invisible","culling","z","z2","zlevel","parent"]),ht=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.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?Nh:i>.2?eC:zh}else if(t)return zh}return Nh},e.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(W(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=sl(t,0)0))},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,n=!t;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Vn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){s.copy(t);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect(),o=this.style;if(t=n[0],i=n[1],a.contain(t,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),gM(s,l/u,t,i)))return!0}if(this.hasFill())return pM(s,t,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Vn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,i){t==="shape"?this.setShape(i):r.prototype.attrKV.call(this,t,i)},e.prototype.setShape=function(t,i){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=i:z(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Vn)},e.prototype.createStyle=function(t){return Yl(Z_,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.shape&&!i.shape&&(i.shape=z({},this.shape))},e.prototype._applyStateObj=function(t,i,n,a,o,s){r.prototype._applyStateObj.call(this,t,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=z({},n.shape),z(u,i.shape)):(u=z({},a?this.shape:n.shape),z(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=z({},this.shape);for(var f={},h=yt(u),c=0;c0},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(t){return Yl(mM,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var i=t.text;i!=null?i+="":i="";var n=No(i,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(yr);go.prototype.type="tspan";var _M=q({x:0,y:0},tn),SM={style:q({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ql.style)};function xM(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var _e=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return Yl(_M,t)},e.prototype._getSize=function(t){var i=this.style,n=i[t];if(n!=null)return n;var a=xM(i.image)?i.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=i[o];return s==null?a[t]:a[t]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return SM},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ot(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(yr);_e.prototype.type="image";function wM(r,e){var t=e.x,i=e.y,n=e.width,a=e.height,o=e.r,s,l,u,f;n<0&&(t=t+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>n&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(t+s,i),r.lineTo(t+n-l,i),l!==0&&r.arc(t+n-l,i+l,l,-Math.PI/2,0),r.lineTo(t+n,i+a-u),u!==0&&r.arc(t+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(t+f,i+a),f!==0&&r.arc(t+f,i+a-f,f,Math.PI/2,Math.PI),r.lineTo(t,i+s),s!==0&&r.arc(t+s,i+s,s,Math.PI,Math.PI*1.5)}var Wn=Math.round;function $_(r,e,t){if(e){var i=e.x1,n=e.x2,a=e.y1,o=e.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=t&&t.lineWidth;return s&&(Wn(i*2)===Wn(n*2)&&(r.x1=r.x2=$i(i,s,!0)),Wn(a*2)===Wn(o*2)&&(r.y1=r.y2=$i(a,s,!0))),r}}function q_(r,e,t){if(e){var i=e.x,n=e.y,a=e.width,o=e.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=$i(i,s,!0),r.y=$i(n,s,!0),r.width=Math.max($i(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max($i(n+o,s,!1)-r.y,o===0?0:1)),r}}function $i(r,e,t){if(!e)return r;var i=Wn(r*2);return(i+Wn(e))%2===0?i/2:(i+(t?1:-1))/2}var bM=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),TM={},gt=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new bM},e.prototype.buildPath=function(t,i){var n,a,o,s;if(this.subPixelOptimize){var l=q_(TM,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?wM(t,i):t.rect(n,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ht);gt.prototype.type="rect";var rp={fill:"#000"},ip=2,CM={style:q({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ql.style)},pt=function(r){O(e,r);function e(t){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=rp,i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,L=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P=0&&(P=x[I],P.align==="right");)this._placeToken(P,t,T,y,L,"right",_),M-=P.width,L-=P.width,I--;for(D+=(a-(D-g)-(m-L)-M)/2;A<=I;)P=x[A],this._placeToken(P,t,T,y,D+P.width/2,"center",_),D+=P.width,A++;y+=T}},e.prototype._placeToken=function(t,i,n,a,o,s,l){var u=i.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,h=a+n/2;f==="top"?h=a+t.height/2:f==="bottom"&&(h=a+n-t.height/2);var c=!t.isLineHolder&&lf(u);c&&this._renderBackground(u,i,s==="right"?o-t.width:s==="center"?o-t.width/2:o,h-t.height/2,t.width,t.height);var v=!!u.backgroundColor,d=t.textPadding;d&&(o=up(o,s,d),h-=t.height/2-d[0]-t.innerHeight/2);var p=this._getOrCreateChild(go),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=lp("fill"in u?u.fill:"fill"in i?i.fill:(m=!0,y.fill)),w=sp("stroke"in u?u.stroke:"stroke"in i?i.stroke:!v&&!l&&(!y.autoStroke||m)?(_=ip,y.stroke):null),x=u.textShadowBlur>0||i.textShadowBlur>0;g.text=t.text,g.x=o,g.y=h,x&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||ln,g.opacity=to(u.opacity,i.opacity,1),ap(g,u),w&&(g.lineWidth=to(u.lineWidth,i.lineWidth,_),g.lineDash=lt(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=w),S&&(g.fill=S);var b=t.contentWidth,T=t.contentHeight;p.setBoundingRect(new ot($a(g.x,b,g.textAlign),Fn(g.y,T,g.textBaseline),b,T))},e.prototype._renderBackground=function(t,i,n,a,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,h=l&&l.image,c=l&&!h,v=t.borderRadius,d=this,p,g;if(c||t.lineHeight||u&&f){p=this._getOrCreateChild(gt),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=n,y.y=a,y.width=o,y.height=s,y.r=v,p.dirtyShape()}if(c){var m=p.style;m.fill=l||null,m.fillOpacity=lt(t.fillOpacity,1)}else if(h){g=this._getOrCreateChild(_e),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&f){var m=p.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=lt(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=to(t.opacity,i.opacity,1)},e.makeFont=function(t){var i="";return LM(t)&&(i=[t.fontStyle,t.fontWeight,DM(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&Xe(i)||t.textFont||t.font},e}(yr),MM={left:!0,right:1,center:1},AM={top:1,bottom:1,middle:1},np=["fontStyle","fontWeight","fontSize","fontFamily"];function DM(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Hv+"px":r+"px"}function ap(r,e){for(var t=0;t=0,a=!1;if(r instanceof ht){var o=K_(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Tn(s)||Tn(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=z({},i),u=z({},u),u.fill=s):!Tn(u.fill)&&Tn(s)?(a=!0,i=z({},i),u=z({},u),u.fill=Rd(s)):!Tn(u.stroke)&&Tn(l)&&(a||(i=z({},i),u=z({},u)),u.stroke=Rd(l)),i.style=u}}if(i&&i.z2==null){a||(i=z({},i));var f=r.z2EmphasisLift;i.z2=r.z2+(f??J_)}return i}function BM(r,e,t){if(t&&t.z2==null){t=z({},t);var i=r.z2SelectLift;t.z2=r.z2+(i??PM)}return t}function NM(r,e,t){var i=ut(r.currentStates,e)>=0,n=r.style.opacity,a=i?null:kM(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=z({},t),o=z({opacity:i?n:a.opacity*.1},o),t.style=o),t}function uf(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return OM(this,r,e,t);if(r==="blur")return NM(this,r,t);if(r==="select")return BM(this,r,t)}return t}function nc(r){r.stateProxy=uf;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=uf),t&&(t.stateProxy=uf)}function dp(r,e){!n1(r,e)&&!r.__highByOuter&&Wr(r,Q_)}function pp(r,e){!n1(r,e)&&!r.__highByOuter&&Wr(r,j_)}function ta(r,e){r.__highByOuter|=1<<(e||0),Wr(r,Q_)}function ea(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Wr(r,j_)}function zM(r){Wr(r,ic)}function e1(r){Wr(r,t1)}function r1(r){Wr(r,RM)}function i1(r){Wr(r,EM)}function n1(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function a1(r){var e=r.getModel(),t=[],i=[];e.eachComponent(function(n,a){var o=ec(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){t1(u)}),s&&t.push(a)),o.isBlured=!1}),C(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function Yh(r,e,t,i){var n=i.getModel();t=t||"coordinateSystem";function a(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:t.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function rn(r,e,t){oc(r,!0),Wr(r,nc),UM(r,e,t)}function YM(r){oc(r,!1)}function mr(r,e,t,i){i?YM(r):rn(r,e,t)}function UM(r,e,t){var i=at(r);e!=null?(i.focus=e,i.blurScope=t):i.focus&&(i.focus=null)}var yp=["emphasis","blur","select"],XM={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function yi(r,e,t,i){t=t||"itemStyle";for(var n=0;n1&&(o*=ff(d),s*=ff(d));var p=(n===a?-1:1)*ff((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,g=p*o*v/s,y=p*-s*c/o,m=(r+t)/2+is(h)*g-rs(h)*y,_=(e+i)/2+rs(h)*g+is(h)*y,S=xp([1,0],[(c-g)/o,(v-y)/s]),w=[(c-g)/o,(v-y)/s],x=[(-1*c-g)/o,(-1*v-y)/s],b=xp(w,x);if($h(w,x)<=-1&&(b=Ma),$h(w,x)>=1&&(b=0),b<0){var T=Math.round(b/Ma*1e6)/1e6;b=Ma*2+T%2*Ma}f.addData(u,m,_,o,s,S,b,h,a)}var QM=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,jM=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function tA(r){var e=new Fr;if(!r)return e;var t=0,i=0,n=t,a=i,o,s=Fr.CMD,l=r.match(QM);if(!l)return e;for(var u=0;uP*P+R*R&&(T=A,M=D),{cx:T,cy:M,x0:-f,y0:-h,x1:T*(n/w-1),y1:M*(n/w-1)}}function sA(r){var e;if(V(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function lA(r,e){var t,i=qa(e.r,0),n=qa(e.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,h=e.cy,c=!!e.clockwise,v=bp(u-l),d=v>hf&&v%hf;if(d>Ge&&(v=d),!(i>Ge))r.moveTo(f,h);else if(v>hf-Ge)r.moveTo(f+i*Mn(l),h+i*Ei(l)),r.arc(f,h,i,l,u,!c),n>Ge&&(r.moveTo(f+n*Mn(u),h+n*Ei(u)),r.arc(f,h,n,u,l,c));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0,b=void 0,T=void 0,M=void 0,A=void 0,D=void 0,L=void 0,I=void 0,P=void 0,R=i*Mn(l),E=i*Ei(l),N=n*Mn(u),k=n*Ei(u),B=v>Ge;if(B){var F=e.cornerRadius;F&&(t=sA(F),p=t[0],g=t[1],y=t[2],m=t[3]);var H=bp(i-n)/2;if(_=ar(H,y),S=ar(H,m),w=ar(H,p),x=ar(H,g),M=b=qa(_,S),A=T=qa(w,x),(b>Ge||T>Ge)&&(D=i*Mn(u),L=i*Ei(u),I=n*Mn(l),P=n*Ei(l),vGe){var Et=ar(y,M),At=ar(m,M),et=ns(I,P,R,E,i,Et,c),ct=ns(D,L,N,k,i,At,c);r.moveTo(f+et.cx+et.x0,h+et.cy+et.y0),M0&&r.arc(f+et.cx,h+et.cy,Et,Ut(et.y0,et.x0),Ut(et.y1,et.x1),!c),r.arc(f,h,i,Ut(et.cy+et.y1,et.cx+et.x1),Ut(ct.cy+ct.y1,ct.cx+ct.x1),!c),At>0&&r.arc(f+ct.cx,h+ct.cy,At,Ut(ct.y1,ct.x1),Ut(ct.y0,ct.x0),!c))}else r.moveTo(f+R,h+E),r.arc(f,h,i,l,u,!c);if(!(n>Ge)||!B)r.lineTo(f+N,h+k);else if(A>Ge){var Et=ar(p,A),At=ar(g,A),et=ns(N,k,D,L,n,-At,c),ct=ns(R,E,I,P,n,-Et,c);r.lineTo(f+et.cx+et.x0,h+et.cy+et.y0),A0&&r.arc(f+et.cx,h+et.cy,At,Ut(et.y0,et.x0),Ut(et.y1,et.x1),!c),r.arc(f,h,n,Ut(et.cy+et.y1,et.cx+et.x1),Ut(ct.cy+ct.y1,ct.cx+ct.x1),c),Et>0&&r.arc(f+ct.cx,h+ct.cy,Et,Ut(ct.y1,ct.x1),Ut(ct.y0,ct.x0),!c))}else r.lineTo(f+N,h+k),r.arc(f,h,n,u,l,c)}r.closePath()}}}var uA=function(){function r(){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 r}(),ge=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new uA},e.prototype.buildPath=function(t,i){lA(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ht);ge.prototype.type="sector";var fA=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),Vo=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new fA},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,o=Math.PI*2;t.moveTo(n+i.r,a),t.arc(n,a,i.r,0,o,!1),t.moveTo(n+i.r0,a),t.arc(n,a,i.r0,0,o,!0)},e}(ht);Vo.prototype.type="ring";function hA(r,e,t,i){var n=[],a=[],o=[],s=[],l,u,f,h;if(i){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c=2){if(i){var a=hA(n,i,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,h=n.length;sOi[1]){if(s=!1,a)return s;var f=Math.abs(Oi[0]-ki[1]),h=Math.abs(ki[0]-Oi[1]);Math.min(f,h)>n.len()&&(f0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),a&&a()}function Mt(r,e,t,i,n,a){uc("update",r,e,t,i,n,a)}function kt(r,e,t,i,n,a){uc("enter",r,e,t,i,n,a)}function Zn(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Mp(r){return!r.isGroup}function MA(r){return r.shape!=null}function iu(r,e,t){if(!r||!e)return;function i(o){var s={};return o.traverse(function(l){Mp(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return MA(o)&&(s.shape=z({},o.shape)),s}var a=i(r);e.traverse(function(o){if(Mp(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),Mt(o,l,t,at(o).dataIndex)}}})}function x1(r,e){return G(r,function(t){var i=t[0];i=gl(i,e.x),i=yl(i,e.x+e.width);var n=t[1];return n=gl(n,e.y),n=yl(n,e.y+e.height),[i,n]})}function AA(r,e){var t=gl(r.x,e.x),i=yl(r.x+r.width,e.x+e.width),n=gl(r.y,e.y),a=yl(r.y+r.height,e.y+e.height);if(i>=t&&a>=n)return{x:t,y:n,width:i-t,height:a-n}}function Fo(r,e,t){var i=z({rectHover:!0},e),n=i.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),q(n,t),new _e(i)):fc(r.replace("path://",""),i,t,"center")}function DA(r,e,t,i,n){for(var a=0,o=n[n.length-1];a1)return!1;var g=vf(v,d,f,h)/c;return!(g<0||g>1)}function vf(r,e,t,i){return r*i-t*e}function LA(r){return r<=1e-6&&r>=-1e-6}function pn(r){var e=r.itemTooltipOption,t=r.componentModel,i=r.itemName,n=W(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&C(yt(l),function(f){rt(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=at(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:q({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function Ap(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function nu(r,e){if(r)if(V(r))for(var t=0;t=0&&s.push(l)}),s}}function _i(r,e){return j(j({},r,!0),e,!0)}const GA={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},HA={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var ml="ZH",hc="EN",$n=hc,Zs={},vc={},L1=nt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||$n).toUpperCase();return r.indexOf(ml)>-1?ml:$n}():$n;function I1(r,e){r=r.toUpperCase(),vc[r]=new Ct(e),Zs[r]=e}function WA(r){if(W(r)){var e=Zs[r.toUpperCase()]||{};return r===ml||r===hc?K(e):j(K(e),K(Zs[$n]),!1)}else return j(K(r),K(Zs[$n]),!1)}function Jh(r){return vc[r]}function YA(){return vc[$n]}I1(hc,GA);I1(ml,HA);var cc=1e3,dc=cc*60,uo=dc*60,Re=uo*24,Ep=Re*365,Ka={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},ss="{yyyy}-{MM}-{dd}",kp={year:"{yyyy}",month:"{yyyy}-{MM}",day:ss,hour:ss+" "+Ka.hour,minute:ss+" "+Ka.minute,second:ss+" "+Ka.second,millisecond:Ka.none},pf=["year","month","day","hour","minute","second","millisecond"],P1=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Kr(r,e){return r+="","0000".substr(0,e-r.length)+r}function qn(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function UA(r){return r===qn(r)}function XA(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function ou(r,e,t,i){var n=gr(r),a=n[pc(t)](),o=n[Kn(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[su(t)](),u=n["get"+(t?"UTC":"")+"Day"](),f=n[So(t)](),h=(f-1)%12+1,c=n[lu(t)](),v=n[uu(t)](),d=n[fu(t)](),p=f>=12?"pm":"am",g=p.toUpperCase(),y=i instanceof Ct?i:Jh(i||L1)||YA(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),w=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Kr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Kr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Kr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Kr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Kr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Kr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,Kr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Kr(d,3)).replace(/{S}/g,d+"")}function ZA(r,e,t,i,n){var a=null;if(W(t))a=t;else if(J(t))a=t(r.value,e,{level:r.level});else{var o=z({},Ka);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(V(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return ou(new Date(r.value),a,n,i)}function R1(r,e){var t=gr(r),i=t[Kn(e)]()+1,n=t[su(e)](),a=t[So(e)](),o=t[lu(e)](),s=t[uu(e)](),l=t[fu(e)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&a===0,v=c&&n===1,d=v&&i===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function Op(r,e,t){var i=bt(r)?gr(r):r;switch(e=e||R1(r,t),e){case"year":return i[pc(t)]();case"half-year":return i[Kn(t)]()>=6?1:0;case"quarter":return Math.floor((i[Kn(t)]()+1)/4);case"month":return i[Kn(t)]();case"day":return i[su(t)]();case"half-day":return i[So(t)]()/24;case"hour":return i[So(t)]();case"minute":return i[lu(t)]();case"second":return i[uu(t)]();case"millisecond":return i[fu(t)]()}}function pc(r){return r?"getUTCFullYear":"getFullYear"}function Kn(r){return r?"getUTCMonth":"getMonth"}function su(r){return r?"getUTCDate":"getDate"}function So(r){return r?"getUTCHours":"getHours"}function lu(r){return r?"getUTCMinutes":"getMinutes"}function uu(r){return r?"getUTCSeconds":"getSeconds"}function fu(r){return r?"getUTCMilliseconds":"getMilliseconds"}function $A(r){return r?"setUTCFullYear":"setFullYear"}function E1(r){return r?"setUTCMonth":"setMonth"}function k1(r){return r?"setUTCDate":"setDate"}function O1(r){return r?"setUTCHours":"setHours"}function B1(r){return r?"setUTCMinutes":"setMinutes"}function N1(r){return r?"setUTCSeconds":"setSeconds"}function z1(r){return r?"setUTCMilliseconds":"setMilliseconds"}function V1(r){if(!P_(r))return W(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function F1(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,i){return i.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Go=r_;function Qh(r,e,t){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&Xe(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?gr(r):r;if(isNaN(+l)){if(s)return"-"}else return ou(l,i,t)}if(e==="ordinal")return xh(r)?n(r):bt(r)&&a(r)?r+"":"-";var u=hl(r);return a(u)?V1(u):xh(r)?n(r):typeof r=="boolean"?r+"":"-"}var Bp=["a","b","c","d","e","f","g"],gf=function(r,e){return"{"+r+(e??"")+"}"};function G1(r,e,t){V(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars||[],a=0;a':'';var o=t.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function fn(r,e){return e=e||"transparent",W(r)?r:$(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function Np(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var $s=C,H1=["left","right","top","bottom","width","height"],qi=[["width","left","right"],["height","top","bottom"]];function gc(r,e,t,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),h=e.childAt(u+1),c=h&&h.getBoundingRect(),v,d;if(r==="horizontal"){var p=f.width+(c?-c.x+f.x:0);v=a+p,v>i||l.newline?(a=0,v=p,o+=s+t,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(c?-c.y+f.y:0);d=o+g,d>n||l.newline?(a+=s+t,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+t:o=d+t)})}var an=gc;dt(gc,"vertical");dt(gc,"horizontal");function ye(r,e,t){t=Go(t||0);var i=e.width,n=e.height,a=Z(r.left,i),o=Z(r.top,n),s=Z(r.right,i),l=Z(r.bottom,n),u=Z(r.width,i),f=Z(r.height,n),h=t[2]+t[0],c=t[1]+t[3],v=r.aspect;switch(isNaN(u)&&(u=i-s-c-a),isNaN(f)&&(f=n-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>i/n?u=i*.8:f=n*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=i-s-u-c),isNaN(o)&&(o=n-l-f-h),r.left||r.right){case"center":a=i/2-u/2-t[3];break;case"right":a=i-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-t[0];break;case"bottom":o=n-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=i-c-a-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var d=new ot(a+t[3],o+t[0],u,f);return d.margin=t,d}function yc(r,e,t,i,n,a){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ot(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=ye(q({width:u.width,height:u.height},e),t,i),c=o?h.x-u.x:0,v=s?h.y-u.y:0;return l==="raw"?(a.x=c,a.y=v):(a.x+=c,a.y+=v),a===r&&r.markRedraw(),!0}function JA(r,e){return r[qi[e][0]]!=null||r[qi[e][1]]!=null&&r[qi[e][2]]!=null}function xo(r){var e=r.layoutMode||r.constructor.layoutMode;return $(e)?e:e?{type:e}:null}function mi(r,e,t){var i=t&&t.ignoreSize;!V(i)&&(i=[i,i]);var n=o(qi[0],0),a=o(qi[1],1);u(qi[0],r,n),u(qi[1],r,a);function o(f,h){var c={},v=0,d={},p=0,g=2;if($s(f,function(_){d[_]=r[_]}),$s(f,function(_){s(e,_)&&(c[_]=d[_]=e[_]),l(c,_)&&v++,l(d,_)&&p++}),i[h])return l(e,f[1])?d[f[2]]=null:l(e,f[2])&&(d[f[1]]=null),d;if(p===g||!v)return d;if(v>=g)return c;for(var y=0;y=0;l--)s=j(s,n[l],!0);i.defaultOption=s}return i.defaultOption},e.prototype.getReferringComponents=function(t,i){var n=t+"Index",a=t+"Id";return zo(this.ecModel,t,{index:this.get(n,!0),id:this.get(a,!0)},i)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Ct);F_(ft,Ct);Zl(ft);VA(ft);FA(ft,jA);function jA(r){var e=[];return C(ft.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=G(e,function(t){return vr(t).main}),r!=="dataset"&&ut(e,"dataset")<=0&&e.unshift("dataset"),e}var Y1="";typeof navigator<"u"&&(Y1=navigator.platform||"");var An="rgba(0, 0, 0, 0.2)";const tD={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:An,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:An,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:An,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:An,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:An,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:An,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Y1.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var U1=U(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),ze="original",me="arrayRows",tr="objectRows",Sr="keyedColumns",ci="typedArray",X1="unknown",zr="column",pa="row",Ft={Must:1,Might:2,Not:3},Z1=mt();function eD(r){Z1(r).datasetMap=U()}function rD(r,e,t){var i={},n=mc(e);if(!n||!r)return i;var a=[],o=[],s=e.ecModel,l=Z1(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,f,h;r=r.slice(),C(r,function(p,g){var y=$(p)?p:r[g]={name:p};y.type==="ordinal"&&f==null&&(f=g,h=d(y)),i[y.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});C(r,function(p,g){var y=p.name,m=d(p);if(f==null){var _=c.valueWayDim;v(i[y],_,m),v(o,_,m),c.valueWayDim+=m}else if(f===g)v(i[y],0,m),v(a,0,m);else{var _=c.categoryWayDim;v(i[y],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(p,g,y){for(var m=0;me)return r[i];return r[t-1]}function J1(r,e,t,i,n,a,o){a=a||r;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!i?t:sD(i,o);if(f=f||t,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function lD(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var ls,Aa,Fp,Gp="\0_ec_inner",uD=1,Sc=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Ct(a),this._locale=new Ct(o),this._optionManager=s},e.prototype.setOption=function(t,i,n){var a=Yp(i);this._optionManager.setOption(t,n,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,i){return this._resetOption(t,Yp(i))},e.prototype._resetOption=function(t,i){var n=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?Fp(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&C(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=U(),u=i&&i.replaceMergeMainTypeMap;eD(this),C(t,function(h,c){h!=null&&(ft.hasClass(c)?c&&(s.push(c),l.set(c,!0)):n[c]=n[c]==null?K(h):j(n[c],h,!0))}),u&&u.each(function(h,c){ft.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),ft.topologicalTravel(s,ft.getAllClassMainTypes(),f,this);function f(h){var c=aD(this,h,Tt(t[h])),v=a.get(h),d=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",p=B_(v,c,d);AC(p,h,ft),n[h]=null,a.set(h,null),o.set(h,0);var g=[],y=[],m=0,_;C(p,function(S,w){var x=S.existing,b=S.newOption;if(!b)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=h==="series",M=ft.getClass(h,S.keyInfo.subType,!T);if(!M)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===M)x.name=S.keyInfo.name,x.mergeOption(b,this),x.optionUpdated(b,!1);else{var A=z({componentIndex:w},S.keyInfo);x=new M(b,this,this,A),z(x,A),S.brandNew&&(x.__requireNewView=!0),x.init(b,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),n[h]=g,a.set(h,y),o.set(h,m),h==="series"&&ls(this)}this._seriesIndices||ls(this)},e.prototype.getOption=function(){var t=K(this.option);return C(t,function(i,n){if(ft.hasClass(n)){for(var a=Tt(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!po(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[n]=a}}),delete t[Gp],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,i){var n=this._componentsMap.get(t);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function mD(r,e){return r.join(",")===e.join(",")}var Ve=C,wo=$,Up=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function mf(r){var e=r&&r.itemStyle;if(e)for(var t=0,i=Up.length;t=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,v)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&c>=0&&m>0||l==="samesign"&&c<=0&&m<0){c=gC(c,m),p=m;break}}}return i[0]=c,i[1]=p,i})})}var hu=function(){function r(e){this.data=e.data||(e.sourceFormat===Sr?{}:[]),this.sourceFormat=e.sourceFormat||X1,this.seriesLayoutBy=e.seriesLayoutBy||zr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var i=0;ip&&(p=_)}v[0]=d,v[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};Qp=(e={},e[me+"_"+zr]={pure:!0,appendData:a},e[me+"_"+pa]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[tr]={pure:!0,appendData:a},e[Sr]={pure:!0,appendData:function(o){var s=this._data;C(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},e[ze]={appendData:a},e[ci]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(e,t){return ra(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,i){},r}();function rg(r){var e,t;return $(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function fo(r){return new OD(r)}var OD=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,i=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||v1&&i>0?s:o}};return a;function o(){return e=r?null:ln?-this._resultLT:0},r}(),ND=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return qs(e,t)},r}();function zD(r,e){var t=new ND,i=r.data,n=t.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==zr&&fe(o);var s=[],l={},u=r.dimensionsDefine;if(u)C(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";rt(l,y)&&fe(_),l[y]=m}});else for(var f=0;f65535?XD:ZD}function Ln(){return[1/0,-1/0]}function $D(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function ag(r,e,t,i,n){var a=hS[t||"float"];if(n){var o=r[e],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=G(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(i!=null&&ie)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,i){var n=this._chunks,a=n[e],o=[];if(!a)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var i=t.constructor,n=this._count;if(i===Array){e=new i(n);for(var a=0;a=h&&m<=c||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var g=v[n[0]],_=v[n[1]],S=e[n[1]][0],w=e[n[1]][1],y=0;y=h&&m<=c||isNaN(m))&&(x>=S&&x<=w||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var y=0;y=h&&m<=c||isNaN(m))&&(l[u++]=b)}else for(var y=0;ye[A][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var i=this.clone([e],!0),n=i._chunks,a=n[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,h,c,v=new(Dn(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;df&&(f=h,c=S)}D>0&&Ds&&(p=s-f);for(var g=0;gd&&(d=m,v=f+g)}var _=this.getRawIndex(h),S=this.getRawIndex(v);hf-d&&(l=f-d,s.length=l);for(var p=0;ph[1]&&(h[1]=y),c[v++]=m}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var i=e.length,n=this._chunks,a=0,o=this.count();al&&(l=h)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var i=[],n=this._chunks,a=0;a=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,i,n,a){return qs(t[a],this._dimensions[a])}xf={arrayRows:e,objectRows:function(t,i,n,a){return qs(t[i],this._dimensions[a])},keyedColumns:e,original:function(t,i,n,a){var o=t&&(t.value==null?t:t.value);return qs(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,i,n,a){return t[a]}}}(),r}(),qD=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),i=!!t.length,n,a;if(us(e)){var o=e,s=void 0,l=void 0,u=void 0;if(i){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=pe(s)?ci:ze,a=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=lt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=lt(h.sourceHeader,c.sourceHeader),p=lt(h.dimensions,c.dimensions),g=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||p;n=g?[tv(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var y=e;if(i){var m=this._applyTransform(t);n=m.sourceList,a=m.upstreamSignList}else{var _=y.get("source",!0);n=[tv(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,i=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var a="";e.length!==1&&og(a)}var o,s=[],l=[];return C(e,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&og(h),s.push(f),l.push(u._getVersionSign())}),i?o=YD(i,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[DD(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return C(r.blocks,function(n){var a=pS(n);a>=e&&(e=a+ +(i&&(!a||rv(n)&&!n.noHeader)))}),e}return 0}function jD(r,e,t,i){var n=e.noHeader,a=e2(pS(e)),o=[],s=e.blocks||[];ke(!s||V(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(rt(u,l)){var f=new BD(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}C(s,function(p,g){var y=e.valueFormatter,m=dS(p)(y?z(z({},r),{valueFormatter:y}):r,p,g>0?a.html:0,i);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(a.richText):iv(i,o.join(""),n?t:a.html);if(n)return h;var c=Qh(e.header,"ordinal",r.useUTC),v=cS(i,r.renderMode).nameStyle,d=vS(i);return r.renderMode==="richText"?gS(r,c,v)+a.richText+h:iv(i,'
'+ue(c)+"
"+h,t)}function t2(r,e,t,i){var n=r.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=V(S)?S:[S],G(S,function(w,x){return Qh(w,V(v)?v[x]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),c=a?"":Qh(l,"ordinal",u),v=e.valueType,d=o?[]:f(e.value,e.dataIndex),p=!s||!a,g=!s&&a,y=cS(i,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":h)+(a?"":gS(r,c,m))+(o?"":n2(r,d,p,g,_)):iv(i,(s?"":h)+(a?"":r2(c,!s,m))+(o?"":i2(d,p,g,_)),t)}}function sg(r,e,t,i,n,a){if(r){var o=dS(r),s={useUTC:n,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function e2(r){return{html:JD[r],richText:QD[r]}}function iv(r,e,t){var i='
',n="margin: "+t+"px 0 0",a=vS(r);return'
'+e+i+"
"}function r2(r,e,t){var i=e?"margin-left:2px":"";return''+ue(r)+""}function i2(r,e,t,i){var n=t?"10px":"20px",a=e?"float:right;margin-left:"+n:"";return r=V(r)?r:[r],''+G(r,function(o){return ue(o)}).join("  ")+""}function gS(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function n2(r,e,t,i,n){var a=[n],o=i?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(V(e)?e.join(" "):e,a)}function yS(r,e){var t=r.getData().getItemVisual(e,"style"),i=t[r.visualDrawType];return fn(i)}function mS(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var wf=function(){function r(){this.richTextStyles={},this._nextStyleNameId=R_()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,i){var n=i==="richText"?this._generateStyleName():null,a=KA({color:t,type:e,renderMode:i,markerId:n});return W(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var i={};V(t)?C(t,function(a){return z(i,a)}):z(i,t);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+e+"}"},r}();function a2(r){var e=r.series,t=r.dataIndex,i=r.multipleSeries,n=e.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=V(s),u=yS(e,t),f,h,c,v;if(o>1||l&&!o){var d=o2(s,e,t,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(a[0]);v=f=ra(n,t,a[0]),h=p.type}else v=f=l?s[0]:s;var g=Jv(e),y=g&&e.name||"",m=n.getName(t),_=i?y:m;return _r("section",{header:y,noHeader:i||!g,sortParam:v,blocks:[_r("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Xe(_),value:f,valueType:h,dataIndex:t})].concat(c||[])})}function o2(r,e,t,i,n){var a=e.getData(),o=dr(r,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?C(i,function(h){f(ra(a,t,h),h)}):C(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(_r("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Jr=mt();function fs(r,e){return r.getName(e)||r.getId(e)}var Ks="__universalTransitionEnabled",ne=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,i,n){this.seriesIndex=this.componentIndex,this.dataTask=fo({count:l2,reset:u2}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var a=Jr(this).sourceManager=new qD(this);a.prepareSource();var o=this.getInitialData(t,n);ug(o,this),this.dataTask.context.data=o,Jr(this).dataBeforeProcessed=o,lg(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,i){var n=xo(this),a=n?da(t):{},o=this.subType;ft.hasClass(o)&&(o+="Series"),j(t,i.getTheme().get(this.subType)),j(t,this.getDefaultOption()),vl(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&mi(t,a,n)},e.prototype.mergeOption=function(t,i){t=j(this.option,t,!0),this.fillDataTextStyle(t.data);var n=xo(this);n&&mi(this.option,t,n);var a=Jr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,i);ug(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Jr(this).dataBeforeProcessed=o,lg(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!pe(t))for(var i=["show"],n=0;nthis.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,i,n){var a=this.ecModel,o=_c.prototype.getColorFromPalette.call(this,t,i,n);return o||(o=a.getColorFromPalette(t,i,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,i){this._innerSelect(this.getData(i),t)},e.prototype.unselect=function(t,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},e.prototype.isSelected=function(t,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[fs(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Ks])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){$(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,i)}},e.registerClass=function(t){return ft.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(ft);ae(ne,lS);ae(ne,_c);F_(ne,ft);function lg(r){var e=r.name;Jv(r)||(r.name=s2(r)||e)}function s2(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),i=[];return C(t,function(n){var a=e.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function l2(r){return r.model.getRawData().count()}function u2(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),f2}function f2(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ug(r,e){C(jb(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,dt(h2,e))})}function h2(r,e){var t=nv(r);return t&&t.setOutputEnd((e||this).count()),e}function nv(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var i=t.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var Pt=function(){function r(){this.group=new it,this.uid=ca("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){},r.prototype.updateLayout=function(e,t,i,n){},r.prototype.updateVisual=function(e,t,i,n){},r.prototype.toggleBlurSeries=function(e,t,i){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();jv(Pt);Zl(Pt);function Cc(){var r=mt();return function(e){var t=r(e),i=e.pipelineContext,n=!!t.large,a=!!t.progressiveRender,o=t.large=!!(i&&i.large),s=t.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var _S=mt(),v2=Cc(),Wt=function(){function r(){this.group=new it,this.uid=ca("viewChart"),this.renderTask=fo({plan:c2,reset:d2}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.highlight=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&hg(a,n,"emphasis")},r.prototype.downplay=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&hg(a,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateLayout=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateVisual=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.eachRendered=function(e){nu(this.group,e)},r.markUpdateMethod=function(e,t){_S(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function fg(r,e,t){r&&Xh(r)&&(e==="emphasis"?ta:ea)(r,t)}function hg(r,e,t){var i=un(r,e),n=e&&e.highlightKey!=null?$M(e.highlightKey):null;i!=null?C(Tt(i),function(a){fg(r.getItemGraphicEl(a),t,n)}):r.eachItemGraphicEl(function(a){fg(a,t,n)})}jv(Wt);Zl(Wt);function c2(r){return v2(r.model)}function d2(r){var e=r.model,t=r.ecModel,i=r.api,n=r.payload,a=e.pipelineContext.progressiveRender,o=r.view,s=n&&_S(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,i,n),p2[l]}var p2={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},_l="\0__throttleOriginMethod",vg="\0__throttleRate",cg="\0__throttleType";function Mc(r,e,t){var i,n=0,a=0,o=null,s,l,u,f;e=e||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],d=0;d=0?h():o=setTimeout(h,-s),n=i};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function Ho(r,e,t,i){var n=r[e];if(n){var a=n[_l]||n,o=n[cg],s=n[vg];if(s!==t||o!==i){if(t==null||!i)return r[e]=a;n=r[e]=Mc(a,t,i==="debounce"),n[_l]=a,n[cg]=i,n[vg]=t}return n}}function bo(r,e){var t=r[e];t&&t[_l]&&(t.clear&&t.clear(),r[e]=t[_l])}var dg=mt(),pg={itemStyle:jn(D1,!0),lineStyle:jn(A1,!0)},g2={lineStyle:"stroke",itemStyle:"fill"};function SS(r,e){var t=r.visualStyleMapper||pg[e];return t||(console.warn("Unknown style type '"+e+"'."),pg.itemStyle)}function xS(r,e){var t=r.visualDrawType||g2[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var y2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=SS(r,i),o=a(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=xS(r,i),u=o[l],f=J(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=c,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||J(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||J(o.stroke)?c:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=z({},o);g[l]=f(p),v.setItemVisual(d,"style",g)}}}},La=new Ct,m2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=SS(r,i),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){La.option=l[i];var u=n(La),f=o.ensureUniqueItemVisual(s,"style");z(f,u),La.option.decal&&(o.setItemVisual(s,"decal",La.option.decal),La.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},_2={performRawSeries:!0,overallReset:function(r){var e=U();r.eachSeries(function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+i,a=e.get(n);a||(a={},e.set(n,a)),dg(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var i=t.getRawData(),n={},a=t.getData(),o=dg(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=xS(t,s);a.each(function(u){var f=a.getRawIndex(u);n[f]=u}),i.each(function(u){var f=n[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=i.getName(u)||u+"",d=i.count();c[l]=t.getColorFromPalette(v,o,d)}})}})}},hs=Math.PI;function S2(r,e){e=e||{},q(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new it,i=new gt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(i);var n=new pt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new gt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new tu({shape:{startAngle:-hs/2,endAngle:-hs/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:hs*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:hs*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var wS=function(){function r(e,t,i,n){this._stageTaskMap=U(),this.ecInstance=e,this.api=t,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),n=i.context,a=!t&&i.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),n=e.getData(),a=n.count(),o=i.progressiveEnabled&&t.incrementalPrepareRender&&a>=i.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,i=t._pipelineMap=U();e.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),i=this.api;C(this._allHandlers,function(n){var a=e.get(n.uid)||e.set(n.uid,{}),o="";ke(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,t,i),n.overallReset&&this._createOverallStageTask(n,a,t,i)},this)},r.prototype.prepareView=function(e,t,i,n){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=i,o.api=n,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,i){this._performStageTasks(this._visualHandlers,e,t,i)},r.prototype._performStageTasks=function(e,t,i,n){n=n||{};var a=!1,o=this;C(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,d=c.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,i);var p=o.getPerformArgs(c,n.block);d.each(function(g){g.perform(p)}),c.perform(p)&&(a=!0)}else h&&h.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,i),g.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(i){t=i.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,i,n){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=U(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(f):l?i.eachRawSeriesByType(l,f):u&&u(i,n).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||fo({plan:C2,reset:M2,count:D2}));v.context={model:h,ecModel:i,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(e,t,i,n){var a=this,o=t.overallTask=t.overallTask||fo({reset:x2});o.context={ecModel:i,api:n,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=U(),u=e.seriesType,f=e.getTargetSeries,h=!0,c=!1,v="";ke(!e.createOnAllSeries,v),u?i.eachRawSeriesByType(u,d):f?f(i,n).each(d):(h=!1,C(i.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(c=!0,fo({reset:w2,onDirty:T2})));y.context={model:p,overallProgress:h},y.agent=o,y.__block=h,a._pipe(p,y)}c&&o.dirty()},r.prototype._pipe=function(e,t){var i=e.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return J(e)&&(e={overallReset:e,seriesType:L2(e)}),e.uid=ca("stageHandler"),t&&(e.visualType=t),e},r}();function x2(r){r.overallReset(r.ecModel,r.api,r.payload)}function w2(r){return r.overallProgress&&b2}function b2(){this.agent.dirty(),this.getDownstream().dirty()}function T2(){this.agent&&this.agent.dirty()}function C2(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function M2(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Tt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?G(e,function(t,i){return bS(i)}):A2}var A2=bS(0);function bS(r){return function(e,t){var i=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var a=e.start;a0&&v===u.length-c.length){var d=u.slice(0,v);d!=="data"&&(t.mainType=d,t[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(i[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:t,dataQuery:i,otherQuery:n}},r.prototype.filter=function(e,t){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),av=["symbol","symbolSize","symbolRotate","symbolOffset"],_g=av.concat(["symbolKeepAspect"]),R2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o=0&&Ji(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function ov(r,e,t){for(var i=e.type==="radial"?$2(r,e,t):Z2(r,e,t),n=e.colorStops,a=0;a0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:bt(r)?[r]:V(r)?r:null}function IS(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&K2(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=G(t,function(a){return a/n}),i/=n)}return[t,i]}var J2=new Fr(!0);function wl(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function Sg(r){return typeof r=="string"&&r!=="none"}function bl(r){var e=r.fill;return e!=null&&e!=="none"}function xg(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function wg(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function sv(r,e,t){var i=G_(e.image,e.__image,t);if($l(i)){var n=r.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*tT),a.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(a)}return n}}function Q2(r,e,t,i){var n,a=wl(t),o=bl(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||J2,h=e.__dirty;if(!i){var c=t.fill,v=t.stroke,d=o&&!!c.colorStops,p=a&&!!v.colorStops,g=o&&!!c.image,y=a&&!!v.image,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0;(d||p)&&(x=e.getBoundingRect()),d&&(m=h?ov(r,c,x):e.__canvasFillGradient,e.__canvasFillGradient=m),p&&(_=h?ov(r,v,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=h||!e.__canvasFillPattern?sv(r,c,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(w=h||!e.__canvasStrokePattern?sv(r,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(w?r.strokeStyle=w:a=!1)}var b=e.getGlobalScale();f.setScale(b[0],b[1],e.segmentIgnoreThreshold);var T,M;r.setLineDash&&t.lineDash&&(n=IS(e),T=n[0],M=n[1]);var A=!0;(u||h&Vn)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),e.buildPath(f,e.shape,i),f.toStatic(),e.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=M),i||(t.strokeFirst?(a&&wg(r,t),o&&xg(r,t)):(o&&xg(r,t),a&&wg(r,t))),T&&r.setLineDash([])}function j2(r,e,t){var i=e.__image=G_(t.image,e.__image,e,e.onload);if(!(!i||!$l(i))){var n=t.x||0,a=t.y||0,o=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(i,u,f,t.sWidth,t.sHeight,n,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,h=o-u,c=s-f;r.drawImage(i,u,f,h,c,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function tL(r,e,t){var i,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||ln,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,o=void 0;r.setLineDash&&t.lineDash&&(i=IS(e),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),t.strokeFirst?(wl(t)&&r.strokeText(n,t.x,t.y),bl(t)&&r.fillText(n,t.x,t.y)):(bl(t)&&r.fillText(n,t.x,t.y),wl(t)&&r.strokeText(n,t.x,t.y)),a&&r.setLineDash([])}}var bg=["shadowBlur","shadowOffsetX","shadowOffsetY"],Tg=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function PS(r,e,t,i,n){var a=!1;if(!i&&(t=t||{},e===t))return!1;if(i||e.opacity!==t.opacity){ce(r,n),a=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?tn.opacity:o}(i||e.blend!==t.blend)&&(a||(ce(r,n),a=!0),r.globalCompositeOperation=e.blend||tn.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,i,n){if(!this[Xt]){if(this._disposed){this.id;return}var a,o,s;if($(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Xt]=!0,!this._model||i){var l=new dD(this._api),u=this._theme,f=this._model=new Sc;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},uv);var h={seriesTransition:s,optionChanged:!0};if(n)this[le]={silent:a,updateParams:h},this[Xt]=!1,this.getZr().wakeUp();else{try{Pn(this),Qr.update.call(this,null,h)}catch(c){throw this[le]=null,this[Xt]=!1,c}this._ssr||this._zr.flush(),this[le]=null,this[Xt]=!1,Ia.call(this,a),Pa.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||nt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var i=this._zr.painter;return i.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(nt.svgSupported){var t=this._zr,i=t.storage.getDisplayList();return C(i,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var i=t.excludeComponents,n=this._model,a=[],o=this;C(i,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return C(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var i=t.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(CL[n]){var l=s,u=s,f=-s,h=-s,c=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();C(zg,function(_,S){if(_.group===n){var w=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(K(t)),x=_.getDom().getBoundingClientRect();l=a(x.left,l),u=a(x.top,u),f=o(x.right,f),h=o(x.bottom,h),c.push({dom:w,left:x.left,top:x.top})}}),l*=v,u*=v,f*=v,h*=v;var d=f-l,p=h-u,g=oa.createCanvas(),y=Wd(g,{renderer:i?"svg":"canvas"});if(y.resize({width:d,height:p}),i){var m="";return C(c,function(_){var S=_.left-l,w=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new gt({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),C(c,function(_){var S=new _e({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,i){return Mf(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return Mf(this,"convertFromPixel",t,i)},e.prototype.containPixel=function(t,i){if(this._disposed){this.id;return}var n=this._model,a,o=ao(n,t);return C(o,function(s,l){l.indexOf("Models")>=0&&C(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(i);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(i,u))}},this)},this),!!a},e.prototype.getVisual=function(t,i){var n=this._model,a=ao(n,t,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?AS(s,l,i):DS(s,i)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;C(TL,function(i){var n=function(a){var o=t.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&Ki(s,function(d){var p=at(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=z({},p.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var c=f&&h!=null&&o.getComponent(f,h),v=c&&t[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];l.event=a,l.type=i,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},t.trigger(i,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(i,n,t)}),C(Ml,function(i,n){t._messageCenter.on(n,function(a){this.trigger(n,a)},t)}),C(["selectchanged"],function(i){t._messageCenter.on(i,function(n){this.trigger(i,n)},t)}),O2(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&RC(this.getDom(),ML,"");var i=this,n=i._api,a=i._model;C(i._componentsViews,function(o){o.dispose(a,n)}),C(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete zg[i.id]},e.prototype.resize=function(t){if(!this[Xt]){if(this._disposed){this.id;return}this._zr.resize(t);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=t&&t.silent;this[le]&&(a==null&&(a=this[le].silent),n=!0,this[le]=null),this[Xt]=!0;try{n&&Pn(this),Qr.update.call(this,{type:"resize",animation:z({duration:0},t&&t.animation)})}catch(o){throw this[Xt]=!1,o}this[Xt]=!1,Ia.call(this,a),Pa.call(this,a)}}},e.prototype.showLoading=function(t,i){if(this._disposed){this.id;return}if($(t)&&(i=t,t=""),t=t||"default",this.hideLoading(),!!fv[t]){var n=fv[t](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var i=z({},t);return i.type=Ml[t.type],i},e.prototype.dispatchAction=function(t,i){if(this._disposed){this.id;return}if($(i)||(i={silent:!!i}),!!Cl[t.type]&&this._model){if(this[Xt]){this._pendingActions.push(t);return}var n=i.silent;Df.call(this,t,n);var a=i.flush;a?this._zr.flush():a!==!1&&nt.browser.weChat&&this._throttledZrFlush(),Ia.call(this,n),Pa.call(this,n)}},e.prototype.updateLabelLayout=function(){sr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var i=t.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Pn=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Cf(h,!0),Cf(h,!1),c.plan()},Cf=function(h,c){for(var v=h._model,d=h._scheduler,p=c?h._componentsViews:h._chartsViews,g=c?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_c.get("hoverLayerThreshold")&&!nt.node&&!nt.worker&&c.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=h._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(h,c){if(!h.preventAutoZ){var v=h.get("z")||0,d=h.get("zlevel")||0;c.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(h,c,v,d){var p=h.getTextContent(),g=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Zn(y))return;if(y instanceof ht&&qM(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&n(y)}})}Bg=function(h){return new(function(c){O(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return h._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){ta(d,p),be(h)},v.prototype.leaveEmphasis=function(d,p){ea(d,p),be(h)},v.prototype.enterBlur=function(d){zM(d),be(h)},v.prototype.leaveBlur=function(d){e1(d),be(h)},v.prototype.enterSelect=function(d){r1(d),be(h)},v.prototype.leaveSelect=function(d){i1(d),be(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},v}(Q1))(h)}}(),e}(Be),Lc=bL.prototype;Lc.on=GS("on");Lc.off=GS("off");Lc.one=function(r,e,t){var i=this;function n(){for(var a=[],o=0;o=0)){Vg.push(t);var a=wS.wrapStageHandler(t,n);a.__prio=e,a.__raw=t,r.push(a)}}function KS(r,e){fv[r]=e}function PL(r,e,t){var i=fL("registerMap");i&&i(r,e,t)}var RL=WD;gn(Dc,y2);gn(du,m2);gn(du,_2);gn(Dc,R2);gn(du,E2);gn(FS,lL);$S(tS);qS(cL,MD);KS("default",S2);xr({type:en,event:en,update:en},Jt);xr({type:Us,event:Us,update:Us},Jt);xr({type:oo,event:oo,update:oo},Jt);xr({type:Xs,event:Xs,update:Xs},Jt);xr({type:so,event:so,update:so},Jt);ZS("light",I2);ZS("dark",MS);function Ra(r){return r==null?0:r.length||1}function Fg(r){return r}var Mo=function(){function r(e,t,i,n,a,o){this._old=e,this._new=t,this._oldKeyGetter=i||Fg,this._newKeyGetter=n||Fg,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,i={},n=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,i,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(f,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,i={},n={},a=[],o=[];this._initIndexMap(e,i,a,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var Ea=$,jr=G,VL=typeof Int32Array>"u"?Array:Int32Array,FL="e\0\0",Gg=-1,GL=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],HL=["_approximateExtent"],Hg,ys,ka,Oa,Pf,Ba,Rf,Rc=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var i,n=!1;QS(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,i=e),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=t)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===ze;if(l&&!n.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var i=this._itemVisuals,n=i[e];n||(n=i[e]={});var a=n[t];return a==null&&(a=this.getVisual(t),V(a)?a=a.slice():Ea(a)&&(a=z({},a)),n[t]=a),a},r.prototype.setItemVisual=function(e,t,i){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Ea(t)?z(n,t):n[t]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Ea(e)?z(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?z(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var i=this.hostModel&&this.hostModel.seriesIndex;Hh(i,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){C(this._graphicEls,function(i,n){i&&e&&e.call(t,i,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:jr(this.dimensions,this._getDimInfo,this),this.hostModel)),Pf(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var i=this[e];J(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=i.apply(this,arguments);return t.apply(this,[n].concat(Xv(arguments)))})},r.internalField=function(){Hg=function(e){var t=e._invertedIndicesMap;C(t,function(i,n){var a=e._dimInfos[n],o=a.ordinalMeta,s=e._store;if(o){i=t[n]=new VL(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[t]=l}}}(),r}();function rx(r,e){wc(r)||(r=eS(r)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||r.dimensionsDefine||[],n=U(),a=[],o=YL(r,t,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&ex(o),l=i===r.dimensionsDefine,u=l?tx(r):jS(i),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var h=U(f),c=new fS(o),v=0;v0&&(i.name=n+(a-1)),a++,e.set(n,a)}}function YL(r,e,t,i){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,i||0);return C(e,function(a){var o;$(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function UL(r,e,t){if(t||e.hasKey(r)){for(var i=0;e.hasKey(r+i);)i++;r+=i}return e.set(r,!0),r}var XL=function(){function r(e){this.coordSysDims=[],this.axisMap=U(),this.categoryAxisMap=U(),this.coordSysName=e}return r}();function ZL(r){var e=r.get("coordinateSystem"),t=new XL(e),i=$L[e];if(i)return i(r,t,t.axisMap,t.categoryAxisMap),t}var $L={cartesian2d:function(r,e,t,i){var n=r.getReferringComponents("xAxis",Nt).models[0],a=r.getReferringComponents("yAxis",Nt).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",a),Rn(n)&&(i.set("x",n),e.firstCategoryDimIndex=0),Rn(a)&&(i.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,i){var n=r.getReferringComponents("singleAxis",Nt).models[0];e.coordSysDims=["single"],t.set("single",n),Rn(n)&&(i.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,i){var n=r.getReferringComponents("polar",Nt).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),Rn(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),Rn(o)&&(i.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,i){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();C(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];t.set(f,u),Rn(u)&&(i.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Rn(r){return r.get("type")==="category"}function qL(r,e,t){t=t||{};var i=t.byIndex,n=t.stackedCoordDimension,a,o,s;KL(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(C(a,function(m,_){W(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!i&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!i&&!u&&(i=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;C(a,function(m){m.coordDim===v&&p++});var g={name:h,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:c,coordDim:c,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(c,d),y.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(a.push(g),a.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:c,stackResultDimension:h}}function KL(r){return!QS(r.schema)}function hn(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function JL(r,e){return hn(r,e)?r.getCalculationInfo("stackResultDimension"):e}function QL(r,e){var t=r.get("coordinateSystem"),i=xc.get(t),n;return e&&e.coordSysDims&&(n=G(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=OL(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function jL(r,e,t){var i,n;return t&&C(r,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function pu(r,e,t){t=t||{};var i=e.getSourceManager(),n,a=!1;n=i.getSource(),a=n.sourceFormat===ze;var o=ZL(e),s=QL(e,o),l=t.useEncodeDefaulter,u=J(l)?l:l?dt(rD,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=rx(n,f),c=jL(h.dimensions,t.createInvertedIndices,o),v=a?null:i.getSharedDataStore(h),d=qL(e,{schema:h,store:v}),p=new Rc(h,e);p.setCalculationInfo(d);var g=c!=null&&tI(n)?function(y,m,_,S){return S===c?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(a?n:v,null,g),p}function tI(r){if(r.sourceFormat===ze){var e=eI(r.data||[]);return!V(ua(e))}}function eI(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();Zl(wr);var rI=0,hv=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++rI}return r.createByAxisModel=function(e){var t=e.option,i=t.data,n=i&&G(i,iI);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,i=this._needCollect;if(!W(e)&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(i?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=U(this.categories))},r}();function iI(r){return $(r)&&r.value!=null?r.value:r+""}function vv(r){return r.type==="interval"||r.type==="log"}function nI(r,e,t,i){var n={},a=r[1]-r[0],o=n.interval=I_(a/e);t!=null&&oi&&(o=n.interval=i);var s=n.intervalPrecision=ix(o),l=n.niceTickExtent=[It(Math.ceil(r[0]/o)*o,s),It(Math.floor(r[1]/o)*o,s)];return aI(l,r),n}function Ef(r){var e=Math.pow(10,Kv(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,It(t*e)}function ix(r){return Rr(r)+2}function Wg(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function aI(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Wg(r,0,e),Wg(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function gu(r,e){return r>=e[0]&&r<=e[1]}function yu(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function mu(r,e){return r*(e[1]-e[0])+e[0]}var _u=function(r){O(e,r);function e(t){var i=r.call(this,t)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new hv({})),V(n)&&(n=new hv({categories:G(n,function(a){return $(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return e.prototype.parse=function(t){return t==null?NaN:W(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),gu(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),yu(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(mu(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],i=this._extent,n=i[0];n<=i[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(wr);wr.registerClass(_u);var Vi=It,Gr=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return gu(t,this._extent)},e.prototype.normalize=function(t){return yu(t,this._extent)},e.prototype.scale=function(t){return mu(t,this._extent)},e.prototype.setExtent=function(t,i){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(i)||(n[1]=parseFloat(i))},e.prototype.unionExtent=function(t){var i=this._extent;t[0]i[1]&&(i[1]=t[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ix(t)},e.prototype.getTicks=function(t){var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;n[0]l)return[];var f=s.length?s[s.length-1].value:a[1];return n[1]>f&&(t?s.push({value:Vi(f+i,o)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(t){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),o=1;oa[0]&&v0&&(a=a===null?s:Math.min(a,s))}t[i]=a}}return t}function sx(r){var e=lI(r),t=[];return C(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=i.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=Z(i.get("barWidth"),s),p=Z(i.get("barMaxWidth"),s),g=Z(i.get("barMinWidth")||(hx(i)?.5:1),s),y=i.get("barGap"),m=i.get("barCategoryGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:Ec(a),stackId:ax(i)})}),uI(t)}function uI(r){var e={};C(r,function(i,n){var a=i.axisKey,o=i.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=i.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=i.barMaxWidth;h&&(l[u].maxWidth=h);var c=i.barMinWidth;c&&(l[u].minWidth=c);var v=i.barGap;v!=null&&(s.gap=v);var d=i.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return C(e,function(i,n){t[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=yt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Z(s,o),f=Z(i.gap,1),h=i.remainedWidth,c=i.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),C(a,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,c--}else{var S=v;m&&mS&&(S=_),S!==v&&(y.width=S,h-=S+f*S,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var d=0,p;C(a,function(y,m){y.width||(y.width=v),p=y,d+=y.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;C(a,function(y,m){t[n][m]=t[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function fI(r,e,t){if(r&&e){var i=r[Ec(e)];return i}}function lx(r,e){var t=ox(r,e),i=sx(t);C(t,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=ax(n),u=i[Ec(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function ux(r){return{seriesType:r,plan:Cc(),reset:function(e){if(fx(e)){var t=e.getData(),i=e.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),f=t.getCalculationInfo("stackResultDimension"),h=hn(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=hI(n,a),d=hx(e),p=e.get("barMinHeight")||0,g=f&&t.getDimensionIndex(f),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var w=_.count,x=d&&kr(w*3),b=d&&l&&kr(w*3),T=d&&kr(w),M=i.master.getRect(),A=c?M.width:M.height,D,L=S.getStore(),I=0;(D=_.next())!=null;){var P=L.get(h?g:o,D),R=L.get(s,D),E=v,N=void 0;h&&(N=+P-L.get(o,D));var k=void 0,B=void 0,F=void 0,H=void 0;if(c){var X=i.dataToPoint([P,R]);if(h){var tt=i.dataToPoint([N,R]);E=tt[0]}k=E,B=X[1]+m,F=X[0]-E,H=y,Math.abs(F)0?t:1:t))}var vI=function(r,e,t,i){for(;t>>1;r[n][1]n&&(this._approxInterval=n);var s=ms.length,l=Math.min(vI(ms,this._approxInterval,0,s),s-1);this._interval=ms[l][1],this._minLevelUnit=ms[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return bt(t)?t:+gr(t)},e.prototype.contain=function(t){return gu(this.parse(t),this._extent)},e.prototype.normalize=function(t){return yu(this.parse(t),this._extent)},e.prototype.scale=function(t){return mu(t,this._extent)},e.type="time",e}(Gr),ms=[["second",cc],["minute",dc],["hour",uo],["quarter-day",uo*6],["half-day",uo*12],["day",Re*1.2],["half-week",Re*3.5],["week",Re*7],["month",Re*31],["quarter",Re*95],["half-year",Ep/2],["year",Ep]];function cI(r,e,t,i){var n=gr(e),a=gr(t),o=function(d){return Op(n,d,i)===Op(a,d,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function dI(r,e){return r/=Re,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function pI(r){var e=30*Re;return r/=e,r>6?6:r>3?3:r>2?2:1}function gI(r){return r/=uo,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Yg(r,e){return r/=e?dc:cc,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function yI(r){return I_(r)}function mI(r,e,t){var i=new Date(r);switch(qn(e)){case"year":case"month":i[E1(t)](0);case"day":i[k1(t)](1);case"hour":i[O1(t)](0);case"minute":i[B1(t)](0);case"second":i[N1(t)](0),i[z1(t)](0)}return i.getTime()}function _I(r,e,t,i){var n=1e4,a=P1,o=0;function s(A,D,L,I,P,R,E){for(var N=new Date(D),k=D,B=N[I]();k1&&R===0&&L.unshift({value:L[0].value-k})}}for(var R=0;R=i[0]&&m<=i[1]&&h++)}var _=(i[1]-i[0])/e;if(h>_*1.5&&c>_/1.5||(u.push(g),h>_||r===a[v]))break}f=[]}}}for(var S=wt(G(u,function(A){return wt(A,function(D){return D.value>=i[0]&&D.value<=i[1]&&!D.notAdd})}),function(A){return A.length>0}),w=[],x=S.length-1,v=0;v0;)a*=10;var s=[It(wI(i[0]/a)*a),It(xI(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){ho.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=Fe(t)/Fe(this.base),gu(t,this._extent)},e.prototype.normalize=function(t){return t=Fe(t)/Fe(this.base),yu(t,this._extent)},e.prototype.scale=function(t){return t=mu(t,this._extent),_s(this.base,t)},e.type="log",e}(wr),vx=Oc.prototype;vx.getMinorTicks=ho.getMinorTicks;vx.getLabel=ho.getLabel;function Ss(r,e){return SI(r,Rr(e))}wr.registerClass(Oc);var bI=function(){function r(e,t,i){this._prepareParams(e,t,i)}return r.prototype._prepareParams=function(e,t,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[CI[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var i=TI[e];this[i]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),TI={min:"_determinedMin",max:"_determinedMax"},CI={min:"_dataMin",max:"_dataMax"};function cx(r,e,t){var i=r.rawExtentInfo;return i||(i=new bI(r,e,t),r.rawExtentInfo=i,i)}function xs(r,e){return e==null?null:rl(e)?NaN:r.parse(e)}function dx(r,e){var t=r.type,i=cx(r,e,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,o=e.ecModel;if(o&&t==="time"){var s=ox("bar",o),l=!1;if(C(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=sx(s),f=MI(n,a,e,u);n=f.min,a=f.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function MI(r,e,t,i){var n=t.axis.getExtent(),a=Math.abs(n[1]-n[0]),o=fI(i,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;C(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;C(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,h=1-(s+l)/a,c=f/h-f;return e+=c*(l/u),r-=c*(s/u),{min:r,max:e}}function Ao(r,e){var t=e,i=dx(r,t),n=i.extent,a=t.get("splitNumber");r instanceof Oc&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Bc(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new _u({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new kc({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(wr.getClass(e)||Gr)}}function AI(r){var e=r.scale.getExtent(),t=e[0],i=e[1];return!(t>0&&i>0||t<0&&i<0)}function ga(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(n,a){return r.scale.getFormattedLabel(n,a,i)}}(e):W(e)?function(i){return function(n){var a=r.scale.getLabel(n),o=i.replace("{value}",a??"");return o}}(e):J(e)?function(i){return function(n,a){return t!=null&&(a=n.value-t),i(Nc(r,n),a,n.level!=null?{level:n.level}:null)}}(e):function(i){return r.scale.getLabel(i)}}function Nc(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function DI(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var i,n,a=t.getExtent();t instanceof _u?n=t.count():(i=t.getTicks(),n=i.length);var o=r.getLabelModel(),s=ga(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;fr[1]&&(r[1]=n[1])})}var Su=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),Xg=[],PI={registerPreprocessor:$S,registerProcessor:qS,registerPostInit:AL,registerPostUpdate:DL,registerUpdateLifecycle:Ic,registerAction:xr,registerCoordinateSystem:LL,registerLayout:IL,registerVisual:gn,registerTransform:RL,registerLoading:KS,registerMap:PL,registerImpl:uL,PRIORITY:wL,ComponentModel:ft,ComponentView:Pt,SeriesModel:ne,ChartView:Wt,registerComponentModel:function(r){ft.registerClass(r)},registerComponentView:function(r){Pt.registerClass(r)},registerSeriesModel:function(r){ne.registerClass(r)},registerChartView:function(r){Wt.registerClass(r)},registerSubTypeDefaulter:function(r,e){ft.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){vC(r,e)}};function jt(r){if(V(r)){C(r,function(e){jt(e)});return}ut(Xg,r)>=0||(Xg.push(r),J(r)&&(r={install:r}),r.install(PI))}var RI=1e-8;function Zg(r,e){return Math.abs(r-e)n&&(i=o,n=l)}if(i)return kI(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var i=this._rect;if(i&&!t)return i;var n=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return C(o,function(s){s.type==="polygon"?qg(s.exterior,n,a,t):C(s.points,function(l){qg(l,n,a,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new ot(n[0],n[1],a[0]-n[0],a[1]-n[1]),t||(this._rect=i),i},e.prototype.contain=function(t){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(t[0],t[1]))return!1;t:for(var a=0,o=n.length;a>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=a,n=s,a=l,i.push([s/t,l/t])}return i}function NI(r,e){return r=BI(r),G(wt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var i=t.properties,n=t.geometry,a=[];switch(n.type){case"Polygon":var o=n.coordinates;a.push(new Kg(o[0],o.slice(1)));break;case"MultiPolygon":C(n.coordinates,function(l){l[0]&&a.push(new Kg(l[0],l.slice(1)))});break;case"LineString":a.push(new Jg([n.coordinates]));break;case"MultiLineString":a.push(new Jg(n.coordinates))}var s=new yx(i[e||"name"],a,i.cp);return s.properties=i,s})}var Do=mt();function _x(r,e){var t=G(e,function(i){return r.scale.parse(i)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function zI(r){var e=r.getLabelModel().get("customValues");if(e){var t=ga(r),i=r.scale.getExtent(),n=_x(r,e),a=wt(n,function(o){return o>=i[0]&&o<=i[1]});return{labels:G(a,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?FI(r):HI(r)}function VI(r,e){var t=r.getTickModel().get("customValues");if(t){var i=r.scale.getExtent(),n=_x(r,t);return{ticks:wt(n,function(a){return a>=i[0]&&a<=i[1]})}}return r.type==="category"?GI(r,e):{ticks:G(r.scale.getTicks(),function(a){return a.value})}}function FI(r){var e=r.getLabelModel(),t=Sx(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function Sx(r,e){var t=xx(r,"labels"),i=zc(e),n=bx(t,i);if(n)return n;var a,o;return J(i)?a=Mx(r,i):(o=i==="auto"?WI(r):i,a=Cx(r,o)),Tx(t,i,{labels:a,labelCategoryInterval:o})}function GI(r,e){var t=xx(r,"ticks"),i=zc(e),n=bx(t,i);if(n)return n;var a,o;if((!e.get("show")||r.scale.isBlank())&&(a=[]),J(i))a=Mx(r,i,!0);else if(i==="auto"){var s=Sx(r,r.getLabelModel());o=s.labelCategoryInterval,a=G(s.labels,function(l){return l.tickValue})}else o=i,a=Cx(r,o,!0);return Tx(t,i,{ticks:a,tickCategoryInterval:o})}function HI(r){var e=r.scale.getTicks(),t=ga(r);return{labels:G(e,function(i,n){return{level:i.level,formattedLabel:t(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function xx(r,e){return Do(r)[e]||(Do(r)[e]=[])}function bx(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),c=0,v=0;l<=a[1];l+=s){var d=0,p=0,g=No(t({value:l}),e.font,"center","top");d=g.width*1.3,p=g.height*1.3,c=Math.max(c,d,7),v=Math.max(v,p,7)}var y=c/f,m=v/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=Do(r.model),w=r.getExtent(),x=S.lastAutoInterval,b=S.lastTickCount;return x!=null&&b!=null&&Math.abs(x-_)<=1&&Math.abs(b-o)<=1&&x>_&&S.axisExtent0===w[0]&&S.axisExtent1===w[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=w[0],S.axisExtent1=w[1]),_}function UI(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Cx(r,e,t){var i=ga(r),n=r.scale,a=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=px(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);v&&d-l!==a[1]&&p(a[1]);function p(g){var y={value:g};s.push(t?g:{formattedLabel:i(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function Mx(r,e,t){var i=r.scale,n=ga(r),a=[];return C(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),a}var Qg=[0,1],br=function(){function r(e,t,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=i||[0,0]}return r.prototype.contain=function(e){var t=this._extent,i=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=i&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return D_(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var i=this._extent;i[0]=e,i[1]=t},r.prototype.dataToCoord=function(e,t){var i=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(i=i.slice(),jg(i,n.count())),_t(e,Qg,i,t)},r.prototype.coordToData=function(e,t){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),jg(i,n.count()));var a=_t(e,i,Qg,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),i=VI(this,t),n=i.ticks,a=G(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return XI(this,a,o,e.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var i=this.scale.getMinorTicks(t),n=G(i,function(a){return G(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return zI(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(){return YI(this)},r}();function jg(r,e){var t=r[1]-r[0],i=e,n=t/i/2;r[0]+=n,r[1]-=n}function XI(r,e,t,i){var n=e.length;if(!r.onBand||t||!n)return;var a=r.getExtent(),o,s;if(n===1)e[0].coord=a[0],o=e[1]={coord:a[1],tickValue:e[0].tickValue};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;C(e,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s,tickValue:f[1]+1},e.push(o)}var h=a[0]>a[1];c(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&c(a[0],e[0].coord)&&e.unshift({coord:a[0]}),c(a[1],o.coord)&&(i?o.coord=a[1]:e.pop()),i&&c(o.coord,a[1])&&e.push({coord:a[1]});function c(v,d){return v=It(v),d=It(d),h?v>d:vn&&(n+=Na);var v=Math.atan2(s,o);if(v<0&&(v+=Na),v>=i&&v<=n||v+Na>=i&&v+Na<=n)return l[0]=f,l[1]=h,u-t;var d=t*Math.cos(i)+r,p=t*Math.sin(i)+e,g=t*Math.cos(n)+r,y=t*Math.sin(n)+e,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Ll(r,e,t,i,n,a,o,s){var l=n-r,u=a-e,f=t-r,h=i-e,c=Math.sqrt(f*f+h*h);f/=c,h/=c;var v=l*f+u*h,d=v/c;s&&(d=Math.min(Math.max(d,0),1)),d*=c;var p=o[0]=r+d*f,g=o[1]=e+d*h;return Math.sqrt((p-n)*(p-n)+(g-a)*(g-a))}function Ax(r,e,t,i,n,a,o){t<0&&(r=r+t,t=-t),i<0&&(e=e+i,i=-i);var s=r+t,l=e+i,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(a,e),l);return Math.sqrt((u-n)*(u-n)+(f-a)*(f-a))}var We=[];function KI(r,e,t){var i=Ax(e.x,e.y,e.width,e.height,r.x,r.y,We);return t.set(We[0],We[1]),i}function JI(r,e,t){for(var i=0,n=0,a=0,o=0,s,l,u=1/0,f=e.data,h=r.x,c=r.y,v=0;v0){e=e/180*Math.PI,Ze.fromArray(r[0]),xt.fromArray(r[1]),Lt.fromArray(r[2]),Q.sub(cr,Ze,xt),Q.sub(hr,Lt,xt);var t=cr.len(),i=hr.len();if(!(t<.001||i<.001)){cr.scale(1/t),hr.scale(1/i);var n=cr.dot(hr),a=Math.cos(e);if(a1&&Q.copy(re,Lt),re.toArray(r[1])}}}}function QI(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ze.fromArray(r[0]),xt.fromArray(r[1]),Lt.fromArray(r[2]),Q.sub(cr,xt,Ze),Q.sub(hr,Lt,xt);var i=cr.len(),n=hr.len();if(!(i<.001||n<.001)){cr.scale(1/i),hr.scale(1/n);var a=cr.dot(e),o=Math.cos(t);if(a=l)Q.copy(re,Lt);else{re.scaleAndAdd(hr,s/Math.tan(Math.PI/2-f));var h=Lt.x!==xt.x?(re.x-xt.x)/(Lt.x-xt.x):(re.y-xt.y)/(Lt.y-xt.y);if(isNaN(h))return;h<0?Q.copy(re,xt):h>1&&Q.copy(re,Lt)}re.toArray(r[1])}}}}function Bf(r,e,t,i){var n=t==="normal",a=n?r:r.ensureState(t);a.ignore=e;var o=i.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();n?r.useStyle(s):a.style=s}function jI(r,e){var t=e.smooth,i=e.points;if(i)if(r.moveTo(i[0][0],i[0][1]),t>0&&i.length>=3){var n=Th(i[0],i[1]),a=Th(i[1],i[2]);if(!n||!a){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var o=Math.min(n,a)*t,s=Vs([],i[1],i[0],o/n),l=Vs([],i[1],i[2],o/a),u=Vs([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var f=1;f0){_(M*T,0,o);var A=M+x;A<0&&S(-A*T,1)}else S(-x*T,1)}}function _(x,b,T){x!==0&&(u=!0);for(var M=b;M0)for(var A=0;A0;A--){var P=T[A-1]*I;_(-P,A,o)}}}function w(x){var b=x<0?-1:1;x=Math.abs(x);for(var T=Math.ceil(x/(o-1)),M=0;M0?_(T,0,M+1):_(-T,o-M-1,o),x-=T,x<=0)return}return u}function tP(r,e,t,i){return Rx(r,"x","width",e,t)}function Ex(r,e,t,i){return Rx(r,"y","height",e,t)}function kx(r){var e=[];r.sort(function(p,g){return g.priority-p.priority});var t=new ot(0,0,0,0);function i(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var n=0;n=0&&i.attr(a.oldLayoutSelect),ut(c,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),Mt(i,u,t,l)}else if(i.attr(u),!va(i).valueAnimation){var h=lt(i.style.opacity,1);i.style.opacity=0,kt(i,{style:{opacity:h}},t,l)}if(a.oldLayout=u,i.states.select){var v=a.oldLayoutSelect={};ws(v,u,bs),ws(v,i.states.select,bs)}if(i.states.emphasis){var d=a.oldLayoutEmphasis={};ws(d,u,bs),ws(d,i.states.emphasis,bs)}M1(i,l,f,t,t)}if(n&&!n.ignore&&!n.invisible){var a=iP(n),o=a.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),Mt(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,kt(n,{style:{strokePercent:1}},t)),a.oldLayout=p}},r}(),zf=mt();function YN(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var n=zf(t).labelManager;n||(n=zf(t).labelManager=new nP),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var n=zf(t).labelManager;i.updatedSeries.forEach(function(a){n.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var aP=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return pu(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var i=new it,n=Vt("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);i.add(n),n.setStyle(t.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=t.itemHeight*.8,u=Vt(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);i.add(u),u.setStyle(t.itemStyle);var f=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(ne);function xu(r,e){var t=r.mapDimensionsAll("defaultedLabel"),i=t.length;if(i===1){var n=ra(r,e,t[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o=0&&i.push(e[a])}return i.join(" ")}var Vc=function(r){O(e,r);function e(t,i,n,a){var o=r.call(this)||this;return o.updateData(t,i,n,a),o}return e.prototype._createSymbol=function(t,i,n,a,o){this.removeAll();var s=Vt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=oP,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){ta(this.childAt(0))},e.prototype.downplay=function(){ea(this.childAt(0))},e.prototype.setZ=function(t,i){var n=this.childAt(0);n.zlevel=t,n.z=i},e.prototype.setDraggable=function(t,i){var n=this.childAt(0);n.draggable=t,n.cursor=!i&&t?"move":n.cursor},e.prototype.updateData=function(t,i,n,a){this.silent=!1;var o=t.getItemVisual(i,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,i),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var h=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,t,i,l,h)}else{var c=this.childAt(0);c.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?c.attr(v):Mt(c,v,s,i),mo(c)}if(this._updateCommon(t,i,l,n,a),u){var c=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,kt(c,v,s,i)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,i,n,a,o){var s=this.childAt(0),l=t.hostModel,u,f,h,c,v,d,p,g,y;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,y=a.cursorStyle,d=a.emphasisDisabled),!a||t.hasItemOption){var m=a&&a.itemModel?a.itemModel:t.getItemModel(i),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=Xr(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(i,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var w=cu(t.getItemVisual(i,"symbolOffset"),n);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(i,"style"),b=x.fill;if(s instanceof _e){var T=s.style;s.useStyle(z({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(z({},x)):s.useStyle(x),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=t.getItemVisual(i,"liftZ"),A=this._z2;M!=null?A==null&&(this._z2=s.z2,s.z2+=M):A!=null&&(s.z2=A,this._z2=null);var D=o&&o.useNameLabel;Ur(s,p,{labelFetcher:l,labelDataIndex:i,defaultText:L,inheritColor:b,defaultOpacity:x.opacity});function L(R){return D?t.getName(R):xu(t,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),mr(this,c,v,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,i,n){var a=this.childAt(0),o=at(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&yo(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();yo(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,i){return Ac(t.getItemVisual(i,"symbolSize"))},e}(it);function oP(r,e){this.parent.drift(r,e)}function Vf(r,e,t,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(t))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function ry(r){return r!=null&&!$(r)&&(r={isIgnore:r}),r||{}}function iy(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Xr(e),cursorStyle:e.get("cursor")}}var Bx=function(){function r(e){this.group=new it,this._SymbolCtor=e||Vc}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=ry(t);var i=this.group,n=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=iy(e),u={disableAnimation:s},f=t.getSymbolPoint||function(h){return e.getItemLayout(h)};a||i.removeAll(),e.diff(a).add(function(h){var c=f(h);if(Vf(e,c,h,t)){var v=new o(e,h,l,u);v.setPosition(c),e.setItemGraphicEl(h,v),i.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),d=f(h);if(!Vf(e,d,h,t)){i.remove(v);return}var p=e.getItemVisual(h,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)i.remove(v),v=new o(e,h,l,u),v.setPosition(d);else{v.updateData(e,h,l,u);var y={x:d[0],y:d[1]};s?v.attr(y):Mt(v,y,n)}i.add(v),e.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){i.remove(c)},n)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(i,n){var a=e._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=iy(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,i){this._progressiveEls=[],i=ry(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?t=i[0]:i[1]<0&&(t=i[1]),t}function zx(r,e,t,i){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=t.get(r.baseDim,i),o[1-a]=n,e.dataToPoint(o)}function lP(r,e){var t=[];return e.diff(r).add(function(i){t.push({cmd:"+",idx:i})}).update(function(i,n){t.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){t.push({cmd:"-",idx:i})}).execute(),t}function uP(r,e,t,i,n,a,o,s){for(var l=lP(r,e),u=[],f=[],h=[],c=[],v=[],d=[],p=[],g=Nx(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=n||p<0)break;if(on(y,m)){if(l){p+=a;continue}break}if(p===t)r[a>0?"moveTo":"lineTo"](y,m),h=y,c=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){p+=a;continue}if(o>0){for(var w=p+a,x=e[w*2],b=e[w*2+1];x===y&&b===m&&g=i||on(x,b))v=y,d=m;else{A=x-u,D=b-f;var P=y-u,R=x-y,E=m-f,N=b-m,k=void 0,B=void 0;if(s==="x"){k=Math.abs(P),B=Math.abs(R);var F=A>0?1:-1;v=y-F*k*o,d=m,L=y+F*B*o,I=m}else if(s==="y"){k=Math.abs(E),B=Math.abs(N);var H=D>0?1:-1;v=y,d=m-H*k*o,L=y,I=m+H*B*o}else k=Math.sqrt(P*P+E*E),B=Math.sqrt(R*R+N*N),M=B/(B+k),v=y-A*o*(1-M),d=m-D*o*(1-M),L=y+A*o*M,I=m+D*o*M,L=ti(L,ei(x,y)),I=ti(I,ei(b,m)),L=ei(L,ti(x,y)),I=ei(I,ti(b,m)),A=L-y,D=I-m,v=y-A*k/B,d=m-D*k/B,v=ti(v,ei(u,y)),d=ti(d,ei(f,m)),v=ei(v,ti(u,y)),d=ei(d,ti(f,m)),A=y-v,D=m-d,L=y+A*B/k,I=m+D*B/k}r.bezierCurveTo(h,c,v,d,y,m),h=L,c=I}else r.lineTo(y,m)}u=y,f=m,p+=a}return g}var Vx=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),fP=function(r){O(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Vx},e.prototype.buildPath=function(t,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&on(n[o*2-2],n[o*2-1]);o--);for(;a=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[t,S]:[S,t]}s=v,l=d;break;case o.C:v=a[h++],d=a[h++],p=a[h++],g=a[h++],y=a[h++],m=a[h++];var w=u?al(s,v,p,y,t,f):al(l,d,g,m,t,f);if(w>0)for(var x=0;x=0){var S=u?Bt(l,d,g,m,b):Bt(s,v,p,y,b);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(ht),hP=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(Vx),vP=function(r){O(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new hP},e.prototype.buildPath=function(t,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&on(n[s*2-2],n[s*2-1]);s--);for(;oe){a?t.push(o(a,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),a=l}return t}function pP(r,e,t){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&e.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=e.getAxis(n),u=G(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=dP(u,n==="x"?t.getWidth():t.getHeight()),v=c.length;if(!v&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var d=10,p=c[0].coord-d,g=c[v-1].coord+d,y=g-p;if(y<.001)return"transparent";C(c,function(_){_.offset=(_.coord-p)/y}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var m=new eu(0,0,0,0,c,!0);return m[n]=p,m[n+"2"]=g,m}}}function gP(r,e,t){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(n&&yP(a,e))){var o=e.mapDimension(a.dim),s={};return C(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function yP(r,e){var t=r.getExtent(),i=Math.abs(t[1]-t[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=e.count(),a=Math.max(1,Math.round(n/5)),o=0;oi)return!1;return!0}function mP(r,e){return isNaN(r)||isNaN(e)}function _P(r){for(var e=r.length/2;e>0&&mP(r[e*2-2],r[e*2-1]);e--);return e-1}function ly(r,e){return[r[e*2],r[e*2+1]]}function SP(r,e,t){for(var i=r.length/2,n=t==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function Wx(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var B=d.getState("emphasis").style;B.lineWidth=+d.style.lineWidth+1}at(d).seriesIndex=t.seriesIndex,mr(d,E,N,k);var F=sy(t.get("smooth")),H=t.get("smoothMonotone");if(d.setShape({smooth:F,smoothMonotone:H,connectNulls:b}),p){var X=s.getCalculationInfo("stackedOnSeries"),tt=0;p.useStyle(q(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),X&&(tt=sy(X.get("smooth"))),p.setShape({smooth:F,stackedOnSmooth:tt,smoothMonotone:H,connectNulls:b}),yi(p,t,"areaStyle"),at(p).seriesIndex=t.seriesIndex,mr(p,E,N,k)}var st=this._changePolyState;s.eachItemGraphicEl(function(vt){vt&&(vt.onHoverStateChange=st)}),this._polyline.onHoverStateChange=st,this._data=s,this._coordSys=a,this._stackedOnPoints=w,this._points=f,this._step=A,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,d),p&&this.packEventData(t,p))},e.prototype.packEventData=function(t,i){at(i).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,i,n,a){var o=t.getData(),s=un(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=t.get("zlevel")||0,v=t.get("z")||0;u=new Vc(o,s),u.x=f,u.y=h,u.setZ(c,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Wt.prototype.highlight.call(this,t,i,n,a)},e.prototype.downplay=function(t,i,n,a){var o=t.getData(),s=un(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Wt.prototype.downplay.call(this,t,i,n,a)},e.prototype._changePolyState=function(t){var i=this._polygon;Wh(this._polyline,t),i&&Wh(i,t)},e.prototype._newPolyline=function(t){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new fP({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(t,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new vP({shape:{points:t,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");J(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=J(h)?h(null):h;t.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,w=i.pointToCoord(g);a?(y=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(y=S.r0,m=S.r,_=w[0])}else{var x=n;a?(y=x.x,m=x.x+x.width,_=v.x):(y=x.y+x.height,m=x.y,_=v.y)}var b=m===y?0:(_-y)/(m-y);l&&(b=1-b);var T=J(h)?h(d):f*b+c,M=p.getSymbolPath(),A=M.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),M.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,i,n){var a=t.getModel("endLabel");if(Wx(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new pt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=_P(l);f>=0&&(Ur(s,Xr(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?Ox(o,v):xu(o,h)},enableTextSetter:!0},xP(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,i,n,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=n.getLayout("points"),c=n.hostModel,v=c.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=i.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,w=(y?p:0)*(m?-1:1),x=(y?0:-p)*(m?-1:1),b=y?"x":"y",T=SP(h,S,b),M=T.range,A=M[1]-M[0],D=void 0;if(A>=1){if(A>1&&!v){var L=ly(h,M[0]);u.attr({x:L[0]+w,y:L[1]+x}),o&&(D=c.getRawValue(M[0]))}else{var L=f.getPointOn(S,b);L&&u.attr({x:L[0]+w,y:L[1]+x});var I=c.getRawValue(M[0]),P=c.getRawValue(M[1]);o&&(D=z_(n,d,I,P,T.t))}a.lastFrameIndex=M[0]}else{var R=t===1||a.lastFrameIndex>0?M[0]:0,L=ly(h,R);o&&(D=c.getRawValue(R)),u.attr({x:L[0]+w,y:L[1]+x})}if(o){var E=va(u);typeof E.setLabelText=="function"&&E.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,i,n,a,o,s,l){var u=this._polyline,f=this._polygon,h=t.hostModel,c=uP(this._data,t,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,p=c.next,g=c.stackedOnNext;if(o&&(d=ri(c.stackedOnCurrent,c.current,n,o,l),v=ri(c.current,null,n,o,l),g=ri(c.stackedOnNext,c.next,n,o,l),p=ri(c.next,null,n,o,l)),oy(v,p)>3e3||f&&oy(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=c.current,u.shape.points=v;var y={shape:{points:p}};c.current!==v&&(y.shape.__points=c.next),u.stopAnimation(),Mt(u,y,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),Mt(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=c.status,S=0;S<_.length;S++){var w=_[S].cmd;if(w==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var b=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=i.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"?e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v)):a==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/v));var d=void 0;W(a)?d=bP[a]:J(a)&&(d=a),d&&e.setData(n.downSample(n.mapDimension(u.dim),1/v,d,TP))}}}}}function UN(r){r.registerChartView(wP),r.registerSeriesModel(aP),r.registerLayout(Gc("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Yx("line"))}var Lo=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return pu(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(n)C(a.getAxes(),function(c,v){if(c.type==="category"&&i!=null){var d=c.getTicksCoords(),p=c.getTickModel().get("alignWithLabel"),g=o[v],y=i[v]==="x1"||i[v]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,w=0;wg){_=(x+m)/2;break}w===1&&(S=b-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=c.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(ne);ne.registerClass(Lo);var CP=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return pu(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>t&&(t=i),t},e.prototype.brushSelector=function(t,i,n){return n.rect(i.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=_i(Lo.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Lo),MP=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Pl=function(r){O(e,r);function e(t){var i=r.call(this,t)||this;return i.type="sausage",i}return e.prototype.getDefaultShape=function(){return new MP},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,f=i.startAngle,h=i.endAngle,c=i.clockwise,v=Math.PI*2,d=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,i,n,a){if(this._isOrderChangedWithinSameData(t,i,n)){var o=this._dataSort(t,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,i,n){var a=i.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(t,i){this._clear(this._model),this._removeOnRenderedListener(i)},e.prototype.dispose=function(t,i){this._removeOnRenderedListener(i)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var i=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){pl(a,t,at(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Wt),uy={cartesian2d:function(r,e){var t=e.width<0?-1:1,i=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,a=r.y+r.height,o=Gf(e.x,r.x),s=Hf(e.x+e.width,n),l=Gf(e.y,r.y),u=Hf(e.y+e.height,a),f=sn?s:o,e.y=h&&l>a?u:l,e.width=f?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),f||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}var n=Hf(e.r,r.r),a=Gf(e.r0,r.r0);e.r=n,e.r0=a;var o=n-a<0;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}return o}},fy={cartesian2d:function(r,e,t,i,n,a,o,s,l){var u=new gt({shape:z({},i),z2:1});if(u.__dataIndex=t,u.name="item",a){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,e,t,i,n,a,o,s,l){var u=!n&&l?Pl:ge,f=new u({shape:i,z2:1});f.name="item";var h=Ux(n);if(f.calculateTextPosition=AP(h,{isRoundCap:u===Pl}),a){var c=f.shape,v=n?"r":"endAngle",d={};c[v]=n?i.r0:i.startAngle,d[v]=i[v],(s?Mt:kt)(f,{shape:d},a)}return f}};function PP(r,e){var t=r.get("realtimeSort",!0),i=e.getBaseAxis();if(t&&i.type==="category"&&e.type==="cartesian2d")return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function hy(r,e,t,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?Mt:kt)(t,{shape:l},e,n,null);var f=e?r.baseAxis.model:null;(o?Mt:kt)(t,{shape:u},f,n)}function vy(r,e){for(var t=0;t0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,e,t){var i=r.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function kP(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Ux(r){return function(e){var t=e?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+t;default:return i}}}(r)}function dy(r,e,t,i,n,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var f=r.shape,h=Qa(i.getModel("itemStyle"),f,!0);z(f,h),r.setShape(f)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=i.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=Xr(i);Ur(r,d,{labelFetcher:a,labelDataIndex:t,defaultText:xu(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var g=i.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,DP(r,g==="outside"?v:g,Ux(o),i.get(["label","rotate"]))}C1(p,d,a.getRawValue(t),function(m){return Ox(e,m)});var y=i.getModel(["emphasis"]);mr(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),yi(r,i),kP(n)&&(r.style.fill="none",r.style.stroke="none",C(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function OP(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,a)}var BP=function(){function r(){}return r}(),py=function(r){O(e,r);function e(t){var i=r.call(this,t)||this;return i.type="largeBar",i}return e.prototype.getDefaultShape=function(){return new BP},e.prototype.buildPath=function(t,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function NP(r,e,t){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=a.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function Xx(r,e,t){if(Fc(t,"cartesian2d")){var i=e,n=t.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=t.getArea(),a=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function zP(r,e,t){var i=r.type==="polar"?ge:gt;return new i({shape:Xx(e,t,r),silent:!0,z2:0})}function XN(r){r.registerChartView(IP),r.registerSeriesModel(CP),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,dt(lx,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ux("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Yx("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var my=Math.PI*2,As=Math.PI/180;function Zx(r,e){return ye(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function $x(r,e){var t=Zx(r,e),i=r.get("center"),n=r.get("radius");V(n)||(n=[0,n]);var a=Z(t.width,e.getWidth()),o=Z(t.height,e.getHeight()),s=Math.min(a,o),l=Z(n[0],s/2),u=Z(n[1],s/2),f,h,c=r.coordinateSystem;if(c){var v=c.dataToPoint(i);f=v[0]||0,h=v[1]||0}else V(i)||(i=[i,i]),f=Z(i[0],a)+t.x,h=Z(i[1],o)+t.y;return{cx:f,cy:h,r0:l,r:u}}function VP(r,e,t){e.eachSeriesByType(r,function(i){var n=i.getData(),a=n.mapDimension("value"),o=Zx(i,t),s=$x(i,t),l=s.cx,u=s.cy,f=s.r,h=s.r0,c=-i.get("startAngle")*As,v=i.get("endAngle"),d=i.get("padAngle")*As;v=v==="auto"?c-my:-v*As;var p=i.get("minAngle")*As,g=p+d,y=0;n.each(a,function(N){!isNaN(N)&&y++});var m=n.getSum(a),_=Math.PI/(m||y)*2,S=i.get("clockwise"),w=i.get("roseType"),x=i.get("stillShowZeroSum"),b=n.getDataExtent(a);b[0]=0;var T=S?1:-1,M=[c,v],A=T*d/2;tc(M,!S),c=M[0],v=M[1];var D=qx(i);D.startAngle=c,D.endAngle=v,D.clockwise=S;var L=Math.abs(v-c),I=L,P=0,R=c;if(n.setLayout({viewRect:o,r:f}),n.each(a,function(N,k){var B;if(isNaN(N)){n.setItemLayout(k,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:h,r:w?NaN:f});return}w!=="area"?B=m===0&&x?_:N*_:B=L/y,BB?(H=R+T*B/2,X=H):(H=R+A,X=F-A),n.setItemLayout(k,{angle:B,startAngle:H,endAngle:X,clockwise:S,cx:l,cy:u,r0:h,r:w?_t(N,b,[h,f]):f}),R=F}),It?y:g,w=Math.abs(_.label.y-t);if(w>=S.maxY){var x=_.label.x-e-_.len2*n,b=i+_.len,T=Math.abs(x)r.unconstrainedWidth?null:v:null;i.setStyle("width",d)}var p=i.getBoundingRect();a.width=p.width;var g=(i.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-h)/2}}}function Wf(r){return r.position==="center"}function HP(r){var e=r.getData(),t=[],i,n,a=!1,o=(r.get("minShowLabelAngle")||0)*FP,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,c=s.height;function v(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var b in x.states)if(x.states[b].ignore===!1)return!0;return!1}e.each(function(x){var b=e.getItemGraphicEl(x),T=b.shape,M=b.getTextContent(),A=b.getTextGuideLine(),D=e.getItemModel(x),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=Z(L.get("edgeDistance"),u),N=L.get("bleedMargin"),k=D.getModel("labelLine"),B=k.get("length");B=Z(B,u);var F=k.get("length2");if(F=Z(F,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":X>0?"left":"right"}var Zr=Math.PI,Tr=0,ya=L.get("rotate");if(bt(ya))Tr=ya*(Zr/180);else if(I==="center")Tr=0;else if(ya==="radial"||ya===!0){var Ib=X<0?-H+Zr:-H;Tr=Ib}else if(ya==="tangential"&&I!=="outside"&&I!=="outer"){var mn=Math.atan2(X,tt);mn<0&&(mn=Zr*2+mn);var Pb=tt>0;Pb&&(mn=Zr+mn),Tr=mn-Zr}if(a=!!Tr,M.x=st,M.y=vt,M.rotation=Tr,M.setStyle({verticalAlign:"middle"}),Yt){M.setStyle({align:oe});var Mu=M.states.select;Mu&&(Mu.x+=M.x,Mu.y+=M.y)}else{var ma=M.getBoundingRect().clone();ma.applyTransform(M.getComputedTransform());var hd=(M.style.margin||0)+2.1;ma.y-=hd/2,ma.height+=hd,t.push({label:M,labelLine:A,position:I,len:B,len2:F,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new Q(X,tt),linePoints:Ot,textAlign:oe,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:N,rect:ma,unconstrainedWidth:ma.width,labelStyleWidth:M.style.width})}b.setTextConfig({inside:Yt})}}),!a&&r.get("avoidLabelOverlap")&&GP(t,i,n,l,u,c,f,h);for(var p=0;p0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=a.r0}},e.type="pie",e}(Wt);function wu(r,e,t){e=V(e)&&{coordDimensions:e}||z({encodeDefine:r.getEncode()},e);var i=r.getSource(),n=rx(i,e).dimensions,a=new Rc(n,r);return a.initData(i,t),a}var Qx=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var i=this._getDataWithEncodedVisual();return i.getItemVisual(e,t)},r}(),UP=mt(),XP=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Qx(Y(this.getData,this),Y(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return wu(this,{coordDimensions:["value"],encodeDefaulter:dt($1,this)})},e.prototype.getDataParams=function(t){var i=this.getData(),n=UP(i),a=n.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=n.seats=pC(o,i.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=a[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){vl(t,"labelLine",["show"]);var i=t.labelLine,n=t.emphasis.labelLine;i.show=i.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ne);function ZP(r){return{seriesType:r,reset:function(e,t){var i=e.getData();i.filterSelf(function(n){var a=i.mapDimension("value"),o=i.get(a,n);return!(bt(o)&&!isNaN(o)&&o<0)})}}}function ZN(r){r.registerChartView(YP),r.registerSeriesModel(XP),LS("pie",r.registerAction),r.registerLayout(dt(VP,"pie")),r.registerProcessor(Kx("pie")),r.registerProcessor(ZP("pie"))}var $P=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return pu(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,i,n){return n.point(i.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(ne),jx=4,qP=function(){function r(){}return r}(),KP=function(r){O(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.getDefaultShape=function(){return new qP},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,i){var n=i.points,a=i.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&a[0]=0;u--){var f=u*2,h=a[f]-s/2,c=a[f+1]-l/2;if(t>=h&&i>=c&&t<=h+s&&i<=c+l)return u}return-1},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=n[0],i=n[1],a.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,n=i.points,a=i.size,o=a[0],s=a[1],l=1/0,u=1/0,f=-1/0,h=-1/0,c=0;c=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),QP=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,n){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,i,n){this._symbolDraw.incrementalUpdate(t,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=t.end===i.getData().count()},e.prototype.updateTransform=function(t,i,n){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Gc("").reset(t,i,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var i=t.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,i){var n=this._symbolDraw,a=i.pipelineContext,o=a.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new JP:new Bx,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Wt),jP=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(ft),dv=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Nt).models[0]},e.type="cartesian2dAxis",e}(ft);ae(dv,Su);var tw={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},tR=j({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},tw),Hc=j({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},tw),eR=j({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Hc),rR=q({logBase:10},Hc);const ew={category:tR,value:Hc,time:eR,log:rR};var iR={value:1,category:1,time:1,log:1};function Io(r,e,t,i){C(iR,function(n,a){var o=j(j({},ew[a],!0),i,!0),s=function(l){O(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=xo(this),v=c?da(f):{},d=h.getTheme();j(f,d.get(a+"Axis")),j(f,this.getDefaultOption()),f.type=Sy(f),c&&mi(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=hv.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",Sy)}function Sy(r){return r.type||(r.data?"category":"value")}var nR=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),wt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),pv=["x","y"];function xy(r){return r.type==="interval"||r.type==="time"}var aR=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=pv,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!xy(t)||!xy(i))){var n=t.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-n[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=la([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,i){var n=this.dataToPoint(t),a=this.dataToPoint(i),o=this.getArea(),s=new ot(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,i,n){n=n||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ht(n,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},e.prototype.clampData=function(t,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(t[0]),u=a.parse(t[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},e.prototype.pointToData=function(t,i){var n=[];if(this._invTransform)return Ht(n,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(t[0]),i),n[1]=o.coordToData(o.toLocalCoord(t[1]),i),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-t,o=Math.min(n[0],n[1])-t,s=Math.max(i[0],i[1])-a+t,l=Math.max(n[0],n[1])-o+t;return new ot(a,o,s,l)},e}(nR),oR=function(r){O(e,r);function e(t,i,n,a,o){var s=r.call(this,t,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),t&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(t,i){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(br);function gv(r,e,t){t=t||{};var i=r.coordinateSystem,n=e.axis,a={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,f=i.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=e.get("offset")||0,d=u==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(p,d[1]),d[0])}a.position=[u==="y"?d[c[l]]:h[0],u==="x"?d[c[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?d[c[s]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),di(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function wy(r){return r.get("coordinateSystem")==="cartesian2d"}function by(r){var e={xAxisModel:null,yAxisModel:null};return C(e,function(t,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,Nt).models[0];e[i]=a}),e}var Yf=Math.log;function rw(r,e,t){var i=Gr.prototype,n=i.getTicks.call(t),a=i.getTicks.call(t,!0),o=n.length-1,s=i.getInterval.call(t),l=dx(r,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var c=Yf(r.base);u=[Yf(u[0])/c,Yf(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=i.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var d=i.getInterval.call(r),p=u[0],g=u[1];if(f&&h)d=(g-p)/o;else if(f)for(g=u[0]+d*o;gu[0]&&isFinite(p)&&isFinite(u[0]);)d=Ef(d),p=u[1]-d*o;else{var y=r.getTicks().length-1;y>o&&(d=Ef(d));var m=d*o;g=Math.ceil(u[1]/d)*d,p=It(g-m),p<0&&u[0]>=0?(p=0,g=It(m)):g>0&&u[1]<=0&&(g=0,p=-It(m))}var _=(n[0].value-a[0].value)/s,S=(n[o].value-a[o].value)/s;i.setExtent.call(r,p+d*_,g+d*S),i.setInterval.call(r,d),(_||S)&&i.setNiceExtent.call(r,p+d,g-d)}var sR=function(){function r(e,t,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=pv,this._initCartesian(e,t,i),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=yt(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var c=+l[h],v=o[c],d=v.model,p=v.scale;vv(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(Ao(p,d),vv(p)&&(s=v))}f.length&&(s||(s=f.pop(),Ao(s.scale,s.model)),C(f,function(g){rw(g.scale,g.model,s.scale)}))}}n(i.x),n(i.y);var a={};C(i.x,function(o){Ty(i,"y",o,a)}),C(i.y,function(o){Ty(i,"x",o,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,i){var n=e.getBoxLayoutParams(),a=!i&&e.get("containLabel"),o=ye(n,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(C(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=DI(u);if(f){var h=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,u.position==="top"?o.y+=f.height+c:u.position==="left"&&(o.x+=f.width+c)}}}),l()),C(this._coordsList,function(u){u.calcAffineTransform()});function l(){C(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(h[c],h[1-c]),lR(u,f?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var i=this._axesMap[e];if(i!=null)return i[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var i="x"+e+"y"+t;return this._coordsMap[i]}$(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,a=this._coordsList;n0?"top":"bottom",a="center"):fl(n-fi)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),My={axisLine:function(r,e,t,i){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var a=e.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Ht(s,s,o),Ht(l,l,o));var f=z({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Gt({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});_o(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var c=e.get(["axisLine","symbol"]);if(c!=null){var v=e.get(["axisLine","symbolSize"]);W(c)&&(c=[c,c]),(W(v)||bt(v))&&(v=[v,v]);var d=cu(e.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];C([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(c[m]!=="none"&&c[m]!=null){var _=Vt(c[m],-p/2,-g/2,p,g,f.stroke,!0),S=y.r+y.offset,w=u?l:s;_.attr({rotation:y.rotate,x:w[0]+S*Math.cos(r.rotation),y:w[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,i){var n=hR(t,i,e,r),a=cR(t,i,e,r);if(fR(e,a,n),vR(t,i,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=Px(G(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));kx(o)}},axisName:function(r,e,t,i){var n=di(r.axisName,e.get("name"));if(n){var a=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,Dy(a)?r.labelOffset+o*l:0],c,v=e.get("nameRotate");v!=null&&(v=v*fi/180);var d;Dy(a)?c=de.innerTextLayout(r.rotation,v??r.rotation,o):(c=uR(r.rotation,a,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=di(r.nameTruncateMaxWidth,g.maxWidth,d),_=new pt({x:h[0],y:h[1],rotation:c.rotation,silent:de.isLabelSilent(e),style:Dt(s,{text:n,font:p,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(pn({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var S=de.makeAxisEventDataBase(e);S.targetType="axisName",S.name=n,at(_).eventData=S}i.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function uR(r,e,t,i){var n=L_(t-r),a,o,s=i[0]>i[1],l=e==="start"&&!s||e!=="start"&&s;return fl(n-fi/2)?(o=l?"bottom":"top",a="center"):fl(n-fi*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",nfi/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function fR(r,e,t){if(!px(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],h=t[t.length-1],c=t[t.length-2];i===!1?(Te(a),Te(u)):Ay(a,o)&&(i?(Te(o),Te(f)):(Te(a),Te(u))),n===!1?(Te(s),Te(h)):Ay(l,s)&&(n?(Te(l),Te(c)):(Te(s),Te(h)))}}function Te(r){r&&(r.ignore=!0)}function Ay(r,e){var t=r&&r.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!t||!i)){var n=Ul([]);return dn(n,n,-r.rotation),t.applyTransform(Br([],n,r.getLocalTransform())),i.applyTransform(Br([],n,e.getLocalTransform())),t.intersect(i)}}function Dy(r){return r==="middle"||r==="center"}function iw(r,e,t,i,n){for(var a=[],o=[],s=[],l=0;l=0||r===e}function _R(r){var e=Wc(r);if(e){var t=e.axisPointerModel,i=e.axis.scale,n=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=i.parse(o));var s=yv(t);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=q({color:d.color},l));var g=j(K(d),{boundaryGap:t,splitNumber:i,scale:n,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:p,triggerEvent:c},!1);if(W(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else J(f)&&(g.name=f(g.name,g));var m=new Ct(g,null,this.ecModel);return ae(m,Su.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:j({lineStyle:{color:"#bbb"}},za.axisLine),axisLabel:Ds(za.axisLabel,!1),axisTick:Ds(za.axisTick,!1),splitLine:Ds(za.splitLine,!0),splitArea:Ds(za.splitArea,!0),indicator:[]},e}(ft),ER=["axisLine","axisTickLabel","axisName"],kR=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var i=t.coordinateSystem,n=i.getIndicatorAxes(),a=G(n,function(o){var s=o.model.get("showName")?o.name:"",l=new de(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});C(a,function(o){C(ER,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var i=t.coordinateSystem,n=i.getIndicatorAxes();if(!n.length)return;var a=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),c=l.get("color"),v=u.get("color"),d=V(c)?c:[c],p=V(v)?v:[v],g=[],y=[];function m(R,E,N){var k=N%E.length;return R[k]=R[k]||[],k}if(a==="circle")for(var _=n[0].getTicksCoords(),S=i.cx,w=i.cy,x=0;x<_.length;x++){if(f){var b=m(g,d,x);g[b].push(new Yr({shape:{cx:S,cy:w,r:_[x].coord}}))}if(h&&x<_.length-1){var b=m(y,p,x);y[b].push(new Vo({shape:{cx:S,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,M=G(n,function(R,E){var N=R.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),G(N,function(k){return i.coordToPoint(k.coord,E)})}),A=[],x=0;x<=T;x++){for(var D=[],L=0;L3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;Zf(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(a),c=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);Zf(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!ky(this._zr,"globalPan")){var i=t.pinchScale>1?1.1:1/1.1;Zf(this,"zoom",null,t,{scale:i,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(Be);function Zf(r,e,t,i,n){r.pointerChecker&&r.pointerChecker(i,n.originX,n.originY)&&(Vr(i.event),lw(r,e,t,i,n))}function lw(r,e,t,i,n){n.isAvailableBehavior=Y(Qs,null,t,i),r.trigger(e,n)}function Qs(r,e,t){var i=t[r];return!r||i&&(!W(i)||e.event[i+"Key"])}function FR(r,e,t){var i=r.target;i.x+=e,i.y+=t,i.dirty()}function GR(r,e,t,i){var n=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(i-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var HR={axisPointer:1,tooltip:1,brush:1};function uw(r,e,t){var i=e.getComponentByElement(r.topTarget),n=i&&i.coordinateSystem;return i&&i!==t&&!HR.hasOwnProperty(i.mainType)&&n&&n.model!==t}function fw(r){if(W(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var $f,Rl={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Oy=yt(Rl),El={"alignment-baseline":"textBaseline","stop-color":"stopColor"},By=yt(El),WR=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var i=fw(e);this._defsUsePending=[];var n=new it;this._root=n;var a=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Se(i,n,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,n,a,null,!1,!1),u=u.nextSibling;XR(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var c=bu(o);c.length>=4&&(f={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(f&&s!=null&&l!=null&&(h=vw(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var v=n;n=new it,n.add(v),v.scaleX=v.scaleY=h.scale,v.x=h.x,v.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new gt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:a}},r.prototype._parseNode=function(e,t,i,n,a,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!a){var f=$f[s];if(f&&rt($f,s)){l=f.call(this,e,t);var h=e.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:l};i.push(c),s==="g"&&(u=c)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var v=Ny[s];if(v&&rt(Ny,s)){var d=v.call(this,e),p=e.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,i,u,a,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var i=new go({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Ce(t,i),Se(e,i,this._defsUsePending,!1,!1),YR(i,t);var n=i.style,a=n.fontSize;a&&a<9&&(n.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=i.getBoundingRect();return this._textX+=s.width,t.add(i),i},r.internalField=function(){$f={g:function(e,t){var i=new it;return Ce(t,i),Se(e,i,this._defsUsePending,!1,!1),i},rect:function(e,t){var i=new gt;return Ce(t,i),Se(e,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(e,t){var i=new Yr;return Ce(t,i),Se(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),i.silent=!0,i},line:function(e,t){var i=new Gt;return Ce(t,i),Se(e,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(e,t){var i=new jl;return Ce(t,i),Se(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(e,t){var i=e.getAttribute("points"),n;i&&(n=Fy(i));var a=new Qe({shape:{points:n||[]},silent:!0});return Ce(t,a),Se(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var i=e.getAttribute("points"),n;i&&(n=Fy(i));var a=new Ne({shape:{points:n||[]},silent:!0});return Ce(t,a),Se(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var i=new _e;return Ce(t,i),Se(e,i,this._defsUsePending,!1,!1),i.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),i.silent=!0,i},text:function(e,t){var i=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var s=new it;return Ce(t,s),Se(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var i=e.getAttribute("x"),n=e.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),n!=null&&(this._textY=parseFloat(n));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new it;return Ce(t,s),Se(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,t){var i=e.getAttribute("d")||"",n=f1(i);return Ce(t,n),Se(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),Ny={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),i=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),a=new eu(e,t,i,n);return zy(r,a),Vy(r,a),a},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),i=parseInt(r.getAttribute("r")||"0",10),n=new p1(e,t,i);return zy(r,n),Vy(r,n),n}};function zy(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function Vy(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var i=t.getAttribute("offset"),n=void 0;i&&i.indexOf("%")>0?n=parseInt(i,10)/100:i?n=parseFloat(i):n=0;var a={};hw(t,a,a);var o=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function Ce(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),q(e.__inheritedStyle,r.__inheritedStyle))}function Fy(r){for(var e=bu(r),t=[],i=0;i0;a-=2){var o=i[a],s=i[a-1],l=bu(o);switch(n=n||$e(),s){case"translate":pi(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":l_(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":dn(n,n,-parseFloat(l[0])*qf,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*qf);Br(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*qf);Br(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var Hy=/([^\s:;]+)\s*:\s*([^:;]+)/g;function hw(r,e,t){var i=r.getAttribute("style");if(i){Hy.lastIndex=0;for(var n;(n=Hy.exec(i))!=null;){var a=n[1],o=rt(Rl,a)?Rl[a]:null;o&&(e[o]=n[2]);var s=rt(El,a)?El[a]:null;s&&(t[s]=n[2])}}}function KR(r,e,t){for(var i=0;i0,g={api:i,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:c};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,i),this._updateMapSelectHandler(e,u,i,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=U(),i=U(),n=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(v,d){return d&&(v=d(v)),v&&[v[0]*a.scaleX+a.x,v[1]*a.scaleY+a.y]}function h(v){for(var d=[],p=!u&&l&&l.project,g=0;g=0)&&(c=n);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Ur(e,Xr(i),{labelFetcher:c,labelDataIndex:h,defaultText:t},v);var d=e.getTextContent();if(d&&(cw(d).ignore=d.ignore,e.textConfig&&o)){var p=e.getBoundingRect().clone();e.textConfig.layoutRect=p,e.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Zy(r,e,t,i,n,a){r.data?r.data.setItemGraphicEl(a,e):at(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:i&&i.option||{}}}function $y(r,e,t,i,n){r.data||pn({el:e,componentModel:n,itemName:t,itemTooltipOption:i.get("tooltip")})}function qy(r,e,t,i,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var a=i.getModel("emphasis"),o=a.get("focus");return mr(e,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&ZM(e,n,t),o}function Ky(r,e,t){var i=[],n;function a(){n=[]}function o(){n.length&&(i.push(n),n=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),C(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(ne);function gE(r,e){var t={};return C(r,function(i){i.each(i.mapDimension("value"),function(n,a){var o="ec-"+i.getName(a);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(i,n){for(var a="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[a].length,f=0;f1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var w=r.getBoxLayoutParams();w.aspect=g,S=ye(w,{width:d,height:p})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function SE(r,e){C(e.get("geoCoord"),function(t,i){r.addGeoCoord(i,t)})}var xE=function(){function r(){this.dimensions=gw}return r.prototype.create=function(e,t){var i=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Sv(l+s,l,z({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=tm,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),C(a,function(o,s){var l=G(o,function(f){return f.get("nameMap")}),u=new Sv(s,s,z({nameMap:Ub(l)},n(o[0])));u.zoomLimit=di.apply(null,G(o,function(f){return f.get("scaleLimit")})),i.push(u),u.resize=tm,u.resize(o[0],t),C(o,function(f){f.coordinateSystem=u,SE(u,f)})}),i},r.prototype.getFilledRegions=function(e,t,i,n){for(var a=(e||[]).slice(),o=U(),s=0;s=0;a--)i[a]==null&&(delete t[e[a]],e.pop())}function Kf(r,e){var t=r.visual,i=[];$(t)?Ro(t,function(a){i.push(a)}):t!=null&&i.push(t);var n={color:1,symbol:1};!e&&i.length===1&&!n.hasOwnProperty(r.type)&&(i[1]=i[0]),mw(r,i)}function Is(r){return{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);i("color",r(t("color"),n))},_normalizedToVisual:xv([0,1])}}function rm(r){var e=this.option.visual;return e[Math.round(_t(r,[0,1],[0,e.length-1],!0))]||{}}function Fa(r){return function(e,t,i){i(r,this.mapValueToVisual(e))}}function ja(r){var e=this.option.visual;return e[this.option.loop&&r!==kl?r%e.length:r]}function Yi(){return this.option.visual[0]}function xv(r){return{linear:function(e){return _t(e,r,this.option.visual,!0)},category:ja,piecewise:function(e,t){var i=wv.call(this,t);return i==null&&(i=_t(e,r,this.option.visual,!0)),i},fixed:Yi}}function wv(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var i=Qt.findPieceIndex(r,t),n=t[i];if(n&&n.visual)return n.visual[this.type]}}function mw(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=G(e,function(t){var i=Ee(t);return i||[0,0,0,1]})),e}var IE={linear:function(r){return _t(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Qt.findPieceIndex(r,e,!0);if(t!=null)return _t(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??kl},fixed:Jt};function Ps(r,e,t){return r?e<=t:e=o/3?1:2),f=i.y-a(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(i.x+n(l)*s,i.y+a(l)*s),t.lineTo(i.x+n(i.angle)*o,i.y+a(i.angle)*o),t.lineTo(i.x-n(l)*s,i.y-a(l)*s),t.lineTo(u,f)},e}(ht);function EE(r,e){var t=r.get("center"),i=e.getWidth(),n=e.getHeight(),a=Math.min(i,n),o=Z(t[0],e.getWidth()),s=Z(t[1],e.getHeight()),l=Z(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Rs(r,e){var t=r==null?"":r+"";return e&&(W(e)?t=e.replace("{value}",t):J(e)&&(t=e(r))),t}var kE=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),o=EE(t,n);this._renderMain(t,i,n,a,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,i,n,a,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),c=h.get("roundCap"),v=c?Pl:ge,d=h.get("show"),p=h.getModel("lineStyle"),g=p.get("width"),y=[u,f];tc(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],w=0;d&&w=M&&(A===0?0:a[A-1][0])Math.PI/2&&(st+=Math.PI)):tt==="tangential"?st=-T-Math.PI/2:bt(tt)&&(st=tt*Math.PI/180),st===0?h.add(new pt({style:Dt(_,{text:B,x:H,y:X,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:F}),silent:!0})):h.add(new pt({style:Dt(_,{text:B,x:H,y:X,verticalAlign:"middle",align:"center"},{inheritColor:F}),silent:!0,originX:H,originY:X,rotation:st}))}if(m.get("show")&&E!==S){var N=m.get("distance");N=N?N+f:f;for(var vt=0;vt<=w;vt++){P=Math.cos(T),R=Math.sin(T);var Ot=new Gt({shape:{x1:P*(d-N)+c,y1:R*(d-N)+v,x2:P*(d-b-N)+c,y2:R*(d-b-N)+v},silent:!0,style:L});L.stroke==="auto"&&Ot.setStyle({stroke:a((E+vt/w)/S)}),h.add(Ot),T+=A}T-=A}else T+=M}},e.prototype._renderPointer=function(t,i,n,a,o,s,l,u,f){var h=this.group,c=this._data,v=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),w=+t.get("max"),x=[S,w],b=[s,l];function T(A,D){var L=m.getItemModel(A),I=L.getModel("pointer"),P=Z(I.get("width"),o.r),R=Z(I.get("length"),o.r),E=t.get(["pointer","icon"]),N=I.get("offsetCenter"),k=Z(N[0],o.r),B=Z(N[1],o.r),F=I.get("keepAspect"),H;return E?H=Vt(E,k-P/2,B-R,P,R,null,F):H=new RE({shape:{angle:-Math.PI/2,width:P,r:R,x:k,y:B}}),H.rotation=-(D+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function M(A,D){var L=g.get("roundCap"),I=L?Pl:ge,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(A+1)*R,N=P?o.r:o.r-A*R,k=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:N}});return P&&(k.z2=_t(m.get(_,A),[S,w],[100,0],!0)),k}(y||p)&&(m.diff(c).add(function(A){var D=m.get(_,A);if(p){var L=T(A,s);kt(L,{rotation:-((isNaN(+D)?b[0]:_t(D,x,b,!0))+Math.PI/2)},t),h.add(L),m.setItemGraphicEl(A,L)}if(y){var I=M(A,s),P=g.get("clip");kt(I,{shape:{endAngle:_t(D,x,b,P)}},t),h.add(I),Hh(t.seriesIndex,m.dataType,A,I),d[A]=I}}).update(function(A,D){var L=m.get(_,A);if(p){var I=c.getItemGraphicEl(D),P=I?I.rotation:s,R=T(A,P);R.rotation=P,Mt(R,{rotation:-((isNaN(+L)?b[0]:_t(L,x,b,!0))+Math.PI/2)},t),h.add(R),m.setItemGraphicEl(A,R)}if(y){var E=v[D],N=E?E.shape.endAngle:s,k=M(A,N),B=g.get("clip");Mt(k,{shape:{endAngle:_t(L,x,b,B)}},t),h.add(k),Hh(t.seriesIndex,m.dataType,A,k),d[A]=k}}).execute(),m.each(function(A){var D=m.getItemModel(A),L=D.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(p){var E=m.getItemGraphicEl(A),N=m.getItemVisual(A,"style"),k=N.fill;if(E instanceof _e){var B=E.style;E.useStyle(z({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},N))}else E.useStyle(N),E.type!=="pointer"&&E.setColor(k);E.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",a(_t(m.get(_,A),x,[0,1],!0))),E.z2EmphasisLift=0,yi(E,D),mr(E,I,P,R)}if(y){var F=d[A];F.useStyle(m.getItemVisual(A,"style")),F.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,yi(F,D),mr(F,I,P,R)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,i){var n=t.getModel("anchor"),a=n.get("show");if(a){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=Vt(s,i.cx-o/2+Z(l[0],i.r),i.cy-o/2+Z(l[1],i.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,i,n,a,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),h=+t.get("max"),c=new it,v=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new pt({silent:!0}),d[y]=new pt({silent:!0})}).update(function(y,m){v[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new it,w=a(_t(_,[f,h],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var b=x.get("offsetCenter"),T=o.cx+Z(b[0],o.r),M=o.cy+Z(b[1],o.r),A=v[y];A.attr({z2:g?0:2,style:Dt(x,{x:T,y:M,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:w})}),S.add(A)}var D=m.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),I=o.cx+Z(L[0],o.r),P=o.cy+Z(L[1],o.r),R=Z(D.get("width"),o.r),E=Z(D.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:w,A=d[y],k=D.get("formatter");A.attr({z2:g?0:2,style:Dt(D,{x:I,y:P,text:Rs(_,k),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:N})}),C1(A,{normal:D},_,function(F){return Rs(F,k)}),p&&M1(A,y,l,t,{getFormattedLabel:function(F,H,X,tt,st,vt){return Rs(vt?vt.interpolatedValue:_,k)}}),S.add(A)}c.add(S)}),this.group.add(c),this._titleEls=v,this._detailEls=d},e.type="gauge",e}(Wt),OE=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,i){return wu(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ne);function JN(r){r.registerChartView(kE),r.registerSeriesModel(OE)}function BE(r){NE(r),zE(r)}function NE(r){if(!r.parallel){var e=!1;C(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function zE(r){var e=Tt(r.parallelAxis);C(e,function(t){if($(t)){var i=t.parallelIndex||0,n=Tt(r.parallel)[i];n&&n.parallelAxisDefault&&j(t,n.parallelAxisDefault,!1)}})}var VE=5,FE=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this._model=t,this._api=n,this._handlers||(this._handlers={},C(GE,function(a,o){n.getZr().on(o,this._handlers[o]=Y(a,this))},this)),Ho(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,i){bo(this,"_throttledDispatchExpand"),C(this._handlers,function(n,a){i.getZr().off(a,n)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(z({type:"parallelAxisExpand"},t))},e.type="parallel",e}(Pt),GE={mousedown:function(r){Jf(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(Jf(this,"click")&&e){var t=[r.offsetX,r.offsetY],i=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(i>VE)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Jf(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),i=t.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function Jf(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var HE=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var i=this.option;t&&j(i,t,!0),this._initDimensions()},e.prototype.contains=function(t,i){var n=t.get("parallelIndex");return n!=null&&i.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){C(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){t.hasOwnProperty(i)&&(this.option[i]=t[i])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],i=this.parallelAxisIndex=[],n=wt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);C(n,function(a){t.push("dim"+a.get("dim")),i.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(ft),WE=function(r){O(e,r);function e(t,i,n,a,o){var s=r.call(this,t,i,n)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(br);function yn(r,e,t,i,n,a){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=kn(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(e[1]-e[0]);s=kn(s,[0,o]),n=a=kn(s,[n,a]),i=0}e[0]=kn(e[0],t),e[1]=kn(e[1],t);var l=Qf(e,i);e[i]+=r;var u=n||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[i]=kn(e[i],f);var h;return h=Qf(e,i),n!=null&&(h.sign!==l.sign||h.spana&&(e[1-i]=e[i]+h.sign*a),e}function Qf(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function kn(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var jf=C,_w=Math.min,Sw=Math.max,im=Math.floor,YE=Math.ceil,nm=It,UE=Math.PI,XE=function(){function r(e,t,i){this.type="parallel",this._axesMap=U(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,i)}return r.prototype._init=function(e,t,i){var n=e.dimensions,a=e.parallelAxisIndex;jf(n,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new WE(o,Bc(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),i=t.axisBase,n=t.layoutBase,a=t.pixelDimIndex,o=e[1-a],s=e[a];return o>=i&&o<=i+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(i){if(e.contains(i,t)){var n=i.getData();jf(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(n,n.mapDimension(a)),Ao(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=ye(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,i=["x","y"],n=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,f=Es(e.get("axisExpandWidth"),l),h=Es(e.get("axisExpandCount")||0,[0,u]),c=e.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,v=e.get("axisExpandWindow"),d;if(v)d=Es(v[1]-v[0],l),v[1]=v[0]+d;else{d=Es(f*(h-1),l);var p=e.get("axisExpandCenter")||im(u/2);v=[f*p-d/2],v[1]=v[0]+d}var g=(s-d)/(u-h);g<3&&(g=0);var y=[im(nm(v[0]/f,1))+1,YE(nm(v[1]/f,1))-1],m=g/f*v[0];return{layout:a,pixelDimIndex:o,layoutBase:t[i[o]],layoutLength:s,axisBase:t[i[1-o]],axisLength:t[n[1-o]],axisExpandable:c,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),jf(i,function(o,s){var l=(n.axisExpandable?$E:ZE)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:UE/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],c=f[a],v=$e();dn(v,v,c),pi(v,v,h),this._axesLayout[o]={position:h,rotation:c,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,i,n){i==null&&(i=0),n==null&&(n=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];C(o,function(g){s.push(e.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),f=i;fa*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?yn(l,n,o,"all"):u="none";else{var v=n[1]-n[0],d=o[1]*s/v;n=[Sw(0,d-v/2)],n[1]=_w(o[1],n[0]+v),n[0]=n[1]-v}return{axisExpandWindow:n,behavior:u}},r}();function Es(r,e){return _w(Sw(r,e[0]),e[1])}function ZE(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function $E(r,e){var t=e.layoutLength,i=e.axisExpandWidth,n=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,f;return r=0;n--)Pr(i[n])},e.prototype.getActiveState=function(t){var i=this.activeIntervals;if(!i.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(i.length===1){var n=i[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var a=0,o=i.length;ajE}function Aw(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function Dw(r,e,t,i){var n=new it;return n.add(new gt({name:"main",style:qc(t),silent:!0,draggable:!0,cursor:"move",drift:dt(sm,r,e,n,["n","s","w","e"]),ondragend:dt(cn,e,{isEnd:!0})})),C(i,function(a){n.add(new gt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:dt(sm,r,e,n,a),ondragend:dt(cn,e,{isEnd:!0})}))}),n}function Lw(r,e,t,i){var n=i.brushStyle.lineWidth||0,a=ia(n,tk),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,f=t[0][1],h=t[1][1],c=f-a+n/2,v=h-a+n/2,d=f-o,p=h-s,g=d+n,y=p+n;Ar(r,e,"main",o,s,d,p),i.transformable&&(Ar(r,e,"w",l,u,a,y),Ar(r,e,"e",c,u,a,y),Ar(r,e,"n",l,u,g,a),Ar(r,e,"s",l,v,g,a),Ar(r,e,"nw",l,u,a,a),Ar(r,e,"ne",c,u,a,a),Ar(r,e,"sw",l,v,a,a),Ar(r,e,"se",c,v,a,a))}function Cv(r,e){var t=e.__brushOption,i=t.transformable,n=e.childAt(0);n.useStyle(qc(t)),n.attr({silent:!i,cursor:i?"move":"default"}),C([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?Mv(r,a[0]):ok(r,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?rk[s]+"-resize":null})})}function Ar(r,e,t,i,n,a,o){var s=e.childOfName(t);s&&s.setShape(lk(Kc(r,e,[[i,n],[i+a,n+o]])))}function qc(r){return q({strokeNoScale:!0},r.brushStyle)}function Iw(r,e,t,i){var n=[Eo(r,t),Eo(e,i)],a=[ia(r,t),ia(e,i)];return[[n[0],a[0]],[n[1],a[1]]]}function ak(r){return nn(r.group)}function Mv(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=ru(t[e],ak(r));return i[n]}function ok(r,e){var t=[Mv(r,e[0]),Mv(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function sm(r,e,t,i,n,a){var o=t.__brushOption,s=r.toRectRange(o.range),l=Pw(e,n,a);C(i,function(u){var f=ek[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(Iw(s[0][0],s[1][0],s[0][1],s[1][1])),Xc(e,t),cn(e,{isEnd:!1})}function sk(r,e,t,i){var n=e.__brushOption.range,a=Pw(r,t,i);C(n,function(o){o[0]+=a[0],o[1]+=a[1]}),Xc(r,e),cn(r,{isEnd:!1})}function Pw(r,e,t){var i=r.group,n=i.transformCoordToLocal(e,t),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function Kc(r,e,t){var i=Mw(r,e);return i&&i!==vn?i.clipPath(t,r._transform):K(t)}function lk(r){var e=Eo(r[0][0],r[1][0]),t=Eo(r[0][1],r[1][1]),i=ia(r[0][0],r[1][0]),n=ia(r[0][1],r[1][1]);return{x:e,y:t,width:i-e,height:n-t}}function uk(r,e,t){if(!(!r._brushType||hk(r,e.offsetX,e.offsetY))){var i=r._zr,n=r._covers,a=$c(r,e,t);if(!r._dragging)for(var o=0;oi.getWidth()||t<0||t>i.getHeight()}var Tu={lineX:fm(0),lineY:fm(1),rect:{createCover:function(r,e){function t(i){return i}return Dw({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=Aw(r);return Iw(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,i){Lw(r,e,t,i)},updateCommon:Cv,contain:Dv},polygon:{createCover:function(r,e){var t=new it;return t.add(new Ne({name:"main",style:qc(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Qe({name:"main",draggable:!0,drift:dt(sk,r,e),ondragend:dt(cn,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,i){e.childAt(0).setShape({points:Kc(r,e,t)})},updateCommon:Cv,contain:Dv}};function fm(r){return{createCover:function(e,t){return Dw({toRectRange:function(i){var n=[i,[0,100]];return r&&n.reverse(),n},fromRectRange:function(i){return i[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=Aw(e),i=Eo(t[0][r],t[1][r]),n=ia(t[0][r],t[1][r]);return[i,n]},updateCoverShape:function(e,t,i,n){var a,o=Mw(e,t);if(o!==vn&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[i,a];r&&l.reverse(),Lw(e,t,l,n)},updateCommon:Cv,contain:Dv}}function Ew(r){return r=Jc(r),function(e){return x1(e,r)}}function kw(r,e){return r=Jc(r),function(t){var i=e??t,n=i?r.width:r.height,a=i?r.x:r.y;return[a,a+(n||0)]}}function Ow(r,e,t){var i=Jc(r);return function(n,a){return i.contain(a[0],a[1])&&!uw(n,e,t)}}function Jc(r){return ot.create(r)}var vk=["axisLine","axisTickLabel","axisName"],ck=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){r.prototype.init.apply(this,arguments),(this._brushController=new xw(i.getZr())).on("brush",Y(this._onBrush,this))},e.prototype.render=function(t,i,n,a){if(!dk(t,i,a)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new it,this.group.add(this._axisGroup),!!t.get("show")){var s=gk(t,i),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,h=t.axis.dim,c=l.getAxisLayout(h),v=z({strokeContainThreshold:f},c),d=new de(t,v);C(vk,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(v,u,t,s,f,n),iu(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,i,n,a,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=ot.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Ew(h),isTargetByCursor:Ow(h,s,a),getLinearBrushOtherExtent:kw(h,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(pk(n))},e.prototype._onBrush=function(t){var i=t.areas,n=this.axisModel,a=n.axis,o=G(i,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Pt);function dk(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function pk(r){var e=r.axis;return G(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function gk(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var yk={type:"axisAreaSelect",event:"axisAreaSelected"};function mk(r){r.registerAction(yk,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(i){i.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(i){i.setAxisExpand(e)})})}var _k={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function QN(r){r.registerComponentView(FE),r.registerComponentModel(HE),r.registerCoordinateSystem("parallel",KE),r.registerPreprocessor(BE),r.registerComponentModel(bv),r.registerComponentView(ck),Io(r,"parallel",bv,_k),mk(r)}var Sk=["itemStyle","borderWidth"],hm=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],th=new Yr,xk=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),h=l.master.getRect(),c={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:hm[+f],categoryDim:hm[1-+f]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=cm(o,d),g=vm(o,d,p,c),y=dm(o,c,g);o.setItemGraphicEl(d,y),a.add(y),gm(y,c,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){a.remove(g);return}var y=cm(o,d),m=vm(o,d,y,c),_=Gw(o,m);g&&_!==g.__pictorialShapeStr&&(a.remove(g),o.setItemGraphicEl(d,null),g=null),g?Dk(g,c,m):g=dm(o,c,m,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=m,a.add(g),gm(g,c,m)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&pm(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var v=t.get("clip",!0)?Hx(t.coordinateSystem,!1,t):null;return v?a.setClipPath(v):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,i){var n=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(o){pm(a,at(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(Wt);function vm(r,e,t,i){var n=r.getItemLayout(e),a=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,h=t.isAnimationEnabled(),c={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};wk(t,a,n,i,c),bk(r,e,n,a,o,c.boundingLength,c.pxSign,f,i,c),Tk(t,c.symbolScale,u,i,c);var v=c.symbolSize,d=cu(t.get("symbolOffset"),v);return Ck(t,v,n,a,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function wk(r,e,t,i,n){var a=i.valueDim,o=r.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[a.wh]<=0),f;if(V(o)){var h=[eh(s,o[0])-l,eh(s,o[1])-l];h[1]=0?1:-1:f>0?1:-1}function eh(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function bk(r,e,t,i,n,a,o,s,l,u){var f=l.valueDim,h=l.categoryDim,c=Math.abs(t[h.wh]),v=r.getItemVisual(e,"symbolSize"),d;V(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[h.index]=Z(d[h.index],c),d[f.index]=Z(d[f.index],i?c:Math.abs(a)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[f.index]*=(l.isHorizontal?-1:1)*o}function Tk(r,e,t,i,n){var a=r.get(Sk)||0;a&&(th.attr({scaleX:e[0],scaleY:e[1],rotation:t}),th.updateTransform(),a/=th.getLineScale(),a*=e[i.valueDim.index]),n.valueLineWidth=a||0}function Ck(r,e,t,i,n,a,o,s,l,u,f,h){var c=f.categoryDim,v=f.valueDim,d=h.pxSign,p=Math.max(e[v.index]+s,0),g=p;if(i){var y=Math.abs(l),m=di(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=Z(m,e[v.index]),w=Math.max(p+S*2,0),x=_?0:S*2,b=P_(i),T=b?i:ym((y+x)/w),M=y-T*p;S=M/2/(_?T:Math.max(T-1,1)),w=p+S*2,x=_?0:S*2,!b&&i!=="fixed"&&(T=u?ym((Math.abs(u)+x)/w):0),g=T*w-x,h.repeatTimes=T,h.symbolMargin=S}var A=d*(g/2),D=h.pathPosition=[];D[c.index]=t[c.wh]/2,D[v.index]=o==="start"?A:o==="end"?l-A:l/2,a&&(D[0]+=a[0],D[1]+=a[1]);var L=h.bundlePosition=[];L[c.index]=t[c.xy],L[v.index]=t[v.xy];var I=h.barRectShape=z({},t);I[v.wh]=d*Math.max(Math.abs(t[v.wh]),Math.abs(D[v.index]+A)),I[c.wh]=t[c.wh];var P=h.clipShape={};P[c.xy]=-t[c.xy],P[c.wh]=f.ecSize[c.wh],P[v.xy]=0,P[v.wh]=t[v.wh]}function Bw(r){var e=r.symbolPatternSize,t=Vt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function Nw(r,e,t,i){var n=r.__pictorialBundle,a=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,h=a[e.valueDim.index]+o+t.symbolMargin*2;for(Qc(r,function(p){p.__pictorialAnimationIndex=f,p.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-p),g[l.index]=h*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function zw(r,e,t,i){var n=r.__pictorialBundle,a=r.__pictorialMainPath;a?Jn(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,i):(a=r.__pictorialMainPath=Bw(t),n.add(a),Jn(a,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,i))}function Vw(r,e,t){var i=z({},e.barRectShape),n=r.__pictorialBarRect;n?Jn(n,null,{shape:i},e,t):(n=r.__pictorialBarRect=new gt({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function Fw(r,e,t,i){if(t.symbolClip){var n=r.__pictorialClipPath,a=z({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)Mt(n,{shape:a},s,l);else{a[o.wh]=0,n=new gt({shape:a}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],ha[i?"updateProps":"initProps"](n,{shape:u},s,l)}}}function cm(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=Mk,t.isAnimationEnabled=Ak,t}function Mk(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function Ak(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function dm(r,e,t,i){var n=new it,a=new it;return n.add(a),n.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?Nw(n,e,t):zw(n,e,t),Vw(n,t,i),Fw(n,e,t,i),n.__pictorialShapeStr=Gw(r,t),n.__pictorialSymbolMeta=t,n}function Dk(r,e,t){var i=t.animationModel,n=t.dataIndex,a=r.__pictorialBundle;Mt(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},i,n),t.symbolRepeat?Nw(r,e,t,!0):zw(r,e,t,!0),Vw(r,t,!0),Fw(r,e,t,!0)}function pm(r,e,t,i){var n=i.__pictorialBarRect;n&&n.removeTextContent();var a=[];Qc(i,function(o){a.push(o)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(t=null),C(a,function(o){yo(o,{scaleX:0,scaleY:0},t,e,function(){i.parent&&i.parent.remove(i)})}),r.setItemGraphicEl(e,null)}function Gw(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Qc(r,e,t){C(r.__pictorialBundle.children(),function(i){i!==r.__pictorialBarRect&&e.call(t,i)})}function Jn(r,e,t,i,n,a){e&&r.attr(e),i.symbolClip&&!n?t&&r.attr(t):t&&ha[n?"updateProps":"initProps"](r,t,i.animationModel,i.dataIndex,a)}function gm(r,e,t){var i=t.dataIndex,n=t.itemModel,a=n.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),f=a.get("focus"),h=a.get("blurScope"),c=a.get("scale");Qc(r,function(p){if(p instanceof _e){var g=p.style;p.useStyle(z({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else p.useStyle(t.style);var y=p.ensureState("emphasis");y.style=o,c&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=t.z2});var v=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Ur(d,Xr(n),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:xu(e.seriesModel.getData(),i),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),mr(r,f,h,a.get("disabled"))}function ym(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var Lk=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=_i(Lo.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Lo);function jN(r){r.registerChartView(xk),r.registerSeriesModel(Lk),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,dt(lx,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ux("pictorialBar"))}function Ik(r,e,t,i){return r&&(r.legacy||r.legacy!==!1&&!t&&!i&&e!=="tspan"&&(e==="text"||rt(r,"text")))}function Pk(r,e,t){var i=r,n,a,o;if(e==="text")o=i;else{o={},rt(i,"text")&&(o.text=i.text),rt(i,"rich")&&(o.rich=i.rich),rt(i,"textFill")&&(o.fill=i.textFill),rt(i,"textStroke")&&(o.stroke=i.textStroke),rt(i,"fontFamily")&&(o.fontFamily=i.fontFamily),rt(i,"fontSize")&&(o.fontSize=i.fontSize),rt(i,"fontStyle")&&(o.fontStyle=i.fontStyle),rt(i,"fontWeight")&&(o.fontWeight=i.fontWeight),a={type:"text",style:o,silent:!0},n={};var s=rt(i,"textPosition");n.position=s?i.textPosition:"inside",rt(i,"textPosition")&&(n.position=i.textPosition),rt(i,"textOffset")&&(n.offset=i.textOffset),rt(i,"textRotation")&&(n.rotation=i.textRotation),rt(i,"textDistance")&&(n.distance=i.textDistance)}return mm(o,r),C(o.rich,function(l){mm(l,l)}),{textConfig:n,textContent:a}}function mm(r,e){e&&(e.font=e.textFont||e.font,rt(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),rt(e,"textAlign")&&(r.align=e.textAlign),rt(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),rt(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),rt(e,"textWidth")&&(r.width=e.textWidth),rt(e,"textHeight")&&(r.height=e.textHeight),rt(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),rt(e,"textPadding")&&(r.padding=e.textPadding),rt(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),rt(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),rt(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),rt(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),rt(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),rt(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),rt(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}var Hw={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},_m=yt(Hw);dr(pr,function(r,e){return r[e]=1,r},{});pr.join(", ");var Ol=["","style","shape","extra"],na=mt();function jc(r,e,t,i,n){var a=r+"Animation",o=fa(r,i,n)||{},s=na(e).userDuring;return o.duration>0&&(o.during=s?Y(Nk,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),z(o,t[a]),o}function rh(r,e,t,i){i=i||{};var n=i.dataIndex,a=i.isInit,o=i.clearStyle,s=t.isAnimationEnabled(),l=na(r),u=e.style;l.userDuring=e.during;var f={},h={};if(Vk(r,e,h),xm("shape",e,h),xm("extra",e,h),!a&&s&&(zk(r,e,f),Sm("shape",r,e,f),Sm("extra",r,e,f),Fk(r,e,u,f)),h.style=u,Ek(r,h,o),Ok(r,e),s)if(a){var c={};C(Ol,function(d){var p=d?e[d]:e;p&&p.enterFrom&&(d&&(c[d]=c[d]||{}),z(d?c[d]:c,p.enterFrom))});var v=jc("enter",r,e,t,n);v.duration>0&&r.animateFrom(c,v)}else kk(r,e,n||0,t,f);Ww(r,e),u?r.dirty():r.markRedraw()}function Ww(r,e){for(var t=na(r).leaveToProps,i=0;i0&&r.animateFrom(n,a)}}function Ok(r,e){rt(e,"silent")&&(r.silent=e.silent),rt(e,"ignore")&&(r.ignore=e.ignore),r instanceof yr&&rt(e,"invisible")&&(r.invisible=e.invisible),r instanceof ht&&rt(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var lr={},Bk={setTransform:function(r,e){return lr.el[r]=e,this},getTransform:function(r){return lr.el[r]},setShape:function(r,e){var t=lr.el,i=t.shape||(t.shape={});return i[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=lr.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=lr.el,i=t.style;return i&&(i[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=lr.el.style;if(e)return e[r]},setExtra:function(r,e){var t=lr.el.extra||(lr.el.extra={});return t[r]=e,this},getExtra:function(r){var e=lr.el.extra;if(e)return e[r]}};function Nk(){var r=this,e=r.el;if(e){var t=na(e).userDuring,i=r.userDuring;if(t!==i){r.el=r.userDuring=null;return}lr.el=e,i(Bk)}}function Sm(r,e,t,i){var n=t[r];if(n){var a=e[r],o;if(a){var s=t.transition,l=n.transition;if(l)if(!o&&(o=i[r]={}),sn(l))z(o,a);else for(var u=Tt(l),f=0;f=0){!o&&(o=i[r]={});for(var v=yt(a),f=0;f=0)){var c=r.getAnimationStyleProps(),v=c?c.style:null;if(v){!a&&(a=i.style={});for(var d=yt(t),u=0;us)return!0;if(o){var l=Wc(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(e,t,i,n,a){},r.prototype.createPointerEl=function(e,t,i,n){var a=t.pointer;if(a){var o=Xi(e).pointerEl=new ha[a.type](wm(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,i,n){if(t.label){var a=Xi(e).labelEl=new pt(wm(t.label));e.add(a),Tm(a,n)}},r.prototype.updatePointerEl=function(e,t,i){var n=Xi(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),i(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,i,n){var a=Xi(e).labelEl;a&&(a.setStyle(t.label.style),i(a,{x:t.label.x,y:t.label.y}),Tm(a,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=Fo(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Vr(u.event)},onmousedown:ih(this._onHandleDragMove,this,0,0),drift:ih(this._onHandleDragMove,this),ondragend:ih(this._onHandleDragEnd,this)}),i.add(n)),Cm(n,t,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");V(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Ho(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){bm(this._axisPointerModel,!t&&this._moveAnimation,this._handle,nh(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(nh(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(nh(n)),Xi(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,n=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),bo(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,i){return i=i||0,{x:e[i],y:e[1-i],width:t[i],height:t[1-i]}},r}();function bm(r,e,t,i){Xw(Xi(t).lastProp,i)||(Xi(t).lastProp=i,e?Mt(t,i,r):(t.stopAnimation(),t.attr(i)))}function Xw(r,e){if($(r)&&$(e)){var t=!0;return C(e,function(i,n){t=t&&Xw(r[n],i)}),!!t}else return r===e}function Tm(r,e){r[e.get(["label","show"])?"show":"hide"]()}function nh(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Cm(r,e,t){var i=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=t)})}function Zw(r){var e=r.get("type"),t=r.getModel(e+"Style"),i;return e==="line"?(i=t.getLineStyle(),i.fill=null):e==="shadow"&&(i=t.getAreaStyle(),i.stroke=null),i}function $w(r,e,t,i,n){var a=t.get("value"),o=qw(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Go(s.get("padding")||0),u=s.getFont(),f=No(o,u),h=n.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=n.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var p=n.verticalAlign;p==="bottom"&&(h[1]-=v),p==="middle"&&(h[1]-=v/2),Yk(h,c,v,i);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Dt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Yk(r,e,t,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function qw(r,e,t,i,n){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Nc(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};C(i,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),W(o)?a=o.replace("{value}",a):J(o)&&(a=o(s))}return a}function Kw(r,e,t){var i=$e();return dn(i,i,t.rotation),pi(i,i,t.position),Ke([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],i)}function Uk(r,e,t,i,n,a){var o=de.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),$w(e,i,n,a,{position:Kw(i.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Jw(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function Xk(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function Mm(r,e,t,i,n,a){return{cx:r,cy:e,r0:t,r:i,startAngle:n,endAngle:a,clockwise:!0}}var Zk=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),f=Am(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var c=Zw(a),v=$k[u](s,h,f);v.style=c,t.graphicKey=v.type,t.pointer=v}var d=gv(l.model,n);Uk(i,t,d,n,a,o)},e.prototype.getHandleTransform=function(t,i,n){var a=gv(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Kw(i.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Am(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[t.x,t.y];h[f]+=i[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var c=(u[1]+u[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:v,tooltipOption:d[f]}},e}(Uw);function Am(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var $k={line:function(r,e,t){var i=Jw([e,t[0]],[e,t[1]],Dm(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:Xk([e-i/2,t[0]],[i,n],Dm(r))}}};function Dm(r){return r.dim==="x"?0:1}var qk=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(ft),Or=mt(),Kk=C;function Qw(r,e,t){if(!nt.node){var i=e.getZr();Or(i).records||(Or(i).records={}),Jk(i,e);var n=Or(i).records[r]||(Or(i).records[r]={});n.handler=t}}function Jk(r,e){if(Or(r).initialized)return;Or(r).initialized=!0,t("click",dt(Lm,"click")),t("mousemove",dt(Lm,"mousemove")),t("globalout",jk);function t(i,n){r.on(i,function(a){var o=tO(e);Kk(Or(r).records,function(s){s&&n(s,a,o.dispatchAction)}),Qk(o.pendings,e)})}}function Qk(r,e){var t=r.showTip.length,i=r.hideTip.length,n;t?n=r.showTip[t-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function jk(r,e,t){r.handler("leave",null,t)}function Lm(r,e,t,i){e.handler(r,t,i)}function tO(r){var e={showTip:[],hideTip:[]},t=function(i){var n=e[i.type];n?n.push(i):(i.dispatchAction=t,r.dispatchAction(i))};return{dispatchAction:t,pendings:e}}function Iv(r,e){if(!nt.node){var t=e.getZr(),i=(Or(t).records||{})[r];i&&(Or(t).records[r]=null)}}var eO=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=i.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Qw("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,i){Iv("axisPointer",i)},e.prototype.dispose=function(t,i){Iv("axisPointer",i)},e.type="axisPointer",e}(Pt);function jw(r,e){var t=[],i=r.seriesIndex,n;if(i==null||!(n=e.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=un(a,r);if(o==null||o<0||V(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,c=u.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),p=[];p[v]=a.get(d,o),p[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(p)||[]}else t=l.dataToPoint(a.getValues(G(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var Im=mt();function rO(r,e,t){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||Y(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){js(n)&&(n=jw({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=js(n),u=a.axesInfo,f=s.axesInfo,h=i==="leave"||js(n),c={},v={},d={list:[],map:{}},p={showPointer:dt(nO,v),showTooltip:dt(aO,d)};C(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);C(s.coordSysAxesInfo[m],function(S,w){var x=S.axis,b=uO(u,S);if(!h&&_&&(!u||b)){var T=b&&b.value;T==null&&!l&&(T=x.pointToData(n)),T!=null&&Pm(S,T,p,!1,c)}})});var g={};return C(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&C(_.axesInfo,function(S,w){var x=v[w];if(S!==y&&x){var b=x.value;_.mapper&&(b=y.axis.scale.parse(_.mapper(b,Rm(S),Rm(y)))),g[y.key]=b}})}),C(g,function(y,m){Pm(f[m],y,p,!0,c)}),oO(v,f,c),sO(d,n,r,o),lO(f,o,t),c}}function Pm(r,e,t,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=iO(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&z(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function iO(r,e){var t=e.axis,i=t.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return C(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(i),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,t);c=v.dataIndices,h=v.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],r,t.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=r-h,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,n=h,a.length=0),C(c,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:n}}function nO(r,e,t,i){r[e.key]={value:t,payloadBatch:i}}function aO(r,e,t,i){var n=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=Po(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function oO(r,e,t){var i=t.axesInfo=[];C(e,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function sO(r,e,t,i){if(js(e)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function lO(r,e,t){var i=t.getZr(),n="axisPointerLastHighlights",a=Im(i)[n]||{},o=Im(i)[n]={};C(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&C(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];C(a,function(u,f){!o[f]&&l.push(u)}),C(o,function(u,f){!a[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function uO(r,e){for(var t=0;t<(r||[]).length;t++){var i=r[t];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Rm(r){var e=r.axis.model,t={},i=t.axisDim=r.axis.dim;return t.axisIndex=t[i+"AxisIndex"]=e.componentIndex,t.axisName=t[i+"AxisName"]=e.name,t.axisId=t[i+"AxisId"]=e.id,t}function js(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function td(r){Wo.registerAxisPointerClass("CartesianAxisPointer",Zk),r.registerComponentModel(qk),r.registerComponentView(eO),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!V(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=dR(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},rO)}function tz(r){jt(ow),jt(td)}var fO=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),h=s.dataToCoord(i),c=a.get("type");if(c&&c!=="none"){var v=Zw(a),d=vO[c](s,l,h,f);d.style=v,t.graphicKey=d.type,t.pointer=d}var p=a.get(["label","margin"]),g=hO(i,n,a,l,p);$w(t,n,a,o,g)},e}(Uw);function hO(r,e,t,i,n){var a=e.axis,o=a.dataToCoord(r),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,f,h;if(a.dim==="radius"){var c=$e();dn(c,c,s),pi(c,c,[i.cx,i.cy]),u=Ke([o,-n],c);var v=e.getModel("axisLabel").get("rotate")||0,d=de.innerTextLayout(s,v*Math.PI/180,-1);f=d.textAlign,h=d.textVerticalAlign}else{var p=l[1];u=i.coordToPoint([p+n,o]);var g=i.cx,y=i.cy;f=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:h}}var vO={line:function(r,e,t,i){return r.dim==="angle"?{type:"Line",shape:Jw(e.coordToPoint([i[0],t]),e.coordToPoint([i[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,i){var n=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:Mm(e.cx,e.cy,i[0],i[1],(-t-n/2)*a,(-t+n/2)*a)}:{type:"Sector",shape:Mm(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}},cO=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var i,n=this.ecModel;return n.eachComponent(t,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(ft),ed=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Nt).models[0]},e.type="polarAxis",e}(ft);ae(ed,Su);var dO=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(ed),pO=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(ed),rd=function(r){O(e,r);function e(t,i){return r.call(this,"radius",t,i)||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e}(br);rd.prototype.dataToRadius=br.prototype.dataToCoord;rd.prototype.radiusToData=br.prototype.coordToData;var gO=mt(),id=function(r){O(e,r);function e(t,i){return r.call(this,"angle",t,i||[0,360])||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,i=t.getLabelModel(),n=t.scale,a=n.getExtent(),o=n.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=No(s==null?"":s+"",i.getFont(),"center","top"),h=Math.max(f.height,7),c=h/u;isNaN(c)&&(c=1/0);var v=Math.max(0,Math.floor(c)),d=gO(t.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-v)<=1&&Math.abs(g-o)<=1&&p>v?v=p:(d.lastTickCount=o,d.lastAutoInterval=v),v},e}(br);id.prototype.dataToAngle=br.prototype.dataToCoord;id.prototype.angleToData=br.prototype.coordToData;var tb=["radius","angle"],yO=function(){function r(e){this.dimensions=tb,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new rd,this._angleAxis=new id,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===e&&t.push(i),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+i*i);t/=l,i/=l;for(var u=Math.atan2(-i,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],i=e[1]/180*Math.PI,n=Math.cos(i)*t+this.cx,a=-Math.sin(i)*t+this.cy;return[n,a]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),i=t.getExtent().slice();i[0]>i[1]&&i.reverse();var n=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,f=l-this.cy,h=u*u+f*f,c=this.r,v=this.r0;return c!==v&&h-o<=c*c&&h+o>=v*v}}},r.prototype.convertToPixel=function(e,t,i){var n=Em(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=Em(t);return n===this?this.pointToData(i):null},r}();function Em(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function mO(r,e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight();r.cx=Z(i[0],n),r.cy=Z(i[1],a);var o=r.getRadiusAxis(),s=Math.min(n,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:V(l)||(l=[0,l]);var u=[Z(l[0],s),Z(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function _O(r,e){var t=this,i=t.getAngleAxis(),n=t.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();C(Dl(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),C(Dl(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),Ao(i.scale,i.model),Ao(n.scale,n.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function SO(r){return r.mainType==="angleAxis"}function km(r,e){var t;if(r.type=e.get("type"),r.scale=Bc(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),SO(e)){r.inverse=r.inverse!==e.get("clockwise");var i=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:i+(r.inverse?-360:360);r.setExtent(i,n)}e.axis=r,r.model=e}var xO={dimensions:tb,create:function(r,e){var t=[];return r.eachComponent("polar",function(i,n){var a=new yO(n+"");a.update=_O;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");km(o,l),km(s,u),mO(a,i,e),t.push(a),i.coordinateSystem=a,a.model=i}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var n=i.getReferringComponents("polar",Nt).models[0];i.coordinateSystem=n.coordinateSystem}}),t}},wO=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function ks(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var i=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function Os(r){var e=r.getRadiusAxis();return e.inverse?0:1}function Om(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var bO=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,a=n.polar,o=a.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=G(n.getViewLabels(),function(f){f=K(f);var h=n.scale,c=h.type==="ordinal"?h.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(c),f});Om(u),Om(s),C(wO,function(f){t.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&TO[f](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(Wo),TO={axisLine:function(r,e,t,i,n,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=Os(t),h=f?0:1,c,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?c=new ha[v]({shape:{cx:t.cx,cy:t.cy,r:a[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):c=new Vo({shape:{cx:t.cx,cy:t.cy,r:a[f],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),c.style.fill=null,r.add(c)},axisTick:function(r,e,t,i,n,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Os(t)],u=G(i,function(f){return new Gt({shape:ks(t,[l,l+s],f.coord)})});r.add(Ue(u,{style:q(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,i,n,a){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Os(t)],f=[],h=0;hy?"left":"right",S=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var w=s[d];$(w)&&w.textStyle&&(v=new Ct(w.textStyle,l,l.ecModel))}var x=new pt({silent:de.isLabelSilent(e),style:Dt(v,{x:g[0],y:g[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),f){var b=de.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=h.rawLabel,at(x).eventData=b}},this)},splitLine:function(r,e,t,i,n,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],h=0;h=0?"p":"n",R=M;w&&(i[f][I]||(i[f][I]={p:M,n:M}),R=i[f][I][P]);var E=void 0,N=void 0,k=void 0,B=void 0;if(d.dim==="radius"){var F=d.dataToCoord(L)-M,H=l.dataToCoord(I);Math.abs(F)=B})}}})}function PO(r){var e={};C(r,function(i,n){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=rb(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=h.stacks;e[l]=h;var v=eb(i);c[v]||h.autoWidthCount++,c[v]=c[v]||{width:0,maxWidth:0};var d=Z(i.get("barWidth"),f),p=Z(i.get("barMaxWidth"),f),g=i.get("barGap"),y=i.get("barCategoryGap");d&&!c[v].width&&(d=Math.min(h.remainedWidth,d),c[v].width=d,h.remainedWidth-=d),p&&(c[v].maxWidth=p),g!=null&&(h.gap=g),y!=null&&(h.categoryGap=y)});var t={};return C(e,function(i,n){t[n]={};var a=i.stacks,o=i.bandWidth,s=Z(i.categoryGap,o),l=Z(i.gap,1),u=i.remainedWidth,f=i.autoWidthCount,h=(u-s)/(f+(f-1)*l);h=Math.max(h,0),C(a,function(p,g){var y=p.maxWidth;y&&y+i.start.y&&(d=d+"-"+i.end.y);var p=o.get("formatter"),g={start:i.start.y,end:i.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new pt({z2:30,style:Dt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,v[l],n,l,s)),a.add(m)}},e.prototype._monthTextPositionControl=function(t,i,n,a,o){var s="left",l="top",u=t[0],f=t[1];return n==="horizontal"?(f=f+o,i&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),a==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,i,n,a){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||W(s))&&(s&&(i=Jh(s)||i),s=i.get(["time","monthAbbr"])||[]);var c=u==="start"?0:1,v=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=f==="center",p=o.get("silent"),g=0;g=n.start.time&&i.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],i;t[0].time>t[1].time&&(i=!0,t.reverse());var n=Math.floor(t[1].time/ah)-Math.floor(t[0].time/ah)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+n-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-t[1].time)*u>0;)n-=u,a.setDate(l-u);var f=Math.floor((n+t[0].day+6)/7),h=i?-f+1:f-1;return i&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:f,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,i){var n=this._getRangeInfo(i);if(e>n.weeks||e===0&&tn.lweek)return null;var a=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+a),this.getDateInfo(o)},r.create=function(e,t){var i=[];return e.eachComponent("calendar",function(n){var a=new r(n);i.push(a),n.coordinateSystem=a}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=i[n.get("calendarIndex")||0])}),i},r.dimensions=["time","value"],r}();function Nm(r){var e=r.calendarModel,t=r.seriesModel,i=e?e.coordinateSystem:t?t.coordinateSystem:null;return i}function rz(r){r.registerComponentModel(OO),r.registerComponentView(BO),r.registerCoordinateSystem("calendar",NO)}function zO(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var i=e.parentOption;i?e.parentId=i.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function zm(r,e){var t;return C(e,function(i){r[i]!=null&&r[i]!=="auto"&&(t=!0)}),t}function VO(r,e,t){var i=z({},t),n=r[e],a=t.$action||"merge";a==="merge"?n?(j(n,i,!0),mi(n,i,{ignoreSize:!0}),W1(t,n),Bs(t,n),Bs(t,n,"shape"),Bs(t,n,"style"),Bs(t,n,"extra"),t.clipPath=n.clipPath):r[e]=i:a==="replace"?r[e]=i:a==="remove"&&n&&(r[e]=null)}var ib=["transition","enterFrom","leaveTo"],FO=ib.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Bs(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var i=t?ib:FO,n=0;n=0;f--){var h=n[f],c=Kt(h.id,null),v=c!=null?o.get(c):null;if(v){var d=v.parent,y=Ie(d),m=d===a?{width:s,height:l}:{width:y.width,height:y.height},_={},S=yc(v,h,m,null,{hv:h.hv,boundingMode:h.bounding},_);if(!Ie(v).isNew&&S){for(var w=h.transition,x={},b=0;b=0)?x[T]=M:v[T]=M}Mt(v,x,t,0)}else v.attr(_)}}},e.prototype._clear=function(){var t=this,i=this._elMap;i.each(function(n){tl(n,Ie(n).option,i,t._lastGraphicModel)}),this._elMap=U()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Pt);function Pv(r){var e=rt(Vm,r)?Vm[r]:y1(r),t=new e({});return Ie(t).type=r,t}function Fm(r,e,t,i){var n=Pv(t);return e.add(n),i.set(r,n),Ie(n).id=r,Ie(n).isNew=!0,n}function tl(r,e,t,i){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(a){tl(a,e,t,i)}),Rk(r,e,i),t.removeKey(Ie(r).id))}function Gm(r,e,t,i){r.isGroup||C([["cursor",yr.prototype.cursor],["zlevel",i||0],["z",t||0],["z2",0]],function(n){var a=n[0];rt(e,a)?r[a]=lt(e[a],n[1]):r[a]==null&&(r[a]=n[1])}),C(yt(e),function(n){if(n.indexOf("on")===0){var a=e[n];r[n]=J(a)?a:null}}),rt(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function YO(r){return r=z({},r),C(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(H1),function(e){delete r[e]}),r}function UO(r,e,t){var i=at(r).eventData;!r.silent&&!r.ignore&&!i&&(i=at(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),i&&(i.info=t.info)}function iz(r){r.registerComponentModel(HO),r.registerComponentView(WO),r.registerPreprocessor(function(e){var t=e.graphic;V(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Hm=["x","y","radius","angle","single"],XO=["cartesian2d","polar","singleAxis"];function ZO(r){var e=r.get("coordinateSystem");return ut(XO,e)>=0}function hi(r){return r+"Axis"}function $O(r,e){var t=U(),i=[],n=U();r.eachComponent({mainType:"dataZoom",query:e},function(f){n.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!n.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){n.set(f.uid,!0),i.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var d=t.get(c);d&&d[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(t.get(h)||t.set(h,[]))[c]=!0})}return i}function nb(r){var e=r.ecModel,t={infoList:[],infoMap:U()};return r.eachTargetAxis(function(i,n){var a=e.getComponent(hi(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(a)}}}),t}var oh=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),ko=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,i,n){var a=Wm(t);this.settledOption=a,this.mergeDefaultAndTheme(t,n),this._doInit(a)},e.prototype.mergeOption=function(t){var i=Wm(t);j(this.option,t,!0),j(this.settledOption,i,!0),this._doInit(i)},e.prototype._doInit=function(t){var i=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;C([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),i=this._targetAxisInfoMap=U(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var i=!1;return C(Hm,function(n){var a=this.getReferringComponents(hi(n),PC);if(a.specified){i=!0;var o=new oh;C(a.models,function(s){o.add(s.componentIndex)}),t.set(n,o)}},this),i},e.prototype._fillAutoTargetAxisByOrient=function(t,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===i}});l(s,"single")}function l(u,f){var h=u[0];if(h){var c=new oh;if(c.add(h.componentIndex),t.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",Nt).models[0];v&&C(u,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Nt).models[0]&&c.add(d.componentIndex)})}}}a&&C(Hm,function(u){if(a){var f=n.findComponents({mainType:hi(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new oh;h.add(f[0].componentIndex),t.set(u,h),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(i){!t&&(t=i)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var i=this._rangePropMode,n=this.get("rangeMode");C([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(i,n){t==null&&(t=this.ecModel.getComponent(hi(i),n))},this),t},e.prototype.eachTargetAxis=function(t,i){this._targetAxisInfoMap.each(function(n,a){C(n.indexList,function(o){t.call(i,a,o)})})},e.prototype.getAxisProxy=function(t,i){var n=this.getAxisModel(t,i);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,i){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[i])return this.ecModel.getComponent(hi(t),i)},e.prototype.setRawRange=function(t){var i=this.option,n=this.settledOption;C([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(i[a[0]]=n[a[0]]=t[a[0]],i[a[1]]=n[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var i=this.option;C(["start","startValue","end","endValue"],function(n){i[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,i){if(t==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,i).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;ao[1];if(_&&!S&&!w)return!0;_&&(g=!0),S&&(d=!0),w&&(p=!0)}return g&&d&&p})}else Gn(f,function(v){if(a==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});Gn(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,i=this._dataExtent;Gn(["min","max"],function(n){var a=t.get(n+"Span"),o=t.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=_t(i[0]+o,i,[0,100],!0):a!=null&&(o=_t(a,[0,100],i,!0)-i[0]),e[n+"Span"]=a,e[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,i=this._valueWindow;if(t){var n=D_(i,[0,500]);n=Math.min(n,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),t[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function QO(r,e,t){var i=[1/0,-1/0];Gn(t,function(o){II(i,o.getData(),e)});var n=r.getAxisModel(),a=cx(n.axis.scale,n,i).calculate();return[a.min,a.max]}var jO={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(hi(o),s);n(o,s,l,a)})})}e(function(n,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new JO(n,a,s,r),t.push(o.__dzAxisProxy))});var i=U();return C(t,function(n){C(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(i,n){t.getAxisProxy(i,n).reset(t)}),t.eachTargetAxis(function(i,n){t.getAxisProxy(i,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var i=t.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function tB(r){r.registerAction("dataZoom",function(e,t){var i=$O(t,e);C(i,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Um=!1;function ad(r){Um||(Um=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,jO),tB(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function eB(r){r.registerComponentModel(qO),r.registerComponentView(KO),ad(r)}var Ye=function(){function r(){}return r}(),ab={};function Ga(r,e){ab[r]=e}function ob(r){return ab[r]}var rB=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;C(this.option.feature,function(i,n){var a=ob(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),j(i,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(ft);function iB(r,e,t){var i=e.getBoxLayoutParams(),n=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},o=ye(i,a,n);an(e.get("orient"),r,e.get("itemGap"),o.width,o.height),yc(r,i,a,n)}function sb(r,e){var t=Go(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),r=new gt({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var nB=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n,a){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),h=[];C(u,function(d,p){h.push(p)}),new Mo(this._featureNames||[],h).add(c).update(c).remove(dt(c,null)).execute(),this._featureNames=h;function c(d,p){var g=h[d],y=h[p],m=u[g],_=new Ct(m,t,t.ecModel),S;if(a&&a.newTitle!=null&&a.featureName===g&&(m.title=a.newTitle),g&&!y){if(aB(g))S={onclick:_.option.onclick,featureName:g};else{var w=ob(g);if(!w)return;S=new w}f[g]=S}else if(S=f[y],!S)return;S.uid=ca("toolbox-feature"),S.model=_,S.ecModel=i,S.api=n;var x=S instanceof Ye;if(!g&&y){x&&S.dispose&&S.dispose(i,n);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(i,n);return}v(_,S,g),_.setIconStatus=function(b,T){var M=this.option,A=this.iconPaths;M.iconStatus=M.iconStatus||{},M.iconStatus[b]=T,A[b]&&(T==="emphasis"?ta:ea)(A[b])},S instanceof Ye&&S.render&&S.render(_,i,n,a)}function v(d,p,g){var y=d.getModel("iconStyle"),m=d.getModel(["emphasis","iconStyle"]),_=p instanceof Ye&&p.getIcons?p.getIcons():d.get("icon"),S=d.get("title")||{},w,x;W(_)?(w={},w[g]=_):w=_,W(S)?(x={},x[g]=S):x=S;var b=d.iconPaths={};C(w,function(T,M){var A=Fo(T,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(y.getItemStyle());var D=A.ensureState("emphasis");D.style=m.getItemStyle();var L=new pt({style:{text:x[M],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:T1({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},i)},ignore:!0});A.setTextContent(L),pn({el:A,componentModel:t,itemName:M,formatterParamsExtra:{title:x[M]}}),A.__title=x[M],A.on("mouseover",function(){var I=m.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),A.setTextConfig({position:m.get("textPosition")||P}),L.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",M])!=="emphasis"&&n.leaveEmphasis(this),L.hide()}),(d.get(["iconStatus",M])==="emphasis"?ta:ea)(A),o.add(A),A.on("click",Y(p.onclick,p,i,n,M)),b[M]=A})}iB(o,t,n),o.add(sb(o.getBoundingRect(),t)),l||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=d.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!J(_)&&p){var S=_.style||(_.style={}),w=No(p,pt.makeFont(S)),x=d.x+o.x,b=d.y+o.y+s,T=!1;b+w.height>n.getHeight()&&(y.position="top",T=!0);var M=T?-5-w.height:s+10;x+w.width/2>n.getWidth()?(y.position=["100%",M],S.align="right"):x-w.width/2<0&&(y.position=[0,M],S.align="left")}})},e.prototype.updateView=function(t,i,n,a){C(this._features,function(o){o instanceof Ye&&o.updateView&&o.updateView(o.model,i,n,a)})},e.prototype.remove=function(t,i){C(this._features,function(n){n instanceof Ye&&n.remove&&n.remove(t,i)}),this.group.removeAll()},e.prototype.dispose=function(t,i){C(this._features,function(n){n instanceof Ye&&n.dispose&&n.dispose(t,i)})},e.type="toolbox",e}(Pt);function aB(r){return r.indexOf("my")===0}var oB=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){var n=this.model,a=n.get("name")||t.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=nt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=a+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var c=l.split(","),v=c[0].indexOf("base64")>-1,d=o?decodeURIComponent(c[1]):c[1];v&&(d=window.atob(d));var p=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,w=S.document;w.open("image/svg+xml","replace"),w.write(d),w.close(),S.focus(),w.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=n.get("lang"),b='',T=window.open();T.document.write(b),T.document.title=a}},e.getDefaultOption=function(t){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},e}(Ye),Xm="__ec_magicType_stack__",sB=[["line","bar"],["stack"]],lB=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,i=t.get("icon"),n={};return C(t.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},e.getDefaultOption=function(t){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},e.prototype.onclick=function(t,i,n){var a=this.model,o=a.get(["seriesIndex",n]);if(Zm[n]){var s={series:[]},l=function(h){var c=h.subType,v=h.id,d=Zm[n](c,v,h,a);d&&(q(d,h.option),s.series.push(d));var p=h.coordinateSystem;if(p&&p.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=h.getReferringComponents(m,Nt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var w=0;w<=S;w++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};C(sB,function(h){ut(h,n)>=0&&C(h,function(c){a.setIconStatus(c,"normal")})}),a.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=j({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),i.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Ye),Zm={line:function(r,e,t,i){if(r==="bar")return j({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,e,t,i){if(r==="line")return j({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,e,t,i){var n=t.get("stack")===Xm;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),j({id:e,stack:n?"":Xm},i.get(["option","stack"])||{},!0)}};xr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Cu=new Array(60).join("-"),aa=" ";function uB(r){var e={},t=[],i=[];return r.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:i}}function fB(r){var e=[];return C(r,function(t,i){var n=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(G(t.series,function(v){return v.name})),l=[n.model.getCategories()];C(t.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(aa)],f=0;f=0)return!0}var Rv=new RegExp("["+aa+"]+","g");function dB(r){for(var e=r.split(/\n+/g),t=Bl(e.shift()).split(Rv),i=[],n=G(t,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=t[a];if(o[n])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function SB(r){var e=od(r),t=e[e.length-1];e.length>1&&e.pop();var i={};return lb(t,function(n,a){for(var o=e.length-1;o>=0;o--)if(n=e[o][a],n){i[a]=n;break}}),i}function xB(r){ub(r).snapshots=null}function wB(r){return od(r).length}function od(r){var e=ub(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var bB=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){xB(t),i.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return i},e}(Ye);xr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var TB=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],fb=function(){function r(e,t,i){var n=this;this._targetInfoList=[];var a=$m(t,e);C(CB,function(o,s){(!i||!i.include||ut(i.include,s)>=0)&&o(a,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var o=sh[i.brushType](0,a,n);i.__rangeOffset={offset:Qm[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,i){C(e,function(n){var a=this.findTargetInfo(n,t);a&&a!==!0&&C(a.coordSyses,function(o){var s=sh[n.brushType](1,o,n.range,!0);i(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){C(e,function(i){var n=this.findTargetInfo(i,t);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=sh[i.brushType](0,n.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?Qm[i.brushType](a.values,o.offset,MB(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(e,t){return G(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t?t(i):null,clipPath:Ew(n),isTargetByCursor:Ow(n,e,i.coordSysModel),getLinearBrushOtherExtent:kw(n)}})},r.prototype.controlSeries=function(e,t,i){var n=this.findTargetInfo(e,i);return n===!0||n&&ut(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var i=this._targetInfoList,n=$m(t,e),a=0;ar[1]&&r.reverse(),r}function $m(r,e){return ao(r,e,{includeMainTypes:TB})}var CB={grid:function(r,e){var t=r.xAxisModels,i=r.yAxisModels,n=r.gridModels,a=U(),o={},s={};!t&&!i&&!n||(C(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),C(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),C(n,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,f=[];C(u.getCartesians(),function(h,c){(ut(t,h.getAxis("x").model)>=0||ut(i,h.getAxis("y").model)>=0)&&f.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Km.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){C(r.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:Km.geo})})}},qm=[function(r,e){var t=r.xAxisModel,i=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],Km={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(nn(r)),e}},sh={lineX:dt(Jm,0),lineY:dt(Jm,1),rect:function(r,e,t,i){var n=r?e.pointToData([t[0][0],t[1][0]],i):e.dataToPoint([t[0][0],t[1][0]],i),a=r?e.pointToData([t[0][1],t[1][1]],i):e.dataToPoint([t[0][1],t[1][1]],i),o=[Ev([n[0],a[0]]),Ev([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=G(t,function(o){var s=r?e.pointToData(o,i):e.dataToPoint(o,i);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:a,xyMinMax:n}}};function Jm(r,e,t,i){var n=t.getAxis(["x","y"][r]),a=Ev(G([0,1],function(s){return e?n.coordToData(n.toLocalCoord(i[s]),!0):n.toGlobalCoord(n.dataToCoord(i[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var Qm={lineX:dt(jm,0),lineY:dt(jm,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return G(r,function(i,n){return[i[0]-t[0]*e[n][0],i[1]-t[1]*e[n][1]]})}};function jm(r,e,t,i){return[e[0]-i[r]*t[0],e[1]-i[r]*t[1]]}function MB(r,e){var t=t0(r),i=t0(e),n=[t[0]/i[0],t[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function t0(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var kv=C,AB=MC("toolbox-dataZoom_"),DB=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n,a){this._brushController||(this._brushController=new xw(n.getZr()),this._brushController.on("brush",Y(this._onBrush,this)).mount()),PB(t,i,this,a,n),IB(t,i)},e.prototype.onclick=function(t,i,n){LB[n].call(this)},e.prototype.remove=function(t,i){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,i){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var i=t.areas;if(!t.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var o=new fb(sd(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,function(u,f,h){if(h.type==="cartesian2d"){var c=u.brushType;c==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[c],h,f)}}),_B(a,n),this._dispatchZoomAction(n);function s(u,f,h){var c=f.getAxis(u),v=c.model,d=l(u,v,a),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(h=yn(0,h.slice(),c.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var c;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,f.componentIndex);d&&(c=v)}),c}},e.prototype._dispatchZoomAction=function(t){var i=[];kv(t,function(n,a){i.push(K(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},e.getDefaultOption=function(t){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},e}(Ye),LB={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(SB(this.ecModel))}};function sd(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function IB(r,e){r.setIconStatus("back",wB(e)>1?"emphasis":"normal")}function PB(r,e,t,i,n){var a=t._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),t._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new fb(sd(r),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}nD("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var i=e.getModel(t),n=[],a=sd(i),o=ao(r,a);kv(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),kv(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:AB+u+h};c[f]=h,n.push(c)}return n});function nz(r){r.registerComponentModel(rB),r.registerComponentView(nB),Ga("saveAsImage",oB),Ga("magicType",lB),Ga("dataView",yB),Ga("dataZoom",DB),Ga("restore",bB),jt(eB)}var RB=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(ft);function hb(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function vb(r){if(nt.domSupported){for(var e=document.documentElement.style,t=0,i=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+n,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*n)/2+Math.SQRT2*n-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=e+" solid "+n+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'
'}function VB(r,e){var t="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+t,n="opacity"+i+",visibility"+i;return e||(i=" "+r+"s "+t,n+=nt.transformSupported?","+ld+i:",left"+i+",top"+i),OB+":"+n}function e0(r,e,t){var i=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!nt.transformSupported)return t?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=nt.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return t?"top:0;left:0;"+ld+":"+o+";":[["top",0],["left",0],[cb,o]]}function FB(r){var e=[],t=r.get("fontSize"),i=r.getTextColor();i&&e.push("color:"+i),e.push("font:"+r.getFont());var n=lt(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+n+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),C(["decoration","align"],function(u){var f=r.get(u);f&&e.push("text-"+u+":"+f)}),e.join(";")}function GB(r,e,t){var i=[],n=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=mS(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+c),e&&n&&i.push(VB(n,t)),a&&i.push("background-color:"+a),C(["width","color","radius"],function(v){var d="border-"+v,p=F1(d),g=r.get(p);g!=null&&i.push(d+":"+g+(v==="color"?"":"px"))}),i.push(FB(f)),h!=null&&i.push("padding:"+Go(h).join("px ")+"px"),i.join(";")+";"}function r0(r,e,t,i,n){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&fT(r,o,t,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var HB=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,nt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=e.getZr(),a=t.appendTo,o=a&&(W(a)?document.querySelector(a):Qn(a)?a:J(a)&&a(e.getDom()));r0(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(i),this._api=e,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();Ae(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),i=kB(t,"position"),n=t.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=BB+GB(e,!this._firstShow,this._longHide)+e0(a[0],a[1],!0)+("border-color:"+fn(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,i,n,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(W(a)&&i.get("trigger")==="item"&&!hb(i)&&(s=zB(i,n,a)),W(e))o.innerHTML=e+s;else if(e){o.innerHTML="",V(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,i=this._ecModel,n=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(t,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,i,n,a){if(!(a.from===this.uid||nt.node||!n.getDom())){var o=a0(a,n);this._ticket="";var s=a.dataByCoordSys,l=qB(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=YB;f.x=a.x,f.y=a.y,f.update(),at(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,i,n,a))return;var h=jw(a,i),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(a0(a,n))},e.prototype._manuallyAxisShowTip=function(t,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var f=u.getData(),h=Ha([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,i){var n=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){var s=at(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ki(n,function(f){if(at(f).dataIndex!=null)return l=f,!0;if(at(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(t,l,i):u?this._showComponentItemTooltip(t,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(t,i){var n=t.get("showDelay");i=Y(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},e.prototype._showAxisTooltip=function(t,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Ha([i.tooltipOption],a),l=this._renderMode,u=[],f=_r("section",{blocks:[],noHeader:!0}),h=[],c=new wf;C(t,function(m){C(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var x=qw(w,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),b=_r("section",{header:x,noHeader:!Xe(x),sortBlocks:!0,blocks:[]});f.blocks.push(b),C(_.seriesDataIndices,function(T){var M=n.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,D=M.getDataParams(A);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Nc(S.axis,{value:w}),D.axisValueLabel=x,D.marker=c.makeTooltipMarker("item",fn(D.color),l);var L=rg(M.formatTooltip(A,!0,null)),I=L.frag;if(I){var P=Ha([M],a).get("valueFormatter");b.blocks.push(P?z({valueFormatter:P},I):I)}L.text&&h.push(L.text),u.push(D)}})}})}),f.blocks.reverse(),h.reverse();var v=i.position,d=s.get("order"),p=sg(f,c,l,d,n.get("useUTC"),s.get("textStyle"));p&&h.unshift(p);var g=l==="richText"?` `:"
",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,c)})},e.prototype._showSeriesItemTooltip=function(t,i,n){var a=this._ecModel,o=at(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=t.positionDefault,p=Ha([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,h),m=new wf;y.marker=m.makeTooltipMarker("item",fn(y.color),v);var _=rg(u.formatTooltip(f,!1,h)),S=p.get("order"),w=p.get("valueFormatter"),x=_.frag,b=x?sg(w?z({valueFormatter:w},x):x,m,v,S,a.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,b,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,i,n){var a=this._renderMode==="html",o=at(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(W(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=K(l),l.content=ue(l.content));var h=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:l.content});var v=t.positionDefault,d=Ha(h,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",y=new wf;this._showOrMove(d,function(){var m=K(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,t.offsetX,t.offsetY,t.position,i,y)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,i,n,a,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var c=t.get("formatter");l=l||t.get("position");var v=i,d=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor")),p=d.color;if(c)if(W(c)){var g=t.ecModel.get("useUTC"),y=V(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=ou(y.axisValue,v,g)),v=G1(v,n,!0)}else if(J(c)){var _=Y(function(S,w){S===this._ticket&&(h.setContent(w,f,t,p,l),this._updatePosition(t,l,o,s,h,n,u))},this);this._ticket=a,v=c(n,a,_)}else v=c;h.setContent(v,f,t,p,l),h.show(t,p),this._updatePosition(t,l,o,s,h,n,u)}},e.prototype._getNearestPoint=function(t,i,n,a){if(n==="axis"||V(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!V(i))return{color:a||i.color||i.borderColor}},e.prototype._updatePosition=function(t,i,n,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||t.get("position");var h=o.getSize(),c=t.get("align"),v=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),J(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),V(i))n=Z(i[0],u),a=Z(i[1],f);else if($(i)){var p=i;p.width=h[0],p.height=h[1];var g=ye(p,{width:u,height:f});n=g.x,a=g.y,c=null,v=null}else if(W(i)&&l){var y=$B(i,d,h,t.get("borderWidth"));n=y[0],a=y[1]}else{var y=XB(n,a,o,u,f,c?null:20,v?null:20);n=y[0],a=y[1]}if(c&&(n-=o0(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=o0(v)?h[1]/2:v==="bottom"?h[1]:0),hb(t)){var y=ZB(n,a,o,u,f);n=y[0],a=y[1]}o.moveTo(n,a)},e.prototype._updateContentNotChangedOnAxis=function(t,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===t.length;return o&&C(n,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&C(u,function(c,v){var d=h[v]||{},p=c.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&p.length===g.length,o&&C(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&C(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=i[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=i,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,i){nt.node||!i.getDom()||(bo(this,"_updatePosition"),this._tooltipContent.dispose(),Iv("itemTooltip",i))},e.type="tooltip",e}(Pt);function Ha(r,e,t){var i=e.ecModel,n;t?(n=new Ct(t,i,i),n=new Ct(e.option,n,i)):n=e;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),W(o)&&(o={formatter:o}),o&&(n=new Ct(o,n,i)))}return n}function a0(r,e){return r.dispatchAction||Y(e.dispatchAction,e)}function XB(r,e,t,i,n,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function ZB(r,e,t,i,n){var a=t.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function $B(r,e,t,i){var n=t[0],a=t[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+f/2-a/2;break;case"top":s=e.x+u/2-n/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+f+o;break;case"left":s=e.x-n-o,l=e.y+f/2-a/2;break;case"right":s=e.x+u+o,l=e.y+f/2-a/2}return[s,l]}function o0(r){return r==="center"||r==="middle"}function qB(r,e,t){var i=Qv(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=zo(e,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=at(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function az(r){jt(td),r.registerComponentModel(RB),r.registerComponentView(UB),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Jt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Jt)}var s0=C;function l0(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function u0(r,e,t){var i={};return s0(e,function(a){var o=i[a]=n();s0(r[a],function(s,l){if(Qt.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new Qt(u),l==="opacity"&&(u=K(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Qt(u))}})}),i;function n(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function KB(r,e,t){var i;C(t,function(n){e.hasOwnProperty(n)&&l0(e[n])&&(i=!0)}),i&&C(t,function(n){e.hasOwnProperty(n)&&l0(e[n])?r[n]=K(e[n]):delete r[n]})}function JB(r,e,t,i){var n={};return C(r,function(a){var o=Qt.prepareVisualTypes(e[a]);n[a]=o}),{progress:function(o,s){var l;i!=null&&(l=s.getDimensionIndex(i));function u(w){return AS(s,h,w)}function f(w,x){k2(s,h,w,x)}for(var h,c=s.getStore();(h=o.next())!=null;){var v=s.getRawDataItem(h);if(!(v&&v.visualMap===!1))for(var d=i!=null?c.get(l,h):h,p=t(d),g=e[p],y=n[p],m=0,_=y.length;m<_;m++){var S=y[m];g[S]&&g[S].applyVisual(d,u,f)}}}}}var QB=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(ft),jB=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=lt(t.get("textBaseline"),t.get("textVerticalAlign")),f=new pt({style:Dt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=t.get("subtext"),v=new pt({style:Dt(s,{text:c,fill:s.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0);f.silent=!d&&!g,v.silent=!p&&!g,d&&f.on("click",function(){Np(d,"_"+t.get("target"))}),p&&v.on("click",function(){Np(p,"_"+t.get("subtarget"))}),at(f).eventData=at(v).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(f),c&&a.add(v);var y=a.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=ye(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),v.setStyle(S),y=a.getBoundingRect();var w=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new gt({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});a.add(b)}},e.type="title",e}(Pt);function oz(r){r.registerComponentModel(QB),r.registerComponentView(jB)}var f0=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var i=this._data.count();this.option.loop?t=(t%i+i)%i:(t>=i&&(t=i-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,i=t.data||[],n=t.axisType,a=this._names=[],o;n==="category"?(o=[],C(i,function(u,f){var h=Kt(ua(u),""),c;$(u)?(c=K(u),c.value=f):c=f,o.push(c),a.push(h)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Rc([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(ft),pb=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=_i(f0.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(f0);ae(pb,lS.prototype);var t5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Pt),e5=function(r){O(e,r);function e(t,i,n,a){var o=r.call(this,t,i,n)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(br),lh=Math.PI,h0=mt(),r5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.api=i},e.prototype.render=function(t,i,n){if(this.model=t,this.api=n,this.ecModel=i,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return _r("nameValue",{noName:!0,value:f})},C(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,t)},this),this._renderAxisLabel(a,s,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,i){var n=t.get(["label","position"]),a=t.get("orient"),o=n5(t,i),s;n==null||n==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:lh/2},h=a==="vertical"?o.height:o.width,c=t.getModel("controlStyle"),v=c.get("show",!0),d=v?c.get("itemSize"):0,p=v?c.get("itemGap"):0,g=d+p,y=t.get(["label","rotate"])||0;y=y*lh/180;var m,_,S,w=c.get("position",!0),x=v&&c.get("showPlayBtn",!0),b=v&&c.get("showPrevBtn",!0),T=v&&c.get("showNextBtn",!0),M=0,A=h;w==="left"||w==="bottom"?(x&&(m=[0,0],M+=g),b&&(_=[M,0],M+=g),T&&(S=[A-d,0],A-=g)):(x&&(m=[A-d,0],A-=g),b&&(_=[0,0],M+=g),T&&(S=[A-d,0],A-=g));var D=[M,A];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:h,orient:a,rotation:f[a],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:d,controlGap:p}},e.prototype._position=function(t,i){var n=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=$e(),l=o.x,u=o.y+o.height;pi(s,s,[-l,-u]),dn(s,s,-lh/2),pi(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),h=m(n.getBoundingRect()),c=m(a.getBoundingRect()),v=[n.x,n.y],d=[a.x,a.y];d[0]=v[0]=f[0][0];var p=t.labelPosOpt;if(p==null||W(p)){var g=p==="+"?0:1;_(v,h,f,1,g),_(d,c,f,1,1-g)}else{var g=p>=0?0:1;_(v,h,f,1,g),d[1]=v[1]+p}n.setPosition(v),a.setPosition(d),n.rotation=a.rotation=t.rotation,y(n),y(a);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,w,x,b,T){S[b]+=x[b][T]-w[b][T]}},e.prototype._createAxis=function(t,i){var n=i.getData(),a=i.get("axisType"),o=i5(i,a);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new e5("value",o,t.axisExtent,a);return l.model=i,l},e.prototype._createGroup=function(t){var i=this[t]=new it;return this.group.add(i),i},e.prototype._renderAxisLine=function(t,i,n,a){var o=n.getExtent();if(a.get(["lineStyle","show"])){var s=new Gt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:z({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new Gt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:q({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},e.prototype._renderAxisTick=function(t,i,n,a){var o=this,s=a.getData(),l=n.scale.getTicks();this._tickSymbols=[],C(l,function(u){var f=n.dataToCoord(u.value),h=s.getItemModel(u.value),c=h.getModel("itemStyle"),v=h.getModel(["emphasis","itemStyle"]),d=h.getModel(["progress","itemStyle"]),p={x:f,y:0,onclick:Y(o._changeTimeline,o,u.value)},g=v0(h,c,i,p);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),rn(g);var y=at(g);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,i,n,a){var o=this,s=n.getLabelModel();if(s.get("show")){var l=a.getData(),u=n.getViewLabels();this._tickLabels=[],C(u,function(f){var h=f.tickValue,c=l.getItemModel(h),v=c.getModel("label"),d=c.getModel(["emphasis","label"]),p=c.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),y=new pt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:Y(o._changeTimeline,o,h),silent:!1,style:Dt(v,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Dt(d),y.ensureState("progress").style=Dt(p),i.add(y),rn(y),h0(y).dataIndex=h,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,i,n,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),f=a.getPlayState(),h=a.get("inverse",!0);c(t.nextBtnPosition,"next",Y(this._changeTimeline,this,h?"-":"+")),c(t.prevBtnPosition,"prev",Y(this._changeTimeline,this,h?"+":"-")),c(t.playPosition,f?"stop":"play",Y(this._handlePlayClick,this,!f),!0);function c(v,d,p,g){if(v){var y=Je(lt(a.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=a5(a,d+"Icon",m,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,i.add(_),rn(_)}}},e.prototype._renderCurrentPointer=function(t,i,n,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(h){h.draggable=!0,h.drift=Y(u._handlePointerDrag,u),h.ondragend=Y(u._handlePointerDragend,u),c0(h,u._progressLine,s,n,a,!0)},onUpdate:function(h){c0(h,u._progressLine,s,n,a)}};this._currentPointer=v0(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,i,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,i){var n=this._toAxisCoord(t)[0],a=this._axis,o=Pr(a.getExtent().slice());n>o[1]&&(n=o[1]),n=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(ft),On=dt,Bv=C,Ns=it,gb=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Ns),this.group.add(this._selectorGroup=new Ns),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,i,n,l,s,u);var f=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},c=t.get("padding"),v=ye(f,h,c),d=this.layoutInner(t,o,v,a,l,u),p=ye(q({width:d.width,height:d.height},f),h,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=sb(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,i,n,a,o,s,l){var u=this.getContentGroup(),f=U(),h=i.get("selectedMode"),c=[];n.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Bv(i.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===` `)){var g=new Ns;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(p)[0];if(!f.get(p))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,p,d,v,i,t,_,w,S,h,a);x.on("click",On(p0,p,null,a,c)).on("mouseover",On(Nv,y.name,null,a,c)).on("mouseout",On(zv,y.name,null,a,c)),n.ssr&&x.eachChild(function(b){var T=at(b);T.seriesIndex=y.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),f.set(p,!0)}else n.eachRawSeries(function(b){if(!f.get(p)&&b.legendVisualProvider){var T=b.legendVisualProvider;if(!T.containName(p))return;var M=T.indexOfName(p),A=T.getItemVisual(M,"style"),D=T.getItemVisual(M,"legendIcon"),L=Ee(A.fill);L&&L[3]===0&&(L[3]=.2,A=z(z({},A),{fill:Nr(L,"rgba")}));var I=this._createItem(b,p,d,v,i,t,{},A,D,h,a);I.on("click",On(p0,null,p,a,c)).on("mouseover",On(Nv,null,p,a,c)).on("mouseout",On(zv,null,p,a,c)),n.ssr&&I.eachChild(function(P){var R=at(P);R.seriesIndex=b.seriesIndex,R.dataIndex=d,R.ssrType="legend"}),f.set(p,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},e.prototype._createSelector=function(t,i,n,a,o){var s=this.getSelectorGroup();Bv(t,function(u){var f=u.type,h=new pt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(h);var c=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);Ur(h,{normal:c,emphasis:v},{defaultText:u.title}),rn(h)})},e.prototype._createItem=function(t,i,n,a,o,s,l,u,f,h,c){var v=t.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(i),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=f5(f,a,l,u,v,g,c),w=new Ns,x=a.getModel("textStyle");if(J(t.getLegendIcon)&&(!_||_==="inherit"))w.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;w.add(h5({itemWidth:d,itemHeight:p,icon:f,iconRotate:b,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,M=s,A=o.get("formatter"),D=i;W(A)&&A?D=A.replace("{name}",i??""):J(A)&&(D=A(i));var L=g?x.getTextColor():a.get("inactiveColor");w.add(new pt({style:Dt(x,{text:D,x:T,y:p/2,fill:L,align:M,verticalAlign:"middle"},{inheritColor:L})}));var I=new gt({shape:w.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&pn({el:I,componentModel:o,itemName:i,itemTooltipOption:P.option}),w.add(I),w.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(w),rn(w),w.__legendDataIndex=n,w},e.prototype.layoutInner=function(t,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();an(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){an("horizontal",u,t.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=f[g]+d:h[p]+=c[g]+d,v[1-p]+=f[y]/2-c[y]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+d+c[g],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-p]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Pt);function f5(r,e,t,i,n,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Bv(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:Tl(h,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:t).opacity),s(u,i);var c=e.getModel("lineStyle"),v=c.getLineStyle();if(s(v,t),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!a){var d=e.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?i.lineWidth>0&&p?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function h5(r){var e=r.icon||"roundRect",t=Vt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function p0(r,e,t,i){zv(r,e,t,i),t.dispatchAction({type:"legendToggleSelect",name:r??e}),Nv(r,e,t,i)}function yb(r){for(var e=r.getZr().storage.getDisplayList(),t,i=0,n=e.length;in[o],g=[-v.x,-v.y];i||(g[a]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=lt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var S=t.get("pageButtonPosition",!0);S==="end"?m[a]+=n[o]-d[o]:y[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,f.setPosition(g),h.setPosition(y),c.setPosition(m);var w={x:0,y:0};if(w[o]=p?n[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-a]),h.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-d[o]-_,0),x[s]=w[s],h.setClipPath(new gt({shape:x})),h.__rectSize=x[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(t);return b.pageIndex!=null&&Mt(f,{x:b.contentPosition[0],y:b.contentPosition[1]},p?t:null),this._updatePageInfoView(t,b),w},e.prototype._pageGo=function(t,i,n){var a=this._getPageInfo(i)[t];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},e.prototype._updatePageInfoView=function(t,i){var n=this._controllerGroup;C(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=i[h]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",c?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=n.childOfName("pageText"),o=t.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",W(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var i=t.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=uh[o],l=fh[o],u=this._findTargetItemIndex(i),f=n.children(),h=f[u],c=f.length,v=c?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=S(h);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=c;++g)_=S(f[g]),(!_&&m.e>y.s+a||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=S(f[g]),(!_||!w(m,_.s))&&y.i=b&&x.s<=b+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(i=s)}),i??a},e.type="legend.scroll",e}(gb);function g5(r){r.registerAction("legendScroll","legendscroll",function(e,t){var i=e.scrollDataIndex;i!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(i)})})}function y5(r){jt(mb),r.registerComponentModel(d5),r.registerComponentView(p5),g5(r)}function lz(r){jt(mb),jt(y5)}var m5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=_i(ko.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(ko),ud=mt();function _5(r,e,t){ud(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function S5(r,e){for(var t=ud(r).coordSysRecordMap,i=t.keys(),n=0;ni[t+e]&&(e=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function C5(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var i=ud(t),n=i.coordSysRecordMap||(i.coordSysRecordMap=U());n.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=nb(a);C(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,x5(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=U());f.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),n.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){_b(n,a);return}var f=T5(l);o.enable(f.controlType,f.opt),o.setPointerChecker(a.containsPoint),Ho(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var M5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,i,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),_5(n,t,{pan:Y(hh.pan,this),zoom:Y(hh.zoom,this),scrollMove:Y(hh.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){S5(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(nd),hh={zoom:function(r,e,t,i){var n=this.range,a=n.slice(),o=r.axisModels[0];if(o){var s=vh[e](null,[i.originX,i.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(yn(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:_0(function(r,e,t,i,n,a){var o=vh[i]([a.oldX,a.oldY],[a.newX,a.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:_0(function(r,e,t,i,n,a){var o=vh[i]([0,0],[a.scrollDelta,a.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*a.scrollDelta})};function _0(r){return function(e,t,i,n){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,i,n);if(yn(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var vh={grid:function(r,e,t,i,n){var a=t.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,e,t,i,n){var a=t.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,e,t,i,n){var a=t.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function A5(r){ad(r),r.registerComponentModel(m5),r.registerComponentView(M5),C5(r)}var D5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=_i(ko.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(ko),Ya=gt,S0=7,L5=1,ch=30,I5=7,Ua="horizontal",x0="vertical",P5=5,R5=["line","bar","candlestick","scatter"],E5={easing:"cubicOut",duration:100,delay:0},k5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,i){this.api=i,this._onBrush=Y(this._onBrush,this),this._onBrushEnd=Y(this._onBrushEnd,this)},e.prototype.render=function(t,i,n,a){if(r.prototype.render.apply(this,arguments),Ho(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){bo(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new it;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(i),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,i=this.api,n=t.get("brushSelect"),a=n?I5:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===Ua?{right:s.width-o.x-o.width,top:s.height-ch-S0-a,width:o.width,height:ch}:{right:S0,top:o.y,width:ch,height:o.height},u=da(t.option);C(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=ye(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===x0&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Ua&&!o?{scaleY:l?1:-1,scaleX:1}:n===Ua&&o?{scaleY:l?1:-1,scaleX:-1}:n===x0&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=i.x-u.x,t.y=i.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=t.get("brushSelect");n.add(new Ya({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Ya({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:Y(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var i=this._size,n=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var v=[0,i[1]],d=[0,i[0]],p=[[i[0],0],[0,0]],g=[],y=d[1]/(o.count()-1),m=0,_=Math.round(o.count()/i[0]),S;o.each([l],function(M,A){if(_>0&&A%_){m+=y;return}var D=M==null||isNaN(M)||M==="",L=D?0:_t(M,h,v,!0);D&&!S&&A?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!D&&S&&(p.push([m,0]),g.push([m,0])),p.push([m,L]),g.push([m,L]),m+=y,S=D}),u=this._shadowPolygonPts=p,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var w=this.dataZoomModel;function x(M){var A=w.getModel(M?"selectedDataBackground":"dataBackground"),D=new it,L=new Qe({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Ne({shape:{points:f},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(L),D.add(I),D}for(var b=0;b<3;b++){var T=x(b===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,i=t.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();C(l,function(u){if(!n&&!(i!==!0&&ut(R5,u.get("type"))<0)){var f=a.getComponent(hi(o),s).axis,h=O5(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),n={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:c}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),c=i.filler=new Ya({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new Ya({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:L5,fill:"rgba(0,0,0,0)"}})),C([0,1],function(_){var S=l.get("handleIcon");!xl[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var w=Vt(S,-1,0,2,2,null,!0);w.attr({cursor:w0(this._orient),draggable:!0,drift:Y(this._onDragMove,this,_),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),b=l.get("handleSize");this._handleHeight=Z(b,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),rn(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(n[_]=w);var M=l.getModel("textStyle"),A=l.get("handleLabel")||{},D=A.show||!1;t.add(a[_]=new pt({silent:!0,invisible:!D,style:Dt(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var v=c;if(h){var d=Z(l.get("moveHandleSize"),s[1]),p=i.moveHandle=new gt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=i.moveHandleIcon=Vt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=i.moveZone=new gt({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:w0(this._orient),drift:Y(this._onDragMove,this,"all"),ondragstart:Y(this._showDataInfo,this,!0),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[_t(t[0],[0,100],i,!0),_t(t[1],[0,100],i,!0)]},e.prototype._updateInterval=function(t,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];yn(i,a,o,n.get("zoomLock")?"all":t,s.minSpan!=null?_t(s.minSpan,l,o,!0):null,s.maxSpan!=null?_t(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Pr([_t(a[0],o,l,!0),_t(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var i=this._displayables,n=this._handleEnds,a=Pr(n.slice()),o=this._size;C([0,1],function(v){var d=i.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;fi[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var i=t.offsetX,n=t.offsetY;this._brushStart=new Q(i,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Pr([_t(n.x,o,s,!0),_t(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Vr(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Ya({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,i),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?E5:null,start:i[0],end:i[1]})},e.prototype._findCoordRect=function(){var t,i=nb(this.dataZoomModel).infoList;if(!t&&i.length){var n=i[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(nd);function O5(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function w0(r){return r==="vertical"?"ns-resize":"ew-resize"}function B5(r){r.registerComponentModel(D5),r.registerComponentView(k5),ad(r)}function uz(r){jt(A5),jt(B5)}var Sb={get:function(r,e,t){var i=K((N5[r]||{})[e]);return t&&V(i)?i[i.length-1]:i}},N5={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},b0=Qt.mapVisual,z5=Qt.eachVisual,V5=V,T0=C,F5=Pr,G5=_t,Nl=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,i){var n=this.option;!i&&KB(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var i=this.stateList;t=Y(t,this),this.controllerVisuals=u0(this.option.controller,i,t),this.targetVisuals=u0(this.option.target,i,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,i=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,a){i.push(a)}):i=Tt(t),i},e.prototype.eachTargetSeries=function(t,i){C(this.getTargetSeriesIndices(),function(n){var a=this.ecModel.getSeriesByIndex(n);a&&t.call(i,a)},this)},e.prototype.isTargetSeries=function(t){var i=!1;return this.eachTargetSeries(function(n){n===t&&(i=!0)}),i},e.prototype.formatValueText=function(t,i,n){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;n=n||["<",">"],V(t)&&(t=t.slice(),u=!0);var f=i?t:u?[h(t[0]),h(t[1])]:h(t);if(W(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(J(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+f[1]:t[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(c){return c===s[0]?"min":c===s[1]?"max":(+c).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,i=F5([t.min,t.max]);this._dataExtent=i},e.prototype.getDataDimensionIndex=function(t){var i=this.option.dimension;if(i!=null)return t.getDimensionIndex(i);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var o=n[a],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),o=i.controller||(i.controller={});j(a,n),j(o,n);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),f.call(this,o);function l(h){V5(i.color)&&!h.inRange&&(h.inRange={color:i.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,c,v){var d=h[c],p=h[v];d&&!p&&(p=h[v]={},T0(d,function(g,y){if(Qt.isValidType(y)){var m=Sb.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(h){var c=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,v=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";T0(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=c&&K(c)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&K(v)||(s?m[0]:[m[0],m[0]])),_.symbol=b0(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var w=-1/0;z5(S,function(x){x>w&&(w=x)}),_.symbolSize=b0(S,function(x){return G5(x,[0,w],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(ft),C0=[20,140],H5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=C0[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=C0[1])},e.prototype._resetRange=function(){var t=this.getExtent(),i=this.option.range;!i||i.auto?(t.auto=1,this.option.range=t):V(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],t[0]),i[1]=Math.min(i[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),C(this.stateList,function(t){var i=this.option.controller[t].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),i=Pr((this.get("range")||[]).slice());return i[0]>t[1]&&(i[0]=t[1]),i[1]>t[1]&&(i[1]=t[1]),i[0]=n[1]||t<=i[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[];return this.eachTargetSeries(function(n){var a=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),i.push({seriesId:n.id,dataIndex:a})},this),i},e.prototype.getVisualMeta=function(t){var i=M0(this,"outOfRange",this.getExtent()),n=M0(this,"inRange",this.option.range.slice()),a=[];function o(v,d){a.push({value:v,color:t(v,d)})}for(var s=0,l=0,u=n.length,f=i.length;lt[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:s/n})}return a.push({color:this.getControllerVisual(t[1],"color",i),offset:1}),a},e.prototype._createBarPoints=function(t,i){var n=this.visualMapModel.itemSize;return[[n[0]-i[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-i[1],t[1]]]},e.prototype._createBarGroup=function(t){var i=this._orient,n=this.visualMapModel.get("inverse");return new it(i==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,i){if(this._useHandle){var n=this._shapes,a=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=a.itemSize,u=a.getExtent(),f=this._applyTransform("left",n.mainGroup);W5([0,1],function(h){var c=o[h];c.setStyle("fill",i.handlesColor[h]),c.y=t[h];var v=ur(t[h],[0,l[1]],u,!0),d=this.getControllerVisual(v,"symbolSize");c.scaleX=c.scaleY=d/l[0],c.x=l[0]-d/2;var p=Ke(n.handleLabelPoints[h],nn(c,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[h].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,i,n,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,h=f.indicator;if(h){h.attr("invisible",!1);var c={convertOpacityToAlpha:!0},v=this.getControllerVisual(t,"color",c),d=this.getControllerVisual(t,"symbolSize"),p=ur(t,s,u,!0),g=l[0]-d/2,y={x:h.x,y:h.y};h.y=p,h.x=g;var m=Ke(f.indicatorLabelPoint,nn(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),w=this._orient,x=w==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(i),verticalAlign:x?S:"middle",align:x?"center":S});var b={x:g,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(b,M),_.animateTo(T,M)}else h.attr(b),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var D=0;Do[1]&&(h[1]=1/0),i&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var c=this._hoverLinkDataIndices,v=[];(i||I0(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var d=LC(c,v);this._dispatchHighDown("downplay",el(d[0],n)),this._dispatchHighDown("highlight",el(d[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var i;if(Ki(t.target,function(l){var u=at(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var n=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(n)){var o=n.getData(i.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var n=0;n=0&&(a.dimension=o,i.push(a))}}),r.getData().setVisual("visualMeta",i)}}];function J5(r,e,t,i){for(var n=e.targetVisuals[i],a=Qt.prepareVisualTypes(n),o={color:DS(r.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction($5,q5),C(K5,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Q5))}function j5(r){r.registerComponentModel(H5),r.registerComponentView(X5),bb(r)}var tN=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],eN[this._mode].call(this,this._pieceList),this._resetSelected(t,i);var a=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=K(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=G(this._pieceList,function(l){return l=K(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,i={},n=Qt.listVisualTypes(),a=this.isCategory();C(t.pieces,function(s){C(n,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),C(i,function(s,l){var u=!1;C(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&C(this.stateList,function(f){(t[f]||(t[f]={}))[l]=Sb.get(l,f==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,i){var n=this.option,a=this._pieceList,o=(i?n:t).selected||{};if(n.selected=o,C(a,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;C(a,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=K(t)},e.prototype.getValueState=function(t){var i=Qt.findPieceIndex(t,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[],n=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Qt.findPieceIndex(l,n);f===t&&o.push(u)},this),i.push({seriesId:a.id,dataIndex:o})},this),i},e.prototype.getRepresentValue=function(t){var i;if(this.isCategory())i=t.value;else if(t.value!=null)i=t.value;else{var n=t.interval||[];i=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return i},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var i=[],n=["",""],a=this;function o(f,h){var c=a.getRepresentValue({interval:f});h||(h=a.getValueState(c));var v=t(c,h);f[0]===-1/0?n[0]=v:f[1]===1/0?n[1]=v:i.push({value:f[0],color:v},{value:f[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return C(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:i,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=_i(Nl.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Nl),eN={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),i=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var a=(i[1]-i[0])/n;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o","≥"][i[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function k0(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var rN=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,f=this._getViewData(),h=f.endsText,c=di(i.get("showLabel",!0),!h),v=!i.get("selectedMode");h&&this._renderEndsText(t,h[0],u,c,l),C(f.viewPieceList,function(d){var p=d.piece,g=new it;g.onclick=Y(this._onItemClick,this,p),this._enableHoverLink(g,d.indexInModelPieceList);var y=i.getRepresentValue(p);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],v),c){var m=this.visualMapModel.getValueState(y);g.add(new pt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1},silent:v}))}t.add(g)},this),h&&this._renderEndsText(t,h[1],u,c,l),an(i.get("orient"),t,i.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,i){var n=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:el(s.findTargetDataIndices(i),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,i=t.option;if(i.orient==="vertical")return wb(t,this.api,t.itemSize);var n=i.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,i,n,a,o){if(i){var s=new it,l=this.visualMapModel.textStyleModel;s.add(new pt({style:Dt(l,{x:a?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:a?o:"center",text:i})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,i=G(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?i.reverse():n&&(n=n.slice().reverse()),{viewPieceList:i,endsText:n}},e.prototype._createItemSymbol=function(t,i,n,a){var o=Vt(this.getControllerVisual(i,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(i,"color"));o.silent=a,t.add(o)},e.prototype._onItemClick=function(t){var i=this.visualMapModel,n=i.option,a=n.selectedMode;if(a){var o=K(n.selected),s=i.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,C(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(xb);function iN(r){r.registerComponentModel(tN),r.registerComponentView(rN),bb(r)}function fz(r){jt(j5),jt(iN)}var nN={label:{enabled:!0},decal:{show:!1}},O0=mt(),aN={};function oN(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var i=K(nN);j(i.label,r.getLocaleModel().get("aria"),!1),j(t.option,i,!1),n(),a();function n(){var u=t.getModel("decal"),f=u.get("show");if(f){var h=U();r.eachSeries(function(c){if(!c.isColorBySeries()){var v=h.get(c.type);v||(v={},h.set(c.type,v)),O0(c).scope=v}}),r.eachRawSeries(function(c){if(r.isSeriesFiltered(c))return;if(J(c.enableAriaDecal)){c.enableAriaDecal();return}var v=c.getData();if(c.isColorBySeries()){var m=Vp(c.ecModel,c.name,aN,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",S(_,m))}else{var d=c.getRawData(),p={},g=O0(c).scope;v.each(function(w){var x=v.getRawIndex(w);p[x]=w});var y=d.count();d.each(function(w){var x=p[w],b=d.getName(w)||w+"",T=Vp(c.ecModel,b,g,y),M=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",S(M,T))})}function S(w,x){var b=w?z(z({},x),w):x;return b.dirty=!0,b}})}}function a(){var u=e.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=q(h.option,f),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var c=r.getSeriesCount(),v=h.get(["data","maxCount"])||10,d=h.get(["series","maxCount"])||10,p=Math.min(c,d),g;if(!(c<1)){var y=s();if(y){var m=h.get(["general","withTitle"]);g=o(m,{title:y})}else g=h.get(["general","withoutTitle"]);var _=[],S=c>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);g+=o(S,{seriesCount:c}),r.eachSeries(function(T,M){if(M1?h.get(["series","multiple",L]):h.get(["series","single",L]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var P=h.get(["data","partialData"]);A+=o(P,{displayCnt:v})}else A+=h.get(["data","allData"]);for(var R=h.get(["data","separator","middle"]),E=h.get(["data","separator","end"]),N=h.get(["data","excludeDimensionId"]),k=[],B=0;B=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=v.dpr,D=0;D0&&e>n[0]){for(l=0;le);l++);s=i[n[l]]}if(n.splice(l+1,0,e),i[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var i=this._zlevelList,n=0;n0?zs:0),this._needsManuallyCompositing),f.__builtin__||Uv("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),a=f),n.__dirty&xe&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,C(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var i=this._layerConfig;i[e]?j(i[e],t,!0):i[e]=t;for(var n=0;n2&&i.push(n),n=[I,P]}function f(I,P,R,E){Yn(I,R)&&Yn(P,E)||n.push(I,P,R,E,R,E)}function h(I,P,R,E,N,k){var B=Math.abs(P-I),F=Math.tan(B/4)*4/3,H=PT:D2&&i.push(n),i}function Fv(r,e,t,i,n,a,o,s,l,u){if(Yn(r,t)&&Yn(e,i)&&Yn(n,o)&&Yn(a,s)){l.push(o,s);return}var f=2/u,h=f*f,c=o-r,v=s-e,d=Math.sqrt(c*c+v*v);c/=d,v/=d;var p=t-r,g=i-e,y=n-o,m=a-s,_=p*p+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var M=[],A=[];gi(r,t,n,o,.5,M),gi(e,i,a,s,.5,A),Fv(M[0],A[0],M[1],A[1],M[2],A[2],M[3],A[3],l,u),Fv(M[4],A[4],M[5],A[5],M[6],A[6],M[7],A[7],l,u)}function vN(r,e){var t=Vv(r),i=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),h=Tb([l,u],f?0:1,e),c=(f?s:u)/h.length,v=0;vn,o=Tb([i,n],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",f=a?"y":"x",h=r[s]/o.length,c=0;c1?null:new Q(p*l+r,p*u+e)}function pN(r,e,t){var i=new Q;Q.sub(i,t,e),i.normalize();var n=new Q;Q.sub(n,r,e);var a=n.dot(i);return a}function Nn(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function gN(r,e,t){for(var i=r.length,n=[],a=0;ao?(u.x=f.x=s+a/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+a),gN(e,u,f)}function zl(r,e,t,i){if(t===1)i.push(e);else{var n=Math.floor(t/2),a=r(e);zl(r,a[0],n,i),zl(r,a[1],t-n,i)}return i}function yN(r,e){for(var t=[],i=0;i0;u/=2){var f=0,h=0;(r&u)>0&&(f=1),(e&u)>0&&(h=1),s+=u*u*(3*f^h),h===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Gl(r){var e=1/0,t=1/0,i=-1/0,n=-1/0,a=G(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(h,t),i=Math.max(f,i),n=Math.max(h,n),[f,h]}),o=G(a,function(s,l){return{cp:s,z:MN(s[0],s[1],e,t,i,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Ab(r){return SN(r.path,r.count)}function Gv(){return{fromIndividuals:[],toIndividuals:[],count:0}}function AN(r,e,t){var i=[];function n(w){for(var x=0;x=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var a=l.length,u=Math.ceil(a/2);t[n].many=l.slice(u,a),t[s].many=l.slice(0,u),s++}return t}var LN={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),i=0;i0))return;var s=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;Y0(r)&&(u=r,f=e),Y0(e)&&(u=e,f=r);function h(y,m,_,S,w){var x=y.many,b=y.one;if(x.length===1&&!w){var T=m?x[0]:b,M=m?b:x[0];if(Vl(T))h({many:[T],one:M},!0,_,S,!0);else{var A=s?q({delay:s(_,S)},l):l;fd(T,M,A),a(T,M,T,M,A)}}else for(var D=q({dividePath:LN[t],individualDelay:s&&function(N,k,B,F){return s(N+_,S)}},l),L=m?AN(x,b,D):DN(b,x,D),I=L.fromIndividuals,P=L.toIndividuals,R=I.length,E=0;Ee.length,v=u?U0(f,u):U0(c?e:r,[c?r:e]),d=0,p=0;pDb))for(var a=i.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof ht&&!T.animators.length&&T.animateFrom({style:{opacity:0}},b)})})}function K0(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function J0(r){return V(r)?r.sort().join(","):r}function ai(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function BN(r,e){var t=U(),i=U(),n=U();return C(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=K0(a),f=J0(u);i.set(f,{dataGroupId:s,data:l}),V(u)&&C(u,function(h){n.set(h,{key:f,dataGroupId:s,data:l})})}),C(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=K0(a),u=J0(l),f=i.get(u);if(f)t.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:ai(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:ai(s),data:s}]});else if(V(l)){var h=[];C(l,function(d){var p=i.get(d);p.data&&h.push({dataGroupId:p.dataGroupId,divide:ai(p.data),data:p.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:ai(s)}]})}else{var c=n.get(l);if(c){var v=t.get(c.key);v||(v={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:ai(c.data)}],newSeries:[]},t.set(c.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:ai(s)})}}}}),t}function Q0(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:ai(e.oldData[s]),groupIdDim:o.dimension})}),C(Tt(r.to),function(o){var s=Q0(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:ai(l),groupIdDim:o.dimension})}}),n.length>0&&a.length>0&&Lb(n,a,i)}function cz(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){C(Tt(i.seriesTransition),function(n){C(Tt(n.to),function(a){for(var o=i.updatedSeries,s=0;s