locust 2.31.4.dev47__py3-none-any.whl → 2.31.5.dev78__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,14 +226,14 @@ PERFORMANCE OF THIS SOFTWARE.
226
226
 
227
227
  `:"<br/>",y=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],d,null,h)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Se(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,p=r.positionDefault,v=Wf([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(c,f),m=new U_;y.marker=m.makeTooltipMarker("item",zl(y.color),d);var _=xE(u.formatTooltip(c,!1,f)),x=v.get("order"),w=v.get("valueFormatter"),S=_.frag,b=S?AE(w?W({valueFormatter:w},S):S,m,d,x,a.get("useUTC"),v.get("textStyle")):_.text,C="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,b,y,C,r.offsetX,r.offsetY,r.position,r.target,m)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Se(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(q(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=me(l),l.content=tn(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=r.positionDefault,p=Wf(f,this._tooltipModel,d?{position:d}:null),v=p.get("content"),g=Math.random()+"",y=new U_;this._showOrMove(p,function(){var m=me(p.get("formatterParams")||{});this._showTooltipContent(p,v,m,g,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),v=p.color;if(h)if(q(h)){var g=r.ecModel.get("useUTC"),y=j(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=h,m&&(d=E0(y.axisValue,d,g)),d=ZV(d,i,!0)}else if(he(h)){var _=ee(function(x,w){x===this._ticket&&(f.setContent(w,c,r,v,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,_)}else d=h;f.setContent(d,c,r,v,l),f.show(r,v),this._updatePosition(r,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||j(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!j(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),he(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),j(n))i=K(n[0],u),a=K(n[1],c);else if(ge(n)){var v=n;v.width=f[0],v.height=f[1];var g=Xt(v,{width:u,height:c});i=g.x,a=g.y,h=null,d=null}else if(q(n)&&l){var y=rSe(n,p,f,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=eSe(i,a,o,u,c,h?null:20,d?null:20);i=y[0],a=y[1]}if(h&&(i-=ON(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=ON(d)?f[1]/2:d==="bottom"?f[1]:0),dW(r)){var y=tSe(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&D(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&D(u,function(h,d){var p=f[d]||{},v=h.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&v.length===g.length,o&&D(v,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&D(h.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],x=a[m];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ee.node||!n.getDom()||(Td(this,"_updatePosition"),this._tooltipContent.dispose(),yC("itemTooltip",n))},t.type="tooltip",t}(_t);function Wf(e,t,r){var n=t.ecModel,i;r?(i=new Xe(r,n,n),i=new Xe(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Xe&&(o=o.get("tooltip",!0)),q(o)&&(o={formatter:o}),o&&(i=new Xe(o,i,n)))}return i}function RN(e,t){return e.dispatchAction||ee(t.dispatchAction,t)}function eSe(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function tSe(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function rSe(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function ON(e){return e==="center"||e==="middle"}function nSe(e,t,r){var n=NA(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=rp(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Se(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function iSe(e){De(xp),e.registerComponentModel(Vxe),e.registerComponentView(Jxe),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Rt),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Rt)}var aSe=["rect","polygon","keep","clear"];function oSe(e,t){var r=et(e?e.brush:[]);if(r.length){var n=[];D(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;j(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),sSe(s),t&&!s.length&&s.push.apply(s,aSe)}}function sSe(e){var t={};D(e,function(r){t[r]=1}),e.length=0,D(t,function(r,n){e.push(n)})}var NN=D;function zN(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function bC(e,t,r){var n={};return NN(t,function(a){var o=n[a]=i();NN(e[a],function(s,l){if(tr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new tr(u),l==="opacity"&&(u=me(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new tr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function yW(e,t,r){var n;D(r,function(i){t.hasOwnProperty(i)&&zN(t[i])&&(n=!0)}),n&&D(r,function(i){t.hasOwnProperty(i)&&zN(t[i])?e[i]=me(t[i]):delete e[i]})}function lSe(e,t,r,n,i,a){var o={};D(e,function(f){var h=tr.prepareVisualTypes(t[f]);o[f]=h});var s;function l(f){return h2(r,s,f)}function u(f,h){BG(r,s,f,h)}r.each(c);function c(f,h){s=f;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,f),v=t[p],g=o[p],y=0,m=g.length;y<m;y++){var _=g[y];v[_]&&v[_].applyVisual(f,l,u)}}}function uSe(e,t,r,n){var i={};return D(e,function(a){var o=tr.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(w){return h2(s,f,w)}function c(w,S){BG(s,f,w,S)}for(var f,h=s.getStore();(f=o.next())!=null;){var d=s.getRawDataItem(f);if(!(d&&d.visualMap===!1))for(var p=n!=null?h.get(l,f):f,v=r(p),g=t[v],y=i[v],m=0,_=y.length;m<_;m++){var x=y[m];g[x]&&g[x].applyVisual(p,u,c)}}}}}function cSe(e){var t=e.brushType,r={point:function(n){return BN[t].point(n,r,e)},rect:function(n){return BN[t].rect(n,r,e)}};return r}var BN={lineX:FN(0),lineY:FN(1),rect:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])},rect:function(e,t,r){return e&&r.boundingRect.intersect(e)}},polygon:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])&&Zs(r.range,e[0],e[1])},rect:function(e,t,r){var n=r.range;if(!e||n.length<=1)return!1;var i=e.x,a=e.y,o=e.width,s=e.height,l=n[0];if(Zs(n,i,a)||Zs(n,i+o,a)||Zs(n,i,a+s)||Zs(n,i+o,a+s)||Ae.create(e).contain(l[0],l[1])||oh(i,a,i+o,a,n)||oh(i,a,i,a+s,n)||oh(i+o,a,i+o,a+s,n)||oh(i,a+s,i+o,a+s,n))return!0}}};function FN(e){var t=["x","y"],r=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[e];return Uf(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[t[e]],n[t[e]]+n[r[e]]];return s[1]<s[0]&&s.reverse(),Uf(s[0],o)||Uf(s[1],o)||Uf(o[0],s)||Uf(o[1],s)}}}}function Uf(e,t){return t[0]<=e&&e<=t[1]}var VN=["inBrush","outOfBrush"],lS="__ecBrushSelect",CC="__ecInBrushSelectEvent";function mW(e){e.eachComponent({mainType:"brush"},function(t){var r=t.brushTargetManager=new xM(t.option,e);r.setInputRanges(t.areas,e)})}function fSe(e,t,r){var n=[],i,a;e.eachComponent({mainType:"brush"},function(o){r&&r.type==="takeGlobalCursor"&&o.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),mW(e),e.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:me(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],h=[],d=[],p=!1;s||(i=u.throttleType,a=u.throttleDelay);var v=Y(o.areas,function(w){var S=vSe[w.brushType],b=pe({boundingRect:S?S(w):void 0},w);return b.selectors=cSe(b),b}),g=bC(o.option,VN,function(w){w.mappingMethod="fixed"});j(c)&&D(c,function(w){f[w]=1});function y(w){return c==="all"||!!f[w]}function m(w){return!!w.length}e.eachSeries(function(w,S){var b=d[S]=[];w.subType==="parallel"?_(w,S):x(w,S,b)});function _(w,S){var b=w.coordinateSystem;p=p||b.hasAxisBrushed(),y(S)&&b.eachActiveState(w.getData(),function(C,T){C==="active"&&(h[T]=1)})}function x(w,S,b){if(!(!w.brushSelector||pSe(o,S))&&(D(v,function(T){o.brushTargetManager.controlSeries(T,w,e)&&b.push(T),p=p||m(b)}),y(S)&&m(b))){var C=w.getData();C.each(function(T){GN(w,b,C,T)&&(h[T]=1)})}}e.eachSeries(function(w,S){var b={seriesId:w.id,seriesIndex:S,seriesName:w.name,dataIndex:[]};l.selected.push(b);var C=d[S],T=w.getData(),A=y(S)?function(M){return h[M]?(b.dataIndex.push(T.getRawIndex(M)),"inBrush"):"outOfBrush"}:function(M){return GN(w,C,T,M)?(b.dataIndex.push(T.getRawIndex(M)),"inBrush"):"outOfBrush"};(y(S)?p:m(C))&&lSe(VN,g,T,A)})}),hSe(t,i,a,n,r)}function hSe(e,t,r,n,i){if(i){var a=e.getZr();if(!a[CC]){a[lS]||(a[lS]=dSe);var o=rf(a,lS,r,t);o(e,n)}}}function dSe(e,t){if(!e.isDisposed()){var r=e.getZr();r[CC]=!0,e.dispatchAction({type:"brushSelect",batch:t}),r[CC]=!1}}function GN(e,t,r,n){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(e.brushSelector(n,r,o.selectors,o))return!0}}function pSe(e,t){var r=e.option.seriesIndex;return r!=null&&r!=="all"&&(j(r)?Me(r,t)<0:t!==r)}var vSe={rect:function(e){return $N(e.range)},polygon:function(e){for(var t,r=e.range,n=0,i=r.length;n<i;n++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=r[n];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&$N(t)}};function $N(e){return new Ae(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var gSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new Z2(n.getZr())).on("brush",ee(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){mW(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:me(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:me(i),$from:n})},t.type="brush",t}(_t),ySe="#ddd",mSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&yW(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:ySe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=Y(r,function(n){return HN(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=HN(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Le);function HN(e,t){return Te({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Xe(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var _Se=["rect","polygon","lineX","lineY","keep","clear"],xSe=function(e){V(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,D(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return D(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:_Se.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(Qn);function SSe(e){e.registerComponentView(gSe),e.registerComponentModel(mSe),e.registerPreprocessor(oSe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,fSe),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Rt),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Rt),Lu("brush",xSe)}var wSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(Le),bSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=we(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Ve({style:ut(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=r.get("subtext"),d=new Ve({style:ut(s,{text:h,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),v=r.get("sublink"),g=r.get("triggerEvent",!0);c.silent=!p&&!g,d.silent=!v&&!g,p&&c.on("click",function(){zy(p,"_"+r.get("target"))}),v&&d.on("click",function(){zy(v,"_"+r.get("subtarget"))}),Se(c).eventData=Se(d).eventData=g?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(d);var y=a.getBoundingRect(),m=r.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Xt(m,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),d.setStyle(x),y=a.getBoundingRect();var w=_.margin,S=r.getItemStyle(["color","opacity"]);S.fill=r.get("backgroundColor");var b=new ze({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:r.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(b)}},t.type="title",t}(_t);function CSe(e){e.registerComponentModel(wSe),e.registerComponentView(bSe)}var WN=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],D(n,function(u,c){var f=Yt(jc(u),""),h;ge(u)?(h=me(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Vr([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(Le),_W=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=fs(WN.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(WN);Ht(_W,F0.prototype);var TSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(_t),ASe=function(e){V(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(Bi),uS=Math.PI,UN=Be(),MSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return nr("nameValue",{noName:!0,value:c})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=kSe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":q(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:uS/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),d=h.get("show",!0),p=d?h.get("itemSize"):0,v=d?h.get("itemGap"):0,g=p+v,y=r.get(["label","rotate"])||0;y=y*uS/180;var m,_,x,w=h.get("position",!0),S=d&&h.get("showPlayBtn",!0),b=d&&h.get("showPrevBtn",!0),C=d&&h.get("showNextBtn",!0),T=0,A=f;w==="left"||w==="bottom"?(S&&(m=[0,0],T+=g),b&&(_=[T,0],T+=g),C&&(x=[A-p,0],A-=g)):(S&&(m=[A-p,0],A-=g),b&&(_=[0,0],T+=g),C&&(x=[A-p,0],A-=g));var M=[T,A];return r.get("inverse")&&M.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:m,prevBtnPosition:_,nextBtnPosition:x,axisExtent:M,controlSize:p,controlGap:v}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=Mn(),l=o.x,u=o.y+o.height;va(s,s,[-l,-u]),Wl(s,s,-uS/2),va(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=m(o),f=m(i.getBoundingRect()),h=m(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var v=r.labelPosOpt;if(v==null||q(v)){var g=v==="+"?0:1;_(d,f,c,1,g),_(p,h,c,1,1-g)}else{var g=v>=0?0:1;_(d,f,c,1,g),p[1]=d[1]+v}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,w,S,b,C){x[b]+=S[b][C]-w[b][C]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=DSe(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new ASe("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new xe;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Jt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:W({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Jt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:pe({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],D(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:ee(o._changeTimeline,o,u.value)},g=jN(f,h,n,v);g.ensureState("emphasis").style=d.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),_l(g);var y=Se(g);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],D(u,function(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),p=h.getModel(["emphasis","label"]),v=h.getModel(["progress","label"]),g=i.dataToCoord(c.tickValue),y=new Ve({x:g,y:0,rotation:r.labelRotation-r.rotation,onclick:ee(o._changeTimeline,o,f),silent:!1,style:ut(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=ut(p),y.ensureState("progress").style=ut(v),n.add(y),_l(y),UN(y).dataIndex=f,o._tickLabels.push(y)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",ee(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",ee(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",ee(this._handlePlayClick,this,!c),!0);function h(d,p,v,g){if(d){var y=Oi(we(a.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=PSe(a,p+"Icon",m,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:v});_.ensureState("emphasis").style=u,n.add(_),_l(_)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=ee(u._handlePointerDrag,u),f.ondragend=ee(u._handlePointerDragend,u),YN(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){YN(f,u._progressLine,s,i,a)}};this._currentPointer=jN(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=ri(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},t.prototype._doPlayStop=function(){var r=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=r.model;r._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(r){var n=this._mainGroup.getLocalTransform();return Ii(r,n,!0)},t.prototype._findNearestTick=function(r){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-r);c<i&&(i=c,a=l)}),a},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(r){var n=this.model.getCurrentIndex();r==="+"?r=n+1:r==="-"&&(r=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:r,from:this.uid})},t.prototype._updateTicksStatus=function(){var r=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<r);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",UN(i[a]).dataIndex<=r)},t.type="timeline.slider",t}(TSe);function DSe(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new U0({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new S2({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new Ja}}function kSe(e,t){return Xt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}function PSe(e,t,r,n){var i=n.style,a=sp(e.get(["controlStyle",t]),n||{},new Ae(r[0],r[1],r[2],r[3]));return i&&a.setStyle(i),a}function jN(e,t,r,n,i,a){var o=t.get("color");if(i)i.setColor(o),r.add(i),a&&a.onUpdate(i);else{var s=e.get("symbol");i=Gt(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),a&&a.onCreate(i)}var l=t.getItemStyle(["color"]);i.setStyle(l),n=Te({rectHover:!0,z2:100},n,!0);var u=nf(e.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=jl(e.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=e.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function YN(e,t,r,n,i,a){if(!e.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",r));if(a||!o.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}function ISe(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,r,n){var i=r.getComponent("timeline");return i&&t.currentIndex!=null&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),r.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),pe({currentIndex:i.option.currentIndex},t)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,r){var n=r.getComponent("timeline");n&&t.playState!=null&&n.setPlayState(t.playState)})}function ESe(e){var t=e&&e.timeline;j(t)||(t=t?[t]:[]),D(t,function(r){r&&LSe(r)})}function LSe(e){var t=e.type,r={number:"value",time:"time"};if(r[t]&&(e.axisType=r[t],delete e.type),XN(e),Qs(e,"controlPosition")){var n=e.controlStyle||(e.controlStyle={});Qs(n,"position")||(n.position=e.controlPosition),n.position==="none"&&!Qs(n,"show")&&(n.show=!1,delete n.position),delete e.controlPosition}D(e.data||[],function(i){ge(i)&&!j(i)&&(!Qs(i,"value")&&Qs(i,"name")&&(i.value=i.name),XN(i))})}function XN(e){var t=e.itemStyle||(e.itemStyle={}),r=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};D(n,function(o,s){!a[s]&&!Qs(i,s)&&(i[s]=o)}),r.label&&!Qs(n,"emphasis")&&(n.emphasis=r.label,delete r.label)}function Qs(e,t){return e.hasOwnProperty(t)}function RSe(e){e.registerComponentModel(_W),e.registerComponentView(MSe),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),ISe(e),e.registerPreprocessor(ESe)}function bM(e,t){if(!e)return!1;for(var r=j(e)?e:[e],n=0;n<r.length;n++)if(r[n]&&r[n][t])return!0;return!1}function Hv(e){Ll(e,"label",["show"])}var Wv=Be(),to=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.createdBySelf=!1,r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._mergeOption(r,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Ee.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},t.prototype.mergeOption=function(r,n){this._mergeOption(r,n,!1,!1)},t.prototype._mergeOption=function(r,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Wv(s)[o];if(!l||!l.data){Wv(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&Hv(l),D(l.data,function(c){c instanceof Array?(Hv(c[0]),Hv(c[1])):Hv(c)}),u=this.createMarkerModelFromSeries(l,this,n),W(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Wv(s)[o]=u},this)},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return nr("section",{header:this.name,blocks:[nr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(r){this._data=r},t.prototype.getDataParams=function(r,n){var i=F0.prototype.getDataParams.call(this,r,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},t.getMarkerModelFromSeries=function(r,n){return Wv(r)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Le);Ht(to,F0.prototype);var OSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(to);function TC(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function NSe(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function Uv(e,t,r,n,i,a){var o=[],s=ns(t,n),l=s?t.getCalculationInfo("stackResultDimension"):n,u=CM(t,l,e),c=t.indicesOfNearest(l,u)[0];o[i]=t.get(r,c),o[a]=t.get(l,c);var f=t.get(n,c),h=ia(t.get(n,c));return h=Math.min(h,20),h>=0&&(o[a]=+o[a].toFixed(h)),[o,f]}var cS={min:be(Uv,"min"),max:be(Uv,"max"),average:be(Uv,"average"),median:be(Uv,"median")};function Fd(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!NSe(t)&&!j(t.coord)&&j(i)){var a=xW(t,r,n,e);if(t=me(t),t.type&&cS[t.type]&&a.baseAxis&&a.valueAxis){var o=Me(i,a.baseAxis.dim),s=Me(i,a.valueAxis.dim),l=cS[t.type](r,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!j(i))t.coord=[];else for(var u=t.coord,c=0;c<2;c++)cS[u[c]]&&(u[c]=CM(r,r.mapDimension(i[c]),u[c]));return t}}function xW(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(zSe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function zSe(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function Vd(e,t){return e&&e.containData&&t.coord&&!TC(t)?e.containData(t.coord):!0}function BSe(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!TC(t)&&!TC(r)?e.containZone(t.coord,r.coord):!0}function SW(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return Yo(o,t[a])}:function(r,n,i,a){return Yo(r.value,t[a])}}function CM(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var fS=Be(),TM=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=ae()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){fS(s).keep=!1}),n.eachSeries(function(s){var l=to.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!fS(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(r){fS(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;D(r,function(a){var o=to.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?cV(l):HA(l))})}})},t.type="marker",t}(_t);function ZN(e,t,r){var n=t.coordinateSystem;e.each(function(i){var a=e.getItemModel(i),o,s=K(a.get("x"),r.getWidth()),l=K(a.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(n){var u=e.get(n.dimensions[0],i),c=e.get(n.dimensions[1],i);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(i,o)})}var FSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=to.getMarkerModelFromSeries(a,"markPoint");o&&(ZN(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new dp),f=VSe(o,r,n);n.setData(f),ZN(n.getData(),r,a),f.each(function(h){var d=f.getItemModel(h),p=d.getShallow("symbol"),v=d.getShallow("symbolSize"),g=d.getShallow("symbolRotate"),y=d.getShallow("symbolOffset"),m=d.getShallow("symbolKeepAspect");if(he(p)||he(v)||he(g)||he(y)){var _=n.getRawValue(h),x=n.getDataParams(h);he(p)&&(p=p(_,x)),he(v)&&(v=v(_,x)),he(g)&&(g=g(_,x)),he(y)&&(y=y(_,x))}var w=d.getModel("itemStyle").getItemStyle(),S=up(l,"color");w.fill||(w.fill=S),f.setItemVisual(h,{symbol:p,symbolSize:v,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:w})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){Se(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}(TM);function VSe(e,t,r){var n;e?n=Y(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return W(W({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Vr(n,r),a=Y(r.get("data"),be(Fd,t));e&&(a=qe(a,be(Vd,e)));var o=SW(!!e,n);return i.initData(a,null,o),i}function GSe(e){e.registerComponentModel(OSe),e.registerComponentView(FSe),e.registerPreprocessor(function(t){bM(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var $Se=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(to),jv=Be(),HSe=function(e,t,r,n){var i=e.getData(),a;if(j(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=sr(n.yAxis,n.xAxis);else{var u=xW(n,i,t,e);s=u.valueAxis;var c=d$(i,u.valueDataDim);l=CM(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=me(n),p={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var v=r.get("precision");v>=0&&$e(l)&&(l=+l.toFixed(Math.min(v,20))),d.coord[f]=p.coord[f]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var g=[Fd(e,a[0]),Fd(e,a[1]),W({},a[2])];return g[2].type=g[2].type||null,Te(g[2],g[0]),Te(g[2],g[1]),g};function um(e){return!isNaN(e)&&!isFinite(e)}function KN(e,t,r,n){var i=1-e,a=n.dimensions[e];return um(t[i])&&um(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function WSe(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(KN(1,r,n,e)||KN(0,r,n,e)))return!0}return Vd(e,t[0])&&Vd(e,t[1])}function hS(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=K(o.get("x"),i.getWidth()),u=K(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,f=e.get(c[0],t),h=e.get(c[1],t);s=a.dataToPoint([f,h])}if(Xl(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;um(e.get(c[0],t))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):um(e.get(c[1],t))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var USe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=to.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=jv(o).from,u=jv(o).to;l.each(function(c){hS(l,c,!0,a,i),hS(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new X2);this.group.add(c.group);var f=jSe(o,r,n),h=f.from,d=f.to,p=f.line;jv(n).from=h,jv(n).to=d,n.setData(p);var v=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");j(v)||(v=[v,v]),j(g)||(g=[g,g]),j(y)||(y=[y,y]),j(m)||(m=[m,m]),f.from.each(function(x){_(h,x,!0),_(d,x,!1)}),p.each(function(x){var w=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[h.getItemLayout(x),d.getItemLayout(x)]),w.stroke==null&&(w.stroke=h.getItemVisual(x,"style").fill),p.setItemVisual(x,{fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:d.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(x,"symbolOffset"),toSymbolRotate:d.getItemVisual(x,"symbolRotate"),toSymbolSize:d.getItemVisual(x,"symbolSize"),toSymbol:d.getItemVisual(x,"symbol"),style:w})}),c.updateData(p),f.line.eachItemGraphicEl(function(x){Se(x).dataModel=n,x.traverse(function(w){Se(w).dataModel=n})});function _(x,w,S){var b=x.getItemModel(w);hS(x,w,S,r,a);var C=b.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=up(l,"color")),x.setItemVisual(w,{symbolKeepAspect:b.get("symbolKeepAspect"),symbolOffset:we(b.get("symbolOffset",!0),m[S?0:1]),symbolRotate:we(b.get("symbolRotate",!0),y[S?0:1]),symbolSize:we(b.get("symbolSize"),g[S?0:1]),symbol:we(b.get("symbol",!0),v[S?0:1]),style:C})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}(TM);function jSe(e,t,r){var n;e?n=Y(e&&e.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return W(W({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Vr(n,r),a=new Vr(n,r),o=new Vr([],r),s=Y(r.get("data"),be(HSe,t,e,r));e&&(s=qe(s,be(WSe,e)));var l=SW(!!e,n);return i.initData(Y(s,function(u){return u[0]}),null,l),a.initData(Y(s,function(u){return u[1]}),null,l),o.initData(Y(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function YSe(e){e.registerComponentModel($Se),e.registerComponentView(USe),e.registerPreprocessor(function(t){bM(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var XSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(to),Yv=Be(),ZSe=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Fd(e,i),s=Fd(e,a),l=o.coord,u=s.coord;l[0]=sr(l[0],-1/0),l[1]=sr(l[1],-1/0),u[0]=sr(u[0],1/0),u[1]=sr(u[1],1/0);var c=TA([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function cm(e){return!isNaN(e)&&!isFinite(e)}function qN(e,t,r,n){var i=1-e;return cm(t[i])&&cm(r[i])}function KSe(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return Xl(e,"cartesian2d")?r&&n&&(qN(1,r,n)||qN(0,r,n))?!0:BSe(e,i,a):Vd(e,i)||Vd(e,a)}function QN(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=K(o.get(r[0]),i.getWidth()),u=K(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=e.getValues(["x0","y0"],t),f=e.getValues(["x1","y1"],t),h=a.clampData(c),d=a.clampData(f),p=[];r[0]==="x0"?p[0]=h[0]>d[0]?f[0]:c[0]:p[0]=h[0]>d[0]?c[0]:f[0],r[1]==="y0"?p[1]=h[1]>d[1]?f[1]:c[1]:p[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(p,r,!0)}else{var v=e.get(r[0],t),g=e.get(r[1],t),y=[v,g];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(Xl(a,"cartesian2d")){var m=a.getAxis("x"),_=a.getAxis("y"),v=e.get(r[0],t),g=e.get(r[1],t);cm(v)?s[0]=m.toGlobalCoord(m.getExtent()[r[0]==="x0"?0:1]):cm(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var JN=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qSe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=to.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Y(JN,function(f){return QN(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new xe});this.group.add(c.group),this.markKeep(c);var f=QSe(o,r,n);n.setData(f),f.each(function(h){var d=Y(JN,function(C){return QN(f,h,C,r,a)}),p=o.getAxis("x").scale,v=o.getAxis("y").scale,g=p.getExtent(),y=v.getExtent(),m=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],_=[v.parse(f.get("y0",h)),v.parse(f.get("y1",h))];ri(m),ri(_);var x=!(g[0]>m[1]||g[1]<m[0]||y[0]>_[1]||y[1]<_[0]),w=!x;f.setItemLayout(h,{points:d,allClipped:w});var S=f.getItemModel(h).getModel("itemStyle").getItemStyle(),b=up(l,"color");S.fill||(S.fill=b,q(S.fill)&&(S.fill=Ty(S.fill,.4))),S.stroke||(S.stroke=b),f.setItemVisual(h,"style",S)}),f.diff(Yv(c).data).add(function(h){var d=f.getItemLayout(h);if(!d.allClipped){var p=new Ur({shape:{points:d.points}});f.setItemGraphicEl(h,p),c.group.add(p)}}).update(function(h,d){var p=Yv(c).data.getItemGraphicEl(d),v=f.getItemLayout(h);v.allClipped?p&&c.group.remove(p):(p?He(p,{shape:{points:v.points}},n,h):p=new Ur({shape:{points:v.points}}),f.setItemGraphicEl(h,p),c.group.add(p))}).remove(function(h){var d=Yv(c).data.getItemGraphicEl(h);c.group.remove(d)}).execute(),f.eachItemGraphicEl(function(h,d){var p=f.getItemModel(d),v=f.getItemVisual(d,"style");h.useStyle(f.getItemVisual(d,"style")),xr(h,rr(p),{labelFetcher:n,labelDataIndex:d,defaultText:f.getName(d)||"",inheritColor:q(v.fill)?Ty(v.fill,1):"#000"}),_r(h,p),Ct(h,null,null,p.get(["emphasis","disabled"])),Se(h).dataModel=n}),Yv(c).data=f,c.group.silent=n.get("silent")||r.get("silent")},t.type="markArea",t}(TM);function QSe(e,t,r){var n,i,a=["x0","y0","x1","y1"];if(e){var o=Y(e&&e.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return W(W({},f),{name:u,ordinalMeta:null})});i=Y(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new Vr(i,r)}else i=[{name:"value",type:"float"}],n=new Vr(i,r);var s=Y(r.get("data"),be(ZSe,t,e,r));e&&(s=qe(s,be(KSe,e)));var l=e?function(u,c,f,h){var d=u.coord[Math.floor(h/2)][h%2];return Yo(d,i[h])}:function(u,c,f,h){return Yo(u.value,i[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}function JSe(e){e.registerComponentModel(XSe),e.registerComponentView(qSe),e.registerPreprocessor(function(t){bM(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var ewe=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},AC=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),j(n)&&D(n,function(a,o){q(a)&&(a={type:a}),n[o]=Te(a,ewe(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(h)),h.length?n=n.concat(h):c=!0}else c=!0;c&&OA(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=ae(),s=Y(a,function(l){return(q(l)||$e(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Xe(l,this,this.ecModel))},this);this._data=qe(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;D(a,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;D(r,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;D(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Me(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(Le),Cu=be,MC=D,Xv=xe,wW=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new Xv),this.group.add(this._selectorGroup=new Xv),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=r.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},h=r.get("padding"),d=Xt(c,f,h),p=this.layoutInner(r,o,d,a,l,u),v=Xt(pe({width:p.width,height:p.height},c),f,h);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=cW(p,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=ae(),f=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),MC(n.getData(),function(d,p){var v=d.get("name");if(!this.newlineDisabled&&(v===""||v===`
