!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var v=function(t,e){return(v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var x=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},p=new function(){this.browser=new x,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(p.wxa=!0,p.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?p.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(p.node=!0,p.svgSupported=!0):(et=navigator.userAgent,ae=(Wt=p).browser,at=et.match(/Firefox\/([\d.]+)/),q=et.match(/MSIE\s([\d.]+)/)||et.match(/Trident\/.+?rv:(([\d.]+))/),tt=et.match(/Edge?\/([\d.]+)/),et=/micromessenger/i.test(et),at&&(ae.firefox=!0,ae.version=at[1]),q&&(ae.ie=!0,ae.version=q[1]),tt&&(ae.edge=!0,ae.version=tt[1],ae.newEdge=18<+tt[1].split(".")[0]),et&&(ae.weChat=!0),Wt.svgSupported="undefined"!=typeof SVGRect,Wt.touchEventsSupported="ontouchstart"in window&&!ae.ie&&!ae.edge,Wt.pointerEventsSupported="onpointerdown"in window&&(ae.edge||ae.ie&&11<=+ae.version),Wt.domSupported="undefined"!=typeof document,at=document.documentElement.style,Wt.transform3dSupported=(ae.ie&&"transition"in at||ae.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in at)&&!("OTransition"in at),Wt.transformSupported=Wt.transform3dSupported||ae.ie&&9<=+ae.version);var w=12,b="sans-serif",K=w+"px "+b;var S,T,C=function(t){var e={};if("undefined"!=typeof JSON)for(var n=0;n>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",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,o),o,r);if(e)return e(t,n,i),1}}function me(t){return"CANVAS"===t.nodeName.toUpperCase()}var ve=/([&<>"'])/g,_e={"&":"&","<":"<",">":">",'"':""","'":"'"};function xe(t){return null==t?"":(t+"").replace(ve,function(t,e){return _e[e]})}var we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,be=[],Se=p.browser.firefox&&+p.browser.version.split(".")[0]<39;function Me(t,e,n,i){return n=n||{},i?Te(t,e,n):Se&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Te(t,e,n),n}function Te(t,e,n){if(p.domSupported&&t.getBoundingClientRect){var i,r=e.clientX,e=e.clientY;if(me(t))return i=t.getBoundingClientRect(),n.zrX=r-i.left,void(n.zrY=e-i.top);if(ye(be,t,r,e))return n.zrX=be[0],void(n.zrY=be[1])}n.zrX=n.zrY=0}function Ce(t){return t||window.event}function Ie(t,e,n){var i;return null==(e=Ce(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Me(t,i,e,n):(Me(t,e,e,n),i=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,t=t.deltaY;return null!=n&&null!=t?3*(0!==t?Math.abs(t):Math.abs(n))*(0=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},Ke.prototype.clone=function(){return new Ke(this.x,this.y,this.width,this.height)},Ke.prototype.copy=function(t){Ke.copy(this,t)},Ke.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Ke.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ke.prototype.isZero=function(){return 0===this.width||0===this.height},Ke.create=function(t){return new Ke(t.x,t.y,t.width,t.height)},Ke.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Ke.applyTransform=function(t,e,n){var i,r,o,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}N(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){sn.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=hn(this,i,r);if("mouseup"===a&&o||(n=(e=this.findHover(i,r)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?l=o:s=1+o;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function mn(A,L){var P,O,N=pn,R=0,E=[];function e(t){var e=P[t],n=O[t],i=P[t+1],r=O[t+1],t=(O[t]=n+r,t===R-3&&(P[t+1]=P[t+2],O[t+1]=O[t+2]),R--,yn(A[i],A,e,n,0,L));if(e+=t,0!=(n-=t)&&0!==(r=gn(A[e+n-1],A,i,r,r-1,L)))if(n<=r){var o=e,a=n,t=i,s=r,l=0;for(l=0;lO[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(r);do{}while((o=dn(t,n,i,e))=this._maxSize&&0>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===i?parseInt(n.slice(4),16)/15:1),gi(t,e),e):void ci(e,0,0,0,1):7===i||9===i?0<=(r=parseInt(n.slice(1,7),16))&&r<=16777215?(ci(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===i?parseInt(n.slice(7),16)/255:1),gi(t,e),e):void ci(e,0,0,0,1):void 0;var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===i){var i=n.substr(0,r),a=n.substr(r+1,o-(r+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?ci(e,+a[0],+a[1],+a[2],1):ci(e,0,0,0,1);s=li(a.pop());case"rgb":return 3<=a.length?(ci(e,si(a[0]),si(a[1]),si(a[2]),3===a.length?s:li(a[3])),gi(t,e),e):void ci(e,0,0,0,1);case"hsla":return 4!==a.length?void ci(e,0,0,0,1):(a[3]=li(a[3]),mi(a,e),gi(t,e),e);case"hsl":return 3!==a.length?void ci(e,0,0,0,1):(mi(a,e),gi(t,e),e);default:return}}ci(e,0,0,0,1)}}function mi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=li(t[1]),r=li(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return ci(e=e||[],oi(255*ui(r,i,n+1/3)),oi(255*ui(r,i,n)),oi(255*ui(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function vi(t,e){var n=yi(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255e);g++);g=f(g-1,h-2)}i=u[g+1],n=u[g]}n&&i&&(this._lastFr=g,this._lastFrP=e,d=i.percent-n.percent,r=0==d?1:f((e-n.percent)/d,1),i.easingFunc&&(r=i.easingFunc(r)),f=a?this._additiveValue:p?Ki:t[c],(Zi(l)||p)&&(f=f||(this._additiveValue=[])),this.discrete?t[c]=(r<1?n:i).rawValue:Zi(l)?(1===l?Wi:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},co.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},co.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},co.prototype.refreshHover=function(){this._needsRefreshHover=!0},co.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},co.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},co.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},co.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},co.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},co.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},co.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},co.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},co.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},co.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},co.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var r=0,o=0,a=t.length;oo){0i.width&&(o=e.split("\n"),c=!0),i.accumWidth=t):(t=La(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,o=t.lines)):o=e.split("\n");for(var p=0;pthis._ux||i>this._uy;return this.addData(Y.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r?(this._xi=t,this._yi=e,this._pendingPtDist=0):(r=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r),this},o.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(Y.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},o.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Y.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},o.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),cs[0]=i,cs[1]=r,s=o,(l=ps((a=cs)[0]))<0&&(l+=us),h=l-a[0],u=a[1],u+=h,!s&&us<=u-l?u=l+us:s&&us<=l-u?u=l-us:!s&&uu.length&&(this._expandData(),u=this.data);for(var h=0;hn||ss(y)>i||c===e-1)&&(f=Math.sqrt(I*I+y*y),r=g,o=_);break;case Y.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],w=t[c++],f=function(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=Bn(t,n,r,a,f),f=Bn(e,i,o,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(r,o,m,v,g,_,x,w,10),r=x,o=w;break;case Y.Q:f=function(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=Un(t,n,r,p),p=Un(e,i,o,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(r,o,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case Y.A:var x=t[c++],w=t[c++],b=t[c++],S=t[c++],M=t[c++],T=t[c++],C=T+M;c+=1,d&&(a=os(M)*b+x,s=as(M)*S+w),f=rs(b,S)*is(us,Math.abs(T)),r=os(C)*b+x,o=as(C)*S+w;break;case Y.R:a=r=t[c++],s=o=t[c++];f=2*t[c++]+2*t[c++];break;case Y.Z:var I=a-r,y=s-o;f=Math.sqrt(I*I+y*y),r=a,o=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},o.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,E=this._ux,z=this._uy,B=this._len,c=e<1,p=0,d=0,f=0;if(!c||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var g=0;g=bs[i=0]+t&&a<=bs[1]+t?h:0;rMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+w,b,T,r);u=Math.cos(x+w)*v+y,h=Math.sin(x+w)*_+m;break;case _s.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],n){if(fs(c,p,S,p,e,i,r)||fs(S,p,S,M,e,i,r)||fs(S,M,c,M,e,i,r)||fs(c,M,c,p,e,i,r))return!0}else l=(l+=vs(S,p,S,M,i,r))+vs(c,M,c,p,i,r);break;case _s.Z:if(n){if(fs(u,h,c,p,e,i,r))return!0}else l+=vs(u,h,c,p,i,r);u=c,h=p}}return n||(t=h,o=p,Math.abs(t-o)i.len()&&(uMath.abs(i[1])?0e)return t[i];return t[n-1]}var kd,Dd="\0_ec_inner",Ad=(u(s,kd=tp),s.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new tp(i),this._locale=new tp(r),this._optionManager=o},s.prototype.setOption=function(t,e,n){e=Od(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},s.prototype.resetOption=function(t,e){return this._resetOption(t,Od(e))},s.prototype._resetOption=function(t,e){var n,i=!1,r=this._optionManager;return t&&"recreate"!==t||(n=r.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Sd(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=r.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=r.getMediaOption(this)).length&&N(n,function(t){i=!0,this._mergeOption(t,e)},this),i},s.prototype.mergeOption=function(t){this._mergeOption(t,null)},s.prototype._mergeOption=function(i,t){var r=this.option,h=this._componentsMap,c=this._componentsCount,n=[],o=G(),p=t&&t.replaceMergeMainTypeMap;yd(this).datasetMap=G(),N(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?_(t):d(r[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!o.get(e)&&(n.push(e),o.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(o){var a,t=function(t,e,n){return(e=(e=xd.get(e))&&e(t))?n.concat(e):n}(this,o,zo(i[o])),e=h.get(o),n=e?p&&p.get(o)?"replaceMerge":"normalMerge":"replaceAll",e=Ho(e,t,n),s=(qo(e,o,g),r[o]=null,h.set(o,null),c.set(o,0),[]),l=[],u=0;N(e,function(t,e){var n=t.existing,i=t.newOption;if(i){var r=g.getClass(o,t.keyInfo.subType,!("series"===o));if(!r)return;if("tooltip"===o){if(a)return;a=!0}n&&n.constructor===r?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=O({componentIndex:e},t.keyInfo),O(n=new r(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(s.push(n.option),l.push(n),u++):(s.push(void 0),l.push(void 0))},this),r[o]=s,h.set(o,l),c.set(o,u),"series"===o&&wd(this)},this),this._seriesIndices||wd(this)},s.prototype.getOption=function(){var a=_(this.option);return N(a,function(t,e){if(g.hasClass(e)){for(var n=zo(t),i=n.length,r=!1,o=i-1;0<=o;o--)n[o]&&!Yo(n[o])?r=!0:(n[o]=null,r||i--);n.length=i,a[e]=n}}),delete a[Dd],a},s.prototype.getTheme=function(){return this._theme},s.prototype.getLocaleModel=function(){return this._locale},s.prototype.setUpdatePayload=function(t){this._payload=t},s.prototype.getUpdatePayload=function(){return this._payload},s.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;ig[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},l.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=B(o,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},l.prototype.count=function(){return this._count},l.prototype.get=function(t,e){return 0<=e&&e=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}}return-1},l.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(i){null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();lt[S][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}}},l.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),r=i._chunks[t],o=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(xg(this._rawCount))(Math.min(2*(Math.ceil(o/s)+2),o));u[a++]=l;for(var h=1;hh[1]&&(h[1]=y),c[p++]=m}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},l.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();rthis.getShallow("animationThreshold")?!1:t)},h.prototype.restoreData=function(){this.dataTask.dirty()},h.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Td.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},h.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},h.prototype.getProgressive=function(){return this.get("progressive")},h.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},h.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},h.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var o=0;oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Hg(e,n){N(zt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,ft(Gg,n))})}function Gg(t,e){t=Wg(t);return t&&t.setOutputEnd((e||this).count()),e}function Wg(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}lt(Eg,$c),lt(Eg,Td),la(Eg,g);Xg.prototype.init=function(t,e){},Xg.prototype.render=function(t,e,n,i){},Xg.prototype.dispose=function(t,e){},Xg.prototype.updateView=function(t,e,n,i){},Xg.prototype.updateLayout=function(t,e,n,i){},Xg.prototype.updateVisual=function(t,e,n,i){},Xg.prototype.toggleBlurSeries=function(t,e,n){},Xg.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var Ug=Xg;function Xg(){this.group=new oo,this.uid=ip("viewComponent")}function Yg(){var o=Zo();return function(t){var e=o(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,r=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==r&&i==e)&&"reset"}}sa(Ug),pa(Ug);var qg=Zo(),jg=Yg(),Zg=(Kg.prototype.init=function(t,e){},Kg.prototype.render=function(t,e,n,i){},Kg.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Qg(t,i,"emphasis")},Kg.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Qg(t,i,"normal")},Kg.prototype.remove=function(t,e){this.group.removeAll()},Kg.prototype.dispose=function(t,e){},Kg.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Kg.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Kg.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Kg.prototype.eachRendered=function(t){Cc(this.group,t)},Kg.markUpdateMethod=function(t,e){qg(t).updateMethod=e},Kg.protoInitialize=void(Kg.prototype.type="chart"),Kg);function Kg(){this.group=new oo,this.uid=ip("viewChart"),this.renderTask=Bf({plan:Jg,reset:ty}),this.renderTask.context={view:this}}function $g(t,e,n){t&&su(t)&&("emphasis"===e?Wl:Ul)(t,n)}function Qg(e,t,n){var i,r=jo(e,t),o=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=fl[t])&&dl<=32?fl[t]=dl++:i):null;null!=r?N(zo(r),function(t){$g(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){$g(t,n,o)})}function Jg(t){return jg(t.model)}function ty(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,t=t.view,a=r&&qg(r).updateMethod,o=o?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==o&&t[o](e,n,i,r),ey[o]}sa(Zg),pa(Zg);var ey={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};function ny(t,r,o){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}r=r||0;function e(){for(var t=[],e=0;en.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},cy.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},cy.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,r=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:r}},cy.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=G();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},cy.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),r=this.api;N(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});It(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,r),t.overallReset&&this._createOverallStageTask(t,e,i,r)},this)},cy.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},cy.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},cy.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},cy.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}N(t,function(i,t){var e,n,r,o,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((o=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),r=!0)}),r&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),o.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},cy.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},cy.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},cy.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},cy.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=G(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Bf({plan:yy,reset:my,count:xy}));e.context={model:t,ecModel:i,api:r,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:o},o._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,r).each(l)},cy.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Bf({reset:py}),a=(o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r},o.agentStubMap),s=o.agentStubMap=G(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,Bf({reset:dy,onDirty:gy})));e.context={model:t,overallProgress:u},e.agent=o,e.__block=u,r._pipe(t,e)}It(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,N(n.getSeries(),c)),h&&o.dirty()},cy.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},cy.wrapStageHandler=function(t,e){return(t=k(t)?{overallReset:t,seriesType:function(t){wy=null;try{t(by,Sy)}catch(t){}return wy}(t)}:t).uid=ip("stageHandler"),e&&(t.visualType=e),t};var hy=cy;function cy(t,e,n,i){this._stageTaskMap=G(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function py(t){t.overallReset(t.ecModel,t.api,t.payload)}function dy(t){return t.overallProgress&&fy}function fy(){this.agent.dirty(),this.getDownstream().dirty()}function gy(){this.agent&&this.agent.dirty()}function yy(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function my(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=zo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new qs({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),N(p,function(t){t=new Bs({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i);this.id},c.prototype.convertToPixel=function(t,e){return Wm(this,"convertToPixel",t,e)},c.prototype.convertFromPixel=function(t,e){return Wm(this,"convertFromPixel",t,e)},c.prototype.containPixel=function(t,i){var r;if(!this._disposed)return N($o(this._model,t),function(t,n){0<=n.indexOf("Models")&&N(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?r=r||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(r=r||e.containPoint(i,t))},this)},this),!!r;this.id},c.prototype.getVisual=function(t,e){var t=$o(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;if(null==t)return Py(n,e);var i=n,r=t,o=e;switch(o){case"color":return i.getItemVisual(r,"style")[i.getVisual("drawType")];case"opacity":return i.getItemVisual(r,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return i.getItemVisual(r,o)}},c.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},c.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},c.prototype._initEvents=function(){var t,n,i,s=this;N(h0,function(a){function t(t){var n,e,i,r=s.getModel(),o=t.target;"globalout"===a?n={}:o&&Ny(o,function(t){var e,t=pl(t);return t&&null!=t.dataIndex?(e=t.dataModel||r.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,o)||{},1):t.eventData&&(n=O({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&r.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),N(p0,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),N(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(Oy("map","selectchanged",n,e,t),Oy("pie","selectchanged",n,e,t)):"select"===t.fromAction?(Oy("map","selected",n,e,t),Oy("pie","selected",n,e,t)):"unselect"===t.fromAction&&(Oy("map","unselected",n,e,t),Oy("pie","unselected",n,e,t))})},c.prototype.isDisposed=function(){return this._disposed},c.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},c.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&ea(this.getDom(),b0,""),e=(t=this)._api,n=t._model,N(t._componentsViews,function(t){t.dispose(n,e)}),N(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete v0[t.id])},c.prototype.resize=function(t){if(!this[km])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var e=e.resetOption("media"),n=t&&t.silent;this[Dm]&&(null==n&&(n=this[Dm].silent),e=!0,this[Dm]=null),this[km]=!0;try{e&&Fm(this),Gm.update.call(this,{type:"resize",animation:O({duration:0},t&&t.animation)})}catch(t){throw this[km]=!1,t}this[km]=!1,Ym.call(this,n),qm.call(this,n)}}},c.prototype.showLoading=function(t,e){this._disposed?this.id:(P(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),m0[t]&&(t=m0[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},c.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},c.prototype.makeActionFromEvent=function(t){var e=O({},t);return e.type=p0[t.type],e},c.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(P(e)||(e={silent:!!e}),c0[t.type]&&this._model&&(this[km]?this._pendingActions.push(t):(n=e.silent,Xm.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&p.browser.weChat&&this._throttledZrFlush(),Ym.call(this,n),qm.call(this,n))))},c.prototype.updateLabelLayout=function(){Cm.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},c.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},c.internalField=(Fm=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Vm(t,!0),Vm(t,!1),e.plan()},Vm=function(t,r){for(var o=t._model,a=t._scheduler,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;es.get("hoverLayerThreshold")&&!p.node&&!p.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=i._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),Cm.trigger("series:afterupdate",t,e,n)},e0=function(t){t[Am]=!0,t.getZr().wakeUp()},n0=function(t){t[Am]&&(t.getZr().storage.traverse(function(t){$h(t)||a0(t)}),t[Am]=!1)},Jm=function(n){return u(t,e=Nd),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){Wl(t,e),e0(n)},t.prototype.leaveEmphasis=function(t,e){Ul(t,e),e0(n)},t.prototype.enterBlur=function(t){Xl(t),e0(n)},t.prototype.leaveBlur=function(t){Yl(t),e0(n)},t.prototype.enterSelect=function(t){ql(t),e0(n)},t.prototype.leaveSelect=function(t){jl(t),e0(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(t0=function(i){function r(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},Mv.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Mv.prototype.getExtent=function(){return this._extent.slice()},Mv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Mv.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},Mv.prototype.isBlank=function(){return this._isBlank},Mv.prototype.setBlank=function(t){this._isBlank=t};var Sv=Mv;function Mv(t){this._setting=t||{},this._extent=[1/0,-1/0]}pa(Sv);var Tv=0,Cv=(Iv.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&B(e,kv);return new Iv({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},Iv.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},Iv.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return V(t)||i?(i&&!this._deduplication?(n=this.categories.length,this.categories[n]=t):null==(n=(e=this._getOrCreateMap()).get(t))&&(i?(n=this.categories.length,this.categories[n]=t,e.set(t,n)):n=NaN),n):t},Iv.prototype._getOrCreateMap=function(){return this._map||(this._map=G(this.categories))},Iv);function Iv(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Tv}function kv(t){return P(t)&&null!=t.value?t.value:t+""}function Dv(t){return"interval"===t.type||"log"===t.type}function Av(t,e,n,i){var r={},o=t[1]-t[0],o=r.interval=Lo(o/e,!0),e=(null!=n&&oi[1]&&(i[0]=i[1]),r}function Lv(t){var e=Math.pow(10,Ao(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,wo(t*e)}function Pv(t){return bo(t)+2}function Ov(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Nv(t,e){return t>=e[0]&&t<=e[1]}function Rv(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Ev(t,e){return t*(e[1]-e[0])+e[0]}u(Fv,zv=Sv),Fv.prototype.parse=function(t){return null==t?NaN:V(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},Fv.prototype.contain=function(t){return Nv(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},Fv.prototype.normalize=function(t){return Rv(t=this._getTickNumber(this.parse(t)),this._extent)},Fv.prototype.scale=function(t){return t=Math.round(Ev(t,this._extent)),this.getRawOrdinalNumber(t)},Fv.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},Fv.prototype.getMinorTicks=function(t){},Fv.prototype.setSortInfo=function(t){if(null==t)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=t},Fv.prototype.getOrdinalMeta=function(){return this._ordinalMeta},Fv.prototype.calcNiceTicks=function(){},Fv.prototype.calcNiceExtent=function(){},Fv.type="ordinal";var zv,Bv=Fv;function Fv(t){var t=zv.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return F(e=e||new Cv({}))&&(e=new Cv({categories:B(e,function(t){return P(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}Sv.registerClass(Bv);var Vv,Hv=wo,Gv=(u(Wv,Vv=Sv),Wv.prototype.parse=function(t){return t},Wv.prototype.contain=function(t){return Nv(t,this._extent)},Wv.prototype.normalize=function(t){return Rv(t,this._extent)},Wv.prototype.scale=function(t){return Ev(t,this._extent)},Wv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Wv.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Wv.prototype.getInterval=function(){return this._interval},Wv.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Pv(t)},Wv.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(e){n[0]s&&o.push(t?{value:Hv(s+e,r)}:{value:n[1]})}return o},Wv.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h=M[0]&&d<=M[1]&&a++)}u=(M[1]-M[0])/b;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),t_.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l);i.push([(r=s+=r)/n,(o=l+=o)/n])}return i}function Y_(t,o){var e,n,r;return B(ct((t=(e=t).UTF8Encoding?(null==(r=(n=e).UTF8Scale)&&(r=1024),N(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=X_(i,n,r);break;case"Polygon":case"MultiLineString":U_(i,n,r);break;case"MultiPolygon":N(i,function(t,e){return U_(t,n[e],r)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0l&&(l=s[h],u=h);++o[u],s[u]=0,++a}return B(o,function(t){return t/i})}(t,n)[e]||0},getPixelPrecision:Mo,getPrecision:bo,getPrecisionSafe:So,isNumeric:Oo,isRadianAroundZero:Co,linearMap:_o,nice:Lo,numericToNumber:Po,parseDate:ko,quantile:function(t,e){var e=(t.length-1)*e+1,n=Math.floor(e),i=+t[n-1];return(e=e-n)?i+e*(t[n]-i):i},quantity:Do,quantityExponent:Ao,reformIntervals:function(t){t.sort(function(t,e){return function t(e,n,i){return e.interval[i]':'':{renderMode:r,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""},normalizeCssArray:Vp,toCamelCase:function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),t=e?t&&t.charAt(0).toUpperCase()+t.slice(1):t},truncateText:ba}),Ly=Object.freeze({__proto__:null,bind:dt,clone:_,curry:ft,defaults:z,each:N,extend:O,filter:ct,indexOf:I,inherits:st,isArray:F,isFunction:k,isObject:P,isString:V,map:B,merge:d,reduce:ht}),q_=Zo();function j_(t){return"category"===t.type?(r=(e=t).getLabelModel(),o=K_(e,r),!r.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:o.labelCategoryInterval}:o):(r=(n=t).scale.getTicks(),i=w_(n),{labels:B(r,function(t,e){return{level:t.level,formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t.value}})});var n,i,e,r,o}function Z_(t,e){var n,i,r,o,a,s;return"category"===t.type?(e=e,o=$_(n=t,"ticks"),a=S_(e),(s=Q_(o,a))||(e.get("show")&&!n.scale.isBlank()||(i=[]),i=k(a)?e1(n,a,!0):"auto"===a?(s=K_(n,n.getLabelModel()),r=s.labelCategoryInterval,B(s.labels,function(t){return t.tickValue})):t1(n,r=a,!0),J_(o,a,{ticks:i,tickCategoryInterval:r}))):{ticks:B(t.scale.getTicks(),function(t){return t.value})}}function K_(t,e){var n,i=$_(t,"labels"),e=S_(e),r=Q_(i,e);return r||J_(i,e,{labels:k(e)?e1(t,e):t1(t,n="auto"===e?null!=(i=q_(r=t).autoInterval)?i:q_(r).autoInterval=r.calculateCategoryInterval():e),labelCategoryInterval:n})}function $_(t,e){return q_(t)[e]||(q_(t)[e]=[])}function Q_(t,e){for(var n=0;nl[1],h(n[0].coord,l[0])&&(t?n[0].coord=l[0]:n.shift()),t&&h(l[0],n[0].coord)&&n.unshift({coord:l[0]}),h(l[1],i.coord)&&(t?i.coord=l[1]:n.pop()),t)&&h(i.coord,l[1])&&n.push({coord:l[1]}),u},i1.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),B(this.scale.getMinorTicks(t=0=u}}for(var o,a=this.__startIndex;ar[0]){for(l=0;lt);l++);s=i[r[l]]}r.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},m.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;ie[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:wi((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return;return 1}(a,e))return r=e.mapDimension(a.dim),o={},N(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);o[t]=1}),function(t){return!o.hasOwnProperty(e.get(r,t))}}}function Ox(t){for(var e,n,i=t.length/2;0e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;nh[1]?-1:1,o=["start"===c?h[0]-o*u:"end"===c?h[1]+o*u:(h[0]+h[1])/2,cw(c)?t.labelOffset+l*u:0],null!=(u=e.get("nameRotate"))&&(u=u*ow/180),cw(c)?a=aw.innerTextLayout(t.rotation,null!=u?u:t.rotation,l):(a=function(t,e,n,i){var r,n=To(n-t),t=i[0]>i[1],i="start"===e&&!t||"start"!==e&&t;e=Co(n-ow/2)?(r=i?"bottom":"top","center"):Co(n-1.5*ow)?(r=i?"top":"bottom","center"):(r="middle",n<1.5*ow&&ow/2s[0]&&isFinite(c)&&isFinite(s[0]);)h=Lv(h),c=s[1]-h*a;else{u=(h=ae[1]&&e.reverse(),e},Gw.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},Gw.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var Vw,Hw=Gw;function Gw(t,e,n,i,r){t=Vw.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=r||"bottom",t}function Ww(t){return"cartesian2d"===t.get("coordinateSystem")}function Uw(i){var r={xAxisModel:null,yAxisModel:null};return N(r,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,Jo).models[0];r[e]=n}),r}Yw.prototype.getRect=function(){return this._rect},Yw.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=R(t),i=n.length;if(i){for(var r=[],o=i-1;0<=o;o--){var a=t[+n[o]],s=a.model,l=a.scale;Dv(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(__(l,s),Dv(l)&&(e=a))}r.length&&(e||__((e=r.pop()).scale,e.model),N(r,function(t){ww(t.scale,t.model,e.scale)}))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};N(n.x,function(t){jw(n,"y",t,r)}),N(n.y,function(t){jw(n,"x",t,r)}),this.resize(this.model,e)},Yw.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),n=!n&&t.get("containLabel"),a=jp(i,{width:e.getWidth(),height:e.getHeight()}),r=(this._rect=a,this._axesList);function o(){N(r,function(t){var e,n,i=t.isHorizontal(),r=i?[0,a.width]:[0,a.height],o=t.inverse?1:0;t.setExtent(r[o],r[1-o]),r=t,e=i?a.x:a.y,o=r.getExtent(),n=o[0]+o[1],r.toGlobalCoord="x"===r.dim?function(t){return t+e}:function(t){return n-t+e},r.toLocalCoord="x"===r.dim?function(t){return t-e}:function(t){return n-t+e}})}o(),n&&(N(r,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=b_(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]),a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i))}),o()),N(this._coordsList,function(t){t.calcAffineTransform()})},Yw.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},Yw.prototype.getAxes=function(){return this._axesList.slice()},Yw.prototype.getCartesian=function(t,e){if(null!=t&&null!=e)return this._coordsMap["x"+t+"y"+e];P(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;nu[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},cS=(pS.prototype.evaluate=function(t){var e=typeof t;return V(e)?this._condVal.test(t):!!H(e)&&this._condVal.test(t+"")},pS);function pS(t){null==(this._condVal=V(t)?new RegExp(t):wt(t)?t:null)&&f("")}fS.prototype.evaluate=function(){return this.value};var dS=fS;function fS(){}yS.prototype.evaluate=function(){for(var t=this.children,e=0;e"}(i,r)+("style"!==i?xe(e):e||"")+(n?o+B(n,t).join(o)+o:"")+""}(t)}function KS(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function $S(t,e,n,i){return jS("svg","root",{width:t,height:e,xmlns:GS,"xmlns:xlink":WS,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var QS=0;var JS={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},tM="transform-origin";var eM={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function nM(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function iM(t){return V(t)?JS[t]?"cubic-bezier("+JS[t]+")":Kn(t)?t:"":""}function rM(D,A,L,P){var t=D.animators,e=t.length,n=[];if(D instanceof Dh){if(r=function(t,e,u){var h,c,t=t.shape.paths,p={};if(N(t,function(t){var e=KS(u.zrId),t=(e.animation=!0,rM(t,{},e,!0),e.cssAnims),n=e.cssNodes,e=R(t),i=e.length;if(i){var r,o,a=t[c=e[i-1]];for(r in a){var s=a[r];p[r]=p[r]||{d:""},p[r].d+=s.d||""}for(o in n){var l=n[o].animation;0<=l.indexOf(c)&&(h=l)}}}),h)return e.d=!1,t=nM(p,u),h.replace(c,t)}(D,A,L))n.push(r);else if(!e)return}else if(!e)return;for(var i,r,o,a={},s=0;s"].join(o):"")&&(e=jS("style","stl",{},[],c),h.push(e)),$S(i,l,h,t.useViewBox)},HM.prototype.renderToString=function(t){return ZS(this.renderToVNode({animation:E((t=t||{}).cssAnimation,!0),emphasis:E(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:E(t.useViewBox,!0)}),{newline:!0})},HM.prototype.setBackgroundColor=function(t){this._backgroundColor=t},HM.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},HM.prototype._paintList=function(t,e,n){for(var i,r,o,a,s,l,u,h=t.length,c=[],p=0,d=0,f=0;f