!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 _=function(t,e){return(_=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(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 i(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var x=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},b=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?(b.wxa=!0,b.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?b.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(b.node=!0,b.svgSupported=!0):(J=navigator.userAgent,ne=(Ft=b).browser,ot=J.match(/Firefox\/([\d.]+)/),Y=J.match(/MSIE\s([\d.]+)/)||J.match(/Trident\/.+?rv:(([\d.]+))/),Q=J.match(/Edge?\/([\d.]+)/),J=/micromessenger/i.test(J),ot&&(ne.firefox=!0,ne.version=ot[1]),Y&&(ne.ie=!0,ne.version=Y[1]),Q&&(ne.edge=!0,ne.version=Q[1],ne.newEdge=18<+Q[1].split(".")[0]),J&&(ne.weChat=!0),Ft.svgSupported="undefined"!=typeof SVGRect,Ft.touchEventsSupported="ontouchstart"in window&&!ne.ie&&!ne.edge,Ft.pointerEventsSupported="onpointerdown"in window&&(ne.edge||ne.ie&&11<=+ne.version),Ft.domSupported="undefined"!=typeof document,ot=document.documentElement.style,Ft.transform3dSupported=(ne.ie&&"transition"in ot||ne.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in ot)&&!("OTransition"in ot),Ft.transformSupported=Ft.transform3dSupported||ne.ie&&9<=+ne.version);var j="12px sans-serif";var w,I,A=function(t){var e={};if("undefined"!=typeof JSON)for(var i=0;i>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",o[u]+":0",n[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(a),i.push(a)}}return i}(e,r),r,o);if(e)return e(t,i,n),!0}return!1}function ge(t){return"CANVAS"===t.nodeName.toUpperCase()}var ye=/([&<>"'])/g,me={"&":"&","<":"<",">":">",'"':""","'":"'"};function ve(t){return null==t?"":(t+"").replace(ye,function(t,e){return me[e]})}var _e=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=[],we=b.browser.firefox&&+b.browser.version.split(".")[0]<39;function be(t,e,i,n){return i=i||{},n?Se(t,e,i):we&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Se(t,e,i),i}function Se(t,e,i){if(b.domSupported&&t.getBoundingClientRect){var n,o=e.clientX,e=e.clientY;if(ge(t))return n=t.getBoundingClientRect(),i.zrX=o-n.left,void(i.zrY=e-n.top);if(fe(xe,t,o,e))return i.zrX=xe[0],void(i.zrY=xe[1])}i.zrX=i.zrY=0}function Me(t){return t||window.event}function Te(t,e,i){var n;return null==(e=Me(e)).zrX&&((n=e.type)&&0<=n.indexOf("touch")?(n=("touchend"!==n?e.targetTouches:e.changedTouches)[0])&&be(t,n,e,i):(be(t,e,e,i),n=function(t){var e=t.wheelDelta;if(e)return e;var i=t.deltaX,t=t.deltaY;return null!=i&&null!=t?3*(0!==t?Math.abs(t):Math.abs(i))*(0=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.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,i){var n,o,r,a;i?i[1]<1e-5&&-1e-5t.getWidth()||i<0||i>t.getHeight()}O(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){ai.prototype[a]=function(t){var e,i,n=t.zrX,o=t.zrY,r=ui(this,n,o);if("mouseup"===a&&r||(i=(e=this.findHover(n,o)).target),"mousedown"===a)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===a)this._upEl=i;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?l=r:s=1+r;var u=n-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);r(t,e[i+h])<0?l=h:a=h+1}return l}function yi(A,L){var P,O,R=ci,z=0,N=[];function e(t){var e=P[t],i=O[t],n=P[t+1],o=O[t+1],t=(O[t]=i+o,t===z-3&&(P[t+1]=P[t+2],O[t+1]=O[t+2]),z--,gi(A[n],A,e,i,0,L));if(e+=t,0!=(i-=t)&&0!==(o=fi(A[e+i-1],A,n,o,o-1,L)))if(i<=o){var r=e,a=i,t=n,s=o,l=0;for(l=0;lO[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(o);do{}while((r=pi(t,i,n,e))=this._maxSize&&0>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===n?parseInt(i.slice(4),16)/15:1),gn(t,e),e):void cn(e,0,0,0,1):7===n||9===n?0<=(o=parseInt(i.slice(1,7),16))&&o<=16777215?(cn(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===n?parseInt(i.slice(7),16)/255:1),gn(t,e),e):void cn(e,0,0,0,1):void 0;var o=i.indexOf("("),r=i.indexOf(")");if(-1!==o&&r+1===n){var n=i.substr(0,o),a=i.substr(o+1,r-(o+1)).split(","),s=1;switch(n){case"rgba":if(4!==a.length)return 3===a.length?cn(e,+a[0],+a[1],+a[2],1):cn(e,0,0,0,1);s=ln(a.pop());case"rgb":return 3<=a.length?(cn(e,sn(a[0]),sn(a[1]),sn(a[2]),3===a.length?s:ln(a[3])),gn(t,e),e):void cn(e,0,0,0,1);case"hsla":return 4!==a.length?void cn(e,0,0,0,1):(a[3]=ln(a[3]),mn(a,e),gn(t,e),e);case"hsl":return 3!==a.length?void cn(e,0,0,0,1):(mn(a,e),gn(t,e),e);default:return}}cn(e,0,0,0,1)}}function mn(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=ln(t[1]),o=ln(t[2]),n=o<=.5?o*(n+1):o+n-o*n,o=2*o-n;return cn(e=e||[],rn(255*un(o,n,i+1/3)),rn(255*un(o,n,i)),rn(255*un(o,n,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function vn(t,e){var i=yn(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);g++);g=f(g-1,h-2)}n=u[g+1],i=u[g]}i&&n&&(this._lastFr=g,this._lastFrP=e,d=n.percent-i.percent,o=0==d?1:f((e-i.percent)/d,1),n.easingFunc&&(o=n.easingFunc(o)),f=a?this._additiveValue:p?En:t[c],(Nn(l)||p)&&(f=f||(this._additiveValue=[])),this.discrete?t[c]=(o<1?i:n).rawValue:Nn(l)?(1===l?An:function(t,e,i,n){for(var o=e.length,r=o&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},Qo.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},Qo.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},Qo.prototype.refreshHover=function(){this._needsRefreshHover=!0},Qo.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},Qo.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},Qo.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},Qo.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},Qo.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},Qo.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},Qo.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},Qo.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},Qo.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},Qo.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},Qo.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,i,n){for(var o=0,r=0,a=t.length;rr){0n.width&&(r=e.split("\n"),c=!0),n.accumWidth=t):(t=xa(e,h,n.width,n.breakAll,n.accumWidth),n.accumWidth=t.accumWidth+i,a=t.linesWidths,r=t.lines)):r=e.split("\n");for(var p=0;pthis._ux||n>this._uy;return this.addData(Fa.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(o=i*i+n*n)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o),this},o.prototype.bezierCurveTo=function(t,e,i,n,o,r){return this._drawPendingPt(),this.addData(Fa.C,t,e,i,n,o,r),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,o,r),this._xi=o,this._yi=r,this},o.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(Fa.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},o.prototype.arc=function(t,e,i,n,o,r){this._drawPendingPt(),es[0]=n,es[1]=o,s=r,(l=is((a=es)[0]))<0&&(l+=Ja),h=l-a[0],u=a[1],u+=h,!s&&Ja<=u-l?u=l+Ja:s&&Ja<=l-u?u=l-Ja:!s&&uu.length&&(this._expandData(),u=this.data);for(var h=0;hi||$a(y)>n||c===e-1)&&(f=Math.sqrt(C*C+y*y),o=g,r=_);break;case Fa.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],w=t[c++],f=function(t,e,i,n,o,r,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=Ei(t,i,o,a,f),f=Ei(e,n,r,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(o,r,m,v,g,_,x,w,10),o=x,r=w;break;case Fa.Q:f=function(t,e,i,n,o,r,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=Wi(t,i,o,p),p=Wi(e,n,r,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),o=g,r=_;break;case Fa.A:var x=t[c++],w=t[c++],b=t[c++],S=t[c++],M=t[c++],T=t[c++],I=T+M;c+=1,d&&(a=ja(M)*b+x,s=Ka(M)*S+w),f=qa(b,S)*Za(Ja,Math.abs(T)),o=ja(I)*b+x,r=Ka(I)*S+w;break;case Fa.R:a=o=t[c++],s=r=t[c++];f=2*t[c++]+2*t[c++];break;case Fa.Z:var C=a-o,y=s-r;f=Math.sqrt(C*C+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},o.prototype.rebuildPath=function(t,e){var i,n,o,r,a,s,l,u,h=this.data,N=this._ux,E=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=ps[n=0]+t&&a<=ps[1]+t?h:0;oMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+w,b,T,o);u=Math.cos(x+w)*v+y,h=Math.sin(x+w)*_+m;break;case us.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],i){if(os(c,p,S,p,e,n,o)||os(S,p,S,M,e,n,o)||os(S,M,c,M,e,n,o)||os(c,M,c,p,e,n,o))return!0}else l=(l+=ls(S,p,S,M,n,o))+ls(c,M,c,p,n,o);break;case us.Z:if(i){if(os(u,h,c,p,e,n,o))return!0}else l+=ls(u,h,c,p,n,o);u=c,h=p}}return i||(t=h,r=p,Math.abs(t-r)n.len()&&(uMath.abs(n[1])?0':'':{renderMode:o,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===n?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function zp(t,e){return e=e||"transparent",F(t)?t:R(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Np(t,e){var i;"_blank"===e||"blank"===e?((i=window.open()).opener=null,i.location.href=t):window.open(t,e)}var Ep=O,Bp=["left","right","top","bottom","width","height"],Vp=[["width","left","right"],["height","top","bottom"]];function Fp(a,s,l,u,h){var c=0,p=0,d=(null==u&&(u=1/0),null==h&&(h=1/0),0);s.eachChild(function(t,e){var i,n,o,r=t.getBoundingRect(),e=s.childAt(e+1),e=e&&e.getBoundingRect();d="horizontal"===a?(n=r.width+(e?-e.x+r.x:0),u<(i=c+n)||t.newline?(c=0,i=n,p+=d+l,r.height):Math.max(d,r.height)):(n=r.height+(e?-e.y+r.y:0),h<(o=p+n)||t.newline?(c+=d+l,p=0,o=n,r.width):Math.max(d,r.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=i+l:p=o+l)})}var Hp=Fp;function Gp(t,e,i){i=kp(i||0);var n=e.width,o=e.height,r=rr(t.left,n),a=rr(t.top,o),e=rr(t.right,n),s=rr(t.bottom,o),l=rr(t.width,n),u=rr(t.height,o),h=i[2]+i[0],c=i[1]+i[3],p=t.aspect;switch(isNaN(l)&&(l=n-e-c-r),isNaN(u)&&(u=o-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(n/oe)return t[n];return t[i-1]}var bd,Sd="\0_ec_inner",Md=(u(r,bd=Gc),r.prototype.init=function(t,e,i,n,o,r){n=n||{},this.option=null,this._theme=new Gc(n),this._locale=new Gc(o),this._optionManager=r},r.prototype.setOption=function(t,e,i){e=Cd(e);this._optionManager.setOption(t,i,e),this._resetOption(null,e)},r.prototype.resetOption=function(t,e){return this._resetOption(t,Cd(e))},r.prototype._resetOption=function(t,e){var i,n=!1,o=this._optionManager;return t&&"recreate"!==t||(i=o.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(i,e)):md(this,i),n=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(i=o.getTimelineOption(this))&&(n=!0,this._mergeOption(i,e)),t&&"recreate"!==t&&"media"!==t||(i=o.getMediaOption(this)).length&&O(i,function(t){n=!0,this._mergeOption(t,e)},this),n},r.prototype.mergeOption=function(t){this._mergeOption(t,null)},r.prototype._mergeOption=function(n,t){var o=this.option,h=this._componentsMap,c=this._componentsCount,i=[],r=N(),p=t&&t.replaceMergeMainTypeMap;hd(this).datasetMap=N(),O(n,function(t,e){null!=t&&(g.hasClass(e)?e&&(i.push(e),r.set(e,!0)):o[e]=null==o[e]?y(t):d(o[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!r.get(e)&&(i.push(e),r.set(e,!0))}),g.topologicalTravel(i,g.getAllClassMainTypes(),function(r){var a,t=function(t,e,i){return(e=(e=fd.get(e))&&e(t))?i.concat(e):i}(this,r,Tr(n[r])),e=h.get(r),i=e?p&&p.get(r)?"replaceMerge":"normalMerge":"replaceAll",e=kr(e,t,i),s=(zr(e,r,g),o[r]=null,h.set(r,null),c.set(r,0),[]),l=[],u=0;O(e,function(t,e){var i=t.existing,n=t.newOption;if(n){var o=g.getClass(r,t.keyInfo.subType,!("series"===r));if(!o)return;if("tooltip"===r){if(a)return;a=!0}i&&i.constructor===o?(i.name=t.keyInfo.name,i.mergeOption(n,this),i.optionUpdated(n,!1)):(e=P({componentIndex:e},t.keyInfo),P(i=new o(n,this,this,e),e),t.brandNew&&(i.__requireNewView=!0),i.init(n,this,this),i.optionUpdated(null,!0))}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(s.push(i.option),l.push(i),u++):(s.push(void 0),l.push(void 0))},this),o[r]=s,h.set(r,l),c.set(r,u),"series"===r&&gd(this)},this),this._seriesIndices||gd(this)},r.prototype.getOption=function(){var a=y(this.option);return O(a,function(t,e){if(g.hasClass(e)){for(var i=Tr(t),n=i.length,o=!1,r=n-1;0<=r;r--)i[r]&&!Rr(i[r])?o=!0:(i[r]=null,o||n--);i.length=n,a[e]=i}}),delete a[Sd],a},r.prototype.getTheme=function(){return this._theme},r.prototype.getLocaleModel=function(){return this._locale},r.prototype.setUpdatePayload=function(t){this._payload=t},r.prototype.getUpdatePayload=function(){return this._payload},r.prototype.getComponent=function(t,e){var i=this._componentsMap.get(t);if(i){t=i[e||0];if(t)return t;if(null==e)for(var n=0;ng[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},l.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=B(r,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!n.persistent&&n.clean&&n.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,i=e[t];if(null!=i&&it))return r;o=r-1}}}return-1},l.prototype.indicesOfNearest=function(t,e,i){var n=this._chunks[t],o=[];if(n){null==i&&(i=1/0);for(var r=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 i,n=this.clone([t],!0),o=n._chunks[t],r=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(yg(this._rawCount))(Math.min(2*(Math.ceil(r/s)+2),r));u[a++]=l;for(var h=1;hh[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o._updateGetRawIdx(),o},l.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,o=0,r=this.count();o'+ve(u)+""+h,t))}function Rg(t,e,i,n){var o,r,a,s,l=t.renderMode,u=e.noName,h=e.noValue,c=!e.markerType,p=e.name,d=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(t){return B(t=V(t)?t:[t],function(t,e){return Ap(t,V(r)?r[e]:r,d)})};if(!u||!h)return o=c?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",l),p=u?"":Ap(p,"ordinal",d),r=e.valueType,f=h?[]:f(e.value,e.dataIndex),e=!c||!u,a=!c&&u,n=Cg(n,l),s=n.nameStyle,n=n.valueStyle,"richText"===l?(c?"":o)+(u?"":Eg(t,p,s))+(h?"":function(t,e,i,n,o){o=[o],n=n?10:20;return i&&o.push({padding:[0,0,0,n],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(V(e)?e.join(" "):e,o)}(t,f,e,a,n)):Ng((c?"":o)+(u?"":''+ve(p)+"")+(h?"":function(t,e,i,n){i=i?"10px":"20px",e=e?"float:right;margin-left:"+i:"";return t=V(t)?t:[t],''+B(t,ve).join("  ")+""}(f,e,a,n)),i)}function zg(t,e,i,n,o,r){if(t)return Pg(t)({useUTC:o,renderMode:i,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,r)}function Ng(t,e){return'
'+t+'
'}function Eg(t,e,i){return t.markupStyleCreator.wrapRichTextStyle(e,i)}function Bg(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}Fg.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},Fg.prototype.makeTooltipMarker=function(t,e,i){var n="richText"===i?this._generateStyleName():null,e=Rp({color:e,type:t,renderMode:i,markerId:n});return F(e)?e:(this.richTextStyles[n]=e.style,e.content)},Fg.prototype.wrapRichTextStyle=function(t,e){var i={},e=(V(e)?O(e,function(t){return P(i,t)}):P(i,e),this._generateStyleName());return this.richTextStyles[e]=i,"{"+e+"|"+t+"}"};var Vg=Fg;function Fg(){this.richTextStyles={},this._nextStyleNameId=wr()}function Hg(t){var e,i,n,o,r,a,s,l,u,h,c,p=t.series,d=t.dataIndex,t=t.multipleSeries,f=p.getData(),g=f.mapDimensionsAll("defaultedTooltip"),y=g.length,m=p.getRawValue(d),v=V(m),_=(_=d,zp((w=p).getData().getItemVisual(_,"style")[w.visualDrawType]));function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Ag("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1this.getShallow("animationThreshold")?!1:t)},s.prototype.restoreData=function(){this.dataTask.dirty()},s.prototype.getColorFromPalette=function(t,e,i){var n=this.ecModel;return _d.prototype.getColorFromPalette.call(this,t,e,i)||n.getColorFromPalette(t,e,i)},s.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},s.prototype.getProgressive=function(){return this.get("progressive")},s.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},s.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},s.prototype.unselect=function(t,e){var i=this.option.selectedMap;if(i){var n=this.option.selectedMode,o=this.getData(e);if("series"===n||"all"===i)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var r=0;re.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Kg(e,i){O(Rt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,M($g,i))})}function $g(t,e){t=Qg(t);return t&&t.setOutputEnd((e||this).count()),e}function Qg(t){var e,i=(t.ecModel||{}).scheduler,i=i&&i.getPipeline(t.uid);if(i)return(i=i.currentTask)&&(e=i.agentStubMap)?e.get(t.uid):i}at(Ug,Lf),at(Ug,_d),$r(Ug,g);ty.prototype.init=function(t,e){},ty.prototype.render=function(t,e,i,n){},ty.prototype.dispose=function(t,e){},ty.prototype.updateView=function(t,e,i,n){},ty.prototype.updateLayout=function(t,e,i,n){},ty.prototype.updateVisual=function(t,e,i,n){},ty.prototype.toggleBlurSeries=function(t,e,i){},ty.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var Jg=ty;function ty(){this.group=new Yo,this.uid=Uc("viewComponent")}function ey(){var r=Er();return function(t){var e=r(t),t=t.pipelineContext,i=!!e.large,n=!!e.progressiveRender,o=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(i==o&&n==e)&&"reset"}}Kr(Jg),ea(Jg);var iy=Er(),ny=ey(),oy=(ry.prototype.init=function(t,e){},ry.prototype.render=function(t,e,i,n){},ry.prototype.highlight=function(t,e,i,n){t=t.getData(n&&n.dataType);t&&sy(t,n,"emphasis")},ry.prototype.downplay=function(t,e,i,n){t=t.getData(n&&n.dataType);t&&sy(t,n,"normal")},ry.prototype.remove=function(t,e){this.group.removeAll()},ry.prototype.dispose=function(t,e){},ry.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},ry.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},ry.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ry.prototype.eachRendered=function(t){fc(this.group,t)},ry.markUpdateMethod=function(t,e){iy(t).updateMethod=e},ry.protoInitialize=void(ry.prototype.type="chart"),ry);function ry(){this.group=new Yo,this.uid=Uc("viewChart"),this.renderTask=Rf({plan:ly,reset:uy}),this.renderTask.context={view:this}}function ay(t,e,i){t&&jl(t)&&("emphasis"===e?Ll:Pl)(t,i)}function sy(e,t,i){var n,o=Nr(e,t),r=t&&null!=t.highlightKey?(t=t.highlightKey,n=null==(n=il[t])&&el<=32?il[t]=el++:n):null;null!=o?O(Tr(o),function(t){ay(e.getItemGraphicEl(t),i,r)}):e.eachItemGraphicEl(function(t){ay(t,i,r)})}function ly(t){return ny(t.model)}function uy(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,t=t.view,a=o&&iy(o).updateMethod,r=r?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==r&&t[r](e,i,n,o),hy[r]}Kr(oy),ea(oy);var hy={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)}}},cy="\0__throttleOriginMethod",py="\0__throttleRate",dy="\0__throttleType";function fy(t,o,r){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}o=o||0;function e(){for(var t=[],e=0;ei.blockIndex?i.step:null,modBy:null!=(t=n&&n.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},Ty.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Ty.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),e=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,o=t.get("large")&&n>=t.get("largeThreshold"),n="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:e,modDataCount:n,large:o}},Ty.prototype.restorePipelines=function(t){var n=this,o=n._pipelineMap=N();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;o.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),n._pipe(t,t.dataTask)})},Ty.prototype.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.api.getModel(),o=this.api;O(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,{});Mt(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,n,o),t.overallReset&&this._createOverallStageTask(t,e,n,o)},this)},Ty.prototype.prepareView=function(t,e,i,n){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=i,r.api=n,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},Ty.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Ty.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},Ty.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))}O(t,function(n,t){var e,i,o,r,a;u.visualType&&u.visualType!==n.visualType||(e=(i=c._stageTaskMap.get(n.uid)).seriesTaskMap,(i=i.overallTask)?((r=i.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),o=!0)}),o&&i.dirty(),c.updatePayload(i,l),a=c.getPerformArgs(i,u.block),r.each(function(t){t.perform(a)}),i.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var i=c.getPerformArgs(t,u.block);i.skip=!n.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(i)&&(h=!0)}))}),this.unfinished=h||this.unfinished},Ty.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Ty.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())})},Ty.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Ty.prototype._createSeriesStageTask=function(i,t,n,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=N(),t=i.seriesType,e=i.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Rf({plan:Ay,reset:Ly,count:Ry}));e.context={model:t,ecModel:n,api:o,useClearVisual:i.isVisual&&!i.isLayout,plan:i.plan,reset:i.reset,scheduler:r},r._pipe(t,e)}i.createOnAllSeries?n.eachRawSeries(l):t?n.eachRawSeriesByType(t,l):e&&e(n,o).each(l)},Ty.prototype._createOverallStageTask=function(t,e,i,n){var o=this,r=e.overallTask=e.overallTask||Rf({reset:Iy}),a=(r.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:o},r.agentStubMap),s=r.agentStubMap=N(),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,Rf({reset:Cy,onDirty:ky})));e.context={model:t,overallProgress:u},e.agent=r,e.__block=u,o._pipe(t,e)}Mt(!t.createOnAllSeries,""),e?i.eachRawSeriesByType(e,c):l?l(i,n).each(c):(u=!1,O(i.getSeries(),c)),h&&r.dirty()},Ty.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},Ty.wrapStageHandler=function(t,e){return(t=D(t)?{overallReset:t,seriesType:function(t){zy=null;try{t(Ny,Ey)}catch(t){}return zy}(t)}:t).uid=Uc("stageHandler"),e&&(t.visualType=e),t};var My=Ty;function Ty(t,e,i,n){this._stageTaskMap=N(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}function Iy(t){t.overallReset(t.ecModel,t.api,t.payload)}function Cy(t){return t.overallProgress&&Dy}function Dy(){this.agent.dirty(),this.getDownstream().dirty()}function ky(){this.agent&&this.agent.dirty()}function Ay(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Ly(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=Tr(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,n.connectedBackgroundColor&&f.painter.setBackgroundColor(n.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(n.connectedBackgroundColor&&f.add(new Bs({shape:{x:0,y:0,width:t,height:i},style:{fill:n.connectedBackgroundColor}})),O(p,function(t){t=new ks({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(n&&n.type||"png")))):this.getDataURL(n);this.id},h.prototype.convertToPixel=function(t,e){return n0(this,"convertToPixel",t,e)},h.prototype.convertFromPixel=function(t,e){return n0(this,"convertFromPixel",t,e)},h.prototype.containPixel=function(t,n){var o;if(!this._disposed)return O(Vr(this._model,t),function(t,i){0<=i.indexOf("Models")&&O(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?o=o||!!e.containPoint(n):"seriesModels"===i&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(o=o||e.containPoint(n,t))},this)},this),!!o;this.id},h.prototype.getVisual=function(t,e){var t=Vr(this._model,t,{defaultMainType:"series"}),i=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=t?Uy(i,t,e):Yy(i,e)},h.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},h.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},h.prototype._initEvents=function(){var t,i,n,s=this;O(M0,function(a){function t(t){var i,e,n,o=s.getModel(),r=t.target;"globalout"===a?i={}:r&&qy(r,function(t){var e,t=k(t);return t&&null!=t.dataIndex?(e=t.dataModel||o.getSeriesByIndex(t.seriesIndex),i=e&&e.getDataParams(t.dataIndex,t.dataType,r)||{},1):t.eventData&&(i=P({},t.eventData),1)},!0),i&&(e=i.componentType,n=i.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",n=i.seriesIndex),n=(e=e&&null!=n&&o.getComponent(e,n))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],i.event=t,i.type=a,s._$eventProcessor.eventInfo={targetEl:r,packedEvent:i,model:e,view:n},s.trigger(a,i))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),O(I0,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),O(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,n=(i=this)._api,t.on("selectchanged",function(t){var e=n.getModel();t.isFromClick?(Zy("map","selectchanged",i,e,t),Zy("pie","selectchanged",i,e,t)):"select"===t.fromAction?(Zy("map","selected",i,e,t),Zy("pie","selected",i,e,t)):"unselect"===t.fromAction&&(Zy("map","unselected",i,e,t),Zy("pie","unselected",i,e,t))})},h.prototype.isDisposed=function(){return this._disposed},h.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},h.prototype.dispose=function(){var t,e,i;this._disposed?this.id:(this._disposed=!0,this.getDom()&&Xr(this.getDom(),N0,""),e=(t=this)._api,i=t._model,O(t._componentsViews,function(t){t.dispose(i,e)}),O(t._chartsViews,function(t){t.dispose(i,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 P0[t.id])},h.prototype.resize=function(t){if(!this[Gm])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"),i=t&&t.silent;this[Wm]&&(null==i&&(i=this[Wm].silent),e=!0,this[Wm]=null),this[Gm]=!0;try{e&&Jm(this),i0.update.call(this,{type:"resize",animation:P({duration:0},t&&t.animation)})}catch(t){throw this[Gm]=!1,t}this[Gm]=!1,a0.call(this,i),s0.call(this,i)}}},h.prototype.showLoading=function(t,e){this._disposed?this.id:(R(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),L0[t]&&(t=L0[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},h.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},h.prototype.makeActionFromEvent=function(t){var e=P({},t);return e.type=I0[t.type],e},h.prototype.dispatchAction=function(t,e){var i;this._disposed?this.id:(R(e)||(e={silent:!!e}),T0[t.type]&&this._model&&(this[Gm]?this._pendingActions.push(t):(i=e.silent,r0.call(this,t,i),(t=e.flush)?this._zr.flush():!1!==t&&b.browser.weChat&&this._throttledZrFlush(),a0.call(this,i),s0.call(this,i))))},h.prototype.updateLabelLayout=function(){Fm.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},h.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())},h.internalField=(Jm=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),t0(t,!0),t0(t,!1),e.plan()},t0=function(t,o){for(var r=t._model,a=t._scheduler,s=o?t._componentsViews:t._chartsViews,l=o?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;es.get("hoverLayerThreshold")&&!b.node&&!b.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=n._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),Fm.trigger("series:afterupdate",t,e,i)},g0=function(t){t[Xm]=!0,t.getZr().wakeUp()},y0=function(t){t[Xm]&&(t.getZr().storage.traverse(function(t){Vh(t)||x0(t)}),t[Xm]=!1)},d0=function(i){return u(t,e=Dd),t.prototype.getCoordinateSystems=function(){return i._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return i._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){Ll(t,e),g0(i)},t.prototype.leaveEmphasis=function(t,e){Pl(t,e),g0(i)},t.prototype.enterBlur=function(t){Ol(t),g0(i)},t.prototype.leaveBlur=function(t){Rl(t),g0(i)},t.prototype.enterSelect=function(t){zl(t),g0(i)},t.prototype.leaveSelect=function(t){Nl(t),g0(i)},t.prototype.getModel=function(){return i.getModel()},t.prototype.getViewOfComponentModel=function(t){return i.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return i.getViewOfSeriesModel(t)},new t(i);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(f0=function(n){function o(t,e){for(var i=0;ie[1]&&(e[1]=t[1])},Bv.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Bv.prototype.getExtent=function(){return this._extent.slice()},Bv.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Bv.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},Bv.prototype.isBlank=function(){return this._isBlank},Bv.prototype.setBlank=function(t){this._isBlank=t};var Ev=Bv;function Bv(t){this._setting=t||{},this._extent=[1/0,-1/0]}ea(Ev);var Vv=0,Fv=(Hv.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&B(e,Gv);return new Hv({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},Hv.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},Hv.prototype.parseAndCollect=function(t){var e,i,n=this._needCollect;return F(t)||n?(n&&!this._deduplication?(i=this.categories.length,this.categories[i]=t):null==(i=(e=this._getOrCreateMap()).get(t))&&(n?(i=this.categories.length,this.categories[i]=t,e.set(t,i)):i=NaN),i):t},Hv.prototype._getOrCreateMap=function(){return this._map||(this._map=N(this.categories))},Hv);function Hv(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Vv}function Gv(t){return R(t)&&null!=t.value?t.value:t+""}function Wv(t){return"interval"===t.type||"log"===t.type}function Xv(t,e,i,n){var o={},r=t[1]-t[0],r=o.interval=mr(r/e,!0),e=(null!=i&&rn[1]&&(n[0]=n[1]),o}function Uv(t){var e=Math.pow(10,yr(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,ar(t*e)}function Yv(t){return lr(t)+2}function Zv(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function qv(t,e){return t>=e[0]&&t<=e[1]}function jv(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Kv(t,e){return t*(e[1]-e[0])+e[0]}u(Jv,$v=Ev),Jv.prototype.parse=function(t){return null==t?NaN:F(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},Jv.prototype.contain=function(t){return qv(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},Jv.prototype.normalize=function(t){return jv(t=this._getTickNumber(this.parse(t)),this._extent)},Jv.prototype.scale=function(t){return t=Math.round(Kv(t,this._extent)),this.getRawOrdinalNumber(t)},Jv.prototype.getTicks=function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push({value:i}),i++;return t},Jv.prototype.getMinorTicks=function(t){},Jv.prototype.setSortInfo=function(t){if(null==t)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var e=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o=t},Jv.prototype.getOrdinalMeta=function(){return this._ordinalMeta},Jv.prototype.calcNiceTicks=function(){},Jv.prototype.calcNiceExtent=function(){},Jv.type="ordinal";var $v,Qv=Jv;function Jv(t){var t=$v.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return V(e=e||new Fv({}))&&(e=new Fv({categories:B(e,function(t){return R(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}Ev.registerClass(Qv);var t_,e_=ar,i_=(u(n_,t_=Ev),n_.prototype.parse=function(t){return t},n_.prototype.contain=function(t){return qv(t,this._extent)},n_.prototype.normalize=function(t){return jv(t,this._extent)},n_.prototype.scale=function(t){return Kv(t,this._extent)},n_.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},n_.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},n_.prototype.getInterval=function(){return this._interval},n_.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Yv(t)},n_.prototype.getTicks=function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,r=[];if(e){i[0]s&&r.push(t?{value:e_(s+e,o)}:{value:i[1]})}return r},n_.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;on[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 0i&&(this._approxInterval=i),f_.length),t=Math.min(function(t,e,i,n){for(;i>>1;t[o][1]>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l);n.push([(o=s+=o)/i,(r=l+=r)/i])}return n}function u1(t,r){var e,i,o;return B(ut((t=(e=t).UTF8Encoding?(null==(o=(i=e).UTF8Scale)&&(o=1024),O(i.features,function(t){var e=t.geometry,i=e.encodeOffsets,n=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=l1(n,i,o);break;case"Polygon":case"MultiLineString":s1(n,i,o);break;case"MultiPolygon":O(n,function(t,e){return s1(t,i[e],o)})}}),i.UTF8Encoding=!1,i):e).features,function(t){return t.geometry&&t.properties&&0l&&(l=s[h],u=h);++r[u],s[u]=0,++a}return B(r,function(t){return t/n})}(t,i)[e]||0},getPixelPrecision:hr,getPrecision:lr,getPrecisionSafe:ur,isNumeric:xr,isRadianAroundZero:pr,linearMap:or,nice:mr,numericToNumber:_r,parseDate:fr,quantile:function(t,e){var e=(t.length-1)*e+1,i=Math.floor(e),n=+t[i-1];return(e=e-i)?n+e*(t[i]-n):n},quantity:gr,quantityExponent:yr,reformIntervals:vr,remRadian:cr,round:ar}),oa=Object.freeze({__proto__:null,format:cp,parse:fr}),Vc=Object.freeze({__proto__:null,Arc:fh,BezierCurve:hh,BoundingRect:U,Circle:_u,CompoundPath:mh,Ellipse:Su,Group:Yo,Image:ks,IncrementalDisplayable:e,Line:oh,LinearGradient:bh,Polygon:ju,Polyline:Ju,RadialGradient:_h,Rect:Bs,Ring:Xu,Sector:Fu,Text:Ws,clipPointsByRect:lc,clipRectByRect:uc,createIcon:hc,extendPath:Zh,extendShape:Uh,getShapeClass:jh,getTransform:nc,initProps:Bh,makeImage:$h,makePath:Kh,mergePath:Jh,registerShape:qh,resizePath:tc,updateProps:Eh}),Ec=Object.freeze({__proto__:null,addCommas:Cp,capitalFirst:function(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)},encodeHTML:ve,formatTime:function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=(e=fr(e))[(i=i?"getUTC":"get")+"FullYear"](),o=e[i+"Month"]()+1,r=e[i+"Date"](),a=e[i+"Hours"](),s=e[i+"Minutes"](),l=e[i+"Seconds"](),e=e[i+"Milliseconds"]();return t=t.replace("MM",up(o,2)).replace("M",o).replace("yyyy",n).replace("yy",up(n%100+"",2)).replace("dd",up(r,2)).replace("d",r).replace("hh",up(a,2)).replace("h",a).replace("mm",up(s,2)).replace("m",s).replace("ss",up(l,2)).replace("s",l).replace("SSS",up(e,3))},formatTpl:Op,getTextRect:function(t,e,i,n,o,r,a,s){return new Ws({style:{text:t,font:e,align:i,verticalAlign:n,padding:o,rich:r,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()},getTooltipMarker:Rp,normalizeCssArray:kp,toCamelCase:Dp,truncateText:ca}),Oc=Object.freeze({__proto__:null,bind:S,clone:y,curry:M,defaults:E,each:O,extend:P,filter:ut,indexOf:C,inherits:rt,isArray:V,isFunction:D,isObject:R,isString:F,map:B,merge:d,reduce:lt}),h1=Er();function c1(e,t){t=B(t,function(t){return e.scale.parse(t)});return"time"===e.type&&0l[1],h(i[0].coord,l[0])&&(t?i[0].coord=l[0]:i.shift()),t&&h(l[0],i[0].coord)&&i.unshift({coord:l[0]}),h(l[1],n.coord)&&(t?n.coord=l[1]:i.pop()),t)&&h(n.coord,l[1])&&i.push({coord:l[1]}),u},w1.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 r,a=this.__startIndex;ao[0]){for(l=0;lt);l++);s=n[o[l]]}o.splice(l+1,0,t),(n[t]=e).virtual||(s?(i=s.dom).nextSibling?a.insertBefore(e.dom,i.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},p.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,n=0;ne[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var i,n,o=[],r=t.length;function a(t,e,i){var n=t.coord;return{coord:i,color:wn((i-n)/(e.coord-n),[t.color,e.color])}}for(var s=0;sn)return;return 1}(a,e))return o=e.mapDimension(a.dim),r={},O(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);r[t]=1}),function(t){return!r.hasOwnProperty(e.get(o,t))}}}function $x(t){for(var e,i,n=t.length/2;0e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},Mw.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},Mw.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var bw,Sw=Mw;function Mw(t,e,i,n,o){t=bw.call(this,t,e,i)||this;return t.index=0,t.type=n||"value",t.position=o||"bottom",t}function Tw(t,e,i){i=i||{};var t=t.coordinateSystem,n=e.axis,o={},r=n.getAxesOnZeroOf()[0],a=n.position,s=r?"onZero":a,n=n.dim,t=t.getRect(),t=[t.x,t.x+t.width,t.y,t.y+t.height],l={left:0,right:1,top:0,bottom:1,onZero:2},u=e.get("offset")||0,u="x"===n?[t[2]-u,t[3]+u]:[t[0]-u,t[1]+u],h=(r&&(h=r.toGlobalCoord(r.dataToCoord(0)),u[l.onZero]=Math.max(Math.min(h,u[1]),u[0])),o.position=["y"===n?u[l[s]]:t[0],"x"===n?u[l[s]]:t[3]],o.rotation=Math.PI/2*("x"===n?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],o.labelOffset=r?u[l[a]]-u[l.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),xt(i.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection),e.get(["axisLabel","rotate"]));return o.labelRotate="top"===s?-h:h,o.z2=1,o}function Iw(t){return"cartesian2d"===t.get("coordinateSystem")}function Cw(n){var o={xAxisModel:null,yAxisModel:null};return O(o,function(t,e){var i=e.replace(/Model$/,""),i=n.getReferringComponents(i,Hr).models[0];o[e]=i}),o}var Dw=Math.log;Aw.prototype.getRect=function(){return this._rect},Aw.prototype.update=function(t,e){var i=this._axesMap;function n(t){var d,e=ht(t),i=e.length;if(i){for(var n=[],o=i-1;0<=o;o--){var r=t[+e[o]],a=r.model,s=r.scale;Wv(s)&&a.get("alignTicks")&&null==a.get("interval")?n.push(r):(R_(s,a),Wv(s)&&(d=r))}n.length&&(d||R_((d=n.pop()).scale,d.model),O(n,function(t){var e=t.scale,t=t.model,i=d.scale,n=i_.prototype,o=n.getTicks.call(i),r=n.getTicks.call(i,!0),a=o.length-1,i=n.getInterval.call(i),s=(t=O_(e,t)).extent,l=t.fixMin,t=t.fixMax,u=("log"===e.type&&(u=Dw(e.base),s=[Dw(s[0])/u,Dw(s[1])/u]),e.setExtent(s[0],s[1]),e.calcNiceExtent({splitNumber:a,fixMin:l,fixMax:t}),n.getExtent.call(e)),h=(l&&(s[0]=u[0]),t&&(s[1]=u[1]),n.getInterval.call(e)),c=s[0],p=s[1];if(l&&t)h=(p-c)/a;else if(l)for(p=s[0]+h*a;ps[0]&&isFinite(c)&&isFinite(s[0]);)h=Uv(h),c=s[1]-h*a;else{u=(h=ah[1]?-1:1,r=["start"===c?h[0]-r*u:"end"===c?h[1]+r*u:(h[0]+h[1])/2,Fw(c)?t.labelOffset+l*u:0],null!=(u=e.get("nameRotate"))&&(u=u*Rw/180),Fw(c)?a=zw.innerTextLayout(t.rotation,null!=u?u:t.rotation,l):(a=function(t,e,i,n){var o,i=cr(i-t),t=n[0]>n[1],n="start"===e&&!t||"start"!==e&&t;e=pr(i-Rw/2)?(o=n?"bottom":"top","center"):pr(i-1.5*Rw)?(o=n?"top":"bottom","center"):(o="middle",i<1.5*Rw&&Rw/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)i[o],f=[-c.x,-c.y],e=(e||(f[n]=l[s]),[0,0]),s=[-p.x,-p.y],g=z(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(d&&("end"===t.get("pageButtonPosition",!0)?s[n]+=i[o]-p[o]:e[n]+=p[o]+g),s[1-n]+=c[r]/2-p[r]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[o]=(d?i:c)[o],f[r]=Math.max(c[r],p[r]),f[a]=Math.min(0,p[a]+s[1-n]),u.__rectSize=i[o],d?((e={x:0,y:0})[o]=Math.max(i[o]-p[o]-g,0),e[r]=f[r],u.setClipPath(new Bs({shape:e})),u.__rectSize=e[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&Eh(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},Xb.prototype._pageGo=function(t,e,i){t=this._getPageInfo(e)[t];null!=t&&i.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},Xb.prototype._updatePageInfoView=function(i,n){var o=this._controllerGroup,t=(O(["pagePrev","pageNext"],function(t){var e=null!=n[t+"DataIndex"],t=o.childOfName(t);t&&(t.setStyle("fill",e?i.get("pageIconColor",!0):i.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")}),o.childOfName("pageText")),e=i.get("pageFormatter"),r=n.pageIndex,r=null!=r?r+1:0,a=n.pageCount;t&&e&&t.setStyle("text",F(e)?e.replace("{current}",null==r?"":r+"").replace("{total}",null==a?"":a+""):e({current:r,total:a}))},Xb.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,t=t.getOrient().index,o=Hb[t],r=Gb[t],e=this._findTargetItemIndex(e),a=i.children(),s=a[e],l=a.length,u=l?1:0,h={contentPosition:[i.x,i.y],pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(s){i=g(s);h.contentPosition[t]=-i.s;for(var c=e+1,p=i,d=i,f=null;c<=l;++c)(!(f=g(a[c]))&&d.e>p.s+n||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=e-1,p=i,d=i,f=null;-1<=c;--c)(f=g(a[c]))&&y(d,f.s)||!(p.i=e&&t.s<=e+n}},Xb.prototype._findTargetItemIndex=function(i){var n,o;return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==o&&null!=t&&(o=e),t===i&&(n=e)}),null!=n?n:o):0},Xb.type="legend.scroll",Xb);function Xb(){var t=null!==Vb&&Vb.apply(this,arguments)||this;return t.type=Xb.type,t.newlineDisabled=!0,t._currentIndex=0,t}Y_(function(t){Y_(Rb),t.registerComponentModel(Nb),t.registerComponentView(Wb),t.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})})});var Ub=Er(),Yb=y,Zb=S;function qb(){this._dragging=!1,this.animationThreshold=15}function jb(t,e,i,n){!function i(n,t){{var o;return R(n)&&R(t)?(o=!0,O(t,function(t,e){o=o&&i(n[e],t)}),!!o):n===t}}(Ub(i).lastProp,n)&&(Ub(i).lastProp=n,e?Eh(i,n,t):(i.stopAnimation(),i.attr(n)))}function Kb(t,e){t[e.get(["label","show"])?"show":"hide"]()}function $b(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function Qb(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function Jb(t,e,i,n,o){var r=tS(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),i=i.getModel("label"),a=kp(i.get("padding")||0),s=i.getFont(),l=Do(r,s),u=o.position,h=l.width+a[1]+a[3],l=l.height+a[0]+a[2],c=o.align,c=("right"===c&&(u[0]-=h),"center"===c&&(u[0]-=h/2),o.verticalAlign),n=("bottom"===c&&(u[1]-=l),"middle"===c&&(u[1]-=l/2),o=u,c=h,h=l,n=(l=n).getWidth(),l=l.getHeight(),o[0]=Math.min(o[0]+c,n)-c,o[1]=Math.min(o[1]+h,l)-h,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0),i.get("backgroundColor"));n&&"auto"!==n||(n=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:wc(i,{text:r,font:s,fill:i.getTextColor(),padding:a,backgroundColor:n}),z2:10}}function tS(t,e,i,n,o){t=e.scale.parse(t);var r,a=e.scale.getLabel({value:t},{precision:o.precision}),o=o.formatter;return o&&(r={value:E_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},O(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&r.seriesData.push(e)}),F(o)?a=o.replace("{value}",a):D(o)&&(a=o(r))),a}function eS(t,e,i){var n=Pe();return Ee(n,n,i.rotation),Ne(n,n,i.position),oc([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}qb.prototype.render=function(t,e,i,n){var o,r,a=e.get("value"),s=e.get("status");this._axisModel=t,this._axisPointerModel=e,this._api=i,!n&&this._lastValue===a&&this._lastStatus===s||(this._lastValue=a,this._lastStatus=s,n=this._group,o=this._handle,s&&"hide"!==s?(n&&n.show(),o&&o.show(),this.makeElOption(s={},a,t,e,i),(r=s.graphicKey)!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=r,r=this._moveAnimation=this.determineAnimation(t,e),n?(r=M(jb,e,r),this.updatePointerEl(n,s,r),this.updateLabelEl(n,s,r,e)):(n=this._group=new Yo,this.createPointerEl(n,s,t,e),this.createLabelEl(n,s,t,e),i.getZr().add(n)),Qb(n,e,!0),this._renderHandle(a)):(n&&n.hide(),o&&o.hide()))},qb.prototype.remove=function(t){this.clear(t)},qb.prototype.dispose=function(t){this.clear(t)},qb.prototype.determineAnimation=function(t,e){var i,n=e.get("animation"),o=t.axis,r="category"===o.type,e=e.get("snap");return!(!e&&!r)&&("auto"===n||null==n?(i=this.animationThreshold,r&&o.getBandWidth()>i||!!e&&(r=Xw(t).seriesDataCount,e=o.getExtent(),Math.abs(e[0]-e[1])/r>i)):!0===n)},qb.prototype.makeElOption=function(t,e,i,n,o){},qb.prototype.createPointerEl=function(t,e,i,n){var o=e.pointer;o&&(o=Ub(t).pointerEl=new gc[o.type](Yb(e.pointer)),t.add(o))},qb.prototype.createLabelEl=function(t,e,i,n){e.label&&(e=Ub(t).labelEl=new Ws(Yb(e.label)),t.add(e),Kb(e,n))},qb.prototype.updatePointerEl=function(t,e,i){t=Ub(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),i(t,{shape:e.pointer.shape}))},qb.prototype.updateLabelEl=function(t,e,i,n){t=Ub(t).labelEl;t&&(t.setStyle(e.label.style),i(t,{x:e.label.x,y:e.label.y}),Kb(t,n))},qb.prototype._renderHandle=function(t){var e,i,n,o,r,a;!this._dragging&&this.updateHandleTransform&&(e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status"),o.get("show")&&a&&"hide"!==a?(this._handle||(r=!0,n=this._handle=hc(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ie(t.event)},onmousedown:Zb(this._onHandleDragMove,this,0,0),drift:Zb(this._onHandleDragMove,this),ondragend:Zb(this._onHandleDragEnd,this)}),i.add(n)),Qb(n,e,!1),n.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),V(a=o.get("size"))||(a=[a,a]),n.scaleX=a[0]/2,n.scaleY=a[1]/2,gy(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)):(n&&i.remove(n),this._handle=null))},qb.prototype._moveHandleToValue=function(t,e){jb(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$b(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},qb.prototype._onHandleDragMove=function(t,e){var i=this._handle;i&&(this._dragging=!0,t=this.updateHandleTransform($b(i),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,i.stopAnimation(),i.attr($b(t)),Ub(i).lastProp=null,this._doDispatchAxisPointer())},qb.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},qb.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},qb.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var t=t.getZr(),e=this._group,i=this._handle;t&&e&&(this._lastGraphicKey=null,e&&t.remove(e),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),yy(this,"_doDispatchAxisPointer")},qb.prototype.doClear=function(){},qb.prototype.buildLabel=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}};u(oS,iS=qb),oS.prototype.makeElOption=function(t,e,i,n,o){var r,a,s=i.axis,l=s.grid,u=n.get("type"),h=rS(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0)),p=(u&&"none"!==u&&(r=(a=n).get("type"),a=a.getModel(r+"Style"),"line"===r?(p=a.getLineStyle()).fill=null:"shadow"===r&&((p=a.getAreaStyle()).stroke=null),r=p,(a=aS[u](s,c,h)).style=r,t.graphicKey=a.type,t.pointer=a),Tw(l.model,i));u=e,s=t,c=p,h=i,r=n,a=o,l=zw.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=r.get(["label","margin"]),Jb(s,h,r,a,{position:eS(h.axis,u,c),align:l.textAlign,verticalAlign:l.textVerticalAlign})},oS.prototype.getHandleTransform=function(t,e,i){var n=Tw(e.axis.grid.model,e,{labelInside:!1}),i=(n.labelMargin=i.get(["handle","margin"]),eS(e.axis,t,n));return{x:i[0],y:i[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},oS.prototype.updateHandleTransform=function(t,e,i,n){var i=i.axis,o=i.grid,r=i.getGlobalExtent(!0),o=rS(o,i).getOtherAxis(i).getGlobalExtent(),i="x"===i.dim?0:1,a=[t.x,t.y],e=(a[i]+=e[i],a[i]=Math.min(r[1],a[i]),a[i]=Math.max(r[0],a[i]),(o[1]+o[0])/2),r=[e,e];r[i]=a[i];return{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:r,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][i]}};var iS,nS=oS;function oS(){return null!==iS&&iS.apply(this,arguments)||this}function rS(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var aS={line:function(t,e,i){var n;return n=[e,i[0]],e=[e,i[1]],i=sS(t),{type:"Line",subPixelOptimize:!0,shape:{x1:n[i=i||0],y1:n[1-i],x2:e[i],y2:e[1-i]}}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:(e=[e-n/2,i[0]],i=[n,o],n=sS(t),{x:e[n=n||0],y:e[1-n],width:i[n],height:i[1-n]})}}};function sS(t){return"x"===t.dim?0:1}u(hS,lS=g),hS.type="axisPointer",hS.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}};var lS,uS=hS;function hS(){var t=null!==lS&&lS.apply(this,arguments)||this;return t.type=hS.type,t}var cS=Er(),pS=O;function dS(t,e,i){var n,c,p;function o(t,h){c.on(t,function(e){i=p;var i,n,o={dispatchAction:r,pendings:n={showTip:[],hideTip:[]}};function r(t){var e=n[t.type];e?e.push(t):(t.dispatchAction=r,i.dispatchAction(t))}pS(cS(c).records,function(t){t&&h(t,e,o.dispatchAction)});var t,a=o.pendings,s=p,l=a.showTip.length,u=a.hideTip.length;l?t=a.showTip[l-1]:u&&(t=a.hideTip[u-1]),t&&(t.dispatchAction=null,s.dispatchAction(t))})}b.node||(n=e.getZr(),cS(n).records||(cS(n).records={}),p=e,cS(c=n).initialized||(cS(c).initialized=!0,o("click",M(gS,"click")),o("mousemove",M(gS,"mousemove")),o("globalout",fS)),(cS(n).records[t]||(cS(n).records[t]={})).handler=i)}function fS(t,e,i){t.handler("leave",null,i)}function gS(t,e,i,n){e.handler(t,i,n)}function yS(t,e){b.node||(e=e.getZr(),(cS(e).records||{})[t]&&(cS(e).records[t]=null))}u(_S,mS=Jg),_S.prototype.render=function(t,e,i){var e=e.getComponent("tooltip"),n=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";dS("axisPointer",i,function(t,e,i){"none"!==n&&("leave"===t||0<=n.indexOf(t))&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},_S.prototype.remove=function(t,e){yS("axisPointer",e)},_S.prototype.dispose=function(t,e){yS("axisPointer",e)},_S.type="axisPointer";var mS,vS=_S;function _S(){var t=null!==mS&&mS.apply(this,arguments)||this;return t.type=_S.type,t}function xS(t,e){var i,n,o,r,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=Nr(i=e.getData(),t))||s<0||V(s)?{point:[]}:(n=i.getItemGraphicEl(s),o=e.coordinateSystem,e.getTooltipPosition?a=e.getTooltipPosition(s)||[]:o&&o.dataToPoint?a=t.isStacked?(e=o.getBaseAxis(),t=o.getOtherAxis(e).dim,e=e.dim,t="x"===t||"radius"===t?1:0,e=i.mapDimension(e),(r=[])[t]=i.get(e,s),r[1-t]=i.get(i.getCalculationInfo("stackResultDimension"),s),o.dataToPoint(r)||[]):o.dataToPoint(i.getValues(B(o.dimensions,function(t){return i.mapDimension(t)}),s))||[]:n&&((e=n.getBoundingRect().clone()).applyTransform(n.transform),a=[e.x+e.width/2,e.y+e.height/2]),{point:a,el:n})}var wS=Er();function bS(t,e,i){var r,a,n,s,l,o,u,h,c,p,d,f,g,y,m=t.currTrigger,v=[t.x,t.y],_=t,x=t.dispatchAction||S(i.dispatchAction,i),w=e.getComponent("axisPointer").coordSysAxesInfo;if(w)return CS(v)&&(v=xS({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),r=CS(v),a=_.axesInfo,n=w.axesInfo,s="leave"===m||CS(v),l={},e={list:[],map:{}},u={showPointer:M(MS,o={}),showTooltip:M(TS,e)},O(w.coordSysMap,function(t,e){var o=r||t.containPoint(v);O(w.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(a,t);s||!o||a&&!n||null!=(n=null!=(n=n&&n.value)||r?n:i.pointToData(v))&&SS(t,n,u,!1,l)})}),h={},O(n,function(i,t){var n=i.linkGroup;n&&!o[t]&&O(n.axesInfo,function(t,e){var e=o[e];t!==i&&e&&(e=e.value,n.mapper&&(e=i.axis.scale.parse(n.mapper(e,IS(t),IS(i)))),h[i.key]=e)})}),O(h,function(t,e){SS(n[e],t,u,!0,l)}),c=o,_=n,p=l.axesInfo=[],O(_,function(t,e){var i=t.axisPointerModel.option,e=c[e];e?(t.useHandle||(i.status="show"),i.value=e.value,i.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&p.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}),m=e,_=t,e=x,CS(t=v)||!m.list.length?e({type:"hideTip"}):(x=((m.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},e({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:_.tooltipOption,position:_.position,dataIndexInside:x.dataIndexInside,dataIndex:x.dataIndex,seriesIndex:x.seriesIndex,dataByCoordSys:m.list})),e=n,_=(t=i).getZr(),x="axisPointerLastHighlights",d=wS(_)[x]||{},f=wS(_)[x]={},O(e,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&t.triggerEmphasis&&O(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;f[e]=t})}),g=[],y=[],O(d,function(t,e){f[e]||y.push(t)}),O(f,function(t,e){d[e]||g.push(t)}),y.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:y}),g.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:g}),l}function SS(t,e,i,n,o){var r,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(a=e,s=t.axis,l=s.dim,u=a,h=[],c=Number.MAX_VALUE,p=-1,O(t.seriesModels,function(e,t){var i,n=e.getData().mapDimensionsAll(l);if(e.getAxisTooltipData)var o=e.getAxisTooltipData(n,a,s),r=o.dataIndices,o=o.nestestValue;else{if(!(r=e.getData().indicesOfNearest(n[0],a,"category"===s.type?.5:null)).length)return;o=e.getData().get(n[0],r[0])}null!=o&&isFinite(o)&&(n=a-o,(i=Math.abs(n))<=c)&&((i'):""),F(t))r.innerHTML=t+c;else if(t){r.innerHTML="",V(t)||(t=[t]);for(var p,d=0;d"),r=f.join(e);this._showOrMove(n,function(){this._updateContentNotChangedOnAxis(t,p)?this._updatePosition(n,o,i[0],i[1],this._tooltipContent,p):this._showTooltipContent(n,r,p,Math.random()+"",i[0],i[1],o,null,g)})},QS.prototype._showSeriesItemTooltip=function(t,e,i){var n,o,r,a,s,l=this._ecModel,e=k(e),u=e.seriesIndex,h=l.getSeriesByIndex(u),c=e.dataModel||h,p=e.dataIndex,e=e.dataType,d=c.getData(e),f=this._renderMode,g=t.positionDefault,y=JS([d.getItemModel(p),c,h&&(h.coordinateSystem||{}).model],this._tooltipModel,g?{position:g}:null),h=y.get("trigger");null!=h&&"item"!==h||(n=c.getDataParams(p,e),o=new Vg,n.marker=o.makeTooltipMarker("item",zp(n.color),f),g=Of(c.formatTooltip(p,!1,e)),h=y.get("order"),e=y.get("valueFormatter"),r=g.frag,a=r?zg(e?P({valueFormatter:e},r):r,o,f,h,l.get("useUTC"),y.get("textStyle")):g.text,s="item_"+c.name+"_"+p,this._showOrMove(y,function(){this._showTooltipContent(y,a,n,s,t.offsetX,t.offsetY,t.position,t.target,o)}),i({type:"showTip",dataIndexInside:p,dataIndex:d.getRawIndex(p),seriesIndex:u,from:this.uid}))},QS.prototype._showComponentItemTooltip=function(e,i,t){var n="html"===this._renderMode,o=k(i),r=o.tooltipConfig.option||{},a=r.encodeHTMLContent,a=(F(r)&&(r={content:r,formatter:r},a=!0),a&&n&&r.content&&((r=y(r)).content=ve(r.content)),[r]),n=this._ecModel.getComponent(o.componentMainType,o.componentIndex),o=(n&&a.push(n),a.push({formatter:r.content}),e.positionDefault),s=JS(a,this._tooltipModel,o?{position:o}:null),l=s.get("content"),u=Math.random()+"",h=new Vg;this._showOrMove(s,function(){var t=y(s.get("formatterParams")||{});this._showTooltipContent(s,l,t,u,e.offsetX,e.offsetY,e.position,i,h)}),t({type:"showTip",from:this.uid})},QS.prototype._showTooltipContent=function(i,t,n,e,o,r,a,s,l){var u,h,c,p,d;this._ticket="",i.get("showContent")&&i.get("show")&&((u=this._tooltipContent).setEnterable(i.get("enterable")),h=i.get("formatter"),a=a||i.get("position"),t=t,c=this._getNearestPoint([o,r],n,i.get("trigger"),i.get("borderColor")).color,h&&(t=F(h)?(p=i.ecModel.get("useUTC"),t=h,Op(t=(d=V(n)?n[0]:n)&&d.axisType&&0<=d.axisType.indexOf("time")?cp(d.axisValue,t,p):t,n,!0)):D(h)?(d=S(function(t,e){t===this._ticket&&(u.setContent(e,l,i,c,a),this._updatePosition(i,a,o,r,u,n,s))},this),this._ticket=e,h(n,e,d)):h),u.setContent(t,l,i,c,a),u.show(i,c),this._updatePosition(i,a,o,r,u,n,s))},QS.prototype._getNearestPoint=function(t,e,i,n){return"axis"===i||V(e)?{color:n||("html"===this._renderMode?"#fff":"none")}:V(e)?void 0:{color:n||e.color||e.borderColor}},QS.prototype._updatePosition=function(t,e,i,n,o,r,a){var s,l=this._api.getWidth(),u=this._api.getHeight(),h=(e=e||t.get("position"),o.getSize()),c=t.get("align"),p=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();a&&d.applyTransform(a.transform),V(e=D(e)?e([i,n],r,o.el,d,{viewSize:[l,u],contentSize:h.slice()}):e)?(i=rr(e[0],l),n=rr(e[1],u)):R(e)?((r=e).width=h[0],r.height=h[1],i=(r=Gp(r,{width:l,height:u})).x,n=r.y,p=c=null):n=(i=(s=F(e)&&a?function(t,e,i,n){var o=i[0],r=i[1],a=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-o/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+h+a;break;case"left":s=e.x-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+a,l=e.y+h/2-r/2}return[s,l]}(e,d,h,t.get("borderWidth")):function(t,e,i,n,o,r,a){var i=i.getSize(),s=i[0],i=i[1];null!=r&&(nr&&(e[1-n]=e[n]+i.sign*r)}function wT(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0e[1]&&(e[1]=t[1])})}),[(e=L_((i=e.getAxisModel()).axis.scale,i,o).calculate()).min,e.max]),this._updateMinMaxSpan(),i=this.calculateDataWindow(t.settledOption),this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel())},UT.prototype.filterData=function(t,e){var o,i,r,c;t===this._dataZoomModel&&(o=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),c=this._valueWindow,"none"!==r)&>(i,function(i){var l,u,n=i.getData(),h=n.mapDimensionsAll(o);h.length&&("weakFilter"===r?(l=n.getStore(),u=B(h,function(t){return n.getDimensionIndex(t)},n),n.filterSelf(function(t){for(var e,i,n,o=0;oc[1];if(a&&!s&&!r)return!0;a&&(n=!0),s&&(e=!0),r&&(i=!0)}return n&&e&&i})):GT(h,function(t){var e;"empty"===r?i.setData(n=n.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,n.selectRange(e))}),GT(h,function(t){n.setApproximateExtent(c,t)}))})},UT.prototype._updateMinMaxSpan=function(){var n=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;GT(["min","max"],function(t){var e=o.get(t+"Span"),i=o.get(t+"ValueSpan");null!=(i=null!=i?this.getAxisModel().axis.scale.parse(i):i)?e=or(r[0]+i,r,[0,100],!0):null!=e&&(i=or(e,[0,100],r,!0)-r[0]),n[t+"Span"]=e,n[t+"ValueSpan"]=i},this)},UT.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),i=this._percentWindow,n=this._valueWindow;i&&(t=hr(n,[0,500]),t=Math.min(t,20),e=e.axis.scale.rawExtentInfo,0!==i[0]&&e.setDeterminedMinMax("min",+n[0].toFixed(t)),100!==i[1]&&e.setDeterminedMinMax("max",+n[1].toFixed(t)),e.freeze())},UT);function UT(t,e,i,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=i}var YT={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(t,e){var i=r.getComponent(sT(t),e);o(t,e,i,n)})})}t(function(t,e,i,n){i.__dzAxisProxy=null});var o=[],e=(t(function(t,e,i,n){i.__dzAxisProxy||(i.__dzAxisProxy=new XT(t,e,n,r),o.push(i.__dzAxisProxy))}),N());return O(o,function(t){O(t.getTargetSeriesModels(),function(t){e.set(t.uid,t)})}),e},overallReset:function(t,n){t.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){i.getAxisProxy(t,e).reset(i)}),i.eachTargetAxis(function(t,e){i.getAxisProxy(t,e).filterData(i,n)})}),t.eachComponent("dataZoom",function(t){var e,i=t.findRepresentativeAxisProxy();i&&(e=i.getDataPercentWindow(),i=i.getDataValueWindow(),t.setCalculatedRange({start:e[0],end:e[1],startValue:i[0],endValue:i[1]}))})}};var ZT=!1;function qT(t){ZT||(ZT=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,YT),t.registerAction("dataZoom",function(e,t){O(lT(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function jT(t){qT(t),t.registerComponentModel(yT),t.registerComponentView(ET),zT(t)}u(QT,KT=mh),QT.type="dataZoom.slider",QT.layoutMode="box",QT.defaultOption=Yc(mh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}});var KT,$T=QT;function QT(){var t=null!==KT&&KT.apply(this,arguments)||this;return t.type=QT.type,t}var JT,tI=Bs,eI="horizontal",iI="vertical",nI=["line","bar","candlestick","scatter"],oI={easing:"cubicOut",duration:100,delay:0},rI=(u(m,JT=Su),m.prototype.init=function(t,e){this.api=e,this._onBrush=S(this._onBrush,this),this._onBrushEnd=S(this._onBrushEnd,this)},m.prototype.render=function(t,e,i,n){JT.prototype.render.apply(this,arguments),gy(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1===t.get("show")?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView())},m.prototype.dispose=function(){this._clear(),JT.prototype.dispose.apply(this,arguments)},m.prototype._clear=function(){yy(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},m.prototype._buildView=function(){var t=this.group,e=(t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval(),this._displayables.sliderGroup=new Yo);this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},m.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,i=t.get("brushSelect")?7:0,n=this._findCoordRect(),e={width:e.getWidth(),height:e.getHeight()},o=this._orient===eI?{right:e.width-n.x-n.width,top:e.height-30-7-i,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},r=Up(t.option),i=(O(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])}),Gp(r,e));this._location={x:i.x,y:i.y},this._size=[i.width,i.height],this._orient===iI&&this._size.reverse()},m.prototype._positionGroup=function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),n=n&&n.get("inverse"),o=this._displayables.sliderGroup,r=(this._dataShadowInfo||{}).otherAxisInverse,i=(o.attr(i!==eI||n?i===eI&&n?{scaleY:r?1:-1,scaleX:-1}:i!==iI||n?{scaleY:r?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:r?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:r?1:-1,scaleX:1}),t.getBoundingRect([o]));t.x=e.x-i.x,t.y=e.y-i.y,t.markRedraw()},m.prototype._getViewExtent=function(){return[0,this._size[0]]},m.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect"),t=(i.add(new tI({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),new tI({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:S(this._onClickPanel,this)})),e=this.api.getZr();n?(t.on("mousedown",this._onBrushStart,this),t.cursor="crosshair",e.on("mousemove",this._onBrush),e.on("mouseup",this._onBrushEnd)):(e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)),i.add(t)},m.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),r=n.getShadowDim&&n.getShadowDim(),r=r&&o.getDimensionInfo(r)?n.getShadowDim():t.otherDim;if(null!=r)for(var a,s,l,u,h,c,p,d,f,g,y=this._shadowPolygonPts,m=this._shadowPolylinePts,v=(o===this._shadowData&&r===this._shadowDim&&e[0]===i[0]&&e[1]===i[1]||(n=.3*((a=o.getDataExtent(r))[1]-a[0]),a=[a[0]-n,a[1]+n],s=[0,e[1]],t=[0,e[0]],l=[[e[0],0],[0,0]],u=[],h=t[1]/(o.count()-1),c=0,p=Math.round(o.count()/e[0]),o.each([r],function(t,e){var i;0e[0]||t[1]<0||t[1]>e[1]||(e=((e=this._handleEnds)[0]+e[1])/2,t=this._updateInterval("all",t[0]-e),this._updateView(),t&&this._dispatchZoomAction(!1))},m.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new T(e,t),this._brushing=!0,this._brushStartTime=+new Date},m.prototype._onBrushEnd=function(t){var e,i,n;this._brushing&&(e=this._displayables.brushRect,this._brushing=!1,e)&&(e.attr("ignore",!0),e=e.shape,+new Date-this._brushStartTime<200&&Math.abs(e.width)<5||(i=this._getViewExtent(),this._range=sr([or(e.x,i,n=[0,100],!0),or(e.x+e.width,i,n,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1)))},m.prototype._onBrush=function(t){this._brushing&&(Ie(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},m.prototype._updateBrushRect=function(t,e){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect,n=(o||(o=i.brushRect=new tI({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1),this._brushStart),i=this._displayables.sliderGroup,t=i.transformCoordToLocal(t,e),e=i.transformCoordToLocal(n.x,n.y),i=this._size;t[0]=Math.max(Math.min(i[0],t[0]),0),o.setShape({x:e[0],y:0,width:t[0]-e[0],height:i[1]})},m.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?oI:null,start:e[0],end:e[1]})},m.prototype._findCoordRect=function(){var t,e,i=uT(this.dataZoomModel).infoList;return t=(t=!t&&i.length?(i=i[0].model.coordinateSystem).getRect&&i.getRect():t)?t:{x:.2*(i=this.api.getWidth()),y:.2*(e=this.api.getHeight()),width:.6*i,height:.6*e}},m.type="dataZoom.slider",m);function m(){var t=null!==JT&&JT.apply(this,arguments)||this;return t.type=m.type,t._displayables={},t}function aI(t){return"vertical"===t?"ns-resize":"ew-resize"}function sI(t){t.registerComponentModel($T),t.registerComponentView(rI),qT(t)}Y_(function(t){Y_(jT),Y_(sI)});var lI=function(t,e,i){t=y((uI[t]||{})[e]);return i&&V(t)?t[t.length-1]:t},uI={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]}},hI=O,cI=R,pI=-1,dI=(fI.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},fI.prototype.getNormalizer=function(){return S(this._normalizeData,this)},fI.listVisualTypes=function(){return ht(fI.visualHandlers)},fI.isValidType=function(t){return fI.visualHandlers.hasOwnProperty(t)},fI.eachVisual=function(t,e,i){R(t)?O(t,e,i):e.call(i,t)},fI.mapVisual=function(t,i,n){var o,r=V(t)?[]:R(t)?{}:(o=!0,null);return fI.eachVisual(t,function(t,e){t=i.call(n,t,e);o?r=t:r[e]=t}),r},fI.retrieveVisuals=function(i){var n,o={};return i&&hI(fI.visualHandlers,function(t,e){i.hasOwnProperty(e)&&(o[e]=i[e],n=!0)}),n?o:null},fI.prepareVisualTypes=function(t){if(V(t))t=t.slice();else{if(!cI(t))return[];var i=[];hI(t,function(t,e){i.push(e)}),t=i}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},fI.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},fI.findPieceIndex=function(i,t,e){for(var n,o=1/0,r=0,a=t.length;r"],V(t)&&(t=t.slice(),n=!0),e?t:n?[s(t[0]),s(t[1])]:s(t));return F(o)?o.replace("{value}",n?e[0]:e).replace("{value2}",n?e[1]:e):D(o)?n?o(t[0],t[1]):o(t):n?t[0]===a[0]?i[0]+" "+e[1]:t[1]===a[1]?i[1]+" "+e[0]:e[0]+" - "+e[1]:e;function s(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},EI.prototype.resetExtent=function(){var t=this.option,t=zI([t.min,t.max]);this._dataExtent=t},EI.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var i=t.dimensions,n=i.length-1;0<=n;n--){var o=i[n],o=t.getDimensionInfo(o);if(!o.isCalculationCoord)return o.storeDimIndex}},EI.prototype.getExtent=function(){return this._dataExtent.slice()},EI.prototype.completeVisualOption=function(){var e=this.ecModel,i=this.option,t={inRange:i.inRange,outOfRange:i.outOfRange},n=i.target||(i.target={}),o=i.controller||(i.controller={}),u=(d(n,t),d(o,t),this.isCategory());function r(t){OI(i.color)&&!t.inRange&&(t.inRange={color:i.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")}}r.call(this,n),r.call(this,o),function(t,e,i){var e=t[e],n=t[i];e&&!n&&(n=t[i]={},RI(e,function(t,e){var i;dI.isValidType(e)&&null!=(i=lI(e,"inactive",u))&&(n[e]=i,"color"!==e||n.hasOwnProperty("opacity")||n.hasOwnProperty("colorAlpha")||(n.opacity=[0,0]))}))}.call(this,n,"inRange","outOfRange"),function(o){var r=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,a=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,s=this.get("inactiveColor"),l=this.getItemSymbol()||"roundRect";RI(this.stateList,function(t){var e,i=this.itemSize,n=o[t],t=(null==(n=n||(o[t]={color:u?s:[s]})).symbol&&(n.symbol=r&&y(r)||(u?l:[l])),null==n.symbolSize&&(n.symbolSize=a&&y(a)||(u?i[0]:[i[0],i[0]])),n.symbol=LI(n.symbol,function(t){return"none"===t?l:t}),n.symbolSize);null!=t&&(e=-1/0,PI(t,function(t){ee[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},HI.prototype.completeVisualOption=function(){BI.prototype.completeVisualOption.apply(this,arguments),O(this.stateList,function(t){t=this.option.controller[t].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},HI.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},HI.prototype.getSelected=function(){var t=this.getExtent(),e=sr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},HI.prototype.findTargetDataIndices=function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimensionIndex(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},HI.prototype.getVisualMeta=function(i){var t=GI(0,0,this.getExtent()),e=GI(0,0,this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var r=0,a=0,s=e.length,l=t.length;at[1])break;i.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},v.prototype._createBarPoints=function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},v.prototype._createBarGroup=function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Yo("horizontal"!==e||i?"horizontal"===e&&i?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||i?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},v.prototype._updateHandle=function(n,o){var r,a,s,l,u,h;this._useHandle&&(r=this._shapes,a=this.visualMapModel,s=r.handleThumbs,l=r.handleLabels,u=a.itemSize,h=a.getExtent(),KI([0,1],function(t){var e=s[t],i=(e.setStyle("fill",o.handlesColor[t]),e.y=n[t],jI(n[t],[0,u[1]],h,!0)),i=this.getControllerVisual(i,"symbolSize"),i=(e.scaleX=e.scaleY=i/u[0],e.x=u[0]-i/2,oc(r.handleLabelPoints[t],nc(e,this.group)));l[t].setStyle({x:i[0],y:i[1],text:a.formatValueText(this._dataInterval[t]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",r.mainGroup):"center"})},this))},v.prototype._showIndicator=function(t,e,i,n){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),t=jI(t,r,s,!0),r=a[0]-c/2,s={x:u.x,y:u.y},a=(u.y=t,u.x=r,oc(l.indicatorLabelPoint,nc(u,this.group))),c=l.indicatorLabel,l=(c.attr("invisible",!1),this._applyTransform("left",l.mainGroup)),p="horizontal"===this._orient,i=(c.setStyle({text:(i||"")+o.formatValueText(e),verticalAlign:p?l:"middle",align:p?"center":l}),{x:r,y:t,style:{fill:h}}),e={style:{x:a[0],y:a[1]}},d=(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator?(p={duration:100,easing:"cubicInOut",additive:!0},u.x=s.x,u.y=s.y,u.animateTo(i,p),c.animateTo(e,p)):(u.attr(i),c.attr(e)),this._firstShowIndicator=!1,this._shapes.handleLabels);if(d)for(var f=0;f ",o):this._showIndicator(t,t,"≈ ",o)),a=this._hoverLinkDataIndices,i=[],(e||eC(r))&&(i=this._hoverLinkDataIndices=r.findTargetDataIndices(n)),t=i,o={},s(a||[],e={}),s(t||[],o,e),n=[l(e),l(o)],this._dispatchHighDown("downplay",ZI(n[0],r)),this._dispatchHighDown("highlight",ZI(n[1],r)))},v.prototype._hoverLinkFromSeriesMouseOver=function(t){var e,i;qy(t.target,function(t){t=k(t);return null!=t.dataIndex&&(e=t,1)},!0),e&&(t=this.ecModel.getSeriesByIndex(e.seriesIndex),(i=this.visualMapModel).isTargetSeries(t))&&(i=(t=t.getData(e.dataType)).getStore().get(i.getDataDimensionIndex(t),e.dataIndex),isNaN(i)||this._showIndicator(i,i))},v.prototype._hideIndicator=function(){var t=this._shapes,e=(t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0),this._shapes.handleLabels);if(e)for(var i=0;ii&&s([i,t[0]],"outOfRange"),s(t.slice()),i=t[1])},this),{stops:o,outerColors:r};function s(t,e){var i=a.getRepresentValue({interval:t}),i=(e=e||a.getValueState(i),n(i,e));t[0]===-1/0?r[0]=i:t[1]===1/0?r[1]=i:o.push({value:t[0],color:i},{value:t[1],color:i})}},gC.type="visualMap.piecewise",gC.defaultOption=Yc(e.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});var dC,fC=gC;function gC(){var t=null!==dC&&dC.apply(this,arguments)||this;return t.type=gC.type,t._pieceList=[],t}var yC={splitNumber:function(t){var e=this.option,i=Math.min(e.precision,20),n=this.getExtent(),o=e.splitNumber,o=Math.max(parseInt(o,10),1);e.splitNumber=o;for(var r=(n[1]-n[0])/o;+r.toFixed(i)!==r&&i<5;)i++;e.precision=i,r=+r.toFixed(i),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var a=0,s=n[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,e)},this)}};function mC(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}u(xC,vC=_h),xC.prototype.doRender=function(){var n=this.group,o=(n.removeAll(),this.visualMapModel),r=o.get("textGap"),t=o.textStyleModel,a=t.getFont(),s=t.getTextColor(),l=this._getItemAlign(),u=o.itemSize,t=this._getViewData(),e=t.endsText,h=xt(o.get("showLabel",!0),!e);e&&this._renderEndsText(n,e[0],u,h,l),O(t.viewPieceList,function(t){var e=t.piece,i=new Yo,t=(i.onclick=S(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList),o.getRepresentValue(e));this._createItemSymbol(i,t,[0,0,u[0],u[1]]),h&&(t=this.visualMapModel.getValueState(t),i.add(new Ws({style:{x:"right"===l?-r:u[0]+r,y:u[1]/2,text:e.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:"outOfRange"===t?.5:1}}))),n.add(i)},this),e&&this._renderEndsText(n,e[1],u,h,l),Hp(o.get("orient"),n,o.get("itemGap")),this.renderBackground(n),this.positionGroup(n)},xC.prototype._enableHoverLink=function(t,i){var n=this,e=(t.on("mouseover",function(){return e("highlight")}).on("mouseout",function(){return e("downplay")}),function(t){var e=n.visualMapModel;e.option.hoverLink&&n.api.dispatchAction({type:t,batch:ZI(e.findTargetDataIndices(i),e)})})},xC.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;return"vertical"===e.orient?YI(t,this.api,t.itemSize):(t=e.align)&&"auto"!==t?t:"left"},xC.prototype._renderEndsText=function(t,e,i,n,o){var r,a;e&&(r=new Yo,a=this.visualMapModel.textStyleModel,r.add(new Ws({style:wc(a,{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:e})})),t.add(r))},xC.prototype._getViewData=function(){var t=this.visualMapModel,e=B(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),t=t.get("inverse");return("horizontal"===n?t:!t)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},xC.prototype._createItemSymbol=function(t,e,i){t.add(sm(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},xC.prototype._onItemClick=function(t){var i,n,e=this.visualMapModel,o=e.option,r=o.selectedMode;r&&(i=y(o.selected),n=e.getSelectedMapKey(t),"single"===r||!0===r?(i[n]=!0,O(i,function(t,e){i[e]=e===n})):i[n]=!i[n],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i}))},xC.type="visualMap.piecewise";var vC,_C=xC;function xC(){var t=null!==vC&&vC.apply(this,arguments)||this;return t.type=xC.type,t}function wC(t){t.registerComponentModel(fC),t.registerComponentView(_C),cC(t)}Y_(function(t){Y_(pC),Y_(wC)}),Y_(px);var bC={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},SC=(MC.prototype.evaluate=function(t){var e=typeof t;return F(e)?this._condVal.test(t):!!pt(e)&&this._condVal.test(t+"")},MC);function MC(t){null==(this._condVal=F(t)?new RegExp(t):vt(t)?t:null)&&f("")}IC.prototype.evaluate=function(){return this.value};var TC=IC;function IC(){}DC.prototype.evaluate=function(){for(var t=this.children,e=0;e