228
228
  `)){var g=new Xv;g.newline=!0,u.add(g);return}var y=i.getSeriesByName(v)[0];if(!c.get(v))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},x=m.getVisual("legendIcon"),w=m.getVisual("style"),S=this._createItem(y,v,p,d,n,r,_,w,x,f,a);S.on("click",Cu(ez,v,null,a,h)).on("mouseover",Cu(DC,y.name,null,a,h)).on("mouseout",Cu(kC,y.name,null,a,h)),i.ssr&&S.eachChild(function(b){var C=Se(b);C.seriesIndex=y.seriesIndex,C.dataIndex=p,C.ssrType="legend"}),c.set(v,!0)}else i.eachRawSeries(function(b){if(!c.get(v)&&b.legendVisualProvider){var C=b.legendVisualProvider;if(!C.containName(v))return;var T=C.indexOfName(v),A=C.getItemVisual(T,"style"),M=C.getItemVisual(T,"legendIcon"),k=Dn(A.fill);k&&k[3]===0&&(k[3]=.2,A=W(W({},A),{fill:Va(k,"rgba")}));var P=this._createItem(b,v,p,d,n,r,{},A,M,f,a);P.on("click",Cu(ez,null,v,a,h)).on("mouseover",Cu(DC,null,v,a,h)).on("mouseout",Cu(kC,null,v,a,h)),i.ssr&&P.eachChild(function(L){var E=Se(L);E.seriesIndex=b.seriesIndex,E.dataIndex=p,E.ssrType="legend"}),c.set(v,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();MC(r,function(u){var c=u.type,f=new Ve({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);xr(f,{normal:h,emphasis:d},{defaultText:u.title}),_l(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){var d=r.visualDrawType,p=o.get("itemWidth"),v=o.get("itemHeight"),g=o.isSelected(n),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var x=twe(c,a,l,u,d,g,h),w=new Xv,S=a.getModel("textStyle");if(he(r.getLegendIcon)&&(!_||_==="inherit"))w.add(r.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;w.add(rwe({itemWidth:p,itemHeight:v,icon:c,iconRotate:b,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}))}var C=s==="left"?p+5:-5,T=s,A=o.get("formatter"),M=n;q(A)&&A?M=A.replace("{name}",n??""):he(A)&&(M=A(n));var k=g?S.getTextColor():a.get("inactiveColor");w.add(new Ve({style:ut(S,{text:M,x:C,y:v/2,fill:k,align:T,verticalAlign:"middle"},{inheritColor:k})}));var P=new ze({shape:w.getBoundingRect(),style:{fill:"transparent"}}),L=a.getModel("tooltip");return L.get("show")&&Zc({el:P,componentModel:o,itemName:n,itemTooltipOption:L.option}),w.add(P),w.eachChild(function(E){E.silent=!0}),P.silent=!f,this.getContentGroup().add(w),_l(w),w.__legendDataIndex=i,w},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Sl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Sl("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],p=r.get("selectorButtonGap",!0),v=r.getOrient().index,g=v===0?"width":"height",y=v===0?"height":"width",m=v===0?"y":"x";s==="end"?d[v]+=c[g]+p:f[v]+=h[g]+p,d[1-v]+=c[y]/2-h[y]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+p+h[g],_[y]=Math.max(c[y],h[y]),_[m]=Math.min(0,h[m]+d[1-v]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(_t);function twe(e,t,r,n,i,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),MC(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:Pc(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=t.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=t.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&v?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function rwe(e){var t=e.icon||"roundRect",r=Gt(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function ez(e,t,r,n){kC(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),DC(e,t,r,n)}function bW(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function DC(e,t,r,n){bW(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function kC(e,t,r,n){bW(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function nwe(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function jf(e,t,r){var n={},i=e==="toggleSelected",a;return r.eachComponent("legend",function(o){i&&a!=null?o[a?"select":"unSelect"](t.name):e==="allSelect"||e==="inverseSelect"?o[e]():(o[e](t.name),a=o.isSelected(t.name));var s=o.getData();D(s,function(l){var u=l.get("name");if(!(u===`
