5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Rc(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};tr(function(t){Wu(t),Hu(t)}),yw.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.normal.color",getInitialData:function(t,e){var i=e.getComponent("parallel",this.get("parallelIndex")),n=i.parallelAxisIndex,o=t.data,a=i.dimensions,r=f(Gc(a,o),function(t,i){var r=l(a,t),s=r>=0&&e.getComponent("parallelAxis",n[r]);return s&&"category"===s.get("type")?(Vc(s,t,o),{name:t,type:"ordinal"}):r<0&&xr.guessOrdinal(o,i)?{name:t,type:"ordinal"}:t}),s=new aS(r,this);return s.initData(o),this.option.progressive&&(this.option.animation=!1),s},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,o){t===e&&n.push(i.getRawIndex(o))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveOpacity:.05,activeOpacity:1,lineStyle:{normal:{width:1,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationEasing:"linear"}});Ta.extend({type:"parallel",init:function(){this._dataGroup=new jy,this.group.add(this._dataGroup),this._data},render:function(t,e,i,n){this._renderForNormal(t,n)},dispose:function(){},_renderForNormal:function(t,e){var i=this._dataGroup,n=t.getData(),o=this._data,a=t.coordinateSystem,r=a.dimensions,s=t.option.smooth?.3:null;if(n.diff(o).add(function(t){Fc(n,i,t,r,a)}).update(function(i,s){var l=o.getItemGraphicEl(s),h=Hc(n,i,r,a);n.setItemGraphicEl(i,l),wo(l,{shape:{points:h}},e&&!1===e.animation?null:t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);i.remove(e)}).execute(),Zc(n,s),!this._data){var l=Wc(a,t,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(l)}this._data=n},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var lA=["lineStyle","normal","opacity"];ar(function(t){t.eachSeriesByType("parallel",function(e){var i=e.getModel("itemStyle.normal"),n=e.getModel("lineStyle.normal"),o=t.get("color"),a=n.get("color")||i.get("color")||o[e.seriesIndex%o.length],r=e.get("inactiveOpacity"),s=e.get("activeOpacity"),l=e.getModel("lineStyle.normal").getLineStyle(),h=e.coordinateSystem,u=e.getData(),c={normal:l.opacity,active:s,inactive:r};h.eachActiveState(u,function(t,e){var i=u.getItemModel(e),n=c[t];if("normal"===t){var o=i.get(lA,!0);null!=o&&(n=o)}u.setItemVisual(e,"opacity",n)}),u.setVisual("color",a)})});var hA=yw.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return hT(i,e,this,!0).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),Gi(a)}return hA.superCall(this,"formatTooltip",t,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,layoutIterations:32,label:{normal:{show:!0,position:"right",color:"#000",fontSize:12},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:1,borderColor:"#333"}},lineStyle:{normal:{color:"#314656",opacity:.2,curveness:.5},emphasis:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),uA=Zn({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildPath:function(t,e){var i=e.extent/2;t.moveTo(e.x1,e.y1-i),t.bezierCurveTo(e.cpx1,e.cpy1-i,e.cpx2,e.cpy2-i,e.x2,e.y2-i),t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i),t.closePath()}});ur({type:"sankey",_model:null,render:function(t,e,i){var n=t.getGraph(),o=this.group,a=t.layoutInfo,r=t.getData(),s=t.getData("edge");this._model=t,o.removeAll(),o.attr("position",[a.x,a.y]),n.eachEdge(function(e){var i=new uA;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n=e.getModel("lineStyle.normal"),a=n.get("curveness"),r=e.node1.getLayout(),l=e.node2.getLayout(),h=e.getLayout();i.shape.extent=Math.max(1,h.dy);var u=r.x+r.dx,c=r.y+h.sy+h.dy/2,d=l.x,f=l.y+h.ty+h.dy/2,g=u*(1-a)+d*a,p=c,m=u*a+d*(1-a),v=f;switch(i.setShape({x1:u,y1:c,x2:d,y2:f,cpx1:g,cpy1:p,cpx2:m,cpy2:v}),i.setStyle(n.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}uo(i,e.getModel("lineStyle.emphasis").getItemStyle()),o.add(i),s.setItemGraphicEl(e.dataIndex,i)}),n.eachNode(function(e){var i=e.getLayout(),n=e.getModel(),a=n.getModel("label.normal"),s=n.getModel("label.emphasis"),l=new db({shape:{x:i.x,y:i.y,width:e.getLayout().dx,height:e.getLayout().dy},style:n.getModel("itemStyle.normal").getItemStyle()}),h=e.getModel("itemStyle.emphasis").getItemStyle();co(l.style,h,a,s,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),l.setStyle("fill",e.getVisual("color")),uo(l,h),o.add(l),r.setItemGraphicEl(e.dataIndex,l),l.dataType="node"}),!this._data&&t.get("animation")&&o.setClipPath(Xc(o.getBoundingRect(),t,function(){o.removeClipPath()})),this._data=t.getData()},dispose:function(){}});or(function(t,e,i){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=qc(t,e);t.layoutInfo=o;var a=o.width,r=o.height,s=t.getGraph(),l=s.nodes,h=s.edges;$c(l),Yc(l,h,i,n,a,r,0!==p(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"))})}),ar(function(t,e){t.eachSeriesByType("sankey",function(t){var e=t.getGraph().nodes;e.sort(function(t,e){return t.getLayout().value-e.getLayout().value});var i=e[0].getLayout().value,n=e[e.length-1].getLayout().value;d(e,function(e){var o=new jI({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",o);var a=e.getModel().get("itemStyle.normal.color");null!=a&&e.setVisual("color",a)})})});var cA=Nn.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var i in e)if(e.hasOwnProperty(i)&&0===i.indexOf("ends")){var n=e[i];t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1])}}}),dA=pd.prototype;dA._createContent=function(t,e,i){var n=t.getItemLayout(e),o="horizontal"===n.chartLayout?1:0,a=0;this.add(new ub({shape:{points:i?md(n.bodyEnds,o,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=a++;var r=f(n.whiskerEnds,function(t){return i?md(t,o,n):t});this.add(new cA({shape:vd(r),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=a++},dA.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,o=t.getItemLayout(e),a=Tb[i?"initProps":"updateProps"];a(this.childAt(this.bodyIndex),{shape:{points:o.bodyEnds}},n,e),a(this.childAt(this.whiskerIndex),{shape:vd(o.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},h(pd,jy);var fA=yd.prototype;fA.updateData=function(t){var e=this.group,i=this._data,n=this.styleUpdater;t.diff(i).add(function(i){if(t.hasValue(i)){var o=new pd(t,i,n,!0);t.setItemGraphicEl(i,o),e.add(o)}}).update(function(o,a){var r=i.getItemGraphicEl(a);t.hasValue(o)?(r?r.updateData(t,o):r=new pd(t,o,n),e.add(r),t.setItemGraphicEl(o,r)):e.remove(r)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)}).execute(),this._data=t},fA.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})};var gA={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getCategories(),n=!0):"category"===s?(t.layout="vertical",i=a.getCategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseAxisDim=l[h],c=l[1-h],f=t.data;n&&d(f,function(t,e){t.value&&y(t.value)?t.value.unshift(e):y(t)&&t.unshift(e)});var g=this.defaultValueDimensions,p=[{name:u,otherDims:{tooltip:!1},dimsDef:["base"]},{name:c,dimsDef:g.slice()}];p=xr(p,f,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions"),dimCount:g.length+1});var m=new aS(p,this);return m.initData(f,i?i.slice():null),m},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},pA={init:function(){var t=this._whiskerBoxDraw=new yd(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};u(yw.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["min","Q1","median","Q3","max"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{normal:{color:"#fff",borderWidth:1},emphasis:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),gA,!0),u(Ta.extend({type:"boxplot",getStyleUpdater:function(){return xd},dispose:N}),pA,!0);var mA=["itemStyle","normal"],vA=["itemStyle","emphasis"],yA=["itemStyle","normal","borderColor"],xA=d;ar(function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",function(e){var n=i[e.seriesIndex%i.length],o=e.getData();o.setVisual({legendSymbol:"roundRect",color:e.get(yA)||n}),t.isSeriesFiltered(e)||o.each(function(t){var e=o.getItemModel(t);o.setItemVisual(t,{color:e.get(yA,!0)})})})}),or(function(t){var e=_d(t);xA(e,function(t){var e=t.seriesModels;e.length&&(bd(t),xA(e,function(e,i){wd(e,t.boxOffsetList[i],t.boxWidthList[i])}))})}),u(yw.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return i.rect(n.brushRect)}}),gA,!0),u(Ta.extend({type:"candlestick",getStyleUpdater:function(){return Sd},dispose:N}),pA,!0);var _A=["itemStyle","normal"],bA=["itemStyle","emphasis"],wA=["itemStyle","normal","borderColor"],SA=["itemStyle","normal","borderColor0"],MA=["itemStyle","normal","color"],IA=["itemStyle","normal","color0"],TA=T;tr(function(t){t&&y(t.series)&&d(t.series,function(t){b(t)&&"k"===t.type&&(t.type="candlestick")})}),ar(function(t,e){t.eachRawSeriesByType("candlestick",function(e){var i=e.getData();i.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||i.each(function(t){var e=i.getItemModel(t),n=i.getItemLayout(t).sign;i.setItemVisual(t,{color:e.get(n>0?MA:IA),borderColor:e.get(n>0?wA:SA)})})})}),or(function(t){t.eachSeriesByType("candlestick",function(t){var e,i=t.coordinateSystem,n=t.getData(),o=Md(t,n),a=t.get("layout"),r="horizontal"===a?0:1,s=1-r,l=["x","y"],h=[];if(d(n.dimensions,function(t){var i=n.getDimensionInfo(t).coordDim;i===l[s]?h.push(t):i===l[r]&&(e=t)}),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),function(){function t(t){var e=[];return e[r]=d,e[s]=t,isNaN(d)||isNaN(t)?[NaN,NaN]:i.dataToPoint(e)}function e(t,e){var i=t.slice(),n=t.slice();i[r]=Kn(i[r]+o/2,1,!1),n[r]=Kn(n[r]-o/2,1,!0),e?M.push(i,n):M.push(n,i)}function l(t){return t[r]=Kn(t[r],1),t}var c=arguments,d=c[0],f=c[h.length+1],g=c[1],p=c[2],m=c[3],v=c[4],y=Math.min(g,p),x=Math.max(g,p),_=t(y),b=t(x),w=t(m),S=[[l(t(v)),l(b)],[l(w),l(_)]],M=[];e(b,0),e(_,1);var I;I=g>p?-1:g0?n.getItemModel(u-1).get()[2]<=p?1:-1:1,n.setItemLayout(f,{chartLayout:a,sign:I,initBaseline:g>p?b[s]:_[s],bodyEnds:M,whiskerEnds:S,brushRect:function(){var e=t(Math.min(g,p,m,v)),i=t(Math.max(g,p,m,v));return e[r]-=o/2,i[r]-=o/2,{x:e[0],y:e[1],width:s?o:i[0]-e[0],height:s?i[1]-e[1]:o}}()}),++u},!0)}})}),yw.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return Sr(t.data,this,e)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var AA=Ad.prototype;AA.stopEffectAnimation=function(){this.childAt(1).removeAll()},AA.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Hr(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}Td(n,t)},AA.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o "))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}}),DA=Dd.prototype;DA.createLine=function(t,e,i){return new bu(t,e,i)},DA._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Hr(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},DA._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,a=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),h=I(e.get("delay"),function(e){return e/t.count()*r/3}),u="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,a),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},DA.getLineLength=function(t){return hy(t.__p1,t.__cp1)+hy(t.__cp1,t.__p2)},DA.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},DA.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},DA.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=un,s=cn;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),h=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(h,l)-Math.PI/2,t.ignore=!1},DA.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},h(Dd,jy);var LA=Ld.prototype;LA._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new cb({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},LA.updateData=function(t,e,i){var n=t.hostModel;wo(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},LA._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),s=i&&i.lineStyle,l=i&&i.hoverLineStyle;i&&!t.hasItemOption||(s=o.getModel("lineStyle.normal").getLineStyle(),l=o.getModel("lineStyle.emphasis").getLineStyle()),n.useStyle(r({strokeNoScale:!0,fill:"none",stroke:a},s)),n.hoverStyle=l,uo(this)},LA.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},h(Ld,jy);var kA=kd.prototype;kA.createLine=function(t,e,i){return new Ld(t,e,i)},kA.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;re);r++);r=Math.min(r-1,o-2)}Y(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},h(kd,Dd);var PA=Zn({shape:{polyline:!1,segs:[]},buildPath:function(t,e){for(var i=e.segs,n=e.polyline,o=0;o2?t.quadraticCurveTo(a[2][0],a[2][1],a[1][0],a[1][1]):t.lineTo(a[1][0],a[1][1])}},findDataIndex:function(t,e){for(var i=this.shape,n=i.segs,o=i.polyline,a=Math.max(this.style.lineWidth,1),r=0;r2){if(Sn(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],a,t,e))return r}else if(bn(s[0][0],s[0][1],s[1][0],s[1][1],a,t,e))return r}return-1}}),OA=Pd.prototype;OA.updateData=function(t){this.group.removeAll();var e=this._lineEl,i=t.hostModel;e.setShape({segs:t.mapArray(t.getItemLayout),polyline:i.get("polyline")}),e.useStyle(i.getModel("lineStyle.normal").getLineStyle());var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)}),this.group.add(e)},OA.updateLayout=function(t){var e=t.getData();this._lineEl.setShape({segs:e.mapArray(e.getItemLayout)})},OA.remove=function(){this.group.removeAll()},ur({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._lineDraw,a=t.get("effect.show"),r=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largeThreshold");a===this._hasEffet&&r===this._isPolyline&&s===this._isLarge||(o&&o.remove(),o=this._lineDraw=s?new Pd:new Mu(r?a?kd:Ld:a?Dd:bu),this._hasEffet=a,this._isPolyline=r,this._isLarge=s);var l=t.get("zlevel"),h=t.get("effect.trailLength"),u=i.getZr(),c="svg"===u.painter.getType();c||u.painter.getLayer(l).clear(!0),null==this._lastZlevel||c||u.configLayer(this._lastZlevel,{motionBlur:!1}),a&&h&&(c||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(h/10+.9,1),0)})),this.group.add(o.group),o.updateData(n),this._lastZlevel=l},updateLayout:function(t,e,i){this._lineDraw.updateLayout(t);var n=i.getZr();"svg"===n.painter.getType()||n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0);var i=e.getZr();"svg"===i.painter.getType()||i.painter.getLayer(this._lastZlevel).clear(!0)},dispose:function(){}});or(function(t){t.eachSeriesByType("lines",function(t){var e=t.coordinateSystem,i=t.getData();i.each(function(n){var o=i.getItemModel(n),a=o.option instanceof Array?o.option:o.get("coords"),r=[];if(t.get("polyline"))for(var s=0;s0){var I=a(v)?s:l;v>0&&(v=v*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),u},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=iy()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},ur({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(o,t,i):Rd(o)&&this._renderOnGeo(o,t,n,i)},dispose:function(){},_renderOnCartesianAndCalendar:function(t,e,i){if("cartesian2d"===t.type)var n=t.getAxis("x"),o=t.getAxis("y"),r=n.getBandWidth(),s=o.getBandWidth();var l=this.group,h=e.getData(),u=e.getModel("itemStyle.normal").getItemStyle(["color"]),c=e.getModel("itemStyle.emphasis").getItemStyle(),d=e.getModel("label.normal"),f=e.getModel("label.emphasis"),g=t.type,p="cartesian2d"===g?[e.coordDimToDataDim("x")[0],e.coordDimToDataDim("y")[0],e.coordDimToDataDim("value")[0]]:[e.coordDimToDataDim("time")[0],e.coordDimToDataDim("value")[0]];h.each(function(i){var n;if("cartesian2d"===g){if(isNaN(h.get(p[2],i)))return;var o=t.dataToPoint([h.get(p[0],i),h.get(p[1],i)]);n=new db({shape:{x:o[0]-r/2,y:o[1]-s/2,width:r,height:s},style:{fill:h.getItemVisual(i,"color"),opacity:h.getItemVisual(i,"opacity")}})}else{if(isNaN(h.get(p[1],i)))return;n=new db({z2:1,shape:t.dataToRect([h.get(p[0],i)]).contentShape,style:{fill:h.getItemVisual(i,"color"),opacity:h.getItemVisual(i,"opacity")}})}var m=h.getItemModel(i);h.hasItemOption&&(u=m.getModel("itemStyle.normal").getItemStyle(["color"]),c=m.getModel("itemStyle.emphasis").getItemStyle(),d=m.getModel("label.normal"),f=m.getModel("label.emphasis"));var v=e.getRawValue(i),y="-";v&&null!=v[2]&&(y=v[2]),co(u,c,d,f,{labelFetcher:e,labelDataIndex:i,defaultText:y,isRectText:!0}),n.setStyle(u),uo(n,h.hasItemOption?c:a({},c)),l.add(n),h.setItemGraphicEl(i,n)})},_renderOnGeo:function(t,e,i,n){var o=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new zd;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),h=t.getRoamTransform().transform;l.applyTransform(h);var u=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),g=d-u,p=f-c,m=r.mapArray(["lng","lat","value"],function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=u,o[1]-=c,o.push(n),o}),v=i.getExtent(),y="visualMap.continuous"===i.type?Ed(v,i.option.range):Nd(v,i.getPieceList(),i.option.selected);s.update(m,g,p,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var x=new qe({style:{width:g,height:p,x:u,y:c,image:s.canvas},silent:!0});this.group.add(x)}});var zA=ZM.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,zA.superApply(this,"getInitialData",arguments)}}),NA=["itemStyle","normal","borderWidth"],EA=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],RA=new nb;ur({type:"pictorialBar",render:function(t,e,i){var n=this.group,o=t.getData(),a=this._data,r=t.coordinateSystem,s=!!r.getBaseAxis().isHorizontal(),l=r.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:EA[+s],categoryDim:EA[1-s]};return o.diff(a).add(function(t){if(o.hasValue(t)){var e=Yd(o,t),i=Vd(o,t,e,h),a=Qd(o,h,i);o.setItemGraphicEl(t,a),n.add(a),rf(a,h,i)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(o.hasValue(t)){var r=Yd(o,t),s=Vd(o,t,r,h),l=nf(o,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),o.setItemGraphicEl(t,null),i=null),i?tf(i,h,s):i=Qd(o,h,s,!0),o.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),rf(i,h,s)}else n.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&ef(a,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=o,this.group},dispose:N,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(e){ef(n,e.dataIndex,t,e)}):i.removeAll()}});or(v(nl,"pictorialBar")),ar(v(cM,"pictorialBar","roundRect",null));var VA=function(t,e,i,n,o){US.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null,this._labelInterval=null};VA.prototype={constructor:VA,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},h(VA,US),lf.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:lf,_init:function(t,e,i){var n=this.dimension,o=new VA(n,Er(t),[0,0],t.get("type"),t.get("position")),a="category"===o.type;o.onBand=a&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData(),i=this.dimension;this._axis.scale.unionExtentFromData(e,t.coordDimToDataDim(i)),Nr(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=Ko({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},ua.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",function(n,o){var a=new lf(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i},dimensions:lf.prototype.dimensions});var BA=DM.getInterval,GA=DM.ifIgnoreOnTick,WA=["axisLine","axisTickLabel","axisName"],HA=EM.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=hf(t),r=new DM(t,a);d(WA,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t,a.labelInterval),HA.superCall(this,"render",t,e,i,n)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("width"),r=o.get("color"),s=BA(n,e);r=r instanceof Array?r:[r];for(var l=t.coordinateSystem.getRect(),h=i.isHorizontal(),u=[],c=0,d=i.getTicksCoords(),f=[],g=[],p=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=0;v=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Tf(e.getZr(),"axisPointer"),KA.superApply(this._model,"remove",arguments)},dispose:function(t,e){Tf("axisPointer",e),KA.superApply(this._model,"dispose",arguments)}}),JA=Eb(),QA=i,tC=m;(Af.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=v(Cf,e,u);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new jy,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);Pf(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=Xs(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=JA(t).pointerEl=new Tb[o.type](QA(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=JA(t).labelEl=new db(QA(e.label));t.add(o),Lf(o,n)}},updatePointerEl:function(t,e,i){var n=JA(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=JA(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),Lf(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=Do(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){bx(t.event)},onmousedown:tC(this._onHandleDragMove,this,0,0),drift:tC(this._onHandleDragMove,this),ondragend:tC(this._onHandleDragEnd,this)}),i.add(n)),Pf(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),La(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){Cf(this._axisPointerModel,!e&&this._moveAnimation,this._handle,kf(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(kf(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(kf(n)),JA(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=Af,Ki(Af);var eC=Af.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=Hf(r,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var u=Of(n),c=iC[s](a,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}Vf(e,t,Js(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Js(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Rf(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=Hf(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(r[1],h[l]),h[l]=Math.max(r[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),iC={line:function(t,e,i,n){var o=Bf([e,i[0]],[e,i[1]],Ff(t));return Yn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Gf([e-o/2,i[0]],[o,a],Ff(t))}}};EM.registerAxisPointerClass("CartesianAxisPointer",eC),tr(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),er(Pw.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Bs(t,e)}),ir({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||m(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){xf(o)&&(o=UA({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=xf(o),h=a.axesInfo,u=s.axesInfo,c="leave"===n||xf(o),d={},f={},g={list:[],map:{}},p={showPointer:jA(df,f),showTooltip:jA(ff,g)};XA(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);XA(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,a=vf(h,t);if(!c&&i&&(!h||a)){var r=a&&a.value;null!=r||l||(r=n.pointToData(o)),null!=r&&uf(t,r,p,!1,d)}})});var v={};return XA(u,function(t,e){var i=t.linkGroup;i&&!f[e]&&XA(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,yf(e),yf(t)))),v[t.key]=a}})}),XA(v,function(t,e){uf(u[e],t,p,!0,d)}),gf(f,u,d),pf(g,o,t,r),mf(u,0,i),d}});var nC=["x","y"],oC=["width","height"],aC=Af.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=Uf(r,1-Zf(a)),l=r.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=Of(n),c=rC[h](a,l,s,u);c.style=u,t.graphicKey=c.type,t.pointer=c}Vf(e,t,hf(i),i,n,o)},getHandleTransform:function(t,e,i){var n=hf(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Rf(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=Zf(o),s=Uf(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var h=Uf(a,1-r),u=(h[1]+h[0])/2,c=[u,u];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),rC={line:function(t,e,i,n){var o=Bf([e,i[0]],[e,i[1]],Zf(t));return Yn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Gf([e-o/2,i[0]],[o,a],Zf(t))}}};EM.registerAxisPointerClass("SingleAxisPointer",aC),lr({type:"single"});var sC=yw.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){sC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=f(jc().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),n=i.length,o=-1,a=-1,r=0;ro&&(o=s,a=r)}for(var l=0;ln[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r}),size:m(Jf,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:m(t.dataToPoint,t)}}}};hr({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0},getInitialData:function(t,e){return Sr(t.data,this,e)}}),ur({type:"custom",_data:null,render:function(t,e,i){var n=this._data,o=t.getData(),a=this.group,r=ig(t,o,e,i);o.diff(n).add(function(e){o.hasValue(e)&&og(null,e,r(e),t,a,o)}).update(function(e,i){var s=n.getItemGraphicEl(i);o.hasValue(e)?og(s,e,r(e),t,a,o):s&&a.remove(s)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&a.remove(e)}).execute(),this._data=o},dispose:N}),tr(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var gC=sr({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,gC.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=Vo(o,a);Bo(r);var s=this._elOptionsToUpdate=[];d(r,function(t,e){var i=t.option;i&&(s.push(i),gg(t,i),pg(o,e,i),mg(o[e],i))},this);for(var l=o.length-1;l>=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});lr({type:"graphic",init:function(t,e){this._elMap=z(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,i),this._relocate(t,i)},_updateElements:function(t,e){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,o=this.group;d(i,function(t){var e=t.$action,i=t.id,a=n.get(i),r=t.parentId,s=null!=r?n.get(r):o;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textVerticalAlign=l.textBaseline=null),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}var h=dg(t);e&&"merge"!==e?"replace"===e?(cg(a,n),ug(i,s,h,n)):"remove"===e&&cg(a,n):a?a.attr(h):ug(i,s,h,n);var u=n.get(i);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;Jo(s,r,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){cg(e,t)}),this._elMap=z()},dispose:function(){this._clear()}});var pC=sr({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){pC.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,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,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});ir("legendToggleSelect","legendselectchanged",v(vg,"toggleSelected")),ir("legendSelect","legendselected",v(vg,"select")),ir("legendUnSelect","legendunselected",v(vg,"unSelect"));var mC=v,vC=d,yC=jy,xC=lr({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new yC),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var o=t.getBoxLayoutParams(),a={width:i.getWidth(),height:i.getHeight()},s=t.get("padding"),l=Ko(o,a,s),h=this.layoutInner(t,n,l),u=Ko(r({width:h.width,height:h.height},o),a,s);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=xg(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var o=this.getContentGroup(),a=z(),r=e.get("selectedMode");vC(e.getData(),function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=i.getSeriesByName(h)[0];if(!a.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var f=c.getVisual("legendSymbol")||"roundRect",g=c.getVisual("symbol");this._createItem(h,l,s,e,f,g,t,d,r).on("click",mC(_g,h,n)).on("mouseover",mC(bg,u,null,n)).on("mouseout",mC(wg,u,null,n)),a.set(h,!0)}else i.eachRawSeries(function(i){if(!a.get(h)&&i.legendDataProvider){var o=i.legendDataProvider(),u=o.indexOfName(h);if(u<0)return;var c=o.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,r).on("click",mC(_g,h,n)).on("mouseover",mC(bg,i,h,n)).on("mouseout",mC(wg,i,h,n)),a.set(h,!0)}},this)}else o.add(new yC({newline:!0}))},this)},_createItem:function(t,e,i,n,o,r,s,l,h){var u=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.isSelected(t),g=new yC,p=i.getModel("textStyle"),m=i.get("icon"),v=i.getModel("tooltip"),y=v.parentModel;if(o=m||o,g.add(Hr(o,0,0,u,c,f?l:d,!0)),!m&&r&&(r!==o||"none"==r)){var x=.8*c;"none"===r&&(r="circle"),g.add(Hr(r,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,b=s,w=n.get("formatter"),S=t;"string"==typeof w&&w?S=w.replace("{name}",null!=t?t:""):"function"==typeof w&&(S=w(t)),g.add(new ib({style:fo({},p,{text:S,x:_,y:c/2,textFill:f?p.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var M=new db({shape:g.getBoundingRect(),invisible:!0,tooltip:v.get("show")?a({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},v.option):null});return g.add(M),g.eachChild(function(t){t.silent=!0}),M.silent=!h,this.getContentGroup().add(g),uo(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();Hb(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var o=n.getBoundingRect();return n.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()}});er(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[s],f=[-u.x,-u.y];f[r]=n.position[r];var g=[0,0],p=[-c.x,-c.y],m=T(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?p[r]+=i[s]-c[s]:g[r]+=c[s]+m),p[1-r]+=u[l]/2-c[l]/2,n.attr("position",f),o.attr("position",g),a.attr("position",p);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+p[1-r]),o.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],o.setClipPath(new db({shape:y})),o.__rectSize=y[s]}else a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&wo(n,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var i,n,o,a,r=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=wC[u],d=wC[1-u],f=SC[u],g=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===r&&(a=t)}):a=s.childAt(0);var p=h?Math.ceil(l[c]/h):0;if(a){var m=a.getBoundingRect(),v=a.position[u]+m[f];g[u]=-v-l[f],i=Math.floor(p*(v+m[f]+h/2)/l[c]),i=l[c]&&p?Math.max(0,Math.min(p-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-g[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),o=t.__legendDataIndex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(o=null)}),null!=x){var b=e(_[x]);if(y[f]=b[f]+b[c]-y[c],x<=0&&b[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legendDataIndex}}}return{contentPosition:g,pageIndex:i,pageCount:p,pagePrevDataIndex:n,pageNextDataIndex:o}}});ir("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),sr({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var IC=d,TC=Bi,AC=["","-webkit-","-moz-","-o-"];Ag.prototype={constructor:Ag,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+Tg(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var CC=m,DC=d,LC=Si,kC=new db({shape:{x:-1,y:-1,width:2,height:2}});lr({type:"tooltip",init:function(t,e){if(!Uv.node){var i=new Ag(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!Uv.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");_f("itemTooltip",this._api,CC(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!Uv.node){var o=Dg(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=kC;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=UA(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;this._alwaysShowContent||o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Dg(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=Cg([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,o=[e.offsetX,e.offsetY],a=[],r=[],s=Cg([e.tooltipOption,n]);DC(t,function(t){DC(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,o=[];if(e&&null!=n){var s=Ef(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(a){var l=i.getSeriesByIndex(a.seriesIndex),h=a.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=Br(e.axis,n),u.axisValueLabel=s,u&&(r.push(u),o.push(l.formatTooltip(h,!0)))});var l=s;a.push((l?Gi(l)+"
":"")+o.join("
"))}})},this),a.reverse(),a=a.join("
");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,o[0],o[1],this._tooltipContent,r):this._showTooltipContent(s,a,r,Math.random(),o[0],o[1],l)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,h=r.getData(),u=Cg([h.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=r.getDataParams(s,l),f=r.formatTooltip(s,!1,l),g="item_"+r.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,g,t.offsetX,t.offsetY,t.position,t.target)}),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new Lo(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var u=e;if(h&&"string"==typeof h)u=Wi(h,i,!0);else if("function"==typeof h){var c=CC(function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,r,o,a,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,r,o,a,l,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=o.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:h.slice()})),y(e))i=LC(e[0],s),n=LC(e[1],l);else if(b(e)){e.width=h[0],e.height=h[1];var f=Ko(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else"string"==typeof e&&r?(i=(g=Og(e,d,h))[0],n=g[1]):(i=(g=Lg(i,n,o.el,s,l,u?null:20,c?null:20))[0],n=g[1]);if(u&&(i-=zg(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=zg(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var g=kg(i,n,o.el,s,l);i=g[0],n=g[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&DC(e,function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&DC(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&DC(o,function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Uv.node||(this._tooltipContent.hide(),Tf("itemTooltip",e))}}),ir({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),ir({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Vg.prototype={constructor:Vg,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:US.prototype.dataToCoord,radiusToData:US.prototype.coordToData},h(Vg,US),Bg.prototype={constructor:Bg,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:US.prototype.dataToCoord,angleToData:US.prototype.coordToData},h(Bg,US);var PC=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Vg,this._angleAxis=new Bg,this._radiusAxis.polar=this._angleAxis.polar=this};PC.prototype={type:"polar",axisPointerEnabled:!0,constructor:PC,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=lr;)l+=360*h;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var OC=Ub.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n(OC.prototype,zS);var zC={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};_M("angle",OC,Gg,zC.angle),_M("radius",OC,Gg,zC.radius),sr({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var NC={dimensions:PC.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new PC(n);o.update=Hg;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Fg(a,s),Fg(r,l),Wg(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};ua.register("polar",NC);var EC=["axisLine","axisLabel","axisTick","splitLine","splitArea"];EM.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords();"category"!==i.type&&a.pop(),d(EC,function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,n,a,o)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new nb({shape:{cx:e.cx,cy:e.cy,r:n[Ug(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[Ug(e)],l=f(i,function(t){return new fb({shape:Zg(e,[s,s+a],t)})});this.group.add(Ib(l,{style:r(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var o=t.axis,a=t.get("data"),r=t.getModel("axisLabel"),s=t.getFormattedLabels(),l=r.get("margin"),h=o.getLabelsCoords(),u=0;uf?"left":"right",m=Math.abs(d[1]-g)/c<.3?"middle":d[1]>g?"top":"bottom";a&&a[u]&&a[u].textStyle&&(r=new Lo(a[u].textStyle,r,r.ecModel));var v=new ib({silent:!0});this.group.add(v),fo(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||t.get("axisLine.lineStyle.color"),text:s[u],textAlign:p,textVerticalAlign:m})}},_splitLine:function(t,e,i,n){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],h=0;h=0?"p":"n",S=i.pointToCoord(M[n]),I=r[u][n][p];if("radius"===g.dim)o=I,s=S[0],c=(h=(-S[1]+d)*Math.PI/180)+f*Math.PI/180,Math.abs(s)0?C=A[1]:C===A[1]&&t<0&&(C=A[0]),r[u][n][p]=C}e.setItemLayout(n,{cx:m,cy:v,r0:o,r:s,startAngle:h,endAngle:c})}},!0)}},this)},"bar")),lr({type:"polar"}),u(Ub.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){Ub.prototype.init.apply(this,arguments),zo(t.label,["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=xI.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=g(t.regions||[],function(t,i){return i.name&&t.set(i.name,new Lo(i,e)),t},z()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new Lo(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),$M),lr({type:"geo",init:function(t,e){var i=new Ul(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var o=this._mapDraw;t.get("show")?o.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),qg("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),qg("select",{type:"geoSelect",event:"geoselected"}),qg("unSelect",{type:"geoUnSelect",event:"geounselected"});var WC=["rect","polygon","keep","clear"],HC=d,FC={lineX:tp(0),lineY:tp(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&Ur(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return!!(Ur(n,o,a)||Ur(n,o+r,a)||Ur(n,o,a+s)||Ur(n,o+r,a+s)||jt.create(t).contain(l[0],l[1])||ip(o,a,o+r,a,n)||ip(o,a,o,a+s,n)||ip(o+r,a,o+r,a+s,n)||ip(o,a+s,o+r,a+s,n))||void 0}}},ZC=d,UC=l,XC=v,jC=["dataToPoint","pointToData"],qC=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],YC=rp.prototype;YC.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=QC[t.brushType](0,i,e);t.__rangeOffset={offset:tD[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},YC.matchOutputRanges=function(t,e,i){ZC(t,function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&d(n.coordSyses,function(n){var o=QC[t.brushType](1,n,t.range);i(t,o.values,n,e)})},this)},YC.setInputRanges=function(t,e){ZC(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&!0!==i){t.panelId=i.panelId;var n=QC[t.brushType](0,i.coordSys,t.coordRange),o=t.__rangeOffset;t.range=o?tD[t.brushType](n.values,o.offset,cp(n.xyMinMax,o.xyMinMax)):n.values}},this)},YC.makePanelOpts=function(t,e){return f(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:Lc(n),isTargetByCursor:Pc(n,t,i.coordSysModel),getLinearBrushOtherExtent:kc(n)}})},YC.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&UC(n.coordSyses,e.coordinateSystem)>=0},YC.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=lp(e,t),o=0;o=0||UC(n,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:JC.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){ZC(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:JC.geo})})}},KC=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],JC={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Mo(t)),e}},QC={lineX:XC(hp,0),lineY:XC(hp,1),rect:function(t,e,i){var n=e[jC[t]]([i[0][0],i[1][0]]),o=e[jC[t]]([i[0][1],i[1][1]]),a=[sp([n[0],o[0]]),sp([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[jC[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o}),xyMinMax:n}}},tD={lineX:XC(up,0),lineY:XC(up,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},eD=["inBrush","outOfBrush"],iD="__ecBrushSelect",nD="__ecInBrushSelectEvent",oD=Pw.VISUAL.BRUSH;or(oD,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new rp(e.option,t)).setInputRanges(e.areas,t)})}),ar(oD,function(t,e,n){var o,a,s=[];t.eachComponent({mainType:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function h(t){return!!t.length}function u(t,e){var i=t.coordinateSystem;b|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=mp(i);if(a&&!vp(e,n)&&(d(w,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),b|=h(o)}),l(n)&&h(o))){var r=i.getData();r.each(function(t){pp(a,o,r,t)&&(x[t]=1)})}}var g={brushId:e.id,brushIndex:n,brushName:e.name,areas:i(e.areas),selected:[]};s.push(g);var p=e.option,m=p.brushLink,v=[],x=[],_=[],b=0;n||(o=p.throttleType,a=p.throttleDelay);var w=f(e.areas,function(t){return yp(r({boundingRect:aD[t.brushType](t)},t))}),S=Kg(e.option,eD,function(t){t.mappingMethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=_[e]=[];"parallel"===t.subType?u(t,e):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};g.selected.push(i);var n=mp(t),o=_[e],a=t.getData(),r=l(e)?function(t){return x[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return pp(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?b:h(o))&&Qg(eD,S,a,r)})}),fp(e,o,a,s,n)});var aD={lineX:N,lineY:N,rect:function(t){return xp(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&xp(e)}},rD=["#ddd"];sr({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&Jg(i,t,["inBrush","outOfBrush"]),i.inBrush=i.inBrush||{},i.outOfBrush=i.outOfBrush||{color:rD}},setAreas:function(t){t&&(this.areas=f(t,function(t){return _p(this.option,t)},this))},setBrushOption:function(t){this.brushOption=_p(this.option,t),this.brushType=this.brushOption.brushType}});lr({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Yu(e.getZr())).on("brush",m(this._onBrush,this)).mount()},render:function(t){return this.model=t,bp.apply(this,arguments)},updateView:bp,updateLayout:bp,updateVisual:bp,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i(t),$from:n})}}),ir({type:"brush",event:"brush",update:"updateView"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),ir({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var sD={},lD={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}}},hD=lD.toolbox.brush;Mp.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],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:i(hD.title)};var uD=Mp.prototype;uD.render=uD.updateView=uD.updateLayout=function(t,e,i){var n,o,a;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,d(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},uD.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},uD.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},wp("brush",Mp),tr(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Yg(s),e&&!s.length&&s.push.apply(s,WC)}});Ip.prototype={constructor:Ip,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"}]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Pi(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:o,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)?this.getDateInfo(t):((t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle.normal").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},h=this._rect=Ko(r,l);d([0,1],function(t){i(a,t)||(a[t]=h[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[NaN,NaN];var a=i.day,r=this._getRangeInfo([n.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:v(Tp,"dataToPoint"),convertFromPixel:v(Tp,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(y(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==a&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(o+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},Ip.dimensions=Ip.prototype.dimensions,Ip.getDimensionsInfo=Ip.prototype.getDimensionsInfo,Ip.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var o=new Ip(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},ua.register("calendar",Ip);var cD=Ub.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{normal:{color:"#fff",borderWidth:1,borderColor:"#ccc"}},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=ea(t);cD.superApply(this,"init",arguments),Ap(t,o)},mergeOption:function(t,e){cD.superApply(this,"mergeOption",arguments),Ap(this.option,t)}}),dD={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},fD={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};lr({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle.normal").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,h=new db({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(h)}},_renderLines:function(t,e,i,n){function o(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var o=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawSplitline(o,s,n)}var a=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),h=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){o(u.formatedDate),0===c&&(u=r.getDateInfo(e.start.y+"-"+e.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}o(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,h,i),s,n),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,h,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new cb({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?Hi(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:d},p=this._formatterLabel(f,g),m=new ib({z2:30});fo(m.style,o,{text:p}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),h=[this._tlpoints,this._blpoints];_(o)&&(o=dD[o.toUpperCase()]||[]);var u="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f=a[0]&&t<=a[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;if("none"!==o){var r=this.getOtherAxisModel();t.get("$fromToolbox")&&r&&"category"===r.get("type")&&(o="empty"),mD(n,function(t){var n=t.getData(),r=t.coordDimToDataDim(i);"weakFilter"===o?n&&n.filterSelf(function(t){for(var e,i,o,s=0;sa[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(e=!0),c&&(i=!0)}return o&&e&&i}):n&&mD(r,function(i){"empty"===o?t.setData(n.map(i,function(t){return e(t)?t:NaN})):n.filterSelf(i,e)})})}}}};var xD=d,_D=pD,bD=sr({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=zp(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=zp(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;Uv.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Np(this,t),xD([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new yD(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();_D(function(e){var i=e.axisIndex;t[i]=Oo(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;_D(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):xD(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&_D(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a0?100:20}},getFirstTargetAxisModel:function(){var t;return _D(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;_D(function(n){xD(this.get(n.axisIndex),function(o){t.call(e,n,o,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;xD([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Np(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),wD=xw.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var o,a=0;a0&&e%p)g+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:MD(t,a,h,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([g,0]),d.push([g,0])),c.push([g,n]),d.push([g,n]),g+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new ub({shape:{points:c},style:r({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new cb({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(o,a){d(t.getAxisProxy(o.name,a).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(LD,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,h=Ep(o.name),u=t.coordinateSystem;null!=h&&u.getOtherAxis&&(r=u.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:o.name,otherDim:h,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new SD({draggable:!0,cursor:Rp(this._orient),drift:TD(this._onDragMove,this,"all"),onmousemove:function(t){bx(t.event)},ondragstart:TD(this._showDataInfo,this,!0),ondragend:TD(this._onDragEnd,this),onmouseover:TD(this._showDataInfo,this,!0),onmouseout:TD(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new SD($n({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),AD([0,1],function(t){var o=Do(a.get("handleIcon"),{cursor:Rp(this._orient),draggable:!0,drift:TD(this._onDragMove,this,t),onmousemove:function(t){bx(t.event)},ondragend:TD(this._onDragEnd,this),onmouseover:TD(this._showDataInfo,this,!0),onmouseout:TD(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=Si(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new ib({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[MD(t[0],[0,100],e,!0),MD(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];OT(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?MD(a.minSpan,r,o,!0):null,null!=a.maxSpan?MD(a.maxSpan,r,o,!0):null),this._range=ID([MD(n[0],o,r,!0),MD(n[1],o,r,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=ID(i.slice()),o=this._size;AD([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Mo(n.handles[t].parent,this.group),i=To(0===t?"right":"left",e),s=this._handleWidth/2+DD,l=Io([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===CD?"middle":i,textAlign:a===CD?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,a=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,h=this._range,u=t?s.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=ID(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=Io([e,i],this._displayables.barGroup.getLocalTransform(),!0);this._updateInterval(t,n[0]);var o=this.dataZoomModel.get("realtime");this._updateView(!o),o&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2;this._updateInterval("all",i[0]-o),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(AD(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});bD.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var PD=v,OD="\0_ec_dataZoom_roams",zD=m,ND=wD.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){ND.superApply(this,"render",arguments),Gp(n,t.id)&&(this._range=t.getPercentRange()),d(this.getTargetCoordInfo(),function(e,n){var o=f(e,function(t){return Wp(t.model)});d(e,function(e){var a=e.model,r=t.option;Vp(i,{coordId:Wp(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:zD(this._onPan,this,e,n),zoomGetRange:zD(this._onZoom,this,e,n),zoomLock:r.zoomLock,disabled:r.disabled,roamControllerOpt:{zoomOnMouseWheel:r.zoomOnMouseWheel,moveOnMouseMove:r.moveOnMouseMove,preventDefaultMouseMove:r.preventDefaultMouseMove}})},this)},this)},dispose:function(){Bp(this.api,this.dataZoomModel.id),ND.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,n,o,a,r,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=ED[e]([a,r],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return OT(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,i,n,o,a){var r=this._range.slice(),s=t.axisModels[0];if(s){var l=ED[e](null,[o,a],s,i,t),h=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(r[1]-r[0])+r[0];n=Math.max(1/n,0),r[0]=(r[0]-h)*n+h,r[1]=(r[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return OT(0,r,[0,100],0,u.minSpan,u.maxSpan),this._range=r}}}),ED={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=h[1]-h[0],r.pixelStart=h[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}};er(function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis($p),t.eachTargetAxis(Kp)}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}),ir("dataZoom",function(t,e){var i=Dp(m(e.eachComponent,e,"dataZoom"),pD,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var RD=d,VD=function(t){var e=t&&t.visualMap;y(e)||(e=e?[e]:[]),RD(e,function(t){if(t){Jp(t,"splitList")&&!Jp(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&y(e)&&RD(e,function(t){b(t)&&(Jp(t,"start")&&!Jp(t,"min")&&(t.min=t.start),Jp(t,"end")&&!Jp(t,"max")&&(t.max=t.end))})}})};Ub.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}),ar(Pw.VISUAL.COMPONENT,function(t){t.eachComponent("visualMap",function(t){Qp(t)}),tm(t)});var BD={get:function(t,e,n){var o=i((GD[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},GD={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]}},WD=jI.mapVisual,HD=jI.eachVisual,FD=y,ZD=d,UD=Ii,XD=wi,jD=N,qD=["#f6efa6","#d88273","#bf444c"],YD=sr({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,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,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;Uv.canvasSupported||(i.realtime=!1),!e&&Jg(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=m(t,this),this.controllerVisuals=Kg(this.option.controller,e,t),this.targetVisuals=Kg(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Oo(t),e},eachTargetSeries:function(t,e){d(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,h=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(h)?h.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(h)?o?h(t[0],t[1]):h(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=UD([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){FD(e.color)&&!t.inRange&&(t.inRange={color:e.color.slice().reverse()}),t.inRange=t.inRange||{color:qD},ZD(this.stateList,function(e){var i=t[e];if(_(i)){var n=BD.get(i,"active",s);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.option,o={inRange:e.inRange,outOfRange:e.outOfRange},a=e.target||(e.target={}),r=e.controller||(e.controller={});n(a,o),n(r,o);var s=this.isCategory();t.call(this,a),t.call(this,r),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},ZD(n,function(t,e){if(jI.isValidType(e)){var i=BD.get(e,"inactive",s);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,a,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");ZD(this.stateList,function(a){var r=this.itemSize,l=t[a];l||(l=t[a]={color:s?o:[o]}),null==l.symbol&&(l.symbol=e&&i(e)||(s?"roundRect":["roundRect"])),null==l.symbolSize&&(l.symbolSize=n&&i(n)||(s?r[0]:[r[0],r[0]])),l.symbol=WD(l.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var h=l.symbolSize;if(null!=h){var u=-1/0;HD(h,function(t){t>u&&(u=t)}),l.symbolSize=WD(h,function(t){return XD(t,[0,u],[0,r[0]],!0)})}},this)}.call(this,r)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:jD,getValueState:jD,getVisualMeta:jD}),$D=[20,140],KD=YD.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){KD.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){KD.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=$D[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=$D[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){YD.prototype.completeVisualOption.apply(this,arguments),d(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Ii((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=im(0,0,this.getExtent()),n=im(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new jy("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,a=i.handleLabels;tL([0,1],function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=Io(i.handleLabelPoints[r],Mo(s,this.group));a[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=QD(t,a,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",sm(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);u.setStyle("fill",d);var f=Io(h.indicatorLabelPoint,Mo(u,this.group)),g=h.indicatorLabel;g.attr("invisible",!1);var p=this._applyTransform("left",h.barGroup),m=this._orient;g.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===m?p:"middle",textAlign:"horizontal"===m?"center":p,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=eL(iL(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=eL(iL(o[0],t),o[1]);var r=lm(i,a,o),s=[t-r,t+r],l=QD(t,o,a,!0),h=[QD(s[0],o,a,!0),QD(s[1],o,a,!0)];s[0]o[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",r):h[1]===1/0?this._showIndicator(l,h[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var u=this._hoverLinkDataIndices,c=[];(e||hm(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=Wo(u,c);this._dispatchHighDown("downplay",om(d[0])),this._dispatchHighDown("highlight",om(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.getDimension(i.getDataDimension(o)),r=o.get(a,e.dataIndex,!0);isNaN(r)||this._showIndicator(r,r)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",om(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=Mo(e,n?null:this.group);return Tb[y(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});ir({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),tr(VD);var rL=YD.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){rL.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();sL[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=i(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=f(this._pieceList,function(t){var t=i(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(b(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=jI.listVisualTypes(),o=this.isCategory();d(e.pieces,function(t){d(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.stateList,function(t){(e[t]||(e[t]={}))[n]=BD.get(n,"inRange"===t?"active":"inactive",o)})},this),YD.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;d(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=i(t)},getValueState:function(t){var e=jI.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){jI.findPieceIndex(e,this._pieceList)===t&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var r=o.getRepresentValue({interval:e});a||(a=o.getValueState(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],o=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),sL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};JD.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),a=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),h=l.endsText,u=I(e.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],s,u,r),d(l.viewPieceList,function(n){var l=n.piece,h=new jy;h.onclick=m(this._onItemClick,this,l),this._enableHoverLink(h,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(h,c,[0,0,s[0],s[1]]),u){var d=this.visualMapModel.getValueState(c);h.add(new ib({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}t.add(h)},this),h&&this._renderEndsText(t,h[1],s,u,r),Hb(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:om(i.findTargetDataIndices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return nm(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new jy,r=this.visualMapModel.textStyleModel;a.add(new ib({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=f(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Hr(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,o=i(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}});tr(VD);var lL=Vi,hL=Gi,uL=sr({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(Uv.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var o=this.constructor,r=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),s=t[r];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&dm(i),d(i.data,function(t){t instanceof Array?(dm(t[0]),dm(t[1])):dm(t)}),a(s=new o(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[r]=s):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,lL).join(", "):lL(i),o=e.getName(t),a=hL(this.name);return(null!=i||o)&&(a+="
"),o&&(a+=hL(o),null!=i&&(a+=" : ")),null!=i&&(a+=hL(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});u(uL,Nb),uL.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}});var cL=l,dL=v,fL={min:dL(mm,"min"),max:dL(mm,"max"),average:dL(mm,"average")},gL=lr({type:"marker",init:function(){this.markerGroupMap=z()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});gL.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(wm(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new ts),h=Sm(o,t,e);e.setData(h),wm(e.getData(),t,n),h.each(function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markPoint=t.markPoint||{}}),uL.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},lineStyle:{normal:{type:"dashed"},emphasis:{width:3}},animationEasing:"linear"}});var pL=function(t,e,o,r){var s=t.getData(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||null!=r.xAxis||null!=r.yAxis)){var h,u;if(null!=r.yAxis||null!=r.xAxis)h=null!=r.yAxis?"y":"x",e.getAxis(h),u=I(r.yAxis,r.xAxis);else{var c=ym(r,s,e,t);h=c.valueDataDim,c.valueAxis,u=bm(s,h,l)}var d="x"===h?0:1,f=1-d,g=i(r),p={};g.type=null,g.coord=[],p.coord=[],g.coord[f]=-1/0,p.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof u&&(u=+u.toFixed(Math.min(m,20))),g.coord[d]=p.coord[d]=u,r=[g,p,{type:l,valueIndex:r.valueIndex,value:u}]}return r=[vm(t,r[0]),vm(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};gL.extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){Am(o,e,!0,t,i),Am(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);Am(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||p[o?0:1],symbol:a.get("symbol",!0)||g[o?0:1],color:a.get("itemStyle.normal.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(r)||l.set(r,new Mu);this.group.add(h.group);var u=Cm(a,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setData(f);var g=e.get("symbol"),p=e.get("symbolSize");y(g)||(g=[g,g]),"number"==typeof p&&(p=[p,p]),u.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.normal.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),h.updateData(f),u.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markLine=t.markLine||{}}),uL.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemStyle:{normal:{borderWidth:0}}}});var mL=function(t,e,i,n){var a=vm(t,n[0]),r=vm(t,n[1]),s=I,l=a.coord,h=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=o([{},a,r]);return u.coord=[a.coord,r.coord],u.x0=a.x,u.y0=a.y,u.x1=r.x,u.y1=r.y,u},vL=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];gL.extend({type:"markArea",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=f(vL,function(o){return Pm(n,e,o,t,i)});n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.name,s=t.getData(),l=this.markerGroupMap,h=l.get(a)||l.set(a,{group:new jy});this.group.add(h.group),h.__keep=!0;var u=Om(o,t,e);e.setData(u),u.each(function(e){u.setItemLayout(e,f(vL,function(i){return Pm(u,e,i,t,n)})),u.setItemVisual(e,{color:s.getVisual("color")})}),u.diff(h.__data).add(function(t){var e=new ub({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),h.group.add(e)}).update(function(t,i){var n=h.__data.getItemGraphicEl(i);wo(n,{shape:{points:u.getItemLayout(t)}},e,t),h.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=h.__data.getItemGraphicEl(t);h.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,i){var n=u.getItemModel(i),o=n.getModel("label.normal"),a=n.getModel("label.emphasis"),s=u.getItemVisual(i,"color");t.useStyle(r(n.getModel("itemStyle.normal").getItemStyle(),{fill:Pt(s,.4),stroke:s})),t.hoverStyle=n.getModel("itemStyle.emphasis").getItemStyle(),co(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:s}),uo(t,{}),t.dataModel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markArea=t.markArea||{}});Ub.registerSubTypeDefaulter("timeline",function(){return"slider"}),ir({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),r({currentIndex:i.option.currentIndex},t)}),ir({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var yL=Ub.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,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:{normal:{},emphasis:{}},label:{normal:{color:"#000"},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){yL.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=No(t);b(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new aS([{name:"value",type:r}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});u(yL.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",normal:{show:!0,interval:"auto",rotate:0,color:"#304654"},emphasis:{show:!0,color:"#c23531"}},itemStyle:{normal:{color:"#304654",borderWidth:1},emphasis:{color:"#c23531"}},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,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:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",normal:{color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Nb);var xL=xw.extend({type:"timeline"}),_L=function(t,e,i,n){US.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};_L.prototype={constructor:_L,getLabelInterval:function(){var t=this.model,e=t.getModel("label.normal"),i=e.get("interval");return null!=i&&"auto"!=i?i:((i=this._autoLabelInterval)||(i=this._autoLabelInterval=Rr(f(this.scale.getTicks(),this.dataToCoord,this),Vr(this,e.get("formatter")),e.getFont(),"horizontal"===t.get("orient")?0:90,e.get("rotate"))),i)},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},h(_L,US);var bL=m,wL=d,SL=Math.PI;xL.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return Gi(s.scale.getLabel(t))},wL(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.normal.position"),n=t.get("orient"),o=Rm(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:SL/2},l="vertical"===n?o.height:o.width,h=t.getModel("controlStyle"),u=h.get("show"),c=u?h.get("itemSize"):0,d=u?h.get("itemGap"):0,f=c+d,g=t.get("label.normal.rotate")||0;g=g*SL/180;var p,m,v,y,x=h.get("position",!0),_=(u=h.get("show",!0))&&h.get("showPlayBtn",!0),b=u&&h.get("showPrevBtn",!0),w=u&&h.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(p=[0,0],S+=f),b&&(m=[S,0],S+=f),w&&(v=[M-c,0],M-=f)):(_&&(p=[M-c,0],M-=f),b&&(m=[0,0],S+=f),w&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:l,orient:n,rotation:s[n],labelRotation:g,labelPosOpt:i,labelAlign:t.get("label.normal.align")||a[n],labelBaseline:t.get("label.normal.verticalAlign")||t.get("label.normal.baseline")||r[n],playPosition:p,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._mainGroup,r=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=ot(),h=s.x,u=s.y+s.height;lt(l,l,[-h,-u]),ht(l,l,-SL/2),lt(l,l,[h,u]),(s=s.clone()).applyTransform(l)}var c=n(s),d=n(a.getBoundingRect()),f=n(r.getBoundingRect()),g=a.position,p=r.position;p[0]=g[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m))o(g,d,c,1,v="+"===m?0:1),o(p,f,c,1,1-v);else{var v=m>=0?0:1;o(g,d,c,1,v),p[1]=g[1]+m}a.attr("position",g),r.attr("position",p),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Er(e,n),a=i.getDataExtent("value");o.setExtent(a[0],a[1]),this._customizeScale(o,i),o.niceTicks();var r=new _L("value",o,t.axisExtent,n);return r.model=e,r},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],function(t){return t})},t.getTicksLabels=function(){return f(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new jy;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new fb({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();wL(a,function(t,a){var r=i.dataToCoord(t),s=o.getItemModel(a),l=s.getModel("itemStyle.normal"),h=s.getModel("itemStyle.emphasis"),u={position:[r,0],onclick:bL(this._changeTimeline,this,a)},c=Bm(s,l,e,u);uo(c,h.getItemStyle()),s.get("tooltip")?(c.dataIndex=a,c.dataModel=n):c.dataIndex=c.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var o=n.getModel("label.normal");if(o.get("show")){var a=n.getData(),r=i.scale.getTicks(),s=Vr(i,o.get("formatter")),l=i.getLabelInterval();wL(r,function(n,o){if(!i.isLabelIgnored(o,l)){var r=a.getItemModel(o),h=r.getModel("label.normal"),u=r.getModel("label.emphasis"),c=i.dataToCoord(n),d=new ib({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:bL(this._changeTimeline,this,o),silent:!1});fo(d.style,h,{text:s[o],textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(d),uo(d,fo({},u))}},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,u){if(t){var c=Vm(n,i,h,{position:t,origin:[a/2,0],rotation:u?-r:0,rectHover:!0,style:s,onclick:o});e.add(c),uo(c,l)}}var a=t.controlSize,r=t.rotation,s=n.getModel("controlStyle.normal").getItemStyle(),l=n.getModel("controlStyle.emphasis").getItemStyle(),h=[0,-a/2,a,a],u=n.getPlayState(),c=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",bL(this._changeTimeline,this,c?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",bL(this._changeTimeline,this,c?"+":"-")),o(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),bL(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=bL(s._handlePointerDrag,s),t.ondragend=bL(s._handlePointerDragend,s),Gm(t,a,i,n,!0)},onUpdate:function(t){Gm(t,a,i,n)}};this._currentPointer=Bm(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Ii(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),ii.getHeight()&&(n.textPosition="top",l=!0);var h=l?-5-o.height:s+8;a+o.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):a-o.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},updateLayout:function(t,e,i,n){d(this._features,function(t){t.updateLayout&&t.updateLayout(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var IL=lD.toolbox.saveAsImage;Hm.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:IL.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:IL.lang.slice()},Hm.prototype.unusable=!Uv.canvasSupported,Hm.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||Uv.browser.ie||Uv.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,n+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},wp("saveAsImage",Hm);var TL=lD.toolbox.magicType;Fm.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(TL.title),option:{},seriesIndex:{}};var AL=Fm.prototype;AL.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var CL={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},DL=[["line","bar"],["stack","tiled"]];AL.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(CL[i]){var a={series:[]};d(DL,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var o=e.subType,s=e.id,l=CL[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var h=e.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:a})}},ir({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),wp("magicType",Fm);var LL=lD.toolbox.dataView,kL=new Array(60).join("-"),PL="\t",OL=new RegExp("["+PL+"]+","g");Qm.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i(LL.title),lang:i(LL.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Qm.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),h=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var u=o.get("optionToContent"),c=o.get("contentToOption"),d=jm(t);if("function"==typeof u){var f=u(e.getOption());"string"==typeof f?l.innerHTML=f:S(f)&&l.appendChild(f)}else l.appendChild(h),h.readOnly=o.get("readOnly"),h.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=o.get("textColor"),h.style.borderColor=o.get("textareaBorderColor"),h.style.backgroundColor=o.get("textareaColor"),h.value=d.value;var g=d.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;si(v,"click",i),si(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Jm(h.value,g)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&p.appendChild(y),p.appendChild(v),si(h,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+PL+e.substring(n),this.selectionStart=this.selectionEnd=i+1,bx(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(p),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},Qm.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Qm.prototype.dispose=function(t,e){this.remove(t,e)},wp("dataView",Qm),ir({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:tv(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(r({series:i},t.newOption))});var zL=d,NL="\0_ec_hist_store";bD.extend({type:"dataZoom.select"}),wD.extend({type:"dataZoom.select"});var EL=lD.toolbox.dataZoom,RL=d,VL="\0_ec_\0toolbox-dataZoom_";rv.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i(EL.title)};var BL=rv.prototype;BL.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,hv(t,e,this,n,i),lv(t,e)},BL.onclick=function(t,e,i){GL[i].call(this)},BL.remove=function(t,e){this._brushController.unmount()},BL.dispose=function(t,e){this._brushController.dispose()};var GL={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(iv(this.ecModel))}};BL._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),h=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==h.minValueSpan&&null==h.maxValueSpan||(i=OT(0,i.slice(),r.scale.getExtent(),0,h.minValueSpan,h.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new rp(sv(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),ev(a,o),this._dispatchZoomAction(o)}},BL._dispatchZoomAction=function(t){var e=[];RL(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},wp("dataZoom",rv),tr(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"==a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"==a||-1!==l(a,i)){var r={type:"select",$fromToolbox:!0,id:VL+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),RL(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);y(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var WL=lD.toolbox.restore;uv.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:WL.title},uv.prototype.onclick=function(t,e,i){nv(t),e.dispatchAction({type:"restore",from:this.uid})},wp("restore",uv),ir({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var HL,FL="urn:schemas-microsoft-com:vml",ZL="undefined"==typeof window?null:window,UL=!1,XL=ZL&&ZL.document;if(XL&&!Uv.canvasSupported)try{!XL.namespaces.zrvml&&XL.namespaces.add("zrvml",FL),HL=function(t){return XL.createElement("')}}catch(t){HL=function(t){return XL.createElement("<"+t+' xmlns="'+FL+'" class="zrvml">')}}var jL=P_.CMD,qL=Math.round,YL=Math.sqrt,$L=Math.abs,KL=Math.cos,JL=Math.sin,QL=Math.max;if(!Uv.canvasSupported){var tk=21600,ek=tk/2,ik=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=tk+","+tk,t.coordorigin="0,0"},nk=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},ok=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},ak=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},rk=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},sk=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},lk=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},hk=function(t,e,i){var n=Mt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=ok(n[0],n[1],n[2]),t.opacity=i*n[3])},uk=function(t){var e=Mt(t);return[ok(e[0],e[1],e[2]),e[3]]},ck=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof yb){var o,a=0,r=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*u,n.y*c],g=[n.x2*u,n.y2*c];d&&($(f,f,d),$(g,g,d));var p=g[0]-f[0],m=g[1]-f[1];(a=180*Math.atan2(p,m)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*u,n.y*c],d=i.transform,v=i.scale,y=u,x=c;r=[(f[0]-h.x)/y,(f[1]-h.y)/x],d&&$(f,f,d),y/=v[0]*tk,x/=v[1]*tk;var _=QL(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorStops.slice();b.sort(function(t,e){return t.offset-e.offset});for(var w=b.length,S=[],M=[],I=0;I=2){var C=S[0][0],D=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=C,t.color2=D,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===o&&(t.focusposition=r.join(","))}else hk(t,n,e.opacity)},dk=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof yb||hk(t,e.stroke,e.opacity)},fk=function(t,e,i,n){var o="fill"==e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof yb&&rk(t,a),a||(a=cv(e)),o?ck(a,i,n):dk(a,i),ak(t,a)):(t[o?"filled":"stroked"]="false",rk(t,a))},gk=[[],[],[]],pk=function(t,e){var i,n,o,a,r,s,l=jL.M,h=jL.C,u=jL.L,c=jL.A,d=jL.Q,f=[],g=t.data,p=t.len();for(a=0;a.01?O&&(z+=.0125):Math.abs(N-C)<1e-4?O&&zA?x-=.0125:x+=.0125:O&&NC?y+=.0125:y-=.0125),f.push(E,qL(((A-D)*M+w)*tk-ek),",",qL(((C-L)*I+S)*tk-ek),",",qL(((A+D)*M+w)*tk-ek),",",qL(((C+L)*I+S)*tk-ek),",",qL((z*M+w)*tk-ek),",",qL((N*I+S)*tk-ek),",",qL((y*M+w)*tk-ek),",",qL((x*I+S)*tk-ek)),r=y,s=x;break;case jL.R:var R=gk[0],V=gk[1];R[0]=g[a++],R[1]=g[a++],V[0]=R[0]+g[a++],V[1]=R[1]+g[a++],e&&($(R,R,e),$(V,V,e)),R[0]=qL(R[0]*tk-ek),V[0]=qL(V[0]*tk-ek),R[1]=qL(R[1]*tk-ek),V[1]=qL(V[1]*tk-ek),f.push(" m ",R[0],",",R[1]," l ",V[0],",",R[1]," l ",V[0],",",V[1]," l ",R[0],",",V[1]);break;case jL.Z:f.push(" x ")}if(i>0){f.push(n);for(var B=0;B100&&(xk=0,yk={});var i,n=_k.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},yk[t]=e,xk++}return e};!function(t,e){cx[t]=e}("measureText",function(t,e){var i=XL;vk||((vk=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",XL.body.appendChild(vk));try{vk.style.font=e}catch(t){}return vk.innerHTML="",vk.appendChild(i.createTextNode(t)),{width:vk.offsetWidth}});for(var wk=new jt,Sk=[px,je,qe,Nn,ib],Mk=0;Mk=o&&h+1>=a){for(var u=[],c=0;c=o&&c+1>=a)return Cv(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},Lv.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t._dom&&i.contains(t._dom))"function"==typeof e&&e();else{var n=this.add(t);n&&(t._dom=n)}}},Lv.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Lv.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},Lv.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},Lv.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},Lv.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Lv.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},Lv.prototype.getSvgProxy=function(t){return t instanceof Nn?Rk:t instanceof qe?Vk:t instanceof ib?Bk:Rk},Lv.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Lv.prototype.getSvgElement=function(t){return t.__svgEl},h(kv,Lv),kv.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getDefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.addDom(o)):o=i.add(a),i.markUsed(e);var s=o.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},kv.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Wy("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},kv.prototype.update=function(t){var e=this;Lv.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},kv.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Wy("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n0){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var h=Array.prototype.slice.call(r.transform);st(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=h}else l.brush(r);var u=this.getSvgElement(r);n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},Pv.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&Lv.prototype.markUsed.call(e,t._dom),t._textDom&&Lv.prototype.markUsed.call(e,t._textDom)})};var Zk=function(t,e){this.root=t,this.storage=e;var i=mv("svg");i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("version","1.1"),i.setAttribute("baseProfile","full"),i.style["user-select"]="none",this.gradientManager=new kv(i),this.clipPathManager=new Pv(i);var n=document.createElement("div");n.style.cssText="overflow: hidden;",this._svgRoot=i,this._viewport=n,t.appendChild(n),n.appendChild(i),this.resize(),this._visibleList=[]};Zk.prototype={constructor:Zk,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused();var e,i=this._svgRoot,n=this._visibleList,o=t.length,a=[];for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(){var t=this._getWidth(),e=this._getHeight();if(this._width!==t&&this._height!==e){this._width=t,this._height=e;var i=this._viewport.style;i.width=t+"px",i.height=e+"px";var n=this._svgRoot;n.setAttribute("width",t),n.setAttribute("height",e)}},getWidth:function(){return this._getWidth()},getHeight:function(){return this._getHeight()},_getWidth:function(){var t=this.root,e=document.defaultView.getComputedStyle(t);return(t.clientWidth||Ov(e.width))-Ov(e.paddingLeft)-Ov(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=document.defaultView.getComputedStyle(t);return(t.clientHeight||Ov(e.height))-Ov(e.paddingTop)-Ov(e.paddingBottom)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Zk.prototype[t]=Wv(t)}),xi("svg",Zk),t.version="3.8.4",t.dependencies=Cw,t.PRIORITY=Pw,t.init=function(t,e,i){var n=Qa(t);if(n)return n;var o=new za(t,e,i);return o.id="ec_"+Yw++,jw[o.id]=o,t.setAttribute?t.setAttribute(Kw,o.id):t[Kw]=o.id,Ka(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,d(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+$w++,d(e,function(e){e.group=t})}return qw[t]=!0,t},t.disConnect=Ja,t.disconnect=Qw,t.dispose=function(t){"string"==typeof t?t=jw[t]:t instanceof za||(t=Qa(t)),t instanceof za&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=Qa,t.getInstanceById=function(t){return jw[t]},t.registerTheme=function(t,e){Uw[t]=e},t.registerPreprocessor=tr,t.registerProcessor=er,t.registerPostUpdate=function(t){Fw.push(t)},t.registerAction=ir,t.registerCoordinateSystem=nr,t.getCoordinateSystemDimensions=function(t){var e=ua.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=or,t.registerVisual=ar,t.registerLoading=rr,t.extendComponentModel=sr,t.extendComponentView=lr,t.extendSeriesModel=hr,t.extendChartView=ur,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,i){e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),Jw[t]={geoJson:e,specialAreas:i}},t.getMap=cr,t.dataTool=tS,t.zrender=Nx,t.graphic=Tb,t.number=Bx,t.format=Xx,t.throttle=Da,t.helper=HS,t.matrix=yy,t.vector=cy,t.color=Ny,t.util=qS,t.List=aS,t.Model=Lo,t.Axis=US,t.env=Uv,t.parseGeoJson=jS});