229
- `||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function iwe(e){e.registerAction("legendToggleSelect","legendselectchanged",be(jf,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",be(jf,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",be(jf,"inverseSelect")),e.registerAction("legendSelect","legendselected",be(jf,"select")),e.registerAction("legendUnSelect","legendunselected",be(jf,"unSelect"))}function CW(e){e.registerComponentModel(AC),e.registerComponentView(wW),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,nwe),e.registerSubTypeDefaulter("legend",function(){return"plain"}),iwe(e)}var awe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=Jc(r);e.prototype.init.call(this,r,n,i),tz(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),tz(this,this.option,r)},t.type="legend.scroll",t.defaultOption=fs(AC.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(AC);function tz(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,rs(t,r,{type:"box",ignoreSize:!!i})}var rz=xe,dS=["width","height"],pS=["x","y"],owe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new rz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new rz)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=j(f)?f:[f,f];p("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new Ve({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var y=v+"DataIndex",m=sp(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:ee(u._pageGo,u,y,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=v,c.add(m)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=dS[u],f=pS[u],h=dS[1-u],d=pS[1-u];o&&Sl("horizontal",l,r.get("selectorItemGap",!0));var p=r.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],y=me(i);o&&(y[c]=i[c]-v[c]-p);var m=this._layoutContentAndController(r,a,y,u,c,h,d,f);if(o){if(s==="end")g[u]+=m[c]+p;else{var _=v[c]+p;g[u]-=_,m[f]-=_}m[c]+=v[c]+p,g[1-u]+=m[d]+m[h]/2-v[h]/2,m[h]=Math.max(m[h],v[h]),m[d]=Math.min(m[d],v[d]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;Sl(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),Sl("horizontal",h,r.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),p=h.getBoundingRect(),v=this._showController=d[o]>i[o],g=[-d.x,-d.y];n||(g[a]=c[u]);var y=[0,0],m=[-p.x,-p.y],_=we(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(v){var x=r.get("pageButtonPosition",!0);x==="end"?m[a]+=i[o]-p[o]:y[a]+=p[o]+_}m[1-a]+=d[s]/2-p[s]/2,c.setPosition(g),f.setPosition(y),h.setPosition(m);var w={x:0,y:0};if(w[o]=v?i[o]:d[o],w[s]=Math.max(d[s],p[s]),w[l]=Math.min(0,p[l]+m[1-a]),f.__rectSize=i[o],v){var S={x:0,y:0};S[o]=Math.max(i[o]-p[o]-_,0),S[s]=w[s],f.setClipPath(new ze({shape:S})),f.__rectSize=S[o]}else h.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(r);return b.pageIndex!=null&&He(c,{x:b.contentPosition[0],y:b.contentPosition[1]},v?r:null),this._updatePageInfoView(r,b),w},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",q(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=dS[o],l=pS[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var v=x(f);p.contentPosition[o]=-v.s;for(var g=u+1,y=v,m=v,_=null;g<=h;++g)_=x(c[g]),(!_&&m.e>y.s+a||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=v,m=v,_=null;g>=-1;--g)_=x(c[g]),(!_||!w(m,_.s))&&y.i<m.i&&(m=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=_;return p;function x(S){if(S){var b=S.getBoundingRect(),C=b[l]+S[l];return{s:C,e:C+b[s],i:S.__legendDataIndex}}}function w(S,b){return S.e>=b&&S.s<=b+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(wW);function swe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function lwe(e){De(CW),e.registerComponentModel(awe),e.registerComponentView(owe),swe(e)}function uwe(e){De(CW),De(lwe)}var cwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=fs(Bd.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Bd),AM=Be();function fwe(e,t,r){AM(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function hwe(e,t){for(var r=AM(e).coordSysRecordMap,n=r.keys(),i=0;i<n.length;i++){var a=n[i],o=r.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||TW(r,o))}}}function TW(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function dwe(e,t){var r={model:t,containsPoint:be(vwe,t),dispatchAction:be(pwe,e),dataZoomInfoMap:null,controller:null},n=r.controller=new mp(e.getZr());return D(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];r.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,r.model.mainType,r.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&r.dispatchAction(o)})}),r}function pwe(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function vwe(e,t,r,n){return e.coordinateSystem.containPoint([r,n])}function gwe(e){var t,r="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[r+s]>n[r+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function ywe(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=AM(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=ae());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=sW(a);D(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,dwe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ae());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){TW(i,a);return}var c=gwe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),rf(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var mwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),fwe(i,r,{pan:ee(vS.pan,this),zoom:ee(vS.zoom,this),scrollMove:ee(vS.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){hwe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(yM),vS={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=gS[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Kl(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:nz(function(e,t,r,n,i,a){var o=gS[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:nz(function(e,t,r,n,i,a){var o=gS[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function nz(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(Kl(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var gS={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function AW(e){mM(e),e.registerComponentModel(cwe),e.registerComponentView(mwe),ywe(e)}var _we=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=fs(Bd.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"}}}),t}(Bd),Yf=ze,iz=7,xwe=1,yS=30,Swe=7,Xf="horizontal",az="vertical",wwe=5,bwe=["line","bar","candlestick","scatter"],Cwe={easing:"cubicOut",duration:100,delay:0},Twe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=ee(this._onBrush,this),this._onBrushEnd=ee(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),rf(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Td(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new xe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Swe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Xf?{right:s.width-o.x-o.width,top:s.height-yS-iz-a,width:o.width,height:yS}:{right:iz,top:o.y,width:yS,height:o.height},u=Jc(r.option);D(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=Xt(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===az&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Xf&&!o?{scaleY:l?1:-1,scaleX:1}:i===Xf&&o?{scaleY:l?1:-1,scaleX:-1}:i===az&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Yf({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Yf({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ee(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var d=[0,n[1]],p=[0,n[0]],v=[[n[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]),x;o.each([l],function(T,A){if(_>0&&A%_){m+=y;return}var M=T==null||isNaN(T)||T==="",k=M?0:Ke(T,f,d,!0);M&&!x&&A?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&x&&(v.push([m,0]),g.push([m,0])),v.push([m,k]),g.push([m,k]),m+=y,x=M}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function S(T){var A=w.getModel(T?"selectedDataBackground":"dataBackground"),M=new xe,k=new Ur({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),P=new Zr({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(k),M.add(P),M}for(var b=0;b<3;b++){var C=S(b===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!i&&!(n!==!0&&Me(bwe,u.get("type"))<0)){var c=a.getComponent(No(o),s).axis,f=Awe(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),i={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Yf({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Yf({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:xwe,fill:"rgba(0,0,0,0)"}})),D([0,1],function(_){var x=l.get("handleIcon");!Vy[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var w=Gt(x,-1,0,2,2,null,!0);w.attr({cursor:oz(this._orient),draggable:!0,drift:ee(this._onDragMove,this,_),ondragend:ee(this._onDragEnd,this),onmouseover:ee(this._showDataInfo,this,!0),onmouseout:ee(this._showDataInfo,this,!1),z2:5});var S=w.getBoundingRect(),b=l.get("handleSize");this._handleHeight=K(b,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),_l(w);var C=l.get("handleColor");C!=null&&(w.style.fill=C),o.add(i[_]=w);var T=l.getModel("textStyle");r.add(a[_]=new Ve({silent:!0,invisible:!0,style:ut(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var d=h;if(f){var p=K(l.get("moveHandleSize"),s[1]),v=n.moveHandle=new ze({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=n.moveHandleIcon=Gt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new ze({invisible:!0,shape:{y:s[1]-m,height:p+m}}),d.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:oz(this._orient),drift:ee(this._onDragMove,this,"all"),ondragstart:ee(this._showDataInfo,this,!0),ondragend:ee(this._onDragEnd,this),onmouseover:ee(this._showDataInfo,this,!0),onmouseout:ee(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Ke(r[0],[0,100],n,!0),Ke(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Kl(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?Ke(s.minSpan,l,o,!0):null,s.maxSpan!=null?Ke(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=ri([Ke(a[0],o,l,!0),Ke(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=ri(i.slice()),o=this._size;D([0,1],function(d){var p=n.handles[d],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:i[d]+(d?-1:1),y:o[1]/2-v/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new ze,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(r)},t.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=r?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=ri(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(p){var v=xl(i.handles[p].parent,this.group),g=P0(p===0?"right":"left",v),y=this._handleWidth/2+wwe,m=Ii([h[p]+(p===0?-y:y),this._size[1]/2],v);a[p].setStyle({x:m[0],y:m[1],verticalAlign:o===Xf?"middle":g,align:o===Xf?g:"center",text:s[p]})}},t.prototype._formatLabel=function(r,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=r==null||isNaN(r)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(o,20));return he(a)?a(r,s):q(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(r){r=this._dragging||r;var n=this._displayables,i=n.handleLabels;i[0].attr("invisible",!r),i[1].attr("invisible",!r),n.moveHandle&&this.api[r?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},t.prototype._onDragMove=function(r,n,i,a){this._dragging=!0,Xa(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Ii([n,i],o,!0),l=this._updateInterval(r,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(r){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Ce(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=ri([Ke(i.x,o,s,!0),Ke(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(Xa(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Yf({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?Cwe:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=sW(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(yM);function Awe(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function oz(e){return e==="vertical"?"ns-resize":"ew-resize"}function MW(e){e.registerComponentModel(_we),e.registerComponentView(Twe),mM(e)}function Mwe(e){De(AW),De(MW)}var DW={get:function(e,t,r){var n=me((Dwe[e]||{})[t]);return r&&j(n)?n[n.length-1]:n}},Dwe={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]}},sz=tr.mapVisual,kwe=tr.eachVisual,Pwe=j,lz=D,Iwe=ri,Ewe=Ke,fm=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&yW(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=ee(r,this),this.controllerVisuals=bC(this.option.controller,n,r),this.targetVisuals=bC(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=et(r),n},t.prototype.eachTargetSeries=function(r,n){D(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],j(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(q(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(he(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=Iwe([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Te(a,i),Te(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Pwe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,d){var p=f[h],v=f[d];p&&!v&&(v=f[d]={},lz(p,function(g,y){if(tr.isValidType(y)){var m=DW.get(y,"inactive",s);m!=null&&(v[y]=m,y==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";lz(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=h&&me(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=d&&me(d)||(s?m[0]:[m[0],m[0]])),_.symbol=sz(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var w=-1/0;kwe(x,function(S){S>w&&(w=S)}),_.symbolSize=sz(x,function(S){return Ewe(S,[0,w],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Le),uz=[20,140],Lwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=uz[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=uz[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):j(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=ri((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},t.prototype.getValueState=function(r){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=r)&&(n[1]>=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=cz(this,"outOfRange",this.getExtent()),i=cz(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:r(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&o(a[a.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=fs(fm.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(fm);function cz(e,t,r){if(r[0]===r[1])return r.slice();for(var n=200,i=(r[1]-r[0])/n,a=r[0],o=[],s=0;s<=n&&a<r[1];s++)o.push(a),a+=i;return o.push(r[1]),o}var kW=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n},t.prototype.render=function(r,n,i,a){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,i,a)},t.prototype.renderBackground=function(r){var n=this.visualMapModel,i=Qc(n.get("padding")||0),a=r.getBoundingRect();r.add(new ze({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(r,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,p){s[d]=p}var f=o.controllerVisuals[a||o.getValueState(r)],h=tr.prepareVisualTypes(f);return D(h,function(d){var p=f[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",p=f.__alphaForOpacity),tr.dependsOn(d,n)&&p&&p.applyVisual(r,u,c)}),s[n]},t.prototype.positionGroup=function(r){var n=this.visualMapModel,i=this.api;z0(r,n.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},t.prototype.doRender=function(r,n,i,a){},t.type="visualMap",t}(_t),fz=[["left","right","width"],["top","bottom","height"]];function PW(e,t,r){var n=e.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=n.orient==="horizontal"?1:0,s=fz[o],l=[0,null,10],u={},c=0;c<3;c++)u[fz[1-o][c]]=l[c],u[s[c]]=c===2?r[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=Xt(u,a,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<a[f[1]]*.5?0:1]}function Lg(e,t){return D(e||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var Yi=Ke,Rwe=D,hz=Math.min,mS=Math.max,Owe=12,Nwe=6,zwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return t.prototype.init=function(r,n){e.prototype.init.call(this,r,n),this._hoverLinkFromSeriesMouseOver=ee(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ee(this._hideIndicator,this)},t.prototype.doRender=function(r,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var i=r.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(r,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),h=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Ve({style:ut(d,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="horizontal"?f:"center",text:a})}))}},t.prototype._renderBar=function(r){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=PW(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new xe;u.add(c),c.add(i.outOfRange=dz()),c.add(i.inRange=dz(null,s?vz(this._orient):null,ee(this._dragHandle,this,"all",!1),ee(this._dragHandle,this,"all",!0))),c.setClipPath(new ze({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),h=mS(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,h,o),this._createHandle(n,u,1,a,h,o)),this._createIndicator(n,u,a,h,o),r.add(u)},t.prototype._createHandle=function(r,n,i,a,o,s){var l=ee(this._dragHandle,this,i,!1),u=ee(this._dragHandle,this,i,!0),c=Oi(r.get("handleSize"),a[0]),f=Gt(r.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=vz(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){Xa(y.event)}}),f.x=a[0]/2,f.useStyle(r.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),ol(f,!0),n.add(f);var d=this.visualMapModel.textStyleModel,p=new Ve({cursor:h,draggable:!0,drift:l,onmousemove:function(y){Xa(y.event)},ondragend:u,style:ut(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],g=this._shapes;g.handleThumbs[i]=f,g.handleLabelPoints[i]=v,g.handleLabels[i]=p},t.prototype._createIndicator=function(r,n,i,a,o){var s=Oi(r.get("indicatorSize"),i[0]),l=Gt(r.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof cr){var c=l.style;l.useStyle(W({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new Ve({silent:!0,invisible:!0,style:ut(f,{x:0,y:0,text:""})});this.group.add(h);var d=[(o==="horizontal"?a/2:Nwe)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=h,p.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(r,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():pz(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},t.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),i=r.getExtent(),a=[0,r.itemSize[1]];this._handleEnds=[Yi(n[0],i,a,!0),Yi(n[1],i,a,!0)]},t.prototype._updateInterval=function(r,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];Kl(n,a,o,r,0);var s=i.getExtent();this._dataInterval=[Yi(a[0],o,s,!0),Yi(a[1],o,s,!0)]},t.prototype._updateView=function(r){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=r?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(r,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(r,o),l=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new ap(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(r,n){var i=100,a=[],o=(r[1]-r[0])/i;a.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=r[0]+o*s;if(l>r[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new xe(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();Rwe([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=r[c];var h=Yi(r[c],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=d/l[0],f.x=l[0]-d/2;var p=Ii(i.handleLabelPoints[c],xl(f,this.group));s[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",h),p=this.getControllerVisual(r,"symbolSize"),v=Yi(r,s,u,!0),g=l[0]-p/2,y={x:f.x,y:f.y};f.y=v,f.x=g;var m=Ii(c.indicatorLabelPoint,xl(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),w=this._orient,S=w==="horizontal";_.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:S?x:"middle",align:S?"center":x});var b={x:g,y:v,style:{fill:d}},C={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(b,T),_.animateTo(C,T)}else f.attr(b),_.attr(C);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this.api.enterBlur(A[M])}},t.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=hz(mS(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=hz(mS(o[0],r),o[1]);var l=Bwe(i,s,o),u=[r-l,r+l],c=Yi(r,o,s,!0),f=[Yi(u[0],o,s,!0),Yi(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||pz(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=Bae(h,d);this._dispatchHighDown("downplay",Lg(p[0],i)),this._dispatchHighDown("highlight",Lg(p[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(ll(r.target,function(l){var u=Se(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this.api.leaveBlur(n[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Lg(r,this.visualMapModel)),r.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(r,n,i,a){var o=xl(n,a?null:this.group);return j(r)?Ii(r,o,i):P0(r,o,i)},t.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(kW);function dz(e,t,r,n){return new Ur({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(i){Xa(i.event)},ondragend:n})}function Bwe(e,t,r){var n=Owe/2,i=e.get("hoverLinkDataSize");return i&&(n=Yi(i,t,r,!0)/2),n}function pz(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function vz(e){return e==="vertical"?"ns-resize":"ew-resize"}var Fwe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Vwe=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(r){r.setSelected(e.selected)})},Gwe=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",function(n){var i=e.pipelineContext;!n.isTargetSeries(e)||i&&i.large||r.push(uSe(n.stateList,n.targetVisuals,ee(n.getValueState,n),n.getDataDimensionIndex(e.getData())))}),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(e)){var a=i.getVisualMeta(ee($we,null,e,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(r);o>=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function $we(e,t,r,n){for(var i=t.targetVisuals[n],a=tr.prepareVisualTypes(i),o={color:up(e.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(r,f,h)}return o.color;function f(d){return o[d]}function h(d,p){o[d]=p}}var gz=D;function Hwe(e){var t=e&&e.visualMap;j(t)||(t=t?[t]:[]),gz(t,function(r){if(r){Tu(r,"splitList")&&!Tu(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&j(n)&&gz(n,function(i){ge(i)&&(Tu(i,"start")&&!Tu(i,"min")&&(i.min=i.start),Tu(i,"end")&&!Tu(i,"max")&&(i.max=i.end))})}})}function Tu(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var yz=!1;function IW(e){yz||(yz=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(Fwe,Vwe),D(Gwe,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(Hwe))}function EW(e){e.registerComponentModel(Lwe),e.registerComponentView(zwe),IW(e)}var Wwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Uwe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=me(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Y(this._pieceList,function(l){return l=me(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=tr.listVisualTypes(),a=this.isCategory();D(r.pieces,function(s){D(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),D(n,function(s,l){var u=!1;D(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&D(this.stateList,function(c){(r[c]||(r[c]={}))[l]=DW.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,D(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;D(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=me(r)},t.prototype.getValueState=function(r){var n=tr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=tr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=r(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=fs(fm.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}),t}(fm),Uwe={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),hI(e),D(e,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(e){var t=this.option;D(t.categories,function(r){e.push({text:this.formatValueText(r,!0),value:r})},this),mz(t,e)},pieces:function(e){var t=this.option;D(t.pieces,function(r,n){ge(r)||(r={value:r});var i={text:"",index:n};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var a=i.value=r.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],d=0;d<3&&o[f]==null;d++)o[f]=r[h[d]],s[f]=l[d],c[f]=d===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=tr.retrieveVisuals(r),e.push(i)},this),mz(t,e),hI(e),D(e,function(r){var n=r.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function mz(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var jwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=sr(n.get("showLabel",!0),!f);f&&this._renderEndsText(r,f[0],u,h,l),D(c.viewPieceList,function(d){var p=d.piece,v=new xe;v.onclick=ee(this._onItemClick,this,p),this._enableHoverLink(v,d.indexInModelPieceList);var g=n.getRepresentValue(p);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);v.add(new Ve({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}r.add(v)},this),f&&this._renderEndsText(r,f[1],u,h,l),Sl(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Lg(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return PW(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new xe,l=this.visualMapModel.textStyleModel;s.add(new Ve({style:ut(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=Y(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i){r.add(Gt(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=me(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(kW);function LW(e){e.registerComponentModel(Wwe),e.registerComponentView(jwe),IW(e)}function Ywe(e){De(EW),De(LW)}var Xwe={label:{enabled:!0},decal:{show:!1}},_z=Be(),Zwe={};function Kwe(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=me(Xwe);Te(n.label,e.getLocaleModel().get("aria"),!1),Te(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=ae();e.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),_z(h).scope=d}}),e.eachRawSeries(function(h){if(e.isSeriesFiltered(h))return;if(he(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var m=kb(h.ecModel,h.name,Zwe,e.getSeriesCount()),_=d.getVisual("decal");d.setVisual("decal",x(_,m))}else{var p=h.getRawData(),v={},g=_z(h).scope;d.each(function(w){var S=d.getRawIndex(w);v[S]=w});var y=p.count();p.each(function(w){var S=v[w],b=p.getName(w)||w+"",C=kb(h.ecModel,b,g,y),T=d.getItemVisual(S,"decal");d.setItemVisual(S,"decal",x(T,C))})}function x(w,S){var b=w?W(W({},S),w):S;return b.dirty=!0,b}})}}function a(){var u=t.getZr().dom;if(u){var c=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=pe(f.option,c),!!f.get("enabled")){if(f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=e.getSeriesCount(),d=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,v=Math.min(h,p),g;if(!(h<1)){var y=s();if(y){var m=f.get(["general","withTitle"]);g=o(m,{title:y})}else g=f.get(["general","withoutTitle"]);var _=[],x=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(x,{seriesCount:h}),e.eachSeries(function(C,T){if(T<v){var A=void 0,M=C.get("name"),k=M?"withName":"withoutName";A=h>1?f.get(["series","multiple",k]):f.get(["series","single",k]),A=o(A,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var P=C.getData();if(P.count()>d){var L=f.get(["data","partialData"]);A+=o(L,{displayCnt:d})}else A+=f.get(["data","allData"]);for(var E=f.get(["data","separator","middle"]),R=f.get(["data","separator","end"]),z=[],O=0;O<P.count();O++)if(O<d){var B=P.getName(O),I=P.getValues(O),G=f.get(["data",B?"withName":"withoutName"]);z.push(o(G,{name:B,value:I.join(E)}))}A+=z.join(E)+R,_.push(A)}});var w=f.getModel(["series","multiple","separator"]),S=w.get("middle"),b=w.get("end");g+=_.join(S)+b,u.setAttribute("aria-label",g)}}}}function o(u,c){if(!q(u))return u;var f=u;return D(c,function(h,d){f=f.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),h)}),f}function s(){var u=e.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=e.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function qwe(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},D(["description","general","series","data"],function(r){t[r]!=null&&(t.label[r]=t[r])})}}function Qwe(e){e.registerPreprocessor(qwe),e.registerVisual(e.PRIORITY.VISUAL.ARIA,Kwe)}var xz={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Jwe=function(){function e(t){var r=this._condVal=q(t)?new RegExp(t):iie(t)?t:null;if(r==null){var n="";Ye(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return q(r)?this._condVal.test(t):$e(r)?this._condVal.test(t+""):!1},e}(),ebe=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),tbe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(!t[r].evaluate())return!1;return!0},e}(),rbe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(t[r].evaluate())return!0;return!1},e}(),nbe=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),ibe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=t?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?i:n))return!1;return!0},e}();function MM(e,t){if(e===!0||e===!1){var r=new ebe;return r.value=e,r}var n="";return RW(e)||Ye(n),e.and?Sz("and",e,t):e.or?Sz("or",e,t):e.not?abe(e,t):obe(e,t)}function Sz(e,t,r){var n=t[e],i="";j(n)||Ye(i),n.length||Ye(i);var a=e==="and"?new tbe:new rbe;return a.children=Y(n,function(o){return MM(o,r)}),a.children.length||Ye(i),a}function abe(e,t){var r=e.not,n="";RW(r)||Ye(n);var i=new nbe;return i.child=MM(r,t),i.child||Ye(n),i}function obe(e,t){for(var r="",n=t.prepareGetValue(e),i=[],a=Re(e),o=e.parser,s=o?vG(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var c=ne(xz,u)?xz[u]:u,f=e[u],h=s?s(f):f,d=Ule(c,h)||c==="reg"&&new Jwe(h);d||Ye(r),i.push(d)}}i.length||Ye(r);var p=new ibe;return p.valueGetterParam=n,p.valueParser=s,p.getValue=t.getValue,p.subCondList=i,p}function RW(e){return ge(e)&&!Pr(e)}var sbe=function(){function e(t,r){this._cond=MM(t,r)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function lbe(e,t){return new sbe(e,t)}var ube={type:"echarts:filter",transform:function(e){for(var t=e.upstream,r,n=lbe(e.config,{valueGetterAttrMap:ae({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;ne(s,"dimension")||Ye(l);var c=t.getDimensionInfo(u);return c||Ye(l),{dimIdx:c.index}},getValue:function(s){return t.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)r=t.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},cbe={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,n="",i=et(r);i.length||Ye(n);var a=[];D(i,function(c){var f=c.dimension,h=c.order,d=c.parser,p=c.incomparable;if(f==null&&Ye(n),h!=="asc"&&h!=="desc"&&Ye(n),p&&p!=="min"&&p!=="max"){var v="";Ye(v)}if(h!=="asc"&&h!=="desc"){var g="";Ye(g)}var y=t.getDimensionInfo(f);y||Ye(n);var m=d?vG(d):null;d&&!m&&Ye(n),a.push({dimIdx:y.index,parser:m,comparator:new yG(h,p)})});var o=t.sourceFormat;o!==Ir&&o!==fi&&Ye(n);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<a.length;h++){var d=a[h],p=t.retrieveValueFromItem(c,d.dimIdx),v=t.retrieveValueFromItem(f,d.dimIdx);d.parser&&(p=d.parser(p),v=d.parser(v));var g=d.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:s}}};function fbe(e){e.registerTransform(ube),e.registerTransform(cbe)}var hbe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new SG(this),CE(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),CE(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ha},t}(Le),dbe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(_t);function pbe(e){e.registerComponentModel(hbe),e.registerComponentView(dbe)}var Ui=ma.CMD;function Zu(e,t){return Math.abs(e-t)<1e-5}function PC(e){var t=e.data,r=e.len(),n=[],i,a=0,o=0,s=0,l=0;function u(P,L){i&&i.length>2&&n.push(i),i=[P,L]}function c(P,L,E,R){Zu(P,E)&&Zu(L,R)||i.push(P,L,E,R,E,R)}function f(P,L,E,R,z,O){var B=Math.abs(L-P),I=Math.tan(B/4)*4/3,G=L<P?-1:1,U=Math.cos(P),N=Math.sin(P),Z=Math.cos(L),oe=Math.sin(L),te=U*z+E,fe=N*O+R,ie=Z*z+E,le=oe*O+R,ue=z*I*G,re=O*I*G;i.push(te-ue*N,fe+re*U,ie+ue*oe,le-re*Z,ie,le)}for(var h,d,p,v,g=0;g<r;){var y=t[g++],m=g===1;switch(m&&(a=t[g],o=t[g+1],s=a,l=o,(y===Ui.L||y===Ui.C||y===Ui.Q)&&(i=[s,l])),y){case Ui.M:a=s=t[g++],o=l=t[g++],u(s,l);break;case Ui.L:h=t[g++],d=t[g++],c(a,o,h,d),a=h,o=d;break;case Ui.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case Ui.Q:h=t[g++],d=t[g++],p=t[g++],v=t[g++],i.push(a+2/3*(h-a),o+2/3*(d-o),p+2/3*(h-p),v+2/3*(d-v),p,v),a=p,o=v;break;case Ui.A:var _=t[g++],x=t[g++],w=t[g++],S=t[g++],b=t[g++],C=t[g++]+b;g+=1;var T=!t[g++];h=Math.cos(b)*w+_,d=Math.sin(b)*S+x,m?(s=h,l=d,u(s,l)):c(a,o,h,d),a=Math.cos(C)*w+_,o=Math.sin(C)*S+x;for(var A=(T?-1:1)*Math.PI/2,M=b;T?M>C:M<C;M+=A){var k=T?Math.max(M+A,C):Math.min(M+A,C);f(M,k,_,x,w,S)}break;case Ui.R:s=a=t[g++],l=o=t[g++],h=s+t[g++],d=l+t[g++],u(h,l),c(h,l,h,d),c(h,d,s,d),c(s,d,s,l),c(s,l,h,l);break;case Ui.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function IC(e,t,r,n,i,a,o,s,l,u){if(Zu(e,r)&&Zu(t,n)&&Zu(i,o)&&Zu(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-e,d=s-t,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var v=r-e,g=n-t,y=i-o,m=a-s,_=v*v+g*g,x=y*y+m*m;if(_<f&&x<f){l.push(o,s);return}var w=h*v+d*g,S=-h*y-d*m,b=_-w*w,C=x-S*S;if(b<f&&w>=0&&C<f&&S>=0){l.push(o,s);return}var T=[],A=[];es(e,r,i,o,.5,T),es(t,n,a,s,.5,A),IC(T[0],A[0],T[1],A[1],T[2],A[2],T[3],A[3],l,u),IC(T[4],A[4],T[5],A[5],T[6],A[6],T[7],A[7],l,u)}function vbe(e,t){var r=PC(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],f=a[u++],h=a[u++],d=a[u++],p=a[u++],v=a[u++];IC(s,l,c,f,h,d,p,v,o,t),s=p,l=v}n.push(o)}return n}function OW(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=r-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function wz(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),f=OW([l,u],c?0:1,t),h=(c?s:u)/f.length,d=0;d<f.length;d++)for(var p=(c?u:s)/f[d],v=0;v<f[d];v++){var g={};c?(g.startAngle=a+h*d,g.endAngle=a+h*(d+1),g.r0=n+p*v,g.r=n+p*(v+1)):(g.startAngle=a+p*v,g.endAngle=a+p*(v+1),g.r0=n+h*d,g.r=n+h*(d+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,r.push(g)}}function gbe(e,t,r){for(var n=e.width,i=e.height,a=n>i,o=OW([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=e[s]/o.length,h=0;h<o.length;h++)for(var d=e[l]/o[h],p=0;p<o[h];p++){var v={};v[u]=h*f,v[c]=p*d,v[s]=f,v[l]=d,v.x+=e.x,v.y+=e.y,r.push(v)}}function bz(e,t,r,n){return e*n-r*t}function ybe(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,h=bz(c,f,l,u);if(Math.abs(h)<1e-6)return null;var d=e-i,p=t-a,v=bz(d,p,c,f)/h;return v<0||v>1?null:new Ce(v*l+e,v*u+t)}function mbe(e,t,r){var n=new Ce;Ce.sub(n,r,t),n.normalize();var i=new Ce;Ce.sub(i,e,t);var a=i.dot(n);return a}function Au(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function _be(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var o=e[a],s=e[(a+1)%n],l=ybe(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:mbe(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(g,y){return g.projPt-y.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[h],v=[d],a=u.idx+1;a<=c.idx;a++)Au(p,e[a].slice());Au(p,d),Au(p,h);for(var a=c.idx+1;a<=u.idx+n;a++)Au(v,e[a%n].slice());return Au(v,h),Au(v,d),[{points:p},{points:v}]}function Cz(e){var t=e.points,r=[],n=[];C0(t,r,n);var i=new Ae(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new Ce,c=new Ce;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),_be(t,u,c)}function hm(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);hm(e,a[0],i,n),hm(e,a[1],r-i,n)}return n}function xbe(e,t){for(var r=[],n=0;n<t;n++)r.push(UA(e));return r}function Sbe(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function wbe(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function bbe(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":gbe(n,t,r),i=ze;break;case"sector":wz(n,t,r),i=Wr;break;case"circle":wz({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=Wr;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=Y(vbe(e.getUpdatedPathProxy(),o),function(y){return wbe(y)}),l=s.length;if(l===0)hm(Cz,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,f=Y(s,function(y){var m=[],_=[];C0(y,m,_);var x=(_[1]-m[1])*(_[0]-m[0]);return c+=x,{poly:y,area:x}});f.sort(function(y,m){return m.area-y.area});for(var h=t,u=0;u<l;u++){var d=f[u];if(h<=0)break;var p=u===l-1?h:Math.ceil(d.area/c*t);p<0||(hm(Cz,{points:d.poly},p,r),h-=p)}}i=Ur;break}if(!i)return xbe(e,t);for(var v=[],u=0;u<r.length;u++){var g=new i;g.setShape(r[u]),Sbe(e,g),v.push(g)}return v}function Cbe(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],o=r<n?e:t,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,d=2;d<s;){var p=o[d-2],v=o[d-1],g=o[d++],y=o[d++],m=o[d++],_=o[d++],x=o[d++],w=o[d++];if(h<=0){f.push(g,y,m,_,x,w);continue}for(var S=Math.min(h,c-1)+1,b=1;b<=S;b++){var C=b/S;es(p,g,m,x,C,i),es(v,y,_,w,C,a),p=i[3],v=a[3],f.push(i[1],a[1],i[2],a[2],p,v),g=i[5],y=a[5],m=i[6],_=a[6]}h-=S-1}return o===e?[f,t]:[e,f]}function Tz(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function Tbe(e,t){for(var r,n,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,f=void 0;l?u?(r=Cbe(l,u),c=r[0],f=r[1],n=c,i=f):(f=Tz(i||l,l),c=l):(c=Tz(n||u,u),f=u),a.push(c),o.push(f)}return[a,o]}function Az(e){for(var t=0,r=0,n=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],l=e[o+1],u=e[a],c=e[a+1],f=s*c-u*l;t+=f,r+=(s+u)*f,n+=(l+c)*f}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function Abe(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var d=h===0?c:(c+h-2)%l+2,p=e[d]-r[0],v=e[d+1]-r[1],g=t[h]-n[0],y=t[h+1]-n[1],m=g-p,_=y-v;f+=m*m+_*_}f<a&&(a=f,o=u)}return o}function Mbe(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function Dbe(e,t,r,n){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],l=t[o],u=Az(s),c=Az(l);a==null&&(a=u[2]<0!=c[2]<0);var f=[],h=[],d=0,p=1/0,v=[],g=s.length;a&&(s=Mbe(s));for(var y=Abe(s,l,u,c)*6,m=g-2,_=0;_<m;_+=2){var x=(y+_)%m+2;f[_+2]=s[x]-u[0],f[_+3]=s[x+1]-u[1]}f[0]=s[y]-u[0],f[1]=s[y+1]-u[1];for(var w=n/r,S=-n/2;S<=n/2;S+=w){for(var b=Math.sin(S),C=Math.cos(S),T=0,_=0;_<s.length;_+=2){var A=f[_],M=f[_+1],k=l[_]-c[0],P=l[_+1]-c[1],L=k*C-P*b,E=k*b+P*C;v[_]=L,v[_+1]=E;var R=L-A,z=E-M;T+=R*R+z*z}if(T<p){p=T,d=S;for(var O=0;O<v.length;O++)h[O]=v[O]}}i.push({from:f,to:h,fromCp:u,toCp:c,rotation:-d})}return i}function dm(e){return e.__isCombineMorphing}var NW="__mOriginal_";function pm(e,t,r){var n=NW+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function Gh(e,t){var r=NW+t;e[r]&&(e[t]=e[r],e[r]=null)}function Mz(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function zW(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=Tbe(PC(r),PC(n)),a=i[0],o=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&Mz(a,s),l&&Mz(o,l),pm(t,"updateTransform",{replace:u}),t.transform=null;var c=Dbe(a,o,10,Math.PI),f=[];pm(t,"buildPath",{replace:function(h){for(var d=t.__morphT,p=1-d,v=[],g=0;g<c.length;g++){var y=c[g],m=y.from,_=y.to,x=y.rotation*d,w=y.fromCp,S=y.toCp,b=Math.sin(x),C=Math.cos(x);vg(v,w,S,d);for(var T=0;T<m.length;T+=2){var A=m[T],M=m[T+1],k=_[T],P=_[T+1],L=A*p+k*d,E=M*p+P*d;f[T]=L*C-E*b+v[0],f[T+1]=L*b+E*C+v[1]}var R=f[0],z=f[1];h.moveTo(R,z);for(var T=2;T<m.length;){var k=f[T++],P=f[T++],O=f[T++],B=f[T++],I=f[T++],G=f[T++];R===k&&z===P&&O===I&&B===G?h.lineTo(I,G):h.bezierCurveTo(k,P,O,B,I,G),R=I,z=G}}}})}function DM(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;zW(e,t),t.__morphT=0;function a(){Gh(t,"buildPath"),Gh(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},pe({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),t}function kbe(e,t,r,n,i,a){var o=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(e&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function vm(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=Y(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=Y(a,function(s,l){return{cp:s,z:kbe(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function BW(e){return bbe(e.path,e.count)}function EC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Pbe(e,t,r){var n=[];function i(w){for(var S=0;S<w.length;S++){var b=w[S];dm(b)?i(b.childrenRef()):b instanceof ke&&n.push(b)}}i(e);var a=n.length;if(!a)return EC();var o=r.dividePath||BW,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),EC();n=vm(n),s=vm(s);for(var l=r.done,u=r.during,c=r.individualDelay,f=new Oa,h=0;h<a;h++){var d=n[h],p=s[h];p.parent=t,p.copyTransform(f),c||zW(d,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function v(w){for(var S=0;S<s.length;S++)s[S].addSelfToZr(w)}pm(t,"addSelfToZr",{after:function(w){v(w)}}),pm(t,"removeSelfFromZr",{after:function(w){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(w)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,Gh(t,"addSelfToZr"),Gh(t,"removeSelfFromZr")}var y=s.length;if(c)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},h=0;h<y;h++){var x=c?pe({delay:(r.delay||0)+c(h,y,n[h],s[h]),done:_},r):r;DM(n[h],s[h],x)}else t.__morphT=0,t.animateTo({__morphT:1},pe({during:function(w){for(var S=0;S<y;S++){var b=s[S];b.__morphT=t.__morphT,b.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<e.length;w++)Gh(e[w],"updateTransform");l&&l()}},r));return t.__zr&&v(t.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function Ibe(e,t,r){var n=t.length,i=[],a=r.dividePath||BW;function o(d){for(var p=0;p<d.length;p++){var v=d[p];dm(v)?o(v.childrenRef()):v instanceof ke&&i.push(v)}}if(dm(e)){o(e.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(UA(i[l++%s]));i.length=n}else{i=a({path:e,count:n});for(var c=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),EC()}i=vm(i),t=vm(t);for(var f=r.individualDelay,u=0;u<n;u++){var h=f?pe({delay:(r.delay||0)+f(u,n,i[u],t[u])},r):r;DM(i[u],t[u],h)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function Dz(e){return j(e[0])}function kz(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var Ebe={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=UA(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function _S(e,t,r,n,i,a){if(!e.length||!t.length)return;var o=Xc("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Dz(e)&&(u=e,c=t),Dz(t)&&(u=t,c=e);function f(y,m,_,x,w){var S=y.many,b=y.one;if(S.length===1&&!w){var C=m?S[0]:b,T=m?b:S[0];if(dm(C))f({many:[C],one:T},!0,_,x,!0);else{var A=s?pe({delay:s(_,x)},l):l;DM(C,T,A),a(C,T,C,T,A)}}else for(var M=pe({dividePath:Ebe[r],individualDelay:s&&function(z,O,B,I){return s(z+_,x)}},l),k=m?Pbe(S,b,M):Ibe(b,S,M),P=k.fromIndividuals,L=k.toIndividuals,E=P.length,R=0;R<E;R++){var A=s?pe({delay:s(R,E)},l):l;a(P[R],L[R],m?S[R]:y.one,m?y.one:S[R],A)}}for(var h=u?u===e:e.length>t.length,d=u?kz(c,u):kz(h?t:e,[h?e:t]),p=0,v=0;v<d.length;v++)p+=d[v].many.length;for(var g=0,v=0;v<d.length;v++)f(d[v],h,g,p),g+=d[v].many.length}function js(e){if(!e)return[];if(j(e)){for(var t=[],r=0;r<e.length;r++)t.push(js(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof ke&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var FW=1e4,Lbe=0,Pz=1,Iz=2,Rbe=Be();function Obe(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function Nbe(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function Ez(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=Obe(e,i);if(a){var o=Nbe(e,t,a);return o}var s=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||e.getId(t)}function Lz(e){var t=[];return D(e,function(r){var n=r.data,i=r.dataGroupId;if(!(n.count()>FW))for(var a=n.getIndices(),o=0;o<a.length;o++)t.push({data:n,groupId:Ez(n,o,i,!1),childGroupId:Ez(n,o,i,!0),divide:r.divide,dataIndex:o})}),t}function xS(e,t,r){e.traverse(function(n){n instanceof ke&&vt(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function SS(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function Mu(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function zbe(e,t,r){var n=Xc("update",r,t);n&&e.traverse(function(i){if(i instanceof si){var a=Dse(i);a&&i.animateFrom({style:a},n)}})}function Bbe(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function VW(e,t,r){var n=Lz(e),i=Lz(t);function a(_,x,w,S,b){(w||_)&&x.animateFrom({style:w&&w!==_?W(W({},w.style),_.style):_.style},b)}var o=!1,s=Lbe,l=ae(),u=ae();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<i.length;c++){var f=i[c].groupId;if(u.get(f)){s=Pz;break}var h=i[c].childGroupId;if(h&&l.get(h)){s=Iz;break}}function d(_,x){return function(w){var S=w.data,b=w.dataIndex;return x?S.getId(b):_?s===Pz?w.childGroupId:w.groupId:s===Iz?w.childGroupId:w.groupId}}var p=Bbe(n,i),v={};if(!p)for(var c=0;c<i.length;c++){var g=i[c],y=g.data.getItemGraphicEl(g.dataIndex);y&&(v[y.id]=!0)}function m(_,x){var w=n[x],S=i[_],b=S.data.hostModel,C=w.data.getItemGraphicEl(w.dataIndex),T=S.data.getItemGraphicEl(S.dataIndex);if(C===T){T&&zbe(T,S.dataIndex,b);return}C&&v[C.id]||T&&(Mu(T),C?(Mu(C),SS(C),o=!0,_S(js(C),js(T),S.divide,b,_,a)):xS(T,b,_))}new Qa(n,i,d(!0,p),d(!1,p),null,"multiple").update(m).updateManyToOne(function(_,x){var w=i[_],S=w.data,b=S.hostModel,C=S.getItemGraphicEl(w.dataIndex),T=qe(Y(x,function(A){return n[A].data.getItemGraphicEl(n[A].dataIndex)}),function(A){return A&&A!==C&&!v[A.id]});C&&(Mu(C),T.length?(D(T,function(A){Mu(A),SS(A)}),o=!0,_S(js(T),js(C),w.divide,b,_,a)):xS(C,b,w.dataIndex))}).updateOneToMany(function(_,x){var w=n[x],S=w.data.getItemGraphicEl(w.dataIndex);if(!(S&&v[S.id])){var b=qe(Y(_,function(T){return i[T].data.getItemGraphicEl(i[T].dataIndex)}),function(T){return T&&T!==S}),C=i[_[0]].data.hostModel;b.length&&(D(b,function(T){return Mu(T)}),S?(Mu(S),SS(S),o=!0,_S(js(S),js(b),w.divide,C,_[0],a)):D(b,function(T){return xS(T,C,_[0])}))}}).updateManyToMany(function(_,x){new Qa(x,_,function(w){return n[w].data.getId(n[w].dataIndex)},function(w){return i[w].data.getId(i[w].dataIndex)}).update(function(w,S){m(_[w],x[S])}).execute()}).execute(),o&&D(t,function(_){var x=_.data,w=x.hostModel,S=w&&r.getViewOfSeriesModel(w),b=Xc("update",w,0);S&&w.isAnimationEnabled()&&b&&b.duration>0&&S.group.traverse(function(C){C instanceof ke&&!C.animators.length&&C.animateFrom({style:{opacity:0}},b)})})}function Rz(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function Oz(e){return j(e)?e.sort().join(","):e}function bo(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function Fbe(e,t){var r=ae(),n=ae(),i=ae();return D(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],l=e.oldData[o],u=Rz(a),c=Oz(u);n.set(c,{dataGroupId:s,data:l}),j(u)&&D(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),D(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=Rz(a),u=Oz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:bo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:bo(s),data:s}]});else if(j(l)){var f=[];D(l,function(p){var v=n.get(p);v.data&&f.push({dataGroupId:v.dataGroupId,divide:bo(v.data),data:v.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:bo(s)}]})}else{var h=i.get(l);if(h){var d=r.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:bo(h.data)}],newSeries:[]},r.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:bo(s)})}}}}),r}function Nz(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function Vbe(e,t,r,n){var i=[],a=[];D(et(e.from),function(o){var s=Nz(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:bo(t.oldData[s]),groupIdDim:o.dimension})}),D(et(e.to),function(o){var s=Nz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:bo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&VW(i,a,n)}function Gbe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){D(et(n.seriesTransition),function(i){D(et(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Ag]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=Rbe(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)D(et(a),function(d){Vbe(d,i,n,r)});else{var o=Fbe(i,n);D(o.keys(),function(d){var p=o.get(d);VW(p.oldSeries,p.newSeries,r)})}D(n.updatedSeries,function(d){d[Ag]&&(d[Ag]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<FW&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}De([Khe]);De([Uhe]);De([gde,Ide,Gde,xpe,Ipe,yve,Uve,Dge,Kge,rye,fye,ame,Pme,Gme,n0e,s0e,y0e,C0e,O0e,G0e,q0e,R1e]);De(J1e);De(A_e);De(BH);De(F_e);De(b6);De(H_e);De(Q_e);De(Fxe);De(iSe);De(xp);De(SSe);De(CSe);De(RSe);De(GSe);De(YSe);De(JSe);De(uwe);De(Mwe);De(AW);De(MW);De(Ywe);De(EW);De(LW);De(Qwe);De(fbe);De(pbe);De(Gbe);De(fhe);const gm={DARK:{textColor:"#b3c3bc",axisColor:"#5b6f66",backgroundColor:"#27272a",splitLine:"#4c4c52"},LIGHT:{textColor:"#000",axisColor:"#000",backgroundColor:"#fff",splitLine:"#ddd"}},$be=e=>!isNaN(new Date(e).getTime()),LC=e=>e&&$be(e)?new Date(e).toLocaleString():"",GW=({charts:e,lines:t,scatterplot:r})=>t.map(({key:n,name:i})=>({symbolSize:4,type:r?"scatter":"line",name:i,data:e[n]})),zz={type:"value",boundaryGap:[0,"5%"]},Hbe=({splitAxis:e,yAxisLabels:t})=>e&&(!t||Array.isArray(t))?Array(2).fill(zz).map((r,n)=>({...r,...t?{name:t[n]}:{}})):{...zz,...t?{name:t}:{}},Wbe=e=>{const t=new Date(e);return[K1(t.getHours(),2),K1(t.getMinutes(),2),K1(t.getSeconds(),2)].join(":")},Ube=({chartValueFormatter:e,value:t})=>e?e(t):Array.isArray(t)?t[1]:t,jbe=({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s})=>({title:{text:t},dataZoom:[{type:"inside",start:0,end:100}],tooltip:{trigger:"axis",formatter:l=>Array.isArray(l)&&l.length>0&&l.some(u=>!!u.value)?l.reduce((u,{axisValue:c,color:f,seriesName:h,value:d},p)=>`
229
+ `||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function iwe(e){e.registerAction("legendToggleSelect","legendselectchanged",be(jf,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",be(jf,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",be(jf,"inverseSelect")),e.registerAction("legendSelect","legendselected",be(jf,"select")),e.registerAction("legendUnSelect","legendunselected",be(jf,"unSelect"))}function CW(e){e.registerComponentModel(AC),e.registerComponentView(wW),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,nwe),e.registerSubTypeDefaulter("legend",function(){return"plain"}),iwe(e)}var awe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=Jc(r);e.prototype.init.call(this,r,n,i),tz(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),tz(this,this.option,r)},t.type="legend.scroll",t.defaultOption=fs(AC.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(AC);function tz(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,rs(t,r,{type:"box",ignoreSize:!!i})}var rz=xe,dS=["width","height"],pS=["x","y"],owe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new rz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new rz)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=j(f)?f:[f,f];p("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new Ve({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var y=v+"DataIndex",m=sp(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:ee(u._pageGo,u,y,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=v,c.add(m)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=dS[u],f=pS[u],h=dS[1-u],d=pS[1-u];o&&Sl("horizontal",l,r.get("selectorItemGap",!0));var p=r.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],y=me(i);o&&(y[c]=i[c]-v[c]-p);var m=this._layoutContentAndController(r,a,y,u,c,h,d,f);if(o){if(s==="end")g[u]+=m[c]+p;else{var _=v[c]+p;g[u]-=_,m[f]-=_}m[c]+=v[c]+p,g[1-u]+=m[d]+m[h]/2-v[h]/2,m[h]=Math.max(m[h],v[h]),m[d]=Math.min(m[d],v[d]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;Sl(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),Sl("horizontal",h,r.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),p=h.getBoundingRect(),v=this._showController=d[o]>i[o],g=[-d.x,-d.y];n||(g[a]=c[u]);var y=[0,0],m=[-p.x,-p.y],_=we(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(v){var x=r.get("pageButtonPosition",!0);x==="end"?m[a]+=i[o]-p[o]:y[a]+=p[o]+_}m[1-a]+=d[s]/2-p[s]/2,c.setPosition(g),f.setPosition(y),h.setPosition(m);var w={x:0,y:0};if(w[o]=v?i[o]:d[o],w[s]=Math.max(d[s],p[s]),w[l]=Math.min(0,p[l]+m[1-a]),f.__rectSize=i[o],v){var S={x:0,y:0};S[o]=Math.max(i[o]-p[o]-_,0),S[s]=w[s],f.setClipPath(new ze({shape:S})),f.__rectSize=S[o]}else h.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(r);return b.pageIndex!=null&&He(c,{x:b.contentPosition[0],y:b.contentPosition[1]},v?r:null),this._updatePageInfoView(r,b),w},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",q(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=dS[o],l=pS[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var v=x(f);p.contentPosition[o]=-v.s;for(var g=u+1,y=v,m=v,_=null;g<=h;++g)_=x(c[g]),(!_&&m.e>y.s+a||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=v,m=v,_=null;g>=-1;--g)_=x(c[g]),(!_||!w(m,_.s))&&y.i<m.i&&(m=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=_;return p;function x(S){if(S){var b=S.getBoundingRect(),C=b[l]+S[l];return{s:C,e:C+b[s],i:S.__legendDataIndex}}}function w(S,b){return S.e>=b&&S.s<=b+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(wW);function swe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function lwe(e){De(CW),e.registerComponentModel(awe),e.registerComponentView(owe),swe(e)}function uwe(e){De(CW),De(lwe)}var cwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=fs(Bd.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Bd),AM=Be();function fwe(e,t,r){AM(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function hwe(e,t){for(var r=AM(e).coordSysRecordMap,n=r.keys(),i=0;i<n.length;i++){var a=n[i],o=r.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||TW(r,o))}}}function TW(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function dwe(e,t){var r={model:t,containsPoint:be(vwe,t),dispatchAction:be(pwe,e),dataZoomInfoMap:null,controller:null},n=r.controller=new mp(e.getZr());return D(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];r.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,r.model.mainType,r.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&r.dispatchAction(o)})}),r}function pwe(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function vwe(e,t,r,n){return e.coordinateSystem.containPoint([r,n])}function gwe(e){var t,r="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[r+s]>n[r+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function ywe(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=AM(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=ae());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=sW(a);D(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,dwe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ae());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){TW(i,a);return}var c=gwe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),rf(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var mwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),fwe(i,r,{pan:ee(vS.pan,this),zoom:ee(vS.zoom,this),scrollMove:ee(vS.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){hwe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(yM),vS={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=gS[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Kl(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:nz(function(e,t,r,n,i,a){var o=gS[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:nz(function(e,t,r,n,i,a){var o=gS[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function nz(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(Kl(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var gS={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function AW(e){mM(e),e.registerComponentModel(cwe),e.registerComponentView(mwe),ywe(e)}var _we=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=fs(Bd.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"}}}),t}(Bd),Yf=ze,iz=7,xwe=1,yS=30,Swe=7,Xf="horizontal",az="vertical",wwe=5,bwe=["line","bar","candlestick","scatter"],Cwe={easing:"cubicOut",duration:100,delay:0},Twe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=ee(this._onBrush,this),this._onBrushEnd=ee(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),rf(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Td(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new xe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Swe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Xf?{right:s.width-o.x-o.width,top:s.height-yS-iz-a,width:o.width,height:yS}:{right:iz,top:o.y,width:yS,height:o.height},u=Jc(r.option);D(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=Xt(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===az&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Xf&&!o?{scaleY:l?1:-1,scaleX:1}:i===Xf&&o?{scaleY:l?1:-1,scaleX:-1}:i===az&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Yf({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Yf({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ee(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var d=[0,n[1]],p=[0,n[0]],v=[[n[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]),x;o.each([l],function(T,A){if(_>0&&A%_){m+=y;return}var M=T==null||isNaN(T)||T==="",k=M?0:Ke(T,f,d,!0);M&&!x&&A?(v.push([v[v.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&x&&(v.push([m,0]),g.push([m,0])),v.push([m,k]),g.push([m,k]),m+=y,x=M}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function S(T){var A=w.getModel(T?"selectedDataBackground":"dataBackground"),M=new xe,k=new Ur({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),P=new Zr({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(k),M.add(P),M}for(var b=0;b<3;b++){var C=S(b===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!i&&!(n!==!0&&Me(bwe,u.get("type"))<0)){var c=a.getComponent(No(o),s).axis,f=Awe(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),i={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Yf({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Yf({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:xwe,fill:"rgba(0,0,0,0)"}})),D([0,1],function(_){var x=l.get("handleIcon");!Vy[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var w=Gt(x,-1,0,2,2,null,!0);w.attr({cursor:oz(this._orient),draggable:!0,drift:ee(this._onDragMove,this,_),ondragend:ee(this._onDragEnd,this),onmouseover:ee(this._showDataInfo,this,!0),onmouseout:ee(this._showDataInfo,this,!1),z2:5});var S=w.getBoundingRect(),b=l.get("handleSize");this._handleHeight=K(b,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),_l(w);var C=l.get("handleColor");C!=null&&(w.style.fill=C),o.add(i[_]=w);var T=l.getModel("textStyle");r.add(a[_]=new Ve({silent:!0,invisible:!0,style:ut(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var d=h;if(f){var p=K(l.get("moveHandleSize"),s[1]),v=n.moveHandle=new ze({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=n.moveHandleIcon=Gt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new ze({invisible:!0,shape:{y:s[1]-m,height:p+m}}),d.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:oz(this._orient),drift:ee(this._onDragMove,this,"all"),ondragstart:ee(this._showDataInfo,this,!0),ondragend:ee(this._onDragEnd,this),onmouseover:ee(this._showDataInfo,this,!0),onmouseout:ee(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Ke(r[0],[0,100],n,!0),Ke(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Kl(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?Ke(s.minSpan,l,o,!0):null,s.maxSpan!=null?Ke(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=ri([Ke(a[0],o,l,!0),Ke(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=ri(i.slice()),o=this._size;D([0,1],function(d){var p=n.handles[d],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:i[d]+(d?-1:1),y:o[1]/2-v/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new ze,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(r)},t.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=r?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=ri(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(p){var v=xl(i.handles[p].parent,this.group),g=P0(p===0?"right":"left",v),y=this._handleWidth/2+wwe,m=Ii([h[p]+(p===0?-y:y),this._size[1]/2],v);a[p].setStyle({x:m[0],y:m[1],verticalAlign:o===Xf?"middle":g,align:o===Xf?g:"center",text:s[p]})}},t.prototype._formatLabel=function(r,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=r==null||isNaN(r)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(o,20));return he(a)?a(r,s):q(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(r){r=this._dragging||r;var n=this._displayables,i=n.handleLabels;i[0].attr("invisible",!r),i[1].attr("invisible",!r),n.moveHandle&&this.api[r?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},t.prototype._onDragMove=function(r,n,i,a){this._dragging=!0,Xa(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Ii([n,i],o,!0),l=this._updateInterval(r,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(r){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Ce(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=ri([Ke(i.x,o,s,!0),Ke(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(Xa(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Yf({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?Cwe:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=sW(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(yM);function Awe(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function oz(e){return e==="vertical"?"ns-resize":"ew-resize"}function MW(e){e.registerComponentModel(_we),e.registerComponentView(Twe),mM(e)}function Mwe(e){De(AW),De(MW)}var DW={get:function(e,t,r){var n=me((Dwe[e]||{})[t]);return r&&j(n)?n[n.length-1]:n}},Dwe={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]}},sz=tr.mapVisual,kwe=tr.eachVisual,Pwe=j,lz=D,Iwe=ri,Ewe=Ke,fm=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&yW(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=ee(r,this),this.controllerVisuals=bC(this.option.controller,n,r),this.targetVisuals=bC(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=et(r),n},t.prototype.eachTargetSeries=function(r,n){D(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],j(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(q(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(he(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=Iwe([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Te(a,i),Te(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Pwe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,d){var p=f[h],v=f[d];p&&!v&&(v=f[d]={},lz(p,function(g,y){if(tr.isValidType(y)){var m=DW.get(y,"inactive",s);m!=null&&(v[y]=m,y==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),g=v||"roundRect";lz(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=h&&me(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=d&&me(d)||(s?m[0]:[m[0],m[0]])),_.symbol=sz(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var w=-1/0;kwe(x,function(S){S>w&&(w=S)}),_.symbolSize=sz(x,function(S){return Ewe(S,[0,w],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Le),uz=[20,140],Lwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=uz[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=uz[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):j(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=ri((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},t.prototype.getValueState=function(r){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=r)&&(n[1]>=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=cz(this,"outOfRange",this.getExtent()),i=cz(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:r(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&o(a[a.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=fs(fm.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(fm);function cz(e,t,r){if(r[0]===r[1])return r.slice();for(var n=200,i=(r[1]-r[0])/n,a=r[0],o=[],s=0;s<=n&&a<r[1];s++)o.push(a),a+=i;return o.push(r[1]),o}var kW=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n},t.prototype.render=function(r,n,i,a){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,i,a)},t.prototype.renderBackground=function(r){var n=this.visualMapModel,i=Qc(n.get("padding")||0),a=r.getBoundingRect();r.add(new ze({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(r,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,p){s[d]=p}var f=o.controllerVisuals[a||o.getValueState(r)],h=tr.prepareVisualTypes(f);return D(h,function(d){var p=f[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",p=f.__alphaForOpacity),tr.dependsOn(d,n)&&p&&p.applyVisual(r,u,c)}),s[n]},t.prototype.positionGroup=function(r){var n=this.visualMapModel,i=this.api;z0(r,n.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},t.prototype.doRender=function(r,n,i,a){},t.type="visualMap",t}(_t),fz=[["left","right","width"],["top","bottom","height"]];function PW(e,t,r){var n=e.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=n.orient==="horizontal"?1:0,s=fz[o],l=[0,null,10],u={},c=0;c<3;c++)u[fz[1-o][c]]=l[c],u[s[c]]=c===2?r[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=Xt(u,a,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<a[f[1]]*.5?0:1]}function Lg(e,t){return D(e||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var Yi=Ke,Rwe=D,hz=Math.min,mS=Math.max,Owe=12,Nwe=6,zwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return t.prototype.init=function(r,n){e.prototype.init.call(this,r,n),this._hoverLinkFromSeriesMouseOver=ee(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ee(this._hideIndicator,this)},t.prototype.doRender=function(r,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var i=r.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(r,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),h=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Ve({style:ut(d,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="horizontal"?f:"center",text:a})}))}},t.prototype._renderBar=function(r){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=PW(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new xe;u.add(c),c.add(i.outOfRange=dz()),c.add(i.inRange=dz(null,s?vz(this._orient):null,ee(this._dragHandle,this,"all",!1),ee(this._dragHandle,this,"all",!0))),c.setClipPath(new ze({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),h=mS(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,h,o),this._createHandle(n,u,1,a,h,o)),this._createIndicator(n,u,a,h,o),r.add(u)},t.prototype._createHandle=function(r,n,i,a,o,s){var l=ee(this._dragHandle,this,i,!1),u=ee(this._dragHandle,this,i,!0),c=Oi(r.get("handleSize"),a[0]),f=Gt(r.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=vz(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){Xa(y.event)}}),f.x=a[0]/2,f.useStyle(r.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),ol(f,!0),n.add(f);var d=this.visualMapModel.textStyleModel,p=new Ve({cursor:h,draggable:!0,drift:l,onmousemove:function(y){Xa(y.event)},ondragend:u,style:ut(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],g=this._shapes;g.handleThumbs[i]=f,g.handleLabelPoints[i]=v,g.handleLabels[i]=p},t.prototype._createIndicator=function(r,n,i,a,o){var s=Oi(r.get("indicatorSize"),i[0]),l=Gt(r.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof cr){var c=l.style;l.useStyle(W({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new Ve({silent:!0,invisible:!0,style:ut(f,{x:0,y:0,text:""})});this.group.add(h);var d=[(o==="horizontal"?a/2:Nwe)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=h,p.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(r,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():pz(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},t.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),i=r.getExtent(),a=[0,r.itemSize[1]];this._handleEnds=[Yi(n[0],i,a,!0),Yi(n[1],i,a,!0)]},t.prototype._updateInterval=function(r,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];Kl(n,a,o,r,0);var s=i.getExtent();this._dataInterval=[Yi(a[0],o,s,!0),Yi(a[1],o,s,!0)]},t.prototype._updateView=function(r){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=r?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(r,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(r,o),l=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new ap(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(r,n){var i=100,a=[],o=(r[1]-r[0])/i;a.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=r[0]+o*s;if(l>r[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new xe(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();Rwe([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=r[c];var h=Yi(r[c],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=d/l[0],f.x=l[0]-d/2;var p=Ii(i.handleLabelPoints[c],xl(f,this.group));s[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",h),p=this.getControllerVisual(r,"symbolSize"),v=Yi(r,s,u,!0),g=l[0]-p/2,y={x:f.x,y:f.y};f.y=v,f.x=g;var m=Ii(c.indicatorLabelPoint,xl(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),w=this._orient,S=w==="horizontal";_.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:S?x:"middle",align:S?"center":x});var b={x:g,y:v,style:{fill:d}},C={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(b,T),_.animateTo(C,T)}else f.attr(b),_.attr(C);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this.api.enterBlur(A[M])}},t.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=hz(mS(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=hz(mS(o[0],r),o[1]);var l=Bwe(i,s,o),u=[r-l,r+l],c=Yi(r,o,s,!0),f=[Yi(u[0],o,s,!0),Yi(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||pz(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=Bae(h,d);this._dispatchHighDown("downplay",Lg(p[0],i)),this._dispatchHighDown("highlight",Lg(p[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(ll(r.target,function(l){var u=Se(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this.api.leaveBlur(n[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Lg(r,this.visualMapModel)),r.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(r,n,i,a){var o=xl(n,a?null:this.group);return j(r)?Ii(r,o,i):P0(r,o,i)},t.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(kW);function dz(e,t,r,n){return new Ur({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(i){Xa(i.event)},ondragend:n})}function Bwe(e,t,r){var n=Owe/2,i=e.get("hoverLinkDataSize");return i&&(n=Yi(i,t,r,!0)/2),n}function pz(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function vz(e){return e==="vertical"?"ns-resize":"ew-resize"}var Fwe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Vwe=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(r){r.setSelected(e.selected)})},Gwe=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",function(n){var i=e.pipelineContext;!n.isTargetSeries(e)||i&&i.large||r.push(uSe(n.stateList,n.targetVisuals,ee(n.getValueState,n),n.getDataDimensionIndex(e.getData())))}),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(e)){var a=i.getVisualMeta(ee($we,null,e,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(r);o>=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function $we(e,t,r,n){for(var i=t.targetVisuals[n],a=tr.prepareVisualTypes(i),o={color:up(e.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(r,f,h)}return o.color;function f(d){return o[d]}function h(d,p){o[d]=p}}var gz=D;function Hwe(e){var t=e&&e.visualMap;j(t)||(t=t?[t]:[]),gz(t,function(r){if(r){Tu(r,"splitList")&&!Tu(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&j(n)&&gz(n,function(i){ge(i)&&(Tu(i,"start")&&!Tu(i,"min")&&(i.min=i.start),Tu(i,"end")&&!Tu(i,"max")&&(i.max=i.end))})}})}function Tu(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var yz=!1;function IW(e){yz||(yz=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(Fwe,Vwe),D(Gwe,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(Hwe))}function EW(e){e.registerComponentModel(Lwe),e.registerComponentView(zwe),IW(e)}var Wwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Uwe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=me(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Y(this._pieceList,function(l){return l=me(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=tr.listVisualTypes(),a=this.isCategory();D(r.pieces,function(s){D(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),D(n,function(s,l){var u=!1;D(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&D(this.stateList,function(c){(r[c]||(r[c]={}))[l]=DW.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,D(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;D(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=me(r)},t.prototype.getValueState=function(r){var n=tr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=tr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=r(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=fs(fm.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}),t}(fm),Uwe={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),hI(e),D(e,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(e){var t=this.option;D(t.categories,function(r){e.push({text:this.formatValueText(r,!0),value:r})},this),mz(t,e)},pieces:function(e){var t=this.option;D(t.pieces,function(r,n){ge(r)||(r={value:r});var i={text:"",index:n};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var a=i.value=r.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],d=0;d<3&&o[f]==null;d++)o[f]=r[h[d]],s[f]=l[d],c[f]=d===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=tr.retrieveVisuals(r),e.push(i)},this),mz(t,e),hI(e),D(e,function(r){var n=r.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function mz(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var jwe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=sr(n.get("showLabel",!0),!f);f&&this._renderEndsText(r,f[0],u,h,l),D(c.viewPieceList,function(d){var p=d.piece,v=new xe;v.onclick=ee(this._onItemClick,this,p),this._enableHoverLink(v,d.indexInModelPieceList);var g=n.getRepresentValue(p);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);v.add(new Ve({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}r.add(v)},this),f&&this._renderEndsText(r,f[1],u,h,l),Sl(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Lg(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return PW(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new xe,l=this.visualMapModel.textStyleModel;s.add(new Ve({style:ut(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=Y(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i){r.add(Gt(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=me(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(kW);function LW(e){e.registerComponentModel(Wwe),e.registerComponentView(jwe),IW(e)}function Ywe(e){De(EW),De(LW)}var Xwe={label:{enabled:!0},decal:{show:!1}},_z=Be(),Zwe={};function Kwe(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=me(Xwe);Te(n.label,e.getLocaleModel().get("aria"),!1),Te(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=ae();e.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),_z(h).scope=d}}),e.eachRawSeries(function(h){if(e.isSeriesFiltered(h))return;if(he(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var m=kb(h.ecModel,h.name,Zwe,e.getSeriesCount()),_=d.getVisual("decal");d.setVisual("decal",x(_,m))}else{var p=h.getRawData(),v={},g=_z(h).scope;d.each(function(w){var S=d.getRawIndex(w);v[S]=w});var y=p.count();p.each(function(w){var S=v[w],b=p.getName(w)||w+"",C=kb(h.ecModel,b,g,y),T=d.getItemVisual(S,"decal");d.setItemVisual(S,"decal",x(T,C))})}function x(w,S){var b=w?W(W({},S),w):S;return b.dirty=!0,b}})}}function a(){var u=t.getZr().dom;if(u){var c=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=pe(f.option,c),!!f.get("enabled")){if(f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=e.getSeriesCount(),d=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,v=Math.min(h,p),g;if(!(h<1)){var y=s();if(y){var m=f.get(["general","withTitle"]);g=o(m,{title:y})}else g=f.get(["general","withoutTitle"]);var _=[],x=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(x,{seriesCount:h}),e.eachSeries(function(C,T){if(T<v){var A=void 0,M=C.get("name"),k=M?"withName":"withoutName";A=h>1?f.get(["series","multiple",k]):f.get(["series","single",k]),A=o(A,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var P=C.getData();if(P.count()>d){var L=f.get(["data","partialData"]);A+=o(L,{displayCnt:d})}else A+=f.get(["data","allData"]);for(var E=f.get(["data","separator","middle"]),R=f.get(["data","separator","end"]),z=[],O=0;O<P.count();O++)if(O<d){var B=P.getName(O),I=P.getValues(O),G=f.get(["data",B?"withName":"withoutName"]);z.push(o(G,{name:B,value:I.join(E)}))}A+=z.join(E)+R,_.push(A)}});var w=f.getModel(["series","multiple","separator"]),S=w.get("middle"),b=w.get("end");g+=_.join(S)+b,u.setAttribute("aria-label",g)}}}}function o(u,c){if(!q(u))return u;var f=u;return D(c,function(h,d){f=f.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),h)}),f}function s(){var u=e.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=e.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function qwe(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},D(["description","general","series","data"],function(r){t[r]!=null&&(t.label[r]=t[r])})}}function Qwe(e){e.registerPreprocessor(qwe),e.registerVisual(e.PRIORITY.VISUAL.ARIA,Kwe)}var xz={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Jwe=function(){function e(t){var r=this._condVal=q(t)?new RegExp(t):iie(t)?t:null;if(r==null){var n="";Ye(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return q(r)?this._condVal.test(t):$e(r)?this._condVal.test(t+""):!1},e}(),ebe=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),tbe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(!t[r].evaluate())return!1;return!0},e}(),rbe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(t[r].evaluate())return!0;return!1},e}(),nbe=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),ibe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=t?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?i:n))return!1;return!0},e}();function MM(e,t){if(e===!0||e===!1){var r=new ebe;return r.value=e,r}var n="";return RW(e)||Ye(n),e.and?Sz("and",e,t):e.or?Sz("or",e,t):e.not?abe(e,t):obe(e,t)}function Sz(e,t,r){var n=t[e],i="";j(n)||Ye(i),n.length||Ye(i);var a=e==="and"?new tbe:new rbe;return a.children=Y(n,function(o){return MM(o,r)}),a.children.length||Ye(i),a}function abe(e,t){var r=e.not,n="";RW(r)||Ye(n);var i=new nbe;return i.child=MM(r,t),i.child||Ye(n),i}function obe(e,t){for(var r="",n=t.prepareGetValue(e),i=[],a=Re(e),o=e.parser,s=o?vG(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var c=ne(xz,u)?xz[u]:u,f=e[u],h=s?s(f):f,d=Ule(c,h)||c==="reg"&&new Jwe(h);d||Ye(r),i.push(d)}}i.length||Ye(r);var p=new ibe;return p.valueGetterParam=n,p.valueParser=s,p.getValue=t.getValue,p.subCondList=i,p}function RW(e){return ge(e)&&!Pr(e)}var sbe=function(){function e(t,r){this._cond=MM(t,r)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function lbe(e,t){return new sbe(e,t)}var ube={type:"echarts:filter",transform:function(e){for(var t=e.upstream,r,n=lbe(e.config,{valueGetterAttrMap:ae({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;ne(s,"dimension")||Ye(l);var c=t.getDimensionInfo(u);return c||Ye(l),{dimIdx:c.index}},getValue:function(s){return t.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)r=t.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},cbe={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,n="",i=et(r);i.length||Ye(n);var a=[];D(i,function(c){var f=c.dimension,h=c.order,d=c.parser,p=c.incomparable;if(f==null&&Ye(n),h!=="asc"&&h!=="desc"&&Ye(n),p&&p!=="min"&&p!=="max"){var v="";Ye(v)}if(h!=="asc"&&h!=="desc"){var g="";Ye(g)}var y=t.getDimensionInfo(f);y||Ye(n);var m=d?vG(d):null;d&&!m&&Ye(n),a.push({dimIdx:y.index,parser:m,comparator:new yG(h,p)})});var o=t.sourceFormat;o!==Ir&&o!==fi&&Ye(n);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<a.length;h++){var d=a[h],p=t.retrieveValueFromItem(c,d.dimIdx),v=t.retrieveValueFromItem(f,d.dimIdx);d.parser&&(p=d.parser(p),v=d.parser(v));var g=d.comparator.evaluate(p,v);if(g!==0)return g}return 0}),{data:s}}};function fbe(e){e.registerTransform(ube),e.registerTransform(cbe)}var hbe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new SG(this),CE(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),CE(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ha},t}(Le),dbe=function(e){V(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(_t);function pbe(e){e.registerComponentModel(hbe),e.registerComponentView(dbe)}var Ui=ma.CMD;function Zu(e,t){return Math.abs(e-t)<1e-5}function PC(e){var t=e.data,r=e.len(),n=[],i,a=0,o=0,s=0,l=0;function u(P,L){i&&i.length>2&&n.push(i),i=[P,L]}function c(P,L,E,R){Zu(P,E)&&Zu(L,R)||i.push(P,L,E,R,E,R)}function f(P,L,E,R,z,O){var B=Math.abs(L-P),I=Math.tan(B/4)*4/3,G=L<P?-1:1,U=Math.cos(P),N=Math.sin(P),Z=Math.cos(L),oe=Math.sin(L),te=U*z+E,fe=N*O+R,ie=Z*z+E,le=oe*O+R,ue=z*I*G,re=O*I*G;i.push(te-ue*N,fe+re*U,ie+ue*oe,le-re*Z,ie,le)}for(var h,d,p,v,g=0;g<r;){var y=t[g++],m=g===1;switch(m&&(a=t[g],o=t[g+1],s=a,l=o,(y===Ui.L||y===Ui.C||y===Ui.Q)&&(i=[s,l])),y){case Ui.M:a=s=t[g++],o=l=t[g++],u(s,l);break;case Ui.L:h=t[g++],d=t[g++],c(a,o,h,d),a=h,o=d;break;case Ui.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case Ui.Q:h=t[g++],d=t[g++],p=t[g++],v=t[g++],i.push(a+2/3*(h-a),o+2/3*(d-o),p+2/3*(h-p),v+2/3*(d-v),p,v),a=p,o=v;break;case Ui.A:var _=t[g++],x=t[g++],w=t[g++],S=t[g++],b=t[g++],C=t[g++]+b;g+=1;var T=!t[g++];h=Math.cos(b)*w+_,d=Math.sin(b)*S+x,m?(s=h,l=d,u(s,l)):c(a,o,h,d),a=Math.cos(C)*w+_,o=Math.sin(C)*S+x;for(var A=(T?-1:1)*Math.PI/2,M=b;T?M>C:M<C;M+=A){var k=T?Math.max(M+A,C):Math.min(M+A,C);f(M,k,_,x,w,S)}break;case Ui.R:s=a=t[g++],l=o=t[g++],h=s+t[g++],d=l+t[g++],u(h,l),c(h,l,h,d),c(h,d,s,d),c(s,d,s,l),c(s,l,h,l);break;case Ui.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function IC(e,t,r,n,i,a,o,s,l,u){if(Zu(e,r)&&Zu(t,n)&&Zu(i,o)&&Zu(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-e,d=s-t,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var v=r-e,g=n-t,y=i-o,m=a-s,_=v*v+g*g,x=y*y+m*m;if(_<f&&x<f){l.push(o,s);return}var w=h*v+d*g,S=-h*y-d*m,b=_-w*w,C=x-S*S;if(b<f&&w>=0&&C<f&&S>=0){l.push(o,s);return}var T=[],A=[];es(e,r,i,o,.5,T),es(t,n,a,s,.5,A),IC(T[0],A[0],T[1],A[1],T[2],A[2],T[3],A[3],l,u),IC(T[4],A[4],T[5],A[5],T[6],A[6],T[7],A[7],l,u)}function vbe(e,t){var r=PC(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],f=a[u++],h=a[u++],d=a[u++],p=a[u++],v=a[u++];IC(s,l,c,f,h,d,p,v,o,t),s=p,l=v}n.push(o)}return n}function OW(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=r-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function wz(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),f=OW([l,u],c?0:1,t),h=(c?s:u)/f.length,d=0;d<f.length;d++)for(var p=(c?u:s)/f[d],v=0;v<f[d];v++){var g={};c?(g.startAngle=a+h*d,g.endAngle=a+h*(d+1),g.r0=n+p*v,g.r=n+p*(v+1)):(g.startAngle=a+p*v,g.endAngle=a+p*(v+1),g.r0=n+h*d,g.r=n+h*(d+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,r.push(g)}}function gbe(e,t,r){for(var n=e.width,i=e.height,a=n>i,o=OW([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=e[s]/o.length,h=0;h<o.length;h++)for(var d=e[l]/o[h],p=0;p<o[h];p++){var v={};v[u]=h*f,v[c]=p*d,v[s]=f,v[l]=d,v.x+=e.x,v.y+=e.y,r.push(v)}}function bz(e,t,r,n){return e*n-r*t}function ybe(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,h=bz(c,f,l,u);if(Math.abs(h)<1e-6)return null;var d=e-i,p=t-a,v=bz(d,p,c,f)/h;return v<0||v>1?null:new Ce(v*l+e,v*u+t)}function mbe(e,t,r){var n=new Ce;Ce.sub(n,r,t),n.normalize();var i=new Ce;Ce.sub(i,e,t);var a=i.dot(n);return a}function Au(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function _be(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var o=e[a],s=e[(a+1)%n],l=ybe(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:mbe(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(g,y){return g.projPt-y.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[h],v=[d],a=u.idx+1;a<=c.idx;a++)Au(p,e[a].slice());Au(p,d),Au(p,h);for(var a=c.idx+1;a<=u.idx+n;a++)Au(v,e[a%n].slice());return Au(v,h),Au(v,d),[{points:p},{points:v}]}function Cz(e){var t=e.points,r=[],n=[];C0(t,r,n);var i=new Ae(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new Ce,c=new Ce;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),_be(t,u,c)}function hm(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);hm(e,a[0],i,n),hm(e,a[1],r-i,n)}return n}function xbe(e,t){for(var r=[],n=0;n<t;n++)r.push(UA(e));return r}function Sbe(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function wbe(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function bbe(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":gbe(n,t,r),i=ze;break;case"sector":wz(n,t,r),i=Wr;break;case"circle":wz({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=Wr;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=Y(vbe(e.getUpdatedPathProxy(),o),function(y){return wbe(y)}),l=s.length;if(l===0)hm(Cz,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,f=Y(s,function(y){var m=[],_=[];C0(y,m,_);var x=(_[1]-m[1])*(_[0]-m[0]);return c+=x,{poly:y,area:x}});f.sort(function(y,m){return m.area-y.area});for(var h=t,u=0;u<l;u++){var d=f[u];if(h<=0)break;var p=u===l-1?h:Math.ceil(d.area/c*t);p<0||(hm(Cz,{points:d.poly},p,r),h-=p)}}i=Ur;break}if(!i)return xbe(e,t);for(var v=[],u=0;u<r.length;u++){var g=new i;g.setShape(r[u]),Sbe(e,g),v.push(g)}return v}function Cbe(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],o=r<n?e:t,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,d=2;d<s;){var p=o[d-2],v=o[d-1],g=o[d++],y=o[d++],m=o[d++],_=o[d++],x=o[d++],w=o[d++];if(h<=0){f.push(g,y,m,_,x,w);continue}for(var S=Math.min(h,c-1)+1,b=1;b<=S;b++){var C=b/S;es(p,g,m,x,C,i),es(v,y,_,w,C,a),p=i[3],v=a[3],f.push(i[1],a[1],i[2],a[2],p,v),g=i[5],y=a[5],m=i[6],_=a[6]}h-=S-1}return o===e?[f,t]:[e,f]}function Tz(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function Tbe(e,t){for(var r,n,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,f=void 0;l?u?(r=Cbe(l,u),c=r[0],f=r[1],n=c,i=f):(f=Tz(i||l,l),c=l):(c=Tz(n||u,u),f=u),a.push(c),o.push(f)}return[a,o]}function Az(e){for(var t=0,r=0,n=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],l=e[o+1],u=e[a],c=e[a+1],f=s*c-u*l;t+=f,r+=(s+u)*f,n+=(l+c)*f}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function Abe(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var d=h===0?c:(c+h-2)%l+2,p=e[d]-r[0],v=e[d+1]-r[1],g=t[h]-n[0],y=t[h+1]-n[1],m=g-p,_=y-v;f+=m*m+_*_}f<a&&(a=f,o=u)}return o}function Mbe(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function Dbe(e,t,r,n){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],l=t[o],u=Az(s),c=Az(l);a==null&&(a=u[2]<0!=c[2]<0);var f=[],h=[],d=0,p=1/0,v=[],g=s.length;a&&(s=Mbe(s));for(var y=Abe(s,l,u,c)*6,m=g-2,_=0;_<m;_+=2){var x=(y+_)%m+2;f[_+2]=s[x]-u[0],f[_+3]=s[x+1]-u[1]}f[0]=s[y]-u[0],f[1]=s[y+1]-u[1];for(var w=n/r,S=-n/2;S<=n/2;S+=w){for(var b=Math.sin(S),C=Math.cos(S),T=0,_=0;_<s.length;_+=2){var A=f[_],M=f[_+1],k=l[_]-c[0],P=l[_+1]-c[1],L=k*C-P*b,E=k*b+P*C;v[_]=L,v[_+1]=E;var R=L-A,z=E-M;T+=R*R+z*z}if(T<p){p=T,d=S;for(var O=0;O<v.length;O++)h[O]=v[O]}}i.push({from:f,to:h,fromCp:u,toCp:c,rotation:-d})}return i}function dm(e){return e.__isCombineMorphing}var NW="__mOriginal_";function pm(e,t,r){var n=NW+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function Gh(e,t){var r=NW+t;e[r]&&(e[t]=e[r],e[r]=null)}function Mz(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function zW(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=Tbe(PC(r),PC(n)),a=i[0],o=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&Mz(a,s),l&&Mz(o,l),pm(t,"updateTransform",{replace:u}),t.transform=null;var c=Dbe(a,o,10,Math.PI),f=[];pm(t,"buildPath",{replace:function(h){for(var d=t.__morphT,p=1-d,v=[],g=0;g<c.length;g++){var y=c[g],m=y.from,_=y.to,x=y.rotation*d,w=y.fromCp,S=y.toCp,b=Math.sin(x),C=Math.cos(x);vg(v,w,S,d);for(var T=0;T<m.length;T+=2){var A=m[T],M=m[T+1],k=_[T],P=_[T+1],L=A*p+k*d,E=M*p+P*d;f[T]=L*C-E*b+v[0],f[T+1]=L*b+E*C+v[1]}var R=f[0],z=f[1];h.moveTo(R,z);for(var T=2;T<m.length;){var k=f[T++],P=f[T++],O=f[T++],B=f[T++],I=f[T++],G=f[T++];R===k&&z===P&&O===I&&B===G?h.lineTo(I,G):h.bezierCurveTo(k,P,O,B,I,G),R=I,z=G}}}})}function DM(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;zW(e,t),t.__morphT=0;function a(){Gh(t,"buildPath"),Gh(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},pe({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),t}function kbe(e,t,r,n,i,a){var o=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(e&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function vm(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=Y(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=Y(a,function(s,l){return{cp:s,z:kbe(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function BW(e){return bbe(e.path,e.count)}function EC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Pbe(e,t,r){var n=[];function i(w){for(var S=0;S<w.length;S++){var b=w[S];dm(b)?i(b.childrenRef()):b instanceof ke&&n.push(b)}}i(e);var a=n.length;if(!a)return EC();var o=r.dividePath||BW,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),EC();n=vm(n),s=vm(s);for(var l=r.done,u=r.during,c=r.individualDelay,f=new Oa,h=0;h<a;h++){var d=n[h],p=s[h];p.parent=t,p.copyTransform(f),c||zW(d,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function v(w){for(var S=0;S<s.length;S++)s[S].addSelfToZr(w)}pm(t,"addSelfToZr",{after:function(w){v(w)}}),pm(t,"removeSelfFromZr",{after:function(w){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(w)}});function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,Gh(t,"addSelfToZr"),Gh(t,"removeSelfFromZr")}var y=s.length;if(c)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},h=0;h<y;h++){var x=c?pe({delay:(r.delay||0)+c(h,y,n[h],s[h]),done:_},r):r;DM(n[h],s[h],x)}else t.__morphT=0,t.animateTo({__morphT:1},pe({during:function(w){for(var S=0;S<y;S++){var b=s[S];b.__morphT=t.__morphT,b.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<e.length;w++)Gh(e[w],"updateTransform");l&&l()}},r));return t.__zr&&v(t.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function Ibe(e,t,r){var n=t.length,i=[],a=r.dividePath||BW;function o(d){for(var p=0;p<d.length;p++){var v=d[p];dm(v)?o(v.childrenRef()):v instanceof ke&&i.push(v)}}if(dm(e)){o(e.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(UA(i[l++%s]));i.length=n}else{i=a({path:e,count:n});for(var c=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),EC()}i=vm(i),t=vm(t);for(var f=r.individualDelay,u=0;u<n;u++){var h=f?pe({delay:(r.delay||0)+f(u,n,i[u],t[u])},r):r;DM(i[u],t[u],h)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function Dz(e){return j(e[0])}function kz(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var Ebe={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=UA(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function _S(e,t,r,n,i,a){if(!e.length||!t.length)return;var o=Xc("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Dz(e)&&(u=e,c=t),Dz(t)&&(u=t,c=e);function f(y,m,_,x,w){var S=y.many,b=y.one;if(S.length===1&&!w){var C=m?S[0]:b,T=m?b:S[0];if(dm(C))f({many:[C],one:T},!0,_,x,!0);else{var A=s?pe({delay:s(_,x)},l):l;DM(C,T,A),a(C,T,C,T,A)}}else for(var M=pe({dividePath:Ebe[r],individualDelay:s&&function(z,O,B,I){return s(z+_,x)}},l),k=m?Pbe(S,b,M):Ibe(b,S,M),P=k.fromIndividuals,L=k.toIndividuals,E=P.length,R=0;R<E;R++){var A=s?pe({delay:s(R,E)},l):l;a(P[R],L[R],m?S[R]:y.one,m?y.one:S[R],A)}}for(var h=u?u===e:e.length>t.length,d=u?kz(c,u):kz(h?t:e,[h?e:t]),p=0,v=0;v<d.length;v++)p+=d[v].many.length;for(var g=0,v=0;v<d.length;v++)f(d[v],h,g,p),g+=d[v].many.length}function js(e){if(!e)return[];if(j(e)){for(var t=[],r=0;r<e.length;r++)t.push(js(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof ke&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var FW=1e4,Lbe=0,Pz=1,Iz=2,Rbe=Be();function Obe(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function Nbe(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function Ez(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=Obe(e,i);if(a){var o=Nbe(e,t,a);return o}var s=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||e.getId(t)}function Lz(e){var t=[];return D(e,function(r){var n=r.data,i=r.dataGroupId;if(!(n.count()>FW))for(var a=n.getIndices(),o=0;o<a.length;o++)t.push({data:n,groupId:Ez(n,o,i,!1),childGroupId:Ez(n,o,i,!0),divide:r.divide,dataIndex:o})}),t}function xS(e,t,r){e.traverse(function(n){n instanceof ke&&vt(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function SS(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function Mu(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function zbe(e,t,r){var n=Xc("update",r,t);n&&e.traverse(function(i){if(i instanceof si){var a=Dse(i);a&&i.animateFrom({style:a},n)}})}function Bbe(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function VW(e,t,r){var n=Lz(e),i=Lz(t);function a(_,x,w,S,b){(w||_)&&x.animateFrom({style:w&&w!==_?W(W({},w.style),_.style):_.style},b)}var o=!1,s=Lbe,l=ae(),u=ae();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<i.length;c++){var f=i[c].groupId;if(u.get(f)){s=Pz;break}var h=i[c].childGroupId;if(h&&l.get(h)){s=Iz;break}}function d(_,x){return function(w){var S=w.data,b=w.dataIndex;return x?S.getId(b):_?s===Pz?w.childGroupId:w.groupId:s===Iz?w.childGroupId:w.groupId}}var p=Bbe(n,i),v={};if(!p)for(var c=0;c<i.length;c++){var g=i[c],y=g.data.getItemGraphicEl(g.dataIndex);y&&(v[y.id]=!0)}function m(_,x){var w=n[x],S=i[_],b=S.data.hostModel,C=w.data.getItemGraphicEl(w.dataIndex),T=S.data.getItemGraphicEl(S.dataIndex);if(C===T){T&&zbe(T,S.dataIndex,b);return}C&&v[C.id]||T&&(Mu(T),C?(Mu(C),SS(C),o=!0,_S(js(C),js(T),S.divide,b,_,a)):xS(T,b,_))}new Qa(n,i,d(!0,p),d(!1,p),null,"multiple").update(m).updateManyToOne(function(_,x){var w=i[_],S=w.data,b=S.hostModel,C=S.getItemGraphicEl(w.dataIndex),T=qe(Y(x,function(A){return n[A].data.getItemGraphicEl(n[A].dataIndex)}),function(A){return A&&A!==C&&!v[A.id]});C&&(Mu(C),T.length?(D(T,function(A){Mu(A),SS(A)}),o=!0,_S(js(T),js(C),w.divide,b,_,a)):xS(C,b,w.dataIndex))}).updateOneToMany(function(_,x){var w=n[x],S=w.data.getItemGraphicEl(w.dataIndex);if(!(S&&v[S.id])){var b=qe(Y(_,function(T){return i[T].data.getItemGraphicEl(i[T].dataIndex)}),function(T){return T&&T!==S}),C=i[_[0]].data.hostModel;b.length&&(D(b,function(T){return Mu(T)}),S?(Mu(S),SS(S),o=!0,_S(js(S),js(b),w.divide,C,_[0],a)):D(b,function(T){return xS(T,C,_[0])}))}}).updateManyToMany(function(_,x){new Qa(x,_,function(w){return n[w].data.getId(n[w].dataIndex)},function(w){return i[w].data.getId(i[w].dataIndex)}).update(function(w,S){m(_[w],x[S])}).execute()}).execute(),o&&D(t,function(_){var x=_.data,w=x.hostModel,S=w&&r.getViewOfSeriesModel(w),b=Xc("update",w,0);S&&w.isAnimationEnabled()&&b&&b.duration>0&&S.group.traverse(function(C){C instanceof ke&&!C.animators.length&&C.animateFrom({style:{opacity:0}},b)})})}function Rz(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function Oz(e){return j(e)?e.sort().join(","):e}function bo(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function Fbe(e,t){var r=ae(),n=ae(),i=ae();return D(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],l=e.oldData[o],u=Rz(a),c=Oz(u);n.set(c,{dataGroupId:s,data:l}),j(u)&&D(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),D(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=Rz(a),u=Oz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:bo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:bo(s),data:s}]});else if(j(l)){var f=[];D(l,function(p){var v=n.get(p);v.data&&f.push({dataGroupId:v.dataGroupId,divide:bo(v.data),data:v.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:bo(s)}]})}else{var h=i.get(l);if(h){var d=r.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:bo(h.data)}],newSeries:[]},r.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:bo(s)})}}}}),r}function Nz(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function Vbe(e,t,r,n){var i=[],a=[];D(et(e.from),function(o){var s=Nz(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:bo(t.oldData[s]),groupIdDim:o.dimension})}),D(et(e.to),function(o){var s=Nz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:bo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&VW(i,a,n)}function Gbe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){D(et(n.seriesTransition),function(i){D(et(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Ag]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=Rbe(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)D(et(a),function(d){Vbe(d,i,n,r)});else{var o=Fbe(i,n);D(o.keys(),function(d){var p=o.get(d);VW(p.oldSeries,p.newSeries,r)})}D(n.updatedSeries,function(d){d[Ag]&&(d[Ag]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<FW&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}De([Khe]);De([Uhe]);De([gde,Ide,Gde,xpe,Ipe,yve,Uve,Dge,Kge,rye,fye,ame,Pme,Gme,n0e,s0e,y0e,C0e,O0e,G0e,q0e,R1e]);De(J1e);De(A_e);De(BH);De(F_e);De(b6);De(H_e);De(Q_e);De(Fxe);De(iSe);De(xp);De(SSe);De(CSe);De(RSe);De(GSe);De(YSe);De(JSe);De(uwe);De(Mwe);De(AW);De(MW);De(Ywe);De(EW);De(LW);De(Qwe);De(fbe);De(pbe);De(Gbe);De(fhe);const gm={DARK:{textColor:"#b3c3bc",axisColor:"#5b6f66",backgroundColor:"#27272a",splitLine:"#4c4c52"},LIGHT:{textColor:"#000",axisColor:"#000",backgroundColor:"#fff",splitLine:"#ddd"}},$be=e=>!isNaN(new Date(e).getTime()),LC=e=>e&&$be(e)?new Date(e).toLocaleString():"",GW=({charts:e,lines:t,scatterplot:r})=>t.map(({key:n,name:i})=>({symbolSize:4,type:r?"scatter":"line",name:i,data:e[n]})),zz={type:"value",boundaryGap:[0,"5%"]},Hbe=({splitAxis:e,yAxisLabels:t})=>e&&(!t||Array.isArray(t))?Array(2).fill(zz).map((r,n)=>({...r,...t?{name:t[n]}:{}})):{...zz,...t?{name:t}:{}},Wbe=e=>{const t=new Date(e);return[K1(t.getHours(),2),K1(t.getMinutes(),2),K1(t.getSeconds(),2)].join(":")},Ube=({chartValueFormatter:e,value:t})=>e?e(t):Array.isArray(t)?t[1]:t,jbe=({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s})=>({title:{text:t},tooltip:{trigger:"axis",formatter:l=>Array.isArray(l)&&l.length>0&&l.some(u=>!!u.value)?l.reduce((u,{axisValue:c,color:f,seriesName:h,value:d},p)=>`
230
230
  ${p===0?LC(c):""}
231
231
  ${u}
232
232
  <br>
233
233
  <span style="color:${f};">
234
234
  ${h}:&nbsp${Ube({chartValueFormatter:i,value:d})}
235
235
  </span>
236
- `,""):"No data",borderWidth:0},xAxis:{type:"time",startValue:(e.time||[""])[0],axisLabel:{formatter:Wbe}},grid:{left:60,right:40},yAxis:Hbe({splitAxis:a,yAxisLabels:o}),series:GW({charts:e,lines:r,scatterplot:s}),color:n,toolbox:{right:10,feature:{dataZoom:{show:!0,title:{zoom:"Zoom Select",back:"Zoom Reset"}},saveAsImage:{name:t.replace(/\s+/g,"_").toLowerCase()+"_"+new Date().getTime()/1e3,title:"Download as PNG",emphasis:{iconStyle:{textPosition:"left"}}}}}}),Ybe=(e,t)=>({symbol:"none",label:{formatter:r=>`Run #${r.dataIndex+1}`,padding:[0,0,8,0]},lineStyle:{color:t?gm.DARK.axisColor:gm.LIGHT.axisColor},data:(e.markers||[]).map(r=>({xAxis:r}))}),Xbe=e=>t=>{const{batch:r}=t;if(!r)return;const[{start:n,end:i}]=r,a=n>0&&i<100;e.setOption({dataZoom:[{type:"inside",start:n,end:i},{type:"slider",show:a,start:n,end:i}]})},Zbe=hQ;function Kbe({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s}){const[l,u]=F.useState(null),c=Zbe(({theme:{isDarkMode:h}})=>h),f=F.useRef(null);return F.useEffect(()=>{if(!f.current)return;const h=Lce(f.current);h.setOption(jbe({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s})),h.on("datazoom",Xbe(h));const d=()=>h.resize();return window.addEventListener("resize",d),h.group="swarmCharts",Rce("swarmCharts"),u(h),()=>{Oce(h),window.removeEventListener("resize",d)}},[f]),F.useEffect(()=>{const h=r.every(({key:d})=>!!e[d]);l&&h&&l.setOption({series:r.map(({key:d,yAxisIndex:p,...v},g)=>({...v,data:e[d],...a?{yAxisIndex:p||g}:{},...g===0?{markLine:Ybe(e,c)}:{}}))})},[e,l,r,c]),F.useEffect(()=>{if(l){const{textColor:h,axisColor:d,backgroundColor:p,splitLine:v}=c?gm.DARK:gm.LIGHT;l.setOption({backgroundColor:p,textStyle:{color:h},title:{textStyle:{color:h}},legend:{icon:"circle",inactiveColor:h,textStyle:{color:h}},tooltip:{backgroundColor:p,textStyle:{color:h}},xAxis:{axisLine:{lineStyle:{color:d}}},yAxis:{axisLine:{lineStyle:{color:d}},splitLine:{lineStyle:{color:v}}}})}},[l,c]),F.useEffect(()=>{l&&l.setOption({series:GW({charts:e,lines:r,scatterplot:s})})},[r]),H.jsx("div",{ref:f,style:{width:"100%",height:"300px"}})}const qbe=pl.percentilesToChart?pl.percentilesToChart.map(e=>({name:`${e*100}th percentile`,key:`responseTimePercentile${e}`})):[],Qbe=["#ff9f00","#9966CC","#8A2BE2","#8E4585","#E0B0FF","#C8A2C8","#E6E6FA"],Jbe=[{title:"Total Requests per Second",lines:[{name:"RPS",key:"currentRps"},{name:"Failures/s",key:"currentFailPerSec"}],colors:["#00ca5a","#ff6d6d"]},{title:"Response Times (ms)",lines:qbe,colors:Qbe},{title:"Number of Users",lines:[{name:"Number of Users",key:"userCount"}],colors:["#0099ff"]}];function $W({charts:e}){return H.jsx("div",{children:Jbe.map((t,r)=>H.jsx(Kbe,{...t,charts:e},`swarm-chart-${r}`))})}const eCe=({ui:{charts:e}})=>({charts:e});qd(eCe)($W);function tCe(e){return(e*100).toFixed(1)+"%"}function RC({classRatio:e}){return H.jsx("ul",{children:Object.entries(e).map(([t,{ratio:r,tasks:n}])=>H.jsxs("li",{children:[`${tCe(r)} ${t}`,n&&H.jsx(RC,{classRatio:n})]},`nested-ratio-${t}`))})}function HW({ratios:{perClass:e,total:t}}){return!e&&!t?null:H.jsxs("div",{children:[e&&H.jsxs(H.Fragment,{children:[H.jsx("h3",{children:"Ratio Per Class"}),H.jsx(RC,{classRatio:e})]}),t&&H.jsxs(H.Fragment,{children:[H.jsx("h3",{children:"Total Ratio"}),H.jsx(RC,{classRatio:t})]})]})}const rCe=({ui:{ratios:e}})=>({ratios:e});qd(rCe)(HW);const wS={DARK:"dark",LIGHT:"light"},WW=localStorage.theme===wS.DARK||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?wS.DARK:wS.LIGHT,nCe={isDarkMode:!1},UW=$q({name:"theme",initialState:nCe,reducers:{setIsDarkMode:(e,{payload:t})=>{e.isDarkMode=t}}});UW.actions;const iCe=UW.reducer,aCe=e=>qT({palette:{mode:e,primary:{main:"#15803d"},success:{main:"#00C853"}},components:{MuiCssBaseline:{styleOverrides:{":root":{"--footer-height":"40px"}}}}}),oCe=aCe(window.theme||WW),sCe=(window.theme||WW)==="dark",lCe=[{key:"method",title:"Type"},{key:"name",title:"Name"},{key:"numRequests",title:"# Requests"},{key:"numFailures",title:"# Fails"},{key:"avgResponseTime",title:"Average (ms)",round:2},{key:"minResponseTime",title:"Min (ms)"},{key:"maxResponseTime",title:"Max (ms)"},{key:"avgContentLength",title:"Average size (bytes)",round:2},{key:"totalRps",title:"RPS",round:2},{key:"totalFailPerSec",title:"Failures/s",round:2}],uCe=Lq({reducer:j3({theme:iCe}),preloadedState:{theme:{isDarkMode:sCe}}});function cCe({locustfile:e,showDownloadLink:t,startTime:r,endTime:n,charts:i,host:a,exceptionsStatistics:o,requestsStatistics:s,failuresStatistics:l,responseTimeStatistics:u,tasks:c}){return H.jsx(rJ,{store:uCe,children:H.jsxs(XY,{theme:oCe,children:[H.jsx(IZ,{}),H.jsxs(MZ,{maxWidth:"lg",sx:{my:4},children:[H.jsxs(zn,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-end"},children:[H.jsx(Ar,{component:"h1",noWrap:!0,sx:{fontWeight:700},variant:"h3",children:"Locust Test Report"}),t&&H.jsx(iK,{href:`?download=1&theme=${window.theme}`,children:"Download the Report"})]}),H.jsxs(zn,{sx:{my:2},children:[H.jsxs(zn,{sx:{display:"flex",columnGap:.5},children:[H.jsx(Ar,{fontWeight:600,children:"During:"}),H.jsxs(Ar,{children:[LC(r)," - ",LC(n)]})]}),H.jsxs(zn,{sx:{display:"flex",columnGap:.5},children:[H.jsx(Ar,{fontWeight:600,children:"Target Host:"}),H.jsx(Ar,{children:a||"None"})]}),H.jsxs(zn,{sx:{display:"flex",columnGap:.5},children:[H.jsx(Ar,{fontWeight:600,children:"Script:"}),H.jsx(Ar,{children:e})]})]}),H.jsxs(zn,{sx:{display:"flex",flexDirection:"column",rowGap:4},children:[H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Request Statistics"}),H.jsx(n4,{stats:s,tableStructure:lCe})]}),!!u.length&&H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Response Time Statistics"}),H.jsx(kne,{responseTimes:u})]}),H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Failures Statistics"}),H.jsx(e4,{errors:l})]}),!!o.length&&H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Exceptions Statistics"}),H.jsx(JF,{exceptions:o})]}),H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Charts"}),H.jsx($W,{charts:i})]}),H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Final ratio"}),H.jsx(HW,{ratios:c})]})]})]})]})})}const fCe=bS.createRoot(document.getElementById("root"));fCe.render(H.jsx(x9,{fallbackRender:w9,children:H.jsx(cCe,{...A9})}));
236
+ `,""):"No data",borderWidth:0},xAxis:{type:"time",startValue:(e.time||[""])[0],axisLabel:{formatter:Wbe}},grid:{left:60,right:40},yAxis:Hbe({splitAxis:a,yAxisLabels:o}),series:GW({charts:e,lines:r,scatterplot:s}),color:n,toolbox:{right:10,feature:{dataZoom:{title:{zoom:"Zoom Select",back:"Zoom Reset"},yAxisIndex:!1},saveAsImage:{name:t.replace(/\s+/g,"_").toLowerCase()+"_"+new Date().getTime()/1e3,title:"Download as PNG",emphasis:{iconStyle:{textPosition:"left"}}}}}}),Ybe=(e,t)=>({symbol:"none",label:{formatter:r=>`Run #${r.dataIndex+1}`,padding:[0,0,8,0]},lineStyle:{color:t?gm.DARK.axisColor:gm.LIGHT.axisColor},data:(e.markers||[]).map(r=>({xAxis:r}))}),Xbe=e=>t=>{const{batch:r}=t;if(!r)return;const[{start:n,startValue:i,end:a}]=r,o=n>0&&a<=100||i>0;e.setOption({dataZoom:[{type:"slider",show:o}]})},Zbe=hQ;function Kbe({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s}){const[l,u]=F.useState(null),c=Zbe(({theme:{isDarkMode:h}})=>h),f=F.useRef(null);return F.useEffect(()=>{if(!f.current)return;const h=Lce(f.current);h.setOption(jbe({charts:e,title:t,lines:r,colors:n,chartValueFormatter:i,splitAxis:a,yAxisLabels:o,scatterplot:s})),h.on("datazoom",Xbe(h));const d=()=>h.resize();return window.addEventListener("resize",d),h.group="swarmCharts",Rce("swarmCharts"),u(h),()=>{Oce(h),window.removeEventListener("resize",d)}},[f]),F.useEffect(()=>{const h=r.every(({key:d})=>!!e[d]);l&&h&&l.setOption({series:r.map(({key:d,yAxisIndex:p,...v},g)=>({...v,data:e[d],...a?{yAxisIndex:p||g}:{},...g===0?{markLine:Ybe(e,c)}:{}}))})},[e,l,r,c]),F.useEffect(()=>{if(l){const{textColor:h,axisColor:d,backgroundColor:p,splitLine:v}=c?gm.DARK:gm.LIGHT;l.setOption({backgroundColor:p,textStyle:{color:h},title:{textStyle:{color:h}},legend:{icon:"circle",inactiveColor:h,textStyle:{color:h}},tooltip:{backgroundColor:p,textStyle:{color:h}},xAxis:{axisLine:{lineStyle:{color:d}}},yAxis:{axisLine:{lineStyle:{color:d}},splitLine:{lineStyle:{color:v}}}})}},[l,c]),F.useEffect(()=>{l&&l.setOption({series:GW({charts:e,lines:r,scatterplot:s})})},[r]),H.jsx("div",{ref:f,style:{width:"100%",height:"300px"}})}const qbe=pl.percentilesToChart?pl.percentilesToChart.map(e=>({name:`${e*100}th percentile`,key:`responseTimePercentile${e}`})):[],Qbe=["#ff9f00","#9966CC","#8A2BE2","#8E4585","#E0B0FF","#C8A2C8","#E6E6FA"],Jbe=[{title:"Total Requests per Second",lines:[{name:"RPS",key:"currentRps"},{name:"Failures/s",key:"currentFailPerSec"}],colors:["#00ca5a","#ff6d6d"]},{title:"Response Times (ms)",lines:qbe,colors:Qbe},{title:"Number of Users",lines:[{name:"Number of Users",key:"userCount"}],colors:["#0099ff"]}];function $W({charts:e}){return H.jsx("div",{children:Jbe.map((t,r)=>H.jsx(Kbe,{...t,charts:e},`swarm-chart-${r}`))})}const eCe=({ui:{charts:e}})=>({charts:e});qd(eCe)($W);function tCe(e){return(e*100).toFixed(1)+"%"}function RC({classRatio:e}){return H.jsx("ul",{children:Object.entries(e).map(([t,{ratio:r,tasks:n}])=>H.jsxs("li",{children:[`${tCe(r)} ${t}`,n&&H.jsx(RC,{classRatio:n})]},`nested-ratio-${t}`))})}function HW({ratios:{perClass:e,total:t}}){return!e&&!t?null:H.jsxs("div",{children:[e&&H.jsxs(H.Fragment,{children:[H.jsx("h3",{children:"Ratio Per Class"}),H.jsx(RC,{classRatio:e})]}),t&&H.jsxs(H.Fragment,{children:[H.jsx("h3",{children:"Total Ratio"}),H.jsx(RC,{classRatio:t})]})]})}const rCe=({ui:{ratios:e}})=>({ratios:e});qd(rCe)(HW);const wS={DARK:"dark",LIGHT:"light"},WW=localStorage.theme===wS.DARK||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?wS.DARK:wS.LIGHT,nCe={isDarkMode:!1},UW=$q({name:"theme",initialState:nCe,reducers:{setIsDarkMode:(e,{payload:t})=>{e.isDarkMode=t}}});UW.actions;const iCe=UW.reducer,aCe=e=>qT({palette:{mode:e,primary:{main:"#15803d"},success:{main:"#00C853"}},components:{MuiCssBaseline:{styleOverrides:{":root":{"--footer-height":"40px"}}}}}),oCe=aCe(window.theme||WW),sCe=(window.theme||WW)==="dark",lCe=[{key:"method",title:"Type"},{key:"name",title:"Name"},{key:"numRequests",title:"# Requests"},{key:"numFailures",title:"# Fails"},{key:"avgResponseTime",title:"Average (ms)",round:2},{key:"minResponseTime",title:"Min (ms)"},{key:"maxResponseTime",title:"Max (ms)"},{key:"avgContentLength",title:"Average size (bytes)",round:2},{key:"totalRps",title:"RPS",round:2},{key:"totalFailPerSec",title:"Failures/s",round:2}],uCe=Lq({reducer:j3({theme:iCe}),preloadedState:{theme:{isDarkMode:sCe}}});function cCe({locustfile:e,showDownloadLink:t,startTime:r,endTime:n,charts:i,host:a,exceptionsStatistics:o,requestsStatistics:s,failuresStatistics:l,responseTimeStatistics:u,tasks:c}){return H.jsx(rJ,{store:uCe,children:H.jsxs(XY,{theme:oCe,children:[H.jsx(IZ,{}),H.jsxs(MZ,{maxWidth:"lg",sx:{my:4},children:[H.jsxs(zn,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-end"},children:[H.jsx(Ar,{component:"h1",noWrap:!0,sx:{fontWeight:700},variant:"h3",children:"Locust Test Report"}),t&&H.jsx(iK,{href:`?download=1&theme=${window.theme}`,children:"Download the Report"})]}),H.jsxs(zn,{sx:{my:2},children:[H.jsxs(zn,{sx:{display:"flex",columnGap:.5},children:[H.jsx(Ar,{fontWeight:600,children:"During:"}),H.jsxs(Ar,{children:[LC(r)," - ",LC(n)]})]}),H.jsxs(zn,{sx:{display:"flex",columnGap:.5},children:[H.jsx(Ar,{fontWeight:600,children:"Target Host:"}),H.jsx(Ar,{children:a||"None"})]}),H.jsxs(zn,{sx:{display:"flex",columnGap:.5},children:[H.jsx(Ar,{fontWeight:600,children:"Script:"}),H.jsx(Ar,{children:e})]})]}),H.jsxs(zn,{sx:{display:"flex",flexDirection:"column",rowGap:4},children:[H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Request Statistics"}),H.jsx(n4,{stats:s,tableStructure:lCe})]}),!!u.length&&H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Response Time Statistics"}),H.jsx(kne,{responseTimes:u})]}),H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Failures Statistics"}),H.jsx(e4,{errors:l})]}),!!o.length&&H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Exceptions Statistics"}),H.jsx(JF,{exceptions:o})]}),H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Charts"}),H.jsx($W,{charts:i})]}),H.jsxs(zn,{children:[H.jsx(Ar,{component:"h2",mb:1,noWrap:!0,variant:"h4",children:"Final ratio"}),H.jsx(HW,{ratios:c})]})]})]})]})})}const fCe=bS.createRoot(document.getElementById("root"));fCe.render(H.jsx(x9,{fallbackRender:w9,children:H.jsx(cCe,{...A9})}));
237
237
  </script>
238
238
  </head>
239
239
  {% endraw %}