System.register(["./prismjs-legacy-BN0FEcG9.js?v=1773287522785"],(function(t,e){"use strict";var n;return{setters:[t=>{n=t.c}],execute:function(){t({C:z,D:O,E:ky,F:Py,G:Dy,I:A,J:k,K:jr,M:_m,P:uc,S:ao,U:R,W:Nd,X:V_,Y:B_,_:C,a:Dz,a0:U,a1:Wy,a2:yx,a4:ei,a6:nb,a7:VI,a8:function(t,e){if("world"===t){var n=Bit[e.name];if(n){var i=[n[0],n[1]];e.setCenter(i)}}},a9:B,aa:go,ac:Id,ad:oe,ae:xd,af:K,ag:Td,ah:Cd,ai:Ey,al:function(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||o=0;s--){var l=i[s].dimension,u=e.dimensions[l],h=e.getDimensionInfo(u);if("x"===(r=h&&h.coordDim)||"y"===r){a=i[s];break}}if(a){var c=n.getAxis(r),d=t.map(a.stops,(function(t){return{coord:c.toGlobalCoord(c.dataToCoord(t.value)),color:t.color}})),p=d.length,f=a.outerColors.slice();p&&d[0].coord>d[p-1].coord&&(d.reverse(),f.reverse());var g=10,v=d[0].coord-g,m=d[p-1].coord+g,y=m-v;if(y<.001)return"transparent";t.each(d,(function(t){t.offset=(t.coord-v)/y})),d.push({offset:p?d[p-1].offset:.5,color:f[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:f[0]||"transparent"});var x=new o.LinearGradient(0,0,0,0,d,!0);return x[r]=v,x[r+"2"]=m,x}}}function S(e,n,i){var r=e.get("showAllSymbol"),o="auto"===r;if(!r||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!M(a,n))){var s=n.mapDimension(a.dim),l={};return t.each(a.getViewLabels(),(function(t){l[t.tickValue]=1})),function(t){return!l.hasOwnProperty(n.get(s,t))}}}}function M(t,e){var n=t.getExtent(),r=Math.abs(n[1]-n[0])/t.scale.count();isNaN(r)&&(r=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),s=0;sr)return!1;return!0}function I(t,e,n){if("cartesian2d"===t.type){var i=t.getBaseAxis().isHorizontal(),r=g(t,e,n);if(!n.get("clip",!0)){var o=r.shape,a=Math.max(o.width,o.height);i?(o.y-=a,o.height+=2*a):(o.x-=a,o.width+=2*a)}return r}return v(t,e,n)}var T=h.extend({type:"line",init:function(){var t=new o.Group,e=new n;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(e,n,i){var r=e.coordinateSystem,o=this.group,a=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),u=a.mapArray(a.getItemLayout),h="polar"===r.type,c=this._coordSys,p=this._symbolDraw,f=this._polyline,g=this._polygon,v=this._lineGroup,y=e.get("animation"),M=!l.isEmpty(),T=l.get("origin"),C=_(r,a,d(r,a,T)),A=e.get("showSymbol"),D=A&&!h&&S(e,a,r),L=this._data;L&&L.eachItemGraphicEl((function(t,e){t.__temp&&(o.remove(t),L.setItemGraphicEl(e,null))})),A||p.remove(),o.add(v);var k,P=!h&&e.get("step");r&&r.getArea&&e.get("clip",!0)&&(null!=(k=r.getArea()).width?(k.x-=.1,k.y-=.1,k.width+=.2,k.height+=.2):k.r0&&(k.r0-=.5,k.r1+=.5)),this._clipShapeForSymbol=k,f&&c.type===r.type&&P===this._step?(M&&!g?g=this._newPolygon(u,C,r,y):g&&!M&&(v.remove(g),g=this._polygon=null),v.setClipPath(I(r,!1,e)),A&&p.updateData(a,{isIgnore:D,clipShape:k}),a.eachItemGraphicEl((function(t){t.stopAnimation(!0)})),m(this._stackedOnPoints,C)&&m(this._points,u)||(y?this._updateAnimation(a,C,r,i,P,T):(P&&(u=b(u,r,P),C=b(C,r,P)),f.setShape({points:u}),g&&g.setShape({points:u,stackedOnPoints:C})))):(A&&p.updateData(a,{isIgnore:D,clipShape:k}),P&&(u=b(u,r,P),C=b(C,r,P)),f=this._newPolyline(u,r,y),M&&(g=this._newPolygon(u,C,r,y)),v.setClipPath(I(r,!0,e)));var O=w(a,r)||a.getVisual("color");f.useStyle(t.defaults(s.getLineStyle(),{fill:"none",stroke:O,lineJoin:"bevel"}));var R=e.get("smooth");if(R=x(e.get("smooth")),f.setShape({smooth:R,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),g){var N=a.getCalculationInfo("stackedOnSeries"),E=0;g.useStyle(t.defaults(l.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel"})),N&&(E=x(N.get("smooth"))),g.setShape({smooth:R,stackedOnSmooth:E,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=a,this._coordSys=r,this._stackedOnPoints=C,this._points=u,this._step=P,this._valueOrigin=T},dispose:function(){},highlight:function(t,e,n,r){var o=t.getData(),s=a.queryDataIndex(o,r);if(!(s instanceof Array)&&null!=s&&s>=0){var l=o.getItemGraphicEl(s);if(!l){var u=o.getItemLayout(s);if(!u)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(u[0],u[1]))return;(l=new i(o,s)).position=u,l.setZ(t.get("zlevel"),t.get("z")),l.ignore=isNaN(u[0])||isNaN(u[1]),l.__temp=!0,o.setItemGraphicEl(s,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else h.prototype.highlight.call(this,t,e,n,r)},downplay:function(t,e,n,i){var r=t.getData(),o=a.queryDataIndex(r,i);if(null!=o&&o>=0){var s=r.getItemGraphicEl(o);s&&(s.__temp?(r.setItemGraphicEl(o,null),this.group.remove(s)):s.downplay())}else h.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new l({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new u({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(t,e,n,i,a,s){var l=this._polyline,u=this._polygon,h=t.hostModel,c=r(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,s),d=c.current,p=c.stackedOnCurrent,f=c.next,g=c.stackedOnNext;if(a&&(d=b(c.current,n,a),p=b(c.stackedOnCurrent,n,a),f=b(c.next,n,a),g=b(c.stackedOnNext,n,a)),y(d,f)>3e3||u&&y(p,g)>3e3)return l.setShape({points:f}),void(u&&u.setShape({points:f,stackedOnPoints:g}));l.shape.__points=c.current,l.shape.points=d,o.updateProps(l,{shape:{points:f}},h),u&&(u.setShape({points:d,stackedOnPoints:p}),o.updateProps(u,{shape:{points:f,stackedOnPoints:g}},h));for(var v=[],m=c.status,x=0;xt&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});EJ=e}(),function(){if(ZJ)return YJ;ZJ=1,cW().__DEV__;var t=s$(),e=bW(),n=zX(),i=qJ().setLabel,r=VX(),o=KJ(),a=PZ(),s=PU(),l=_q().throttle,u=B$().createClipPath,h=function(){if(UJ)return WJ;UJ=1;var t=zX().extendShape,e=t({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),p=Math.cos(u),f=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+n,d*r+i),t.arc(c*s+n,d*s+i,a,-Math.PI+l,l,!h)),t.arc(n,i,o,l,u,!h),t.moveTo(p*o+n,f*o+i),t.arc(p*s+n,f*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveTo(c*r+n,f*r+i)),t.closePath()}});return WJ=e}(),c=["itemStyle","barBorderWidth"],d=[0,0];function p(t,e){var n=t.getArea&&t.getArea();if("cartesian2d"===t.type){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}e.extend(r.prototype,o);var f=t.extendChartView({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var r,o=this.group,a=t.getData(),l=this._data,u=t.coordinateSystem,h=u.getBaseAxis();"cartesian2d"===u.type?r=h.isHorizontal():"polar"===u.type&&(r="angle"===h.dim);var c=t.isAnimationEnabled()?t:null,d=t.get("clip",!0),f=p(u,a);o.removeClipPath();var g=t.get("roundCap",!0),v=t.get("showBackground",!0),w=t.getModel("backgroundStyle"),M=w.get("barBorderRadius")||0,I=[],T=this._backgroundEls||[],C=function(t){var e=b[u.type](a,t),n=P(u,r,e);return n.useStyle(w.getBarItemStyle()),"cartesian2d"===u.type&&n.setShape("r",M),I[t]=n,n};a.diff(l).add((function(e){var n=a.getItemModel(e),i=b[u.type](a,e,n);if(v&&C(e),a.hasValue(e)){if(d&&m[u.type](f,i))return void o.remove(s);var s=y[u.type](e,i,r,c,!1,g);a.setItemGraphicEl(e,s),o.add(s),S(s,a,e,n,i,t,r,"polar"===u.type)}})).update((function(e,i){var s=a.getItemModel(e),h=b[u.type](a,e,s);if(v){var p;0===T.length?p=C(i):((p=T[i]).useStyle(w.getBarItemStyle()),"cartesian2d"===u.type&&p.setShape("r",M),I[e]=p);var x=b[u.type](a,e),_=k(r,x,u);n.updateProps(p,{shape:_},c,e)}var A=l.getItemGraphicEl(i);if(a.hasValue(e)){if(d&&m[u.type](f,h))return void o.remove(A);A?n.updateProps(A,{shape:h},c,e):A=y[u.type](e,h,r,c,!0,g),a.setItemGraphicEl(e,A),o.add(A),S(A,a,e,s,h,t,r,"polar"===u.type)}else o.remove(A)})).remove((function(t){var e=l.getItemGraphicEl(t);"cartesian2d"===u.type?e&&x(t,c,e):e&&_(t,c,e)})).execute();var A=this._backgroundGroup||(this._backgroundGroup=new s);A.removeAll();for(var D=0;D0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function w(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function S(t,r,o,a,s,l,u,h){var c=r.getItemVisual(o,"color"),d=r.getItemVisual(o,"opacity"),p=r.getVisual("borderColor"),f=a.getModel("itemStyle"),g=a.getModel("emphasis.itemStyle").getBarItemStyle();h||t.setShape("r",f.get("barBorderRadius")||0),t.useStyle(e.defaults({stroke:w(s)?"none":p,fill:w(s)?"none":c,opacity:d},f.getBarItemStyle()));var v=a.getShallow("cursor");v&&t.attr("cursor",v);var m=u?s.height>0?"bottom":"top":s.width>0?"left":"right";h||i(t.style,g,a,c,l,o,m),w(s)&&(g.fill=g.stroke="none"),n.setHoverStyle(t,g)}function M(t,e){var n=t.get(c)||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,r)}var I=a.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o=0?n:null}),30,!1);function A(t,e,n){var i=t.__baseDimIdx,r=1-i,o=t.shape.points,a=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];d[0]=e,d[1]=n;for(var u=d[i],h=d[1-i],c=u-s,p=u+s,f=0,g=o.length/2;f=c&&m<=p&&(l<=y?h>=l&&h<=y:h>=y&&h<=l))return a[f]}return-1}function D(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function L(t,e,n){var i=e.get("borderColor")||e.get("color"),r=e.getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function k(t,e,n){var i,r="polar"===n.type;return i=r?n.getArea():n.grid.getRect(),r?{cx:i.cx,cy:i.cy,r0:t?i.r0:e.r0,r:t?i.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:i.x,y:t?i.y:e.y,width:t?e.width:i.width,height:t?i.height:e.height}}function P(t,e,i){return new("polar"===t.type?n.Sector:n.Rect)({shape:k(e,i,t),silent:!0,z2:0})}YJ=f}(),OJ(),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,e.curry(i,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,r),t.registerVisual({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}})}(),function(){if(mQ)return yQ;mQ=1;var t=s$(),e=bW();(function(){if(rQ)return iQ;rQ=1;var t=s$(),e=xQ(),n=bW(),i=AY(),r=YX().getPercentWithPrecision,o=_Q(),a=Gj().retrieveRawAttr,s=Lj().makeSeriesEncodeForNameBased,l=bQ(),u=t.extendSeriesModel({type:"series.pie",init:function(t){u.superApply(this,"init",arguments),this.legendVisualProvider=new l(n.bind(this.getData,this),n.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){u.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,i){return e(this,{coordDimensions:["value"],encodeDefaulter:n.curry(s,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,r=t.count();i0&&(c?"scale"!==d:"transition"!==p)){for(var v=s.getItemLayout(0),m=1;isNaN(v.startAngle)&&m=n.r0}}}),l=s;oQ=l}();var n=wQ(),i=SQ(),r=IQ(),o=TQ();n("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),t.registerVisual(i("pie")),t.registerLayout(e.curry(r,"pie")),t.registerProcessor(o("pie"))}(),function(){if(PQ)return $Q;PQ=1;var t=s$();(function(){if(AQ)return CQ;AQ=1;var t=hK(),e=tq(),n=e.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,n){return t(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});CQ=n})(),function(){if(kQ)return JQ;kQ=1;var t=s$(),e=x$(),n=function(){if(LQ)return DQ;LQ=1;var t=zX(),e=HK().createSymbol,n=EX(),i=4,r=t.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var n=e.points,r=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&r[0]=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1}});function o(){this.group=new t.Group}var a=o.prototype;a.isPersistent=function(){return!this._incremental},a.updateData=function(t,e){this.group.removeAll();var n=new r({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},a.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild((function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)}))}},a.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new n({silent:!0})),this.group.add(this._incremental)):this._incremental=null},a.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new r,this._incremental.addDisplayable(i,!0)):((i=new r({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental,n)},a._setCommon=function(t,n,r,o){var a=n.hostModel;o=o||{};var s=n.getVisual("symbolSize");t.setShape("size",s instanceof Array?s:[s,s]),t.softClipShape=o.clipShape||null,t.symbolProxy=e(n.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var l=t.shape.size[0]=0&&(t.dataIndex=n+(t.startIndex||0))})))},a.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},a._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var s=o;return DQ=s}(),i=G$();t.extendChartView({type:"scatter",render:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var r=t.getData();if(this.group.dirty(),!this._finished||r.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var o=i().reset(t);o.progress&&o.progress({start:0,end:r.count()},r),this._symbolDraw.updateLayout(r)},_getClipShape:function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},_updateSymbolDraw:function(t,i){var r=this._symbolDraw,o=i.pipelineContext.large;return r&&o===this._isLargeDraw||(r&&r.remove(),r=this._symbolDraw=o?new n:new e,this._isLargeDraw=o,this.group.removeAll()),this.group.add(r.group),r},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})}();var e=F$(),n=G$();OJ(),t.registerVisual(e("scatter","circle")),t.registerLayout(n("scatter"))}(),function(){if(KQ)return QQ;KQ=1;var t=s$();GQ||(GQ=1,function(){if(EQ)return NQ;EQ=1;var t=bW(),e=function(){if(RQ)return OQ;RQ=1;var t=bW(),e=o$();function n(t,n,i){e.call(this,t,n,i),this.type="value",this.angle=0,this.name="",this.model}t.inherits(n,e);var i=n;return OQ=i}(),n=IK(),i=YX(),r=zK(),o=r.getScaleExtent,a=r.niceScaleExtent,s=Oj(),l=EK();function u(i,r,o){this._model=i,this.dimensions=[],this._indicatorAxes=t.map(i.getIndicatorModels(),(function(t,i){var r="indicator_"+i,o=new e(r,"log"===t.get("axisType")?new l:new n);return o.name=t.get("name"),o.model=t,t.axis=o,this.dimensions.push(r),o}),this),this.resize(i,o),this.cx,this.cy,this.r,this.r0,this.startAngle}u.prototype.getIndicatorAxes=function(){return this._indicatorAxes},u.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},u.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},u.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var r,o=Math.atan2(-n,e),a=1/0,s=-1,l=0;ln[0]&&isFinite(f)&&isFinite(n[0]));else{s.getTicks().length-1>l&&(d=u(d));var p=Math.ceil(n[1]/d)*d,f=i.round(p-d*l);s.setExtent(f,p),s.setInterval(d)}}))},u.dimensions=[],u.create=function(t,e){var n=[];return t.eachComponent("radar",(function(i){var r=new u(i,t,e);n.push(r),i.coordinateSystem=r})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("radarIndex")||0])})),n},s.register("radar",u);var h=u;NQ=h}(),function(){if(VQ)return zQ;VQ=1;var t=s$(),e=bW(),n=sJ(),i=VX(),r=VK(),o=n.valueAxis;function a(t,n){return e.defaults({show:n},t)}var s=t.extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),o=this.get("scale"),a=this.get("axisLine"),s=this.get("axisTick"),l=this.get("axisType"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),f=this.get("triggerEvent"),g=e.map(this.get("indicator")||[],(function(g){null!=g.max&&g.max>0&&!g.min?g.min=0:null!=g.min&&g.min<0&&!g.max&&(g.max=0);var v=h;if(null!=g.color&&(v=e.defaults({color:g.color},h)),g=e.merge(e.clone(g),{boundaryGap:t,splitNumber:n,scale:o,axisLine:a,axisTick:s,axisType:l,axisLabel:u,name:g.text,nameLocation:"end",nameGap:p,nameTextStyle:v,triggerEvent:f},!1),c||(g.name=""),"string"==typeof d){var m=g.name;g.name=d.replace("{value}",null!=m?m:"")}else"function"==typeof d&&(g.name=d(g.name,g));var y=e.extend(new i(g,null,this.ecModel),r);return y.mainType="radar",y.componentIndex=this.componentIndex,y}),this);this.getIndicatorModels=function(){return g}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:e.merge({lineStyle:{color:"#bbb"}},o.axisLine),axisLabel:a(o.axisLabel,!1),axisTick:a(o.axisTick,!1),axisType:"interval",splitLine:a(o.splitLine,!0),splitArea:a(o.splitArea,!0),indicator:[]}}),l=s;zQ=l}(),function(){if(FQ)return BQ;FQ=1,cW().__DEV__;var t=s$(),e=bW(),n=gJ(),i=zX(),r=["axisLine","axisTickLabel","axisName"],o=t.extendComponentView({type:"radar",render:function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var i=t.coordinateSystem,o=i.getIndicatorAxes(),a=e.map(o,(function(t){return new n(t.model,{position:[i.cx,i.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));e.each(a,(function(t){e.each(r,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var n=t.coordinateSystem,r=n.getIndicatorAxes();if(r.length){var o=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),h=a.get("show"),c=s.get("show"),d=l.get("color"),p=u.get("color");d=e.isArray(d)?d:[d],p=e.isArray(p)?p:[p];var f=[],g=[];if("circle"===o)for(var v=r[0].getTicksCoords(),m=n.cx,y=n.cy,x=0;x":"\n";return i(""===l?this.name:l)+u+n.map(s,(function(e,n){var r=a.get(a.mapDimension(e.dim),t);return i(e.name+" : "+r)})).join(u)},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,r=e.getValues(n.map(i.dimensions,(function(t){return e.mapDimension(t)})),t,!0),o=0,a=r.length;o":"\n";return h.join(", ")+f+r(l+" : "+s)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});t.mixin(h,a);var c=h;g0=c})(),function(){if(R0)return O0;R0=1;var t=s$(),e=bW(),n=zX(),i=z0(),r="__seriesMapHighDown",o="__seriesMapCallKey",a=t.extendChartView({type:"map",render:function(t,e,n,r){if(!r||"mapToggleSelect"!==r.type||r.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(r&&"geoRoam"===r.type&&"series"===r.componentType&&r.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new i(n,!0);o.add(a.group),a.draw(t,e,n,this,r),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,i,a){var u=t.originalData,h=this.group;u.each(u.mapDimension("value"),(function(i,a){if(!isNaN(i)){var c=u.getItemLayout(a);if(c&&c.point){var d=c.point,p=c.offset,f=new n.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:d[0]+9*p,cy:d[1],r:3},silent:!0,z2:8+(p?0:n.Z2_EMPHASIS_LIFT+1)});if(!p){var g=t.mainSeries.getData(),v=u.getName(a),m=g.indexOfName(v),y=u.getItemModel(a),x=y.getModel("label"),_=y.getModel("emphasis.label"),b=g.getItemGraphicEl(m),w=e.retrieve2(t.getFormattedLabel(m,"normal"),v),S=e.retrieve2(t.getFormattedLabel(m,"emphasis"),w),M=b[r],I=Math.random();if(!M){M=b[r]={};var T=e.curry(s,!0),C=e.curry(s,!1);b.on("mouseover",T).on("mouseout",C).on("emphasis",T).on("normal",C)}b[o]=I,e.extend(M,{recordVersion:I,circle:f,labelModel:x,hoverLabelModel:_,emphasisText:S,normalText:w}),l(M,!1)}h.add(f)}}}))}});function s(t){var e=this[r];e&&e.recordVersion===this[o]&&l(e,t)}function l(t,e){var i=t.circle,r=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,s=t.normalText;e?(i.style.extendFrom(n.setTextStyle({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=n.Z2_EMPHASIS_LIFT):(n.setTextStyle(i.style,r,{text:r.get("show")?s:null,textPosition:r.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}O0=a}(),r1(),a1();var e=s1(),n=l1(),i=u1(),r=h1(),o=wQ();t.registerLayout(e),t.registerVisual(n),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,i),t.registerPreprocessor(r),o("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}])}(),function(){if(D1)return m1;D1=1;var t=s$();(function(){if(v1)return g1;v1=1;var t=tq(),e=x1(),n=ij().encodeHTML,i=VX(),r=t.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var n={name:t.name,children:t.data},r=t.leaves||{},o=new i(r,this,this.ecModel),a=e.createTree(n,this,s);function s(t){t.wrapMethod("getItemModel",(function(t,e){var n=a.getNodeByDataIndex(e);return n.children.length&&n.isExpand||(t.parentModel=o),t}))}var l=0;a.eachNode("preorder",(function(t){t.depth>l&&(l=t.depth)}));var u=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return a.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=u})),a.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],r=e.getNodeByDataIndex(t),o=r.getValue(),a=r.name;r&&r!==i;)a=r.parentNode.name+"."+a,r=r.parentNode;return n(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});g1=r})(),function(){if(w1)return b1;w1=1;var t=bW(),e=zX(),n=y$(),i=M1().radialCoordinate,r=s$(),o=jY(),a=o1(),s=D0(),l=T0(),u=E0().onIrrelevantElement;cW().__DEV__;var h=YX().parsePercent,c=e.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=h(e.forkPosition,1),d=[];d[l]=r[l],d[u]=r[u]+(a[u]-r[u])*c,t.moveTo(r[0],r[1]),t.lineTo(d[0],d[1]),t.moveTo(o[0],o[1]),d[l]=o[l],t.lineTo(d[0],d[1]),d[l]=a[l],t.lineTo(d[0],d[1]),t.lineTo(a[0],a[1]);for(var p=1;pS.x)||(_-=Math.PI);var T=b?"left":"right",C=s.labelModel.get("rotate"),A=C*(Math.PI/180);x.setStyle({textPosition:s.labelModel.get("position")||T,textRotation:null==C?-_:A,textOrigin:"center",verticalAlign:"middle"})}v(a,u,c,r,m,g,y,o,s)}function v(n,i,r,o,a,s,l,u,h){var d=h.edgeShape,p=o.__edge;if("curve"===d)i.parentNode&&i.parentNode!==r&&(p||(p=o.__edge=new e.BezierCurve({shape:y(h,a,a),style:t.defaults({opacity:0,strokeNoScale:!0},h.lineStyle)})),e.updateProps(p,{shape:y(h,s,l),style:t.defaults({opacity:1},h.lineStyle)},n));else if("polyline"===d&&"orthogonal"===h.layout&&i!==r&&i.children&&0!==i.children.length&&!0===i.isExpand){for(var f=i.children,g=[],v=0;v=0;m--){var y=v[m],x=y.node,_=y.width,b=y.text;g>f.width&&(g-=_-d,_=d,b=null);var w=new t.Polygon({shape:{points:l(c,0,_,p,m===v.length-1,0===m)},style:n.defaults(a.getItemStyle(),{lineJoin:"bevel",text:b,textFill:s.getTextColor(),textFont:s.getFont()}),z:10,onclick:n.curry(h,x)});this.group.add(w),u(w,i,x),c+=_+o}},remove:function(){this.group.removeAll()}};var h=s;return E1=h}(),a=T0(),s=kU(),l=$W(),u=function(){if(G1)return J1;G1=1;var t=bW();function e(){var e,n=[],i={};return{add:function(e,r,o,a,s){return t.isString(a)&&(s=a,a=0),!i[e.id]&&(i[e.id]=1,n.push({el:e,target:r,time:o,delay:a,easing:s}),!0)},done:function(t){return e=t,this},start:function(){for(var t=n.length,r=0,o=n.length;rv||Math.abs(t.dy)>v)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},_onZoom:function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new s(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var u=l.create();l.translate(u,u,[-e,-n]),l.scale(u,u,[t.scale,t.scale]),l.translate(u,u,[e,n]),o.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){t.on("click",(function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var n=this.findTarget(t.offsetX,t.offsetY);if(n){var i=n.node;if(i.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===e)this._zoomToNode(n);else if("link"===e){var r=i.hostTree.data.getItemModel(i.dataIndex),o=r.get("link",!0),a=r.get("target",!0)||"blank";o&&c(o,a)}}}}}),this)},_renderBreadcrumb:function(t,e,n){function i(e){"animating"!==this._state&&(r.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new o(this.group))).render(t,e,n.node,d(i,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=C(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n}});function C(){return{nodeGroup:[],background:[],content:[]}}function A(t,i,r,o,a,s,l,u,h,c){if(l){var d=l.getLayout(),g=t.getData();if(g.setItemGraphicEl(l.dataIndex,null),d&&d.isInView){var v=d.width,b=d.height,T=d.borderWidth,C=d.invisible,A=l.getRawIndex(),L=u&&u.getRawIndex(),k=l.viewChildren,P=d.upperHeight,O=k&&k.length,R=l.getModel("itemStyle"),N=l.getModel("emphasis.itemStyle"),E=Y("nodeGroup",p);if(E){if(h.add(E),E.attr("position",[d.x||0,d.y||0]),E.__tmNodeWidth=v,E.__tmNodeHeight=b,d.isAboveViewRoot)return E;var z=l.getModel(),V=Y("background",f,c,w);if(V&&F(E,V,O&&d.upperLabelHeight),O)n.isHighDownDispatcher(E)&&n.setAsHighDownDispatcher(E,!1),V&&(n.setAsHighDownDispatcher(V,!0),g.setItemGraphicEl(l.dataIndex,V));else{var B=Y("content",f,c,S);B&&G(E,B),V&&n.isHighDownDispatcher(V)&&n.setAsHighDownDispatcher(V,!1),n.setAsHighDownDispatcher(E,!0),g.setItemGraphicEl(l.dataIndex,E)}return E}}}function F(e,i,r){if(i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:v,height:b}),C)H(i);else{i.invisible=!1;var o=l.getVisual("borderColor",!0),a=N.get("borderColor"),s=I(R);s.fill=o;var u=M(N);if(u.fill=a,r){var h=v-2*T;W(s,u,o,h,P,{x:T,y:0,width:h,height:P})}else s.text=u.text=null;i.setStyle(s),n.setElementHoverStyle(i,u)}e.add(i)}function G(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var r=Math.max(v-2*T,0),o=Math.max(b-2*T,0);if(i.culling=!0,i.setShape({x:T,y:T,width:r,height:o}),C)H(i);else{i.invisible=!1;var a=l.getVisual("color",!0),s=I(R);s.fill=a;var u=M(N);W(s,u,a,r,o),i.setStyle(s),n.setElementHoverStyle(i,u)}e.add(i)}function H(t){!t.invisible&&s.push(t)}function W(i,r,o,a,s,u){var h=z.get("name"),c=z.getModel(u?x:m),p=z.getModel(u?_:y),f=c.getShallow("show");n.setLabelStyle(i,r,c,p,{defaultText:f?h:null,autoColor:o,isRectText:!0,labelFetcher:t,labelDataIndex:l.dataIndex,labelProp:u?"upperLabel":"label"}),U(i,u,d),U(r,u,d),u&&(i.textRect=e.clone(u)),i.truncate=f&&c.get("ellipsis")?{outerWidth:a,outerHeight:s,minChar:2}:null}function U(e,n,i){var r=e.text;if(!n&&i.isLeafRoot&&null!=r){var o=t.get("drillDownIcon",!0);e.text=o?o+" "+r:r}}function Y(t,e,n,o){var s=null!=L&&r[t][L],l=a[t];return s?(r[t][L]=null,Z(l,s,t)):C||((s=new e({z:D(n,o)})).__tmDepth=n,s.__tmStorageName=t,X(l,s,t)),i[t][A]=s}function Z(t,n,i){(t[A]={}).old="nodeGroup"===i?n.position.slice():e.extend({},n.shape)}function X(t,e,n){var i=t[A]={},r=l.parentNode;if(r&&(!o||"drillDown"===o.direction)){var s=0,u=0,h=a.background[r.getRawIndex()];!o&&h&&h.old&&(s=h.old.width,u=h.old.height),i.old="nodeGroup"===n?[0,u]:{x:s,y:u,width:0,height:0}}i.fadein="nodeGroup"!==n}}function D(t,e){var n=t*b+e;return(n-1)/n}H1=T}(),function(){if(U1)return Q1;U1=1;for(var t=s$(),e=F1(),n=function(){},i=["treemapZoomToNode","treemapRender","treemapMove"],r=0;r ")),r.value&&(u+=" : "+o(r.value)),u}return c.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=n.map(this.option.categories||[],(function(t){return null!=t.value?t:n.extend({value:0},t)})),i=new e(["value"],this);i.initData(t),this._categoriesData=i,this._categoriesModels=i.mapArray((function(t){return i.getItemModel(t,!0)}))},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return c.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}}}});h2=c})(),function(){if(C2)return T2;C2=1;var t=s$(),e=bW(),n=x$(),i=w2(),r=T0(),o=D0(),a=E0().onIrrelevantElement,s=zX(),l=L2(),u=D2().getNodeGlobalScale,h="__focusNodeAdjacency",c="__unfocusNodeAdjacency",d=["itemStyle","opacity"],p=["lineStyle","opacity"];function f(t,e){var n=t.getVisual("opacity");return null!=n?n:t.getModel().get(e)}function g(t,e,n){var i=t.getGraphicEl(),r=f(t,e);null!=n&&(null==r&&(r=1),r*=n),i.downplay&&i.downplay(),i.traverse((function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;null!=e&&null==n||(e=r),t.setStyle("opacity",e)}}))}function v(t,e){var n=f(t,e),i=t.getGraphicEl();i.traverse((function(t){!t.isGroup&&t.setStyle("opacity",n)})),i.highlight&&i.highlight()}var m=t.extendChartView({type:"graph",init:function(t,e){var o=new n,a=new i,s=this.group;this._controller=new r(e.getZr()),this._controllerHost={target:s},s.add(o.group),s.add(a.group),this._symbolDraw=o,this._lineDraw=a,this._firstRender=!0},render:function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,d=this.group;if("view"===r.type){var p={position:r.position,scale:r.scale};this._firstRender?d.attr(p):s.updateProps(d,p,t)}l(t.getGraph(),u(t));var f=t.getData();o.updateData(f);var g=t.getEdgeData();a.updateData(g),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var v=t.forceLayout,m=t.get("force.layoutAnimation");v&&this._startForceLayoutIteration(v,m),f.eachItemGraphicEl((function(e,r){var o=f.getItemModel(r);e.off("drag").off("dragend");var a=o.get("draggable");a&&e.on("drag",(function(){v&&(v.warmUp(),!this._layouting&&this._startForceLayoutIteration(v,m),v.setFixed(r),f.setItemLayout(r,e.position))}),this).on("dragend",(function(){v&&v.setUnfixed(r)}),this),e.setDraggable(a&&v),e[h]&&e.off("mouseover",e[h]),e[c]&&e.off("mouseout",e[c]),o.get("focusNodeAdjacency")&&(e.on("mouseover",e[h]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[c]=function(){i._dispatchUnfocus(n)}))}),this),f.graph.eachEdge((function(e){var r=e.getGraphicEl();r[h]&&r.off("mouseover",r[h]),r[c]&&r.off("mouseout",r[c]),e.getModel().get("focusNodeAdjacency")&&(r.on("mouseover",r[h]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),r.on("mouseout",r[c]=function(){i._dispatchUnfocus(n)}))}));var y="circular"===t.get("layout")&&t.get("circular.rotateLabel"),x=f.getLayout("cx"),_=f.getLayout("cy");f.eachItemGraphicEl((function(t,e){var n=f.getItemModel(e).get("label.rotate")||0,i=t.getSymbolPath();if(y){var r=f.getItemLayout(e),o=Math.atan2(r[1]-_,r[0]-x);o<0&&(o=2*Math.PI+o);var a=r[0]=t&&(0===e?0:r[e-1][0]).4?"bottom":"middle",textAlign:k<-.4?"left":k>.4?"right":"center"},{autoColor:E}),silent:!0}))}if(x.get("show")&&L!==b){for(var z=0;z<=w;z++){k=Math.cos(I),P=Math.sin(I);var V=new e.Line({shape:{x1:k*g+p,y1:P*g+f,x2:k*(g-M)+p,y2:P*(g-M)+f},silent:!0,style:D});"auto"===D.stroke&&V.setStyle({stroke:a((L+z/w)/b)}),d.add(V),I+=C}I-=C}else I+=T}},_renderPointer:function(n,i,o,s,l,u,h,c){var d=this.group,p=this._data;if(n.get("pointer.show")){var f=[+n.get("min"),+n.get("max")],g=[u,h],v=n.getData(),m=v.mapDimension("value");v.diff(p).add((function(i){var r=new t({shape:{angle:u}});e.initProps(r,{shape:{angle:a(v.get(m,i),f,g,!0)}},n),d.add(r),v.setItemGraphicEl(i,r)})).update((function(t,i){var r=p.getItemGraphicEl(i);e.updateProps(r,{shape:{angle:a(v.get(m,t),f,g,!0)}},n),d.add(r),v.setItemGraphicEl(t,r)})).remove((function(t){var e=p.getItemGraphicEl(t);d.remove(e)})).execute(),v.eachItemGraphicEl((function(t,n){var i=v.getItemModel(n),o=i.getModel("pointer");t.setShape({x:l.cx,y:l.cy,width:r(o.get("width"),l.r),r:r(o.get("length"),l.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",s(a(v.get(m,n),f,[0,1],!0))),e.setHoverStyle(t,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=v}else p&&p.eachItemGraphicEl((function(t){d.remove(t)}))},_renderTitle:function(t,n,i,o,s){var l=t.getData(),u=l.mapDimension("value"),h=t.getModel("title");if(h.get("show")){var c=h.get("offsetCenter"),d=s.cx+r(c[0],s.r),p=s.cy+r(c[1],s.r),f=+t.get("min"),g=+t.get("max"),v=t.getData().get(u,0),m=o(a(v,[f,g],[0,1],!0));this.group.add(new e.Text({silent:!0,style:e.setTextStyle({},h,{x:d,y:p,text:l.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:m,forceRich:!0})}))}},_renderDetail:function(t,n,i,o,s){var u=t.getModel("detail"),h=+t.get("min"),c=+t.get("max");if(u.get("show")){var d=u.get("offsetCenter"),p=s.cx+r(d[0],s.r),f=s.cy+r(d[1],s.r),g=r(u.get("width"),s.r),v=r(u.get("height"),s.r),m=t.getData(),y=m.get(m.mapDimension("value"),0),x=o(a(y,[h,c],[0,1],!0));this.group.add(new e.Text({silent:!0,style:e.setTextStyle({},u,{x:p,y:f,text:l(y,u.get("formatter")),textWidth:isNaN(g)?null:g,textHeight:isNaN(v)?null:v,textAlign:"center",textVerticalAlign:"middle"},{autoColor:x,forceRich:!0})}))}}}),c=h;c5=c}()),function(){if(S5)return M5;S5=1;var t=s$();(function(){if(y5)return m5;y5=1;var t=s$(),e=bW(),n=xQ(),i=AY().defaultEmphasis,r=Lj().makeSeriesEncodeForNameBased,o=bQ(),a=t.extendSeriesModel({type:"series.funnel",init:function(t){a.superApply(this,"init",arguments),this.legendVisualProvider=new o(e.bind(this.getData,this),e.bind(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,i){return n(this,{coordDimensions:["value"],encodeDefaulter:e.curry(r,this)})},_defaultLabelLine:function(t){i(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),n=a.superCall(this,"getDataParams",t),i=e.mapDimension("value"),r=e.getSum(i);return n.percent=r?+(e.get(i,t)/r*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});m5=a})(),function(){if(_5)return x5;_5=1;var t=zX(),e=bW(),n=iq();function i(e,n){t.Group.call(this);var i=new t.Polygon,r=new t.Polyline,o=new t.Text;this.add(i),this.add(r),this.add(o),this.highDownOnUpdate=function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,o.ignore=o.hoverIgnore):(r.ignore=r.normalIgnore,o.ignore=o.normalIgnore)},this.updateData(e,n,!0)}var r=i.prototype,o=["itemStyle","opacity"];r.updateData=function(n,i,r){var a=this.childAt(0),s=n.hostModel,l=n.getItemModel(i),u=n.getItemLayout(i),h=n.getItemModel(i).get(o);h=null==h?1:h,a.useStyle({}),r?(a.setShape({points:u.points}),a.setStyle({opacity:0}),t.initProps(a,{style:{opacity:h}},s,i)):t.updateProps(a,{style:{opacity:h},shape:{points:u.points}},s,i);var c=l.getModel("itemStyle"),d=n.getItemVisual(i,"color");a.setStyle(e.defaults({lineJoin:"round",fill:d},c.getItemStyle(["opacity"]))),a.hoverStyle=c.getModel("emphasis").getItemStyle(),this._updateLabel(n,i),t.setHoverStyle(this)},r._updateLabel=function(e,n){var i=this.childAt(1),r=this.childAt(2),o=e.hostModel,a=e.getItemModel(n),s=e.getItemLayout(n).label,l=e.getItemVisual(n,"color");t.updateProps(i,{shape:{points:s.linePoints||s.linePoints}},o,n),t.updateProps(r,{style:{x:s.x,y:s.y}},o,n),r.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=a.getModel("label"),h=a.getModel("emphasis.label"),c=a.getModel("labelLine"),d=a.getModel("emphasis.labelLine");l=e.getItemVisual(n,"color"),t.setLabelStyle(r.style,r.hoverStyle={},u,h,{labelFetcher:e.hostModel,labelDataIndex:n,defaultText:e.getName(n),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),r.ignore=r.normalIgnore=!u.get("show"),r.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle()},e.inherits(i,t.Group);var a=n.extend({type:"funnel",render:function(t,e,n){var r=t.getData(),o=this._data,a=this.group;r.diff(o).add((function(t){var e=new i(r,t);r.setItemGraphicEl(t,e),a.add(e)})).update((function(t,e){var n=o.getItemGraphicEl(e);n.updateData(r,t),a.add(n),r.setItemGraphicEl(t,n)})).remove((function(t){var e=o.getItemGraphicEl(t);a.remove(e)})).execute(),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),s=a;x5=s}();var e=SQ(),n=I5(),i=TQ();t.registerVisual(e("funnel")),t.registerLayout(n),t.registerProcessor(i("funnel"))}(),function(){if(h3)return A5;h3=1;var t=s$();g3(),function(){if(o3)return r3;o3=1;var t=bW(),e=t.each,n=t.createHashMap,i=tq(),r=hK(),o=i.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var n=this.getSource();return a(n,this),r(n,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,n=this.getData(),i=[];return e.eachActiveState(n,(function(e,r){t===e&&i.push(n.getRawIndex(r))})),i},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});function a(t,i){if(!t.encodeDefine){var r=i.ecModel.getComponent("parallel",i.get("parallelIndex"));if(r){var o=t.encodeDefine=n();e(r.dimensions,(function(t){var e=s(t);o.set(t,e)}))}}}function s(t){return+t.replace("dim","")}r3=o}(),function(){if(s3)return a3;s3=1;var t=zX(),e=iq(),n=.3,i=e.extend({type:"parallel",init:function(){this._dataGroup=new t.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,n,i,u){var h=this._dataGroup,c=e.getData(),d=this._data,p=e.coordinateSystem,f=p.dimensions,g=s(e);function v(t){l(a(c,h,t,f,p),c,t,g)}function m(n,i){var r=d.getItemGraphicEl(i),a=o(c,n,f,p);c.setItemGraphicEl(n,r);var s=u&&!1===u.animation?null:e;t.updateProps(r,{shape:{points:a}},s,n),l(r,c,n,g)}function y(t){var e=d.getItemGraphicEl(t);h.remove(e)}if(c.diff(d).add(v).update(m).remove(y).execute(),!this._initialized){this._initialized=!0;var x=r(p,e,(function(){setTimeout((function(){h.removeClipPath()}))}));h.setClipPath(x)}this._data=c},incrementalPrepareRender:function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,n){for(var i=e.getData(),r=e.coordinateSystem,o=r.dimensions,u=s(e),h=t.start;h=0&&(s[a[l].depth]=new i(a[l],this,n));if(o&&r)return e(o,r,this,!0,u).data;function u(t,e){t.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var n=this.parentModel,i=n.getData().getItemLayout(e).depth;return n.levelModels[i]||this.parentModel})),t})),e.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var n=this.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout().depth;return n.levelModels[i]||this.parentModel})),t}))}},setNodePosition:function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var o=this.getDataParams(t,i),a=o.data,s=a.source+" -- "+a.target;return o.value&&(s+=" : "+o.value),n(s)}if("node"===i){var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,i).data.name;return l&&(s=u+" : "+l),n(s)}return r.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var n=r.superCall(this,"getDataParams",t,e);if(null==n.value&&"node"===e){var i=this.getGraph().getNodeByIndex(t).getLayout().value;n.value=i}return n},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}});m3=r})(),function(){if(_3)return x3;_3=1;var t=zX(),e=s$(),n=bW(),i=["itemStyle","opacity"],r=["emphasis","itemStyle","opacity"],o=["lineStyle","opacity"],a=["emphasis","lineStyle","opacity"];function s(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function l(t,e,n){var i=t.getGraphicEl(),r=s(t,e);null!=n&&(null==r&&(r=1),r*=n),i.downplay&&i.downplay(),i.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",r)}))}function u(t,e){var n=s(t,e),i=t.getGraphicEl();i.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",n)})),i.highlight&&i.highlight()}var h=t.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var n=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}}),c=e.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,n,i){var r=this,o=e.getGraph(),a=this.group,s=e.layoutInfo,l=s.width,u=s.height,c=e.getData(),p=e.getData("edge"),f=e.get("orient");this._model=e,a.removeAll(),a.attr("position",[s.x,s.y]),o.eachEdge((function(n){var i=new h;i.dataIndex=n.dataIndex,i.seriesIndex=e.seriesIndex,i.dataType="edge";var r,o,s,c,d,g,v,m,y=n.getModel("lineStyle"),x=y.get("curveness"),_=n.node1.getLayout(),b=n.node1.getModel(),w=b.get("localX"),S=b.get("localY"),M=n.node2.getLayout(),I=n.node2.getModel(),T=I.get("localX"),C=I.get("localY"),A=n.getLayout();switch(i.shape.extent=Math.max(1,A.dy),i.shape.orient=f,"vertical"===f?(r=(null!=w?w*l:_.x)+A.sy,o=(null!=S?S*u:_.y)+_.dy,s=(null!=T?T*l:M.x)+A.ty,d=r,g=o*(1-x)+(c=null!=C?C*u:M.y)*x,v=s,m=o*x+c*(1-x)):(r=(null!=w?w*l:_.x)+_.dx,o=(null!=S?S*u:_.y)+A.sy,d=r*(1-x)+(s=null!=T?T*l:M.x)*x,g=o,v=r*x+s*(1-x),m=c=(null!=C?C*u:M.y)+A.ty),i.setShape({x1:r,y1:o,x2:s,y2:c,cpx1:d,cpy1:g,cpx2:v,cpy2:m}),i.setStyle(y.getItemStyle()),i.style.fill){case"source":i.style.fill=n.node1.getVisual("color");break;case"target":i.style.fill=n.node2.getVisual("color")}t.setHoverStyle(i,n.getModel("emphasis.lineStyle").getItemStyle()),a.add(i),p.setItemGraphicEl(n.dataIndex,i)})),o.eachNode((function(n){var i=n.getLayout(),r=n.getModel(),o=r.get("localX"),s=r.get("localY"),h=r.getModel("label"),d=r.getModel("emphasis.label"),p=new t.Rect({shape:{x:null!=o?o*l:i.x,y:null!=s?s*u:i.y,width:i.dx,height:i.dy},style:r.getModel("itemStyle").getItemStyle()}),f=n.getModel("emphasis.itemStyle").getItemStyle();t.setLabelStyle(p.style,f,h,d,{labelFetcher:e,labelDataIndex:n.dataIndex,defaultText:n.id,isRectText:!0}),p.setStyle("fill",n.getVisual("color")),t.setHoverStyle(p,f),a.add(p),c.setItemGraphicEl(n.dataIndex,p),p.dataType="node"})),c.eachItemGraphicEl((function(t,n){var o=c.getItemModel(n);o.get("draggable")&&(t.drift=function(t,o){r._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=o,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:c.getRawIndex(n),localX:this.shape.x/l,localY:this.shape.y/u})},t.ondragend=function(){r._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),o.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){r._focusAdjacencyDisabled||(r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){r._focusAdjacencyDisabled||r._dispatchUnfocus(i)}))})),p.eachItemGraphicEl((function(t,n){var o=p.getItemModel(n);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),o.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){r._focusAdjacencyDisabled||(r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){r._focusAdjacencyDisabled||r._dispatchUnfocus(i)}))})),!this._data&&e.get("animation")&&a.setClipPath(d(a.getBoundingRect(),e,(function(){a.removeClipPath()}))),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,s,h){var c=t.getData(),d=c.graph,p=h.dataIndex,f=c.getItemModel(p),g=h.edgeDataIndex;if(null!=p||null!=g){var v=d.getNodeByIndex(p),m=d.getEdgeByIndex(g);if(d.eachNode((function(t){l(t,i,.1)})),d.eachEdge((function(t){l(t,o,.1)})),v){u(v,r);var y=f.get("focusNodeAdjacency");"outEdges"===y?n.each(v.outEdges,(function(t){t.dataIndex<0||(u(t,a),u(t.node2,r))})):"inEdges"===y?n.each(v.inEdges,(function(t){t.dataIndex<0||(u(t,a),u(t.node1,r))})):"allEdges"===y&&n.each(v.edges,(function(t){t.dataIndex<0||(u(t,a),t.node1!==v&&u(t.node1,r),t.node2!==v&&u(t.node2,r))}))}m&&(u(m,a),u(m.node1,r),u(m.node2,r))}},unfocusNodeAdjacency:function(t,e,n,r){var a=t.getGraph();a.eachNode((function(t){l(t,i)})),a.eachEdge((function(t){l(t,o)}))}});function d(e,n,i){var r=new t.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return t.initProps(r,{shape:{width:e.width+20}},n,i),r}x3=c}(),function(){if(b3)return A3;b3=1;var t=s$();G2(),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},(function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])}))}))}();var e=D3(),n=L3();t.registerLayout(e),t.registerVisual(n)}(),function(){if(F3)return G3;F3=1;var t=s$();(function(){if(O3)return P3;O3=1;var t=bW(),e=tq(),n=W3().seriesModelMixin,i=e.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});t.mixin(i,n,!0),P3=i})(),function(){if(N3)return R3;N3=1;var t=bW(),e=iq(),n=zX(),i=PZ(),r=["itemStyle"],o=["emphasis","itemStyle"],a=e.extend({type:"boxplot",render:function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=l(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?u(s,n,i,t):n=l(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},remove:function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},dispose:t.noop}),s=i.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i0?"P":"N",a=i.getVisual("borderColor"+r)||i.getVisual("color"+r),l=n.getModel(o).getItemStyle(s);e.useStyle(l),e.style.fill=null,e.style.stroke=a}var m=l;j3=m}();var e=function(){if($3)return K3;$3=1;var t=bW();function e(e){e&&t.isArray(e.series)&&t.each(e.series,(function(e){t.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))}return K3=e}(),n=r4(),i=o4();t.registerPreprocessor(e),t.registerVisual(n),t.registerLayout(i)}(),function(){if(d4)return z4;d4=1;var t=s$();(function(){if(s4)return a4;s4=1;var t=hK(),e=tq(),n=e.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,n){return t(this.getSource(),this,{useEncodeDefaulter:!0})},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}});a4=n})(),function(){if(c4)return h4;c4=1;var t=s$(),e=x$(),n=function(){if(u4)return l4;u4=1;var t=bW(),e=HK().createSymbol,n=zX().Group,i=YX().parsePercent,r=y$(),o=3;function a(e){return t.isArray(e)||(e=[+e,+e]),e}function s(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}function l(t,e){n.call(this);var i=new r(t,e),o=new n;this.add(i),this.add(o),o.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var u=l.prototype;u.stopEffectAnimation=function(){this.childAt(1).removeAll()},u.startEffectAnimation=function(t){for(var n=t.symbolType,i=t.color,r=this.childAt(1),a=0;a "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},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,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});p4=h})(),function(){if(T4)return I4;T4=1,cW().__DEV__;var t=s$(),e=w2(),n=B4(),i=b2(),r=F4(),o=function(){if(_4)return x4;_4=1;var t=F4(),e=bW(),n=B4(),i=AW();function r(t,e,i){n.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}var o=r.prototype;o.createLine=function(e,n,i){return new t(e,n,i)},o.updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],r=0,o=1;o=0&&!(r[s]<=e);s--);s=Math.min(s,o-2)}else{for(var s=a;se);s++);s=Math.min(s-1,o-2)}i.lerp(t.position,n[s],n[s+1],(e-r[s])/(r[s+1]-r[s]));var l=n[s+1][0]-n[s][0],u=n[s+1][1]-n[s][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=e,t.ignore=!1}},e.inherits(r,n);var a=r;return x4=a}(),a=function(){if(w4)return b4;w4=1;var t=zX(),e=EX(),n=QY(),i=oZ(),r=t.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r0){t.moveTo(n[r++],n[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*i,d=(l+h)/2-(u-s)*i;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var r=this.shape,o=r.segs,a=r.curveness;if(r.polyline)for(var s=0,l=0;l0)for(var h=o[l++],c=o[l++],d=1;d0){var g=(h+p)/2-(c-f)*a,v=(c+f)/2-(p-h)*a;if(i.containStroke(h,c,g,v,p,f))return s}else if(n.containStroke(h,c,p,f))return s;s++}return-1}});function o(){this.group=new t.Group}var a=o.prototype;a.isPersistent=function(){return!this._incremental},a.updateData=function(t){this.group.removeAll();var e=new r({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},a.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new e({silent:!0})),this.group.add(this._incremental)):this._incremental=null},a.incrementalUpdate=function(t,e){var n=new r;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},a.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},a._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("color");r&&t.setStyle("stroke",r),t.setStyle("fill"),n||(t.seriesIndex=i.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(t.dataIndex=n+t.__startIndex)})))},a._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var s=o;return b4=s}(),s=G4(),l=B$().createClipPath,u=t.extendChartView({type:"lines",init:function(){},render:function(t,e,n){var i=t.getData(),r=this._updateLineDraw(i,t),o=t.get("zlevel"),a=t.get("effect.trailLength"),s=n.getZr(),u="svg"===s.painter.getType();u||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||u||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a&&(u||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var h=t.get("clip",!0)&&l(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=s.reset(t);o.progress&&o.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(t,s){var l=this._lineDraw,u=this._showEffect(s),h=!!s.get("polyline"),c=s.pipelineContext.large;return l&&u===this._hasEffet&&h===this._isPolyline&&c===this._isLargeDraw||(l&&l.remove(),l=this._lineDraw=c?new a:new e(h?u?o:r:u?n:i),this._hasEffet=u,this._isPolyline=h,this._isLargeDraw=c,this.group.removeAll()),this.group.add(l.group),l},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});I4=u}();var e=G4(),n=H4();t.registerLayout(e),t.registerVisual(n)}(),E4||(E4=1,function(){if(k4)return L4;k4=1;var t=tq(),e=hK(),n=Oj(),i=t.extend({type:"series.heatmap",getInitialData:function(t,n){return e(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=n.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});L4=i}(),function(){if(N4)return R4;N4=1,cW().__DEV__;var t=s$(),e=zX(),n=W4(),i=bW();function r(t,e,n){var r=t[1]-t[0],o=(e=i.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/r,(e.interval[1]-t[0])/r]}}))).length,a=0;return function(t){for(var i=a;i=0;i--){var r;if((r=e[i].interval)[0]<=t&&t<=r[1]){a=i;break}}return i>=0&&i=e[0]&&t<=e[1]}}function a(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var s=t.extendChartView({type:"heatmap",render:function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):a(r)&&this._renderOnGeo(r,t,i,n)},incrementalPrepareRender:function(t,e,n){this.group.removeAll()},incrementalRender:function(t,e,n,i){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,n,r,o,a){var s,l,u=t.coordinateSystem;if("cartesian2d"===u.type){var h=u.getAxis("x"),c=u.getAxis("y");s=h.getBandWidth(),l=c.getBandWidth()}for(var d=this.group,p=t.getData(),f="itemStyle",g="emphasis.itemStyle",v="label",m="emphasis.label",y=t.getModel(f).getItemStyle(["color"]),x=t.getModel(g).getItemStyle(),_=t.getModel(v),b=t.getModel(m),w=u.type,S="cartesian2d"===w?[p.mapDimension("x"),p.mapDimension("y"),p.mapDimension("value")]:[p.mapDimension("time"),p.mapDimension("value")],M=r;M0?1:a<0?-1:0}function f(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function g(t,n,i,r,a,s,l,u,h,c){var d=h.valueDim,p=h.categoryDim,f=Math.abs(i[p.wh]),g=t.getItemVisual(n,"symbolSize");e.isArray(g)?g=g.slice():(null==g&&(g="100%"),g=[g,g]),g[p.index]=o(g[p.index],f),g[d.index]=o(g[d.index],r?f:Math.abs(s)),c.symbolSize=g,(c.symbolScale=[g[0]/u,g[1]/u])[d.index]*=(h.isHorizontal?-1:1)*l}function v(t,e,n,i,r){var o=t.get(l)||0;o&&(h.attr({scale:e.slice(),rotation:n}),h.updateTransform(),o/=h.getLineScale(),o*=e[i.valueDim.index]),r.valueLineWidth=o}function m(t,n,i,r,s,l,u,h,c,d,p,f){var g=p.categoryDim,v=p.valueDim,m=f.pxSign,y=Math.max(n[v.index]+h,0),x=y;if(r){var _=Math.abs(c),b=e.retrieve(t.get("symbolMargin"),"15%")+"",w=!1;b.lastIndexOf("!")===b.length-1&&(w=!0,b=b.slice(0,b.length-1)),b=o(b,n[v.index]);var S=Math.max(y+2*b,0),M=w?0:2*b,I=a(r),T=I?r:R((_+M)/S);S=y+2*(b=(_-T*y)/2/(w?T:T-1)),M=w?0:2*b,I||"fixed"===r||(T=d?R((Math.abs(d)+M)/S):0),x=T*S-M,f.repeatTimes=T,f.symbolMargin=b}var C=m*(x/2),A=f.pathPosition=[];A[g.index]=i[g.wh]/2,A[v.index]="start"===u?C:"end"===u?c-C:c/2,l&&(A[0]+=l[0],A[1]+=l[1]);var D=f.bundlePosition=[];D[g.index]=i[g.xy],D[v.index]=i[v.xy];var L=f.barRectShape=e.extend({},i);L[v.wh]=m*Math.max(Math.abs(i[v.wh]),Math.abs(A[v.index]+C)),L[g.wh]=i[g.wh];var k=f.clipShape={};k[g.xy]=-i[g.xy],k[g.wh]=p.ecSize[g.wh],k[v.xy]=0,k[v.wh]=i[v.wh]}function y(t){var e=t.symbolPatternSize,n=i(t.symbolType,-e/2,-e/2,e,e,t.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function x(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(k(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{position:e,scale:n.symbolScale.slice(),rotation:n.rotation}}function g(){k(t,(function(t){t.trigger("emphasis")}))}function v(){k(t,(function(t){t.trigger("normal")}))}}function _(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;function a(){this.trigger("emphasis")}function s(){this.trigger("normal")}o?P(o,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(o=t.__pictorialMainPath=y(n),r.add(o),P(o,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),o.on("mouseover",a).on("mouseout",s)),T(o,n)}function b(t,i,r){var o=e.extend({},i.barRectShape),a=t.__pictorialBarRect;a?P(a,null,{shape:o},i,r):(a=t.__pictorialBarRect=new n.Rect({z2:2,shape:o,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function w(t,i,r,o){if(r.symbolClip){var a=t.__pictorialClipPath,s=e.extend({},r.clipShape),l=i.valueDim,u=r.animationModel,h=r.dataIndex;if(a)n.updateProps(a,{shape:s},u,h);else{s[l.wh]=0,a=new n.Rect({shape:s}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var c={};c[l.wh]=r.clipShape[l.wh],n[o?"updateProps":"initProps"](a,{shape:c},u,h)}}}function S(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=M,n.isAnimationEnabled=I,n}function M(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function I(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function T(t,e){t.off("emphasis").off("normal");var n=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:n.slice()},400,"elasticOut")}))}function C(t,e,i,r){var o=new n.Group,a=new n.Group;return o.add(a),o.__pictorialBundle=a,a.attr("position",i.bundlePosition.slice()),i.symbolRepeat?x(o,e,i):_(o,e,i),b(o,i,r),w(o,e,i,r),o.__pictorialShapeStr=L(t,i),o.__pictorialSymbolMeta=i,o}function A(t,e,i){var r=i.animationModel,o=i.dataIndex,a=t.__pictorialBundle;n.updateProps(a,{position:i.bundlePosition.slice()},r,o),i.symbolRepeat?x(t,e,i,!0):_(t,e,i,!0),b(t,i,!0),w(t,e,i,!0)}function D(t,i,r,o){var a=o.__pictorialBarRect;a&&(a.style.text=null);var s=[];k(o,(function(t){s.push(t)})),o.__pictorialMainPath&&s.push(o.__pictorialMainPath),o.__pictorialClipPath&&(r=null),e.each(s,(function(t){n.updateProps(t,{scale:[0,0]},r,i,(function(){o.parent&&o.parent.remove(o)}))})),t.setItemGraphicEl(i,null)}function L(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function k(t,n,i){e.each(t.__pictorialBundle.children(),(function(e){e!==t.__pictorialBarRect&&n.call(i,e)}))}function P(t,e,i,r,o,a){e&&t.attr(e),r.symbolClip&&!o?i&&t.attr(i):i&&n[o?"updateProps":"initProps"](t,i,r.animationModel,r.dataIndex,a)}function O(t,i,r){var o=r.color,a=r.dataIndex,l=r.itemModel,u=l.getModel("itemStyle").getItemStyle(["color"]),h=l.getModel("emphasis.itemStyle").getItemStyle(),c=l.getShallow("cursor");k(t,(function(t){t.setColor(o),t.setStyle(e.defaults({fill:o,opacity:r.opacity},u)),n.setHoverStyle(t,h),c&&(t.cursor=c),t.z2=r.z2}));var d={},p=i.valueDim.posDesc[+(r.boundingLength>0)],f=t.__pictorialBarRect;s(f.style,d,l,o,i.seriesModel,a,p),n.setHoverStyle(f,d)}function R(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var N=c;Z4=N}();var n=NK().layout,i=F$();OJ(),t.registerLayout(e.curry(n,"pictorialBar")),t.registerVisual(i("pictorialBar","roundRect"))}(),function(){if(U6)return e6;U6=1;var t=s$();q6(),function(){if(z6)return E6;z6=1;var t=tq(),e=nK(),n=Jq().getDimensionTypeByAxis,i=tK(),r=bW(),o=AY().groupData,a=ij().encodeHTML,s=bQ(),l=2,u=t.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){u.superApply(this,"init",arguments),this.legendVisualProvider=new s(r.bind(this.getData,this),r.bind(this.getRawData,this))},fixData:function(t){var e=t.length,n={},i=o(t,(function(t){return n.hasOwnProperty(t[0])||(n[t[0]]=-1),t[2]})),r=[];i.buckets.each((function(t,e){r.push({name:e,dataList:t})}));for(var a=r.length,s=0;so&&(o=u),i.push(u)}for(var h=0;ho&&(o=d)}return a.y0=r,a.max=o,a}return F6=n}(),n=K6(),i=TQ();t.registerLayout(e),t.registerVisual(n),t.registerProcessor(i("themeRiver"))}(),function(){if(a8)return s8;a8=1;var t=s$(),e=bW();(function(){if(J6)return $6;J6=1;var t=bW(),e=tq(),n=x1(),i=VX(),r=F1().wrapTreePathInfo,o=e.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,r){var o={name:e.name,children:e.data};a(o);var s=t.map(e.levels||[],(function(t){return new i(t,this,r)}),this),l=n.createTree(o,this,u);function u(t){t.wrapMethod("getItemModel",(function(t,e){var n=l.getNodeByDataIndex(e),i=s[n.depth];return i&&(t.parentModel=i),t}))}return l.data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=r(i,this),n},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});function a(e){var n=0;t.each(e.children,(function(e){a(e);var i=e.value;t.isArray(i)&&(i=i[0]),n+=i}));var i=e.value;t.isArray(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=n),i<0&&(i=0),t.isArray(e.value)?e.value[0]=i:e.value=i}$6=o})(),function(){if(n8)return e8;n8=1;var t=bW(),e=iq(),n=function(){if(t8)return Q6;t8=1;var t=bW(),e=zX(),n={NONE:"none",ANCESTOR:"ancestor",SELF:"self"},i=2,r=4;function o(t,n,o){e.Group.call(this);var a=new e.Sector({z2:i});a.seriesIndex=n.seriesIndex;var s=new e.Text({z2:r,silent:t.getModel("label").get("silent")});function l(){s.ignore=s.hoverIgnore}function u(){s.ignore=s.normalIgnore}this.add(a),this.add(s),this.updateData(!0,t,"normal",n,o),this.on("emphasis",l).on("normal",u).on("mouseover",l).on("mouseout",u)}var a=o.prototype;a.updateData=function(n,i,r,o,a){this.node=i,i.piece=this,o=o||this._seriesModel,a=a||this._ecModel;var s=this.childAt(0);s.dataIndex=i.dataIndex;var u=i.getModel(),h=i.getLayout(),d=t.extend({},h);d.label=null;var p=l(i,o,a);c(i,o,p);var f,g=u.getModel("itemStyle").getItemStyle();if("normal"===r)f=g;else{var v=u.getModel(r+".itemStyle").getItemStyle();f=t.merge(v,g)}f=t.defaults({lineJoin:"bevel",fill:f.fill||p},f),n?(s.setShape(d),s.shape.r=h.r0,e.updateProps(s,{shape:{r:h.r}},o,i.dataIndex),s.useStyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof s.style.fill&&s.style.fill.type?(e.updateProps(s,{shape:d},o),s.useStyle(f)):e.updateProps(s,{shape:d,style:f},o),this._updateLabel(o,p,r);var m=u.getShallow("cursor");if(m&&s.attr("cursor",m),n){var y=o.getShallow("highlightPolicy");this._initEvents(s,i,o,y)}this._seriesModel=o||this._seriesModel,this._ecModel=a||this._ecModel,e.setHoverStyle(this)},a.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode((function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):h(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==n.NONE&&i.piece.childAt(0).trigger("downplay"))}))},a.onNormal=function(){this.node.hostTree.root.eachNode((function(t){t.piece&&t.piece.updateData(!1,t,"normal")}))},a.onHighlight=function(){this.updateData(!1,this.node,"highlight")},a.onDownplay=function(){this.updateData(!1,this.node,"downplay")},a._updateLabel=function(n,i,r){var o=this.node.getModel(),a=o.getModel("label"),s="normal"===r||"emphasis"===r?a:o.getModel(r+".label"),l=o.getModel("emphasis.label"),u=s.get("formatter")?r:"normal",h=t.retrieve(n.getFormattedLabel(this.node.dataIndex,u,null,null,"label"),this.node.name);!1===T("show")&&(h="");var c=this.node.getLayout(),d=s.get("minAngle");null==d&&(d=a.get("minAngle")),d=d/180*Math.PI;var p=c.endAngle-c.startAngle;null!=d&&Math.abs(p)Math.PI/2?"right":"left"):b&&"center"!==b?"left"===b?(g=c.r0+_,v>Math.PI/2&&(b="right")):"right"===b&&(g=c.r-_,v>Math.PI/2&&(b="left")):(g=(c.r+c.r0)/2,b="center"),f.attr("style",{text:h,textAlign:b,textVerticalAlign:T("verticalAlign")||"middle",opacity:T("opacity")});var w=g*m+c.cx,S=g*y+c.cy;f.attr("position",[w,S]);var M=T("rotate"),I=0;function T(t){var e=s.get(t);return null==e?a.get(t):e}"radial"===M?(I=-v)<-Math.PI/2&&(I+=Math.PI):"tangential"===M?(I=Math.PI/2-v)>Math.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI):"number"==typeof M&&(I=M*Math.PI/180),f.attr("rotation",I)},a._initEvents=function(t,e,n,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var r=this,o=function(){r.onEmphasis(i)},a=function(){r.onNormal()},s=function(){r.onDownplay()},l=function(){r.onHighlight()};n.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",s).on("highlight",l)},t.inherits(o,e.Group);var s=o;function l(t,e,n){var i=t.getVisual("color"),r=t.getVisual("visualMeta");r&&0!==r.length||(i=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(i)return i;if(0===t.depth)return n.option.color[0];var a=n.option.color.length;return o=n.option.color[u(t)%a]}function u(e){for(var n=e;n.depth>1;)n=n.parentNode;var i=e.getAncestors()[0];return t.indexOf(i.children,n)}function h(t,e,i){return i!==n.NONE&&(i===n.SELF?t===e:i===n.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function c(t,e,n){e.getData().setItemVisual(t.dataIndex,"color",n)}return Q6=s}(),i=Gq(),r=ij().windowOpen,o="sunburstRootToNode",a=e.extend({type:"sunburst",init:function(){},render:function(e,r,o,a){var s=this;this.seriesModel=e,this.api=o,this.ecModel=r;var l=e.getData(),u=l.tree.root,h=e.getViewRoot(),c=this.group,d=e.get("renderLabelForZeroData"),p=[];h.eachNode((function(t){p.push(t)}));var f=this._oldChildren||[];if(m(p,f),_(u,h),a&&a.highlight&&a.highlight.piece){var g=e.getShallow("highlightPolicy");a.highlight.piece.onEmphasis(g)}else if(a&&a.unhighlight){var v=this.virtualPiece;!v&&u.children.length&&(v=u.children[0].piece),v&&v.onNormal()}function m(e,n){function r(t){return t.getId()}function o(t,i){y(null==t?null:e[t],null==i?null:n[i])}0===e.length&&0===n.length||new i(n,e,r,r).add(o).update(o).remove(t.curry(o,null)).execute()}function y(t,i){if(d||!t||t.getValue()||(t=null),t!==u&&i!==u)if(i&&i.piece)t?(i.piece.updateData(!1,t,"normal",e,r),l.setItemGraphicEl(t.dataIndex,i.piece)):x(i);else if(t){var o=new n(t,e,r);c.add(o),l.setItemGraphicEl(t.dataIndex,o)}}function x(t){t&&t.piece&&(c.remove(t.piece),t.piece=null)}function _(t,i){if(i.depth>0){s.virtualPiece?s.virtualPiece.updateData(!1,t,"normal",e,r):(s.virtualPiece=new n(t,e,r),c.add(s.virtualPiece)),i.piece._onclickEvent&&i.piece.off("click",i.piece._onclickEvent);var o=function(t){s._rootToNode(i.parentNode)};i.piece._onclickEvent=o,s.virtualPiece.on("click",o)}else s.virtualPiece&&(c.remove(s.virtualPiece),s.virtualPiece=null)}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece.childAt(0)===e.target){var o=i.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(i);else if("link"===o){var a=i.getModel(),s=a.get("link");if(s){var l=a.get("target",!0)||"_blank";r(s,l)}}n=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:o,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}}}),s=a;e8=s}(),function(){if(i8)return l8;i8=1;var t=s$(),e=F1(),n="sunburstRootToNode";t.registerAction({type:n,update:"updateView"},(function(t,i){function r(i,r){var o=e.retrieveTargetInfo(t,[n],i);if(o){var a=i.getViewRoot();a&&(t.direction=e.aboveViewRoot(a,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}i.eachComponent({mainType:"series",subType:"sunburst",query:t},r)}));var i="sunburstHighlight";t.registerAction({type:i,update:"updateView"},(function(t,n){function r(n,r){var o=e.retrieveTargetInfo(t,[i],n);o&&(t.highlight=o.node)}n.eachComponent({mainType:"series",subType:"sunburst",query:t},r)}));var r="sunburstUnhighlight";t.registerAction({type:r,update:"updateView"},(function(t,e){function n(e,n){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},n)}))}();var n=SQ(),i=u8(),r=TQ();t.registerVisual(e.curry(n,"sunburst")),t.registerLayout(e.curry(i,"sunburst")),t.registerProcessor(e.curry(r,"sunburst"))}(),function(){if(_8)return M8;_8=1,cW().__DEV__;var t=bW(),e=zX(),n=m$().getDefaultLabel,i=hK(),r=NK().getLayoutOnAxis,o=Gq(),a=tq(),s=VX(),l=iq(),u=B$().createClipPath,h=function(){if(c8)return h8;c8=1;var t=bW();function e(e,n){return n=n||[0,0],t.map(["x","y"],(function(t,i){var r=this.getAxis(t),o=n[i],a=e[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function n(n){var i=n.grid.getRect();return{coordSys:{type:"cartesian2d",x:i.x,y:i.y,width:i.width,height:i.height},api:{coord:function(t){return n.dataToPoint(t)},size:t.bind(e,n)}}}return h8=n}(),c=function(){if(p8)return d8;p8=1;var t=bW();function e(e,n){return n=n||[0,0],t.map([0,1],(function(t){var i=n[t],r=e[t]/2,o=[],a=[];return o[t]=i-r,a[t]=i+r,o[1-t]=a[1-t]=n[1-t],Math.abs(this.dataToPoint(o)[t]-this.dataToPoint(a)[t])}),this)}function n(n){var i=n.getBoundingRect();return{coordSys:{type:"geo",x:i.x,y:i.y,width:i.width,height:i.height,zoom:n.getZoom()},api:{coord:function(t){return n.dataToPoint(t)},size:t.bind(e,n)}}}return d8=n}(),d=function(){if(g8)return f8;g8=1;var t=bW();function e(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function n(n){var i=n.getRect();return{coordSys:{type:"singleAxis",x:i.x,y:i.y,width:i.width,height:i.height},api:{coord:function(t){return n.dataToPoint(t)},size:t.bind(e,n)}}}return f8=n}(),p=function(){if(m8)return v8;m8=1;var t=bW();function e(e,n){return t.map(["Radius","Angle"],(function(t,i){var r=this["get"+t+"Axis"](),o=n[i],a=e[i]/2,s="dataTo"+t,l="category"===r.type?r.getBandWidth():Math.abs(r[s](o-a)-r[s](o+a));return"Angle"===t&&(l=l*Math.PI/180),l}),this)}function n(n){var i=n.getRadiusAxis(),r=n.getAngleAxis(),o=i.getExtent();return o[0]>o[1]&&o.reverse(),{coordSys:{type:"polar",cx:n.cx,cy:n.cy,r:o[1],r0:o[0]},api:{coord:t.bind((function(t){var e=i.dataToRadius(t[0]),o=r.dataToAngle(t[1]),a=n.coordToPoint([e,o]);return a.push(e,o*Math.PI/180),a})),size:t.bind(e,n)}}}return v8=n}(),f=function(){if(x8)return y8;function t(t){var e=t.getRect(),n=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:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}return x8=1,y8=t}(),g=e.CACHED_LABEL_STYLE_PROPERTIES,v=["itemStyle"],m=["emphasis","itemStyle"],y=["label"],x=["emphasis","label"],_="e\0\0",b={cartesian2d:h,geo:c,singleAxis:d,polar:p,calendar:f};function w(t){var n,i=t.type;if("path"===i){var r=t.shape,o=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,a=E(r);(n=e.makePath(a,null,o,r.layout||"center")).__customPathData=a}else if("image"===i)(n=new e.Image({})).__customImagePath=t.style.image;else if("text"===i)(n=new e.Text({})).__customText=t.style.text;else if("group"===i)n=new e.Group;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');n=new(e.getShapeClass(i))}return n.__customGraphicType=i,n.name=t.name,n}function S(n,i,r,o,a,s,l){var u={},h=r.style||{};if(r.shape&&(u.shape=t.clone(r.shape)),r.position&&(u.position=r.position.slice()),r.scale&&(u.scale=r.scale.slice()),r.origin&&(u.origin=r.origin.slice()),r.rotation&&(u.rotation=r.rotation),"image"===n.type&&r.style){var c=u.style={};t.each(["x","y","width","height"],(function(t){M(t,c,h,n.style,s)}))}if("text"===n.type&&r.style&&(c=u.style={},t.each(["x","y"],(function(t){M(t,c,h,n.style,s)})),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke")&&h.stroke&&(h.textStroke=h.stroke)),"group"!==n.type&&(n.useStyle(h),s)){n.style.opacity=0;var d=h.opacity;null==d&&(d=1),e.initProps(n,{style:{opacity:d}},o,i)}s?n.attr(u):e.updateProps(n,u,o,i),r.hasOwnProperty("z2")&&n.attr("z2",r.z2||0),r.hasOwnProperty("silent")&&n.attr("silent",r.silent),r.hasOwnProperty("invisible")&&n.attr("invisible",r.invisible),r.hasOwnProperty("ignore")&&n.attr("ignore",r.ignore),r.hasOwnProperty("info")&&n.attr("info",r.info);var p=r.styleEmphasis;e.setElementHoverStyle(n,p),l&&e.setAsHighDownDispatcher(n,!1!==p)}function M(t,e,n,i,r){null==n[t]||r||(e[t]=n[t],n[t]=i[t])}function I(i,o,a,s){var l=i.get("renderItem"),u=i.coordinateSystem,h={};u&&(h=u.prepareCustoms?u.prepareCustoms():b[u.type](u));var c,d,p,f,g,_=t.defaults({getWidth:s.getWidth,getHeight:s.getHeight,getZr:s.getZr,getDevicePixelRatio:s.getDevicePixelRatio,value:I,style:C,styleEmphasis:A,visual:D,barLayout:L,currentSeriesIndices:k,font:P},h.api||{}),w={context:{},seriesId:i.id,seriesName:i.name,seriesIndex:i.seriesIndex,coordSys:h.coordSys,dataInsideLength:o.count(),encode:T(i.getData())},S=!0;return function(e,n){return c=e,S=!0,l&&l(t.defaults({dataIndexInside:e,dataIndex:o.getRawIndex(e),actionType:n?n.type:null},w),_)};function M(t){null==t&&(t=c),S&&(d=o.getItemModel(t),p=d.getModel(y),f=d.getModel(x),g=o.getItemVisual(t,"color"),S=!1)}function I(t,e){return null==e&&(e=c),o.get(o.getDimension(t||0),e)}function C(r,a){null==a&&(a=c),M(a);var s=d.getModel(v).getItemStyle();null!=g&&(s.fill=g);var l=o.getItemVisual(a,"opacity");null!=l&&(s.opacity=l);var u=r?O(r,p):p;return e.setTextStyle(s,u,null,{autoColor:g,isRectText:!0}),s.text=u.getShallow("show")?t.retrieve2(i.getFormattedLabel(a,"normal"),n(o,a)):null,r&&R(s,r),s}function A(r,a){null==a&&(a=c),M(a);var s=d.getModel(m).getItemStyle(),l=r?O(r,f):f;return e.setTextStyle(s,l,null,{isRectText:!0},!0),s.text=l.getShallow("show")?t.retrieve3(i.getFormattedLabel(a,"emphasis"),i.getFormattedLabel(a,"normal"),n(o,a)):null,r&&R(s,r),s}function D(t,e){return null==e&&(e=c),o.getItemVisual(e,t)}function L(e){if(u.getBaseAxis){var n=u.getBaseAxis();return r(t.defaults({axis:n},e),s)}}function k(){return a.getCurrentSeriesIndices()}function P(t){return e.getFont(t,a)}}function T(e){var n={};return t.each(e.dimensions,(function(t,i){var r=e.getDimensionInfo(t);if(!r.isExtraCoord){var o=r.coordDim;(n[o]=n[o]||[])[r.coordDimIndex]=i}})),n}function C(t,e,n,i,r,o){return(t=A(t,e,n,i,r,o,!0))&&o.setItemGraphicEl(e,t),t}function A(t,e,n,i,r,o,a){var s=!n,l=(n=n||{}).type,u=n.shape,h=n.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&z(u)&&E(u)!==t.__customPathData||"image"===l&&V(h,"image")&&h.image!==t.__customImagePath||"text"===l&&V(u,"text")&&h.text!==t.__customText)&&(r.remove(t),t=null),!s){var c=!t;return!t&&(t=w(n)),S(t,e,n,i,o,c,a),"group"===l&&D(t,e,n,i,o),r.add(t),t}}function D(t,e,n,i,r){var o=n.children,a=o?o.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,u=!1===s;if(a||l||u)if(l)L({oldChildren:t.children()||[],newChildren:o||[],dataIndex:e,animatableModel:i,group:t,data:r});else{u&&t.removeAll();for(var h=0;he[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function s(t){return t.getRadiusAxis().inverse?0:1}function l(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var u=i.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,n){if(this.group.removeAll(),e.get("show")){var i=e.axis,r=i.polar,a=r.getRadiusAxis().getExtent(),s=i.getTicksCoords(),u=i.getMinorTicksCoords(),h=t.map(i.getViewLabels(),(function(e){return(e=t.clone(e)).coord=i.dataToCoord(e.tickValue),e}));l(h),l(s),t.each(o,(function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,r,s,u,a,h)}),this)}},_axisLine:function(t,n,i,r,o){var a,l=t.getModel("axisLine.lineStyle"),u=s(n),h=u?0:1;(a=0===o[h]?new e.Circle({shape:{cx:n.cx,cy:n.cy,r:o[u]},style:l.getLineStyle(),z2:1,silent:!0}):new e.Ring({shape:{cx:n.cx,cy:n.cy,r:o[u],r0:o[h]},style:l.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(n,i,r,o,l){var u=n.getModel("axisTick"),h=(u.get("inside")?-1:1)*u.get("length"),c=l[s(i)],d=t.map(r,(function(t){return new e.Line({shape:a(i,[c,c+h],t.coord)})}));this.group.add(e.mergePath(d,{style:t.defaults(u.getModel("lineStyle").getLineStyle(),{stroke:n.get("axisLine.lineStyle.color")})}))},_minorTick:function(n,i,r,o,l){if(o.length){for(var u=n.getModel("axisTick"),h=n.getModel("minorTick"),c=(u.get("inside")?-1:1)*h.get("length"),d=l[s(i)],p=[],f=0;fm?"left":"right",_=Math.abs(v[1]-y)/g<.3?"middle":v[1]>y?"top":"bottom";c&&c[h]&&c[h].textStyle&&(l=new n(c[h].textStyle,d,d.ecModel));var b=new e.Text({silent:r.isLabelSilent(i)});this.group.add(b),e.setTextStyle(b.style,l,{x:v[0],y:v[1],textFill:l.getTextColor()||i.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:x,textVerticalAlign:_}),f&&(b.eventData=r.makeAxisEventDataBase(i),b.eventData.targetType="axisLabel",b.eventData.value=t.rawLabel)}),this)},_splitLine:function(n,i,r,o,s){var l=n.getModel("splitLine").getModel("lineStyle"),u=l.get("color"),h=0;u=u instanceof Array?u:[u];for(var c=[],d=0;dx?"left":"right",p=Math.abs(c[1]-_)/y<.3?"middle":c[1]>_?"top":"bottom"}return{position:c,align:d,verticalAlign:p}}var u={line:function(t,e,n,r,o){return"angle"===t.dim?{type:"Line",shape:i.makeLineShape(e.coordToPoint([r[0],n]),e.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,r,o){var a=Math.max(1,t.getBandWidth()),s=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:i.makeSectorShape(e.cx,e.cy,r[0],r[1],(-n-a/2)*s,(a/2-n)*s)}:{type:"Sector",shape:i.makeSectorShape(e.cx,e.cy,n-a/2,n+a/2,0,2*Math.PI)}}};a.registerAxisPointerClass("PolarAxisPointer",s);var h=s;Y8=h}(),t.registerLayout(e.curry(n,"bar")),t.extendComponentView({type:"polar"})}(),function(){if(e7)return p7;e7=1;var t=s$(),e=bW();function n(n,i){i.update="updateView",t.registerAction(i,(function(t,i){var r={};return i.eachComponent({mainType:"geo",query:t},(function(i){i[n](t.name);var o=i.coordinateSystem;e.each(o.regions,(function(t){r[t.name]=i.isSelected(t.name)||!1}))})),{selected:r,name:t.name}}))}(function(){if(J8)return $8;J8=1;var t=bW(),e=AY(),n=oj(),i=VX(),r=_Q(),o=a1(),a=n.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){n.prototype.init.apply(this,arguments),e.defaultEmphasis(t,"label",["show"])},optionUpdated:function(){var e=this.option,n=this;e.regions=o.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=t.reduce(e.regions||[],(function(t,e){return e.name&&t.set(e.name,new i(e,n)),t}),t.createHashMap()),this.updateSelectedMap(e.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new i(null,this,this.ecModel)},getFormattedLabel:function(t,e){e=e||"normal";var n=this.getRegionModel(t).get(("normal"===e?"":e+".")+"label.formatter"),i={name:t};return"function"==typeof n?(i.status=e,n(i)):"string"==typeof n?n.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});t.mixin(a,r);var s=a;$8=s})(),a1(),function(){if(t7)return Q8;t7=1;var t=z0(),e=s$(),n=e.extendComponentView({type:"geo",init:function(e,n){var i=new t(n,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,n,i){if(!i||"geoToggleSelect"!==i.type||i.from!==this.uid){var r=this._mapDraw;t.get("show")?r.draw(t,e,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});Q8=n}(),r1(),n("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),n("select",{type:"geoSelect",event:"geoselected"}),n("unSelect",{type:"geoUnSelect",event:"geounselected"})}(),q6(),g3(),l7||(l7=1,function(){if(i7)return n7;i7=1;var t=bW(),e=rj(),n=YX(),i=Oj(),r=864e5;function o(t,e,n){this._model=t}function a(t,e,n,i){var r=n.calendarModel,o=n.seriesModel,a=r?r.coordinateSystem:o?o.coordinateSystem:null;return a===this?a[t](i):null}o.prototype={constructor:o,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},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=n.parseDate(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var r=t.getDate();r=r<10?"0"+r:r;var o=t.getDay();return{y:e,m:i,d:r,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+r,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(n,i){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),s=this._model.getBoxLayoutParams(),l="horizontal"===this._orient?[r,7]:[7,r];t.each([0,1],(function(t){c(a,t)&&(s[o[t]]=a[t]*l[t])}));var u={width:i.getWidth(),height:i.getHeight()},h=this._rect=e.getLayoutRect(s,u);function c(t,e){return null!=t[e]&&"auto"!==t[e]}t.each([0,1],(function(t){c(a,t)||(a[t]=h[o[t]]/l[t])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(e,n){t.isArray(e)&&(e=e[0]),null==n&&(n=!0);var i=this.getDateInfo(e),o=this._rangeInfo,a=i.formatedDate;if(n&&!(i.time>=o.start.time&&i.timea.end.time&&e.reverse(),e},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var n=Math.floor(t[1].time/r)-Math.floor(t[0].time/r)+1,i=new Date(t[0].time),o=i.getDate(),a=t[1].date.getDate();i.setDate(o+n-1);var s=i.getDate();if(s!==a)for(var l=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==a&&(i.getTime()-t[1].time)*l>0;)n-=l,i.setDate(s-l);var u=Math.floor((n+t[0].day+6)/7),h=e?1-u:u-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:u,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return!1;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(i.start.d+r),this.getDateInfo(o)}},o.dimensions=o.prototype.dimensions,o.getDimensionsInfo=o.prototype.getDimensionsInfo,o.create=function(t,e){var n=[];return t.eachComponent("calendar",(function(t){var e=new o(t);n.push(e),t.coordinateSystem=e})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])})),n},i.register("calendar",o);var s=o;n7=s}(),function(){if(o7)return r7;o7=1;var t=bW(),e=oj(),n=rj(),i=n.getLayoutParams,r=n.sizeCalculable,o=n.mergeLayoutParam,a=e.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:{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,n,r){var o=i(t);a.superApply(this,"init",arguments),s(t,o)},mergeOption:function(t,e){a.superApply(this,"mergeOption",arguments),s(this.option,t)}});function s(e,n){var i=e.cellSize;t.isArray(i)?1===i.length&&(i[1]=i[0]):i=e.cellSize=[i,i];var a=t.map([0,1],(function(t){return r(n,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));o(e,n,{type:"box",ignoreSize:a})}var l=a;r7=l}(),function(){if(s7)return a7;s7=1;var t=s$(),e=bW(),n=zX(),i=ij(),r=YX(),o={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},a={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},s=t.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,a,i),this._renderWeekText(t,o,a,i)},_renderDayRect:function(t,e,i){for(var r=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=r.getCellWidth(),s=r.getCellHeight(),l=e.start.time;l<=e.end.time;l=r.getNextNDay(l,1).time){var u=r.dataToRect([l],!1).tl,h=new n.Rect({shape:{x:u[0],y:u[1],width:a,height:s},cursor:"default",style:o});i.add(h)}},_renderLines:function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},_getEdgesPoints:function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},_drawSplitline:function(t,e,i){var r=new n.Polyline({z2:20,shape:{points:t},style:e});i.add(r)},_getLinePointsOfOneWeek:function(t,e,n){var i=t.coordinateSystem;e=i.getDateInfo(e);for(var r=[],o=0;o<7;o++){var a=i.getNextNDay(e.time,o),s=i.dataToRect([a.time],!1);r[2*a.day]=s.tl,r[2*a.day+1]=s["horizontal"===n?"bl":"tr"]}return r},_formatterLabel:function(t,e){return"string"==typeof t&&t?i.formatTplSimple(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,i,r){e=e.slice();var o=["center","bottom"];"bottom"===i?(e[1]+=r,o=["center","top"]):"left"===i?e[0]-=r:"right"===i?(e[0]+=r,o=["center","top"]):e[1]-=r;var a=0;return"left"!==i&&"right"!==i||(a=Math.PI/2),{rotation:a,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,i,r){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),s=o.get("position");s||(s="horizontal"!==i?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],u=(l[0][0]+l[1][0])/2,h=(l[0][1]+l[1][1])/2,c="horizontal"===i?0:1,d={top:[u,l[c][1]],bottom:[u,l[1-c][1]],left:[l[1-c][0],h],right:[l[c][0],h]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var f=o.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:p},v=this._formatterLabel(f,g),m=new n.Text({z2:30});n.setTextStyle(m.style,o,{text:v}),m.attr(this._yearTextPositionControl(m,d[s],i,s,a)),r.add(m)}},_monthTextPositionControl:function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:a}},_renderMonthText:function(t,i,r){var a=t.getModel("monthLabel");if(a.get("show")){var s=a.get("nameMap"),l=a.get("margin"),u=a.get("position"),h=a.get("align"),c=[this._tlpoints,this._blpoints];e.isString(s)&&(s=o[s.toUpperCase()]||[]);var d="start"===u?0:1,p="horizontal"===i?0:1;l="start"===u?-l:l;for(var f="center"===h,g=0;g=0;h--)null==a[h]?a.splice(h,1):delete a[h].$action},_flatten:function(t,n,i){e.each(t,(function(t){if(t){i&&(t.parentOption=i),n.push(t);var e=t.children;"group"===t.type&&e&&this._flatten(e,n,t),delete t.children}}),this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function l(t,e,n,r){var o=n.type,s=new(a.hasOwnProperty(o)?a[o]:i.getShapeClass(o))(n);e.add(s),r.set(t,s),s.__ecGraphicId=t}function u(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse((function(t){u(t,e)})),e.removeKey(t.__ecGraphicId),n.remove(t))}function h(t){return t=e.extend({},t),e.each(["id","parentId","$action","hv","bounding"].concat(r.LOCATION_PARAMS),(function(e){delete t[e]})),t}function c(t,n){var i;return e.each(n,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}function d(t,e){var n=t.exist;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}function p(t,n,i){var o=e.extend({},i),a=t[n],s=i.$action||"merge";"merge"===s?a?(e.merge(a,o,!0),r.mergeLayoutParam(a,o,{ignoreSize:!0}),r.copyLayoutParams(i,a)):t[n]=o:"replace"===s?t[n]=o:"remove"===s&&a&&(t[n]=null)}function f(t,e){t&&(t.hv=e.hv=[c(e,["left","right"]),c(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function g(t,e,n){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}t.extendComponentView({type:"graphic",init:function(t,n){this._elMap=e.createHashMap(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},_updateElements:function(t){var n=t.useElOptionsToUpdate();if(n){var i=this._elMap,r=this.group;e.each(n,(function(e){var n=e.$action,o=e.id,a=i.get(o),s=e.parentId,c=null!=s?i.get(s):r,d=e.style;"text"===e.type&&d&&(e.hv&&e.hv[1]&&(d.textVerticalAlign=d.textBaseline=null),!d.hasOwnProperty("textFill")&&d.fill&&(d.textFill=d.fill),!d.hasOwnProperty("textStroke")&&d.stroke&&(d.textStroke=d.stroke));var p=h(e);n&&"merge"!==n?"replace"===n?(u(a,i),l(o,c,p,i)):"remove"===n&&u(a,i):a?a.attr(p):l(o,c,p,i);var f=i.get(o);f&&(f.__ecGraphicWidthOption=e.width,f.__ecGraphicHeightOption=e.height,g(f,t))}))}},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,a=this._elMap,s=e.getWidth(),l=e.getHeight(),u=0;u=0;u--){var d;if(h=n[u],d=a.get(h.id)){var p,f=(p=d.parent)===i?{width:s,height:l}:{width:p.__ecGraphicWidth,height:p.__ecGraphicHeight};r.positionElement(d,h,f,null,{hv:h.hv,boundingMode:h.bounding})}}},_clear:function(){var t=this._elMap;t.each((function(e){u(e,t)})),this._elMap=e.createHashMap()},dispose:function(){this._clear()}})}(),l9||(l9=1,function(){if(d7)return c7;d7=1;var t=s$(),e=bW(),n=v7(),i=t.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){i.superApply(this,"optionUpdated",arguments),e.each(this.option.feature,(function(t,i){var r=n.get(i);r&&e.merge(t,r.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}}),r=i;c7=r}(),function(){if(x7)return y7;x7=1;var t=s$(),e=bW(),n=eY(),i=v7(),r=zX(),o=VX(),a=Gq(),s=D7(),l=t.extendComponentView({type:"toolbox",render:function(t,l,h,c){var d=this.group;if(d.removeAll(),t.get("show")){var p=+t.get("itemSize"),f=t.get("feature")||{},g=this._features||(this._features={}),v=[];e.each(f,(function(t,e){v.push(e)})),new a(this._featureNames||[],v).add(m).update(m).remove(e.curry(m,null)).execute(),this._featureNames=v,s.layout(d,t,h),d.add(s.makeBackground(d.getBoundingRect(),t)),d.eachChild((function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var r=n.getBoundingRect(e,n.makeFont(i)),o=t.position[0]+d.position[0],a=!1;t.position[1]+d.position[1]+p+r.height>h.getHeight()&&(i.textPosition="top",a=!0);var s=a?-5-r.height:p+8;o+r.width/2>h.getWidth()?(i.textPosition=["100%",s],i.textAlign="right"):o-r.width/2<0&&(i.textPosition=[0,s],i.textAlign="left")}}))}function m(e,n){var r,a=v[e],s=v[n],d=f[a],p=new o(d,t,t.ecModel);if(c&&null!=c.newTitle&&c.featureName===a&&(d.title=c.newTitle),a&&!s){if(u(a))r={model:p,onclick:p.option.onclick,featureName:a};else{var m=i.get(a);if(!m)return;r=new m(p,l,h)}g[a]=r}else{if(!(r=g[s]))return;r.model=p,r.ecModel=l,r.api=h}a||!s?p.get("show")&&!r.unusable?(y(p,r,a),p.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},r.render&&r.render(p,l,h,c)):r.remove&&r.remove(l,h):r.dispose&&r.dispose(l,h)}function y(n,i,o){var a=n.getModel("iconStyle"),s=n.getModel("emphasis.iconStyle"),u=i.getIcons?i.getIcons():n.get("icon"),c=n.get("title")||{};if("string"==typeof u){var f=u,g=c;c={},(u={})[o]=f,c[o]=g}var v=n.iconPaths={};e.each(u,(function(o,u){var f=r.createIcon(o,{},{x:-p/2,y:-p/2,width:p,height:p});f.setStyle(a.getItemStyle()),f.hoverStyle=s.getItemStyle(),f.setStyle({text:c[u],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var g=t.getModel("tooltip");g&&g.get("show")&&f.attr("tooltip",e.extend({content:c[u],formatter:g.get("formatter",!0)||function(){return c[u]},formatterParams:{componentType:"toolbox",name:u,title:c[u],$vars:["name","title"]},position:g.get("position",!0)||"bottom"},g.option)),r.setHoverStyle(f),t.get("showTitle")&&(f.__title=c[u],f.on("mouseover",(function(){var e=s.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setStyle({textFill:s.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||n})})).on("mouseout",(function(){f.setStyle({textFill:null,textBackgroundColor:null})}))),f.trigger(n.get("iconStatus."+u)||"normal"),d.add(f),f.on("click",e.bind(i.onclick,i,l,h,u)),v[u]=f}))}},updateView:function(t,n,i,r){e.each(this._features,(function(t){t.updateView&&t.updateView(t.model,n,i,r)}))},remove:function(t,n){e.each(this._features,(function(e){e.remove&&e.remove(t,n)})),this.group.removeAll()},dispose:function(t,n){e.each(this._features,(function(e){e.dispose&&e.dispose(t,n)}))}});function u(t){return 0===t.indexOf("my")}y7=l}(),function(){if(b7)return _7;b7=1;var t=yW(),e=wq(),n=v7(),i=e.toolbox.saveAsImage;function r(t){this.model=t}r.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:i.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:i.lang.slice()},r.prototype.unusable=!t.canvasSupported;var o=r.prototype;o.onclick=function(e,n){var i=this.model,r=i.get("name")||e.get("title.0.text")||"echarts",o="svg"===n.getZr().painter.getType()?"svg":i.get("type",!0)||"png",a=n.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||t.browser.ie||t.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(a.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,r+"."+o)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var p=document.createElement("a");p.download=r+"."+o,p.target="_blank",p.href=a;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(f)}},n.register("saveAsImage",r);var a=r;_7=a}(),function(){if(S7)return w7;S7=1;var t=s$(),e=bW(),n=wq(),i=v7(),r=n.toolbox.magicType,o="__ec_magicType_stack__";function a(t){this.model=t}a.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"},title:e.clone(r.title),option:{},seriesIndex:{}};var s=a.prototype;s.getIcons=function(){var t=this.model,n=t.get("icon"),i={};return e.each(t.get("type"),(function(t){n[t]&&(i[t]=n[t])})),i};var l={line:function(t,n,i,r){if("bar"===t)return e.merge({id:n,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.line")||{},!0)},bar:function(t,n,i,r){if("line"===t)return e.merge({id:n,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.bar")||{},!0)},stack:function(t,n,i,r){var a=i.get("stack")===o;if("line"===t||"bar"===t)return r.setIconStatus("stack",a?"normal":"emphasis"),e.merge({id:n,stack:a?"":o},r.get("option.stack")||{},!0)}},u=[["line","bar"],["stack"]];s.onclick=function(t,n,i){var a=this.model,s=a.get("seriesIndex."+i);if(l[i]){var h,c={series:[]},d=function(n){var r=n.subType,o=n.id,s=l[i](r,o,n,a);s&&(e.defaults(s,n.option),c.series.push(s));var u=n.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var d=h.dim+"Axis",p=t.queryComponents({mainType:d,index:n.get(name+"Index"),id:n.get(name+"Id")})[0].componentIndex;c[d]=c[d]||[];for(var f=0;f<=p;f++)c[d][p]=c[d][p]||{};c[d][p].boundaryGap="bar"===i}}};e.each(u,(function(t){e.indexOf(t,i)>=0&&e.each(t,(function(t){a.setIconStatus(t,"normal")}))})),a.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==s?null:{seriesIndex:s}},d),"stack"===i&&(h=c.series&&c.series[0]&&c.series[0].stack===o?e.merge({stack:r.title.tiled},r.title):e.clone(r.title)),n.dispatchAction({type:"changeMagicType",currentType:i,newOption:c,newTitle:h,featureName:"magicType"})}},t.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),i.register("magicType",a);var h=a;w7=h}(),function(){if(I7)return M7;I7=1;var t=s$(),e=bW(),n=GW(),i=wq(),r=v7(),o=i.toolbox.dataView,a=new Array(60).join("-"),s="\t";function l(t){var e={},n=[],i=[];return t.eachRawSeries((function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}})),{seriesGroupByCategoryAxis:e,other:n,meta:i}}function u(t){var n=[];return e.each(t,(function(t,i){var r=t.categoryAxis,o=t.valueAxis.dim,a=[" "].concat(e.map(t.series,(function(t){return t.name}))),l=[r.model.getCategories()];e.each(t.series,(function(t){var e=t.getRawData();l.push(t.getRawData().mapArray(e.mapDimension(o),(function(t){return t})))}));for(var u=[a.join(s)],h=0;h=0)return!0}var f=new RegExp("["+s+"]+","g");function g(t){for(var n=t.split(/\n+/g),i=d(n.shift()).split(f),r=[],o=e.map(i,(function(t){return{name:t,data:[]}})),a=0;a1?"emphasis":"normal")}function v(t,e,n,r,o){var a=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(a="dataZoomSelect"===r.key&&r.dataZoomSelectActive),n._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var s=new i(f(t.option),e,{include:["grid"]});n._brushController.setPanels(s.makePanelOpts(o,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!a&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}d._onBrush=function(t,e){if(e.isEnd&&t.length){var n={},a=this.ecModel;this._brushController.updateCovers([]),new i(f(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(s("x",n,e[0]),s("y",n,e[1])):s({lineX:"x",lineY:"y"}[i],n,e)}})),r.push(a,n),this._dispatchZoomAction(n)}function s(t,e,i){var r=e.getAxis(t),s=r.model,u=l(t,s,a),h=u.findRepresentativeAxisProxy(s).getMinMaxSpan();null==h.minValueSpan&&null==h.maxValueSpan||(i=o(0,i.slice(),r.scale.getExtent(),0,h.minValueSpan,h.maxValueSpan)),u&&(n[u.id]={dataZoomId:u.id,startValue:i[0],endValue:i[1]})}function l(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}},d._dispatchZoomAction=function(t){var n=[];u(t,(function(t,i){n.push(e.clone(t))})),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},s.register("dataZoom",c),t.registerPreprocessor((function(t){if(t){var n=t.dataZoom||(t.dataZoom=[]);e.isArray(n)||(t.dataZoom=n=[n]);var i=t.toolbox;if(i&&(e.isArray(i)&&(i=i[0]),i&&i.feature)){var r=i.feature.dataZoom;o("xAxis",r),o("yAxis",r)}}function o(t,i){if(i){var r=t+"Index",o=i[r];null==o||"all"===o||e.isArray(o)||(o=!1===o||"none"===o?[]:[o]),a(t,(function(a,s){if(null==o||"all"===o||-1!==e.indexOf(o,s)){var l={type:"select",$fromToolbox:!0,filterMode:i.filterMode||"filter",id:h+t+s};l[r]=s,n.push(l)}}))}}function a(n,i){var r=t[n];e.isArray(r)||(r=r?[r]:[]),u(r,i)}})),r9=c}(),function(){if(s9)return a9;s9=1;var t=s$(),e=O7(),n=wq(),i=v7(),r=n.toolbox.restore;function o(t){this.model=t}o.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:r.title};var a=o.prototype;a.onclick=function(t,n,i){e.clear(t),n.dispatchAction({type:"restore",from:this.uid})},i.register("restore",o),t.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")})),a9=o}()),function(){if(x9)return L9;x9=1;var t=s$();j6(),function(){if(d9)return c9;d9=1;var t=s$(),e=t.extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",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}}});c9=e}(),function(){if(y9)return m9;y9=1;var t=s$(),e=bW(),n=yW(),i=function(){if(f9)return p9;f9=1;var t=bW(),e=sU(),n=GW(),i=FW(),r=yW(),o=ij(),a=t.each,s=o.toCamelCase,l=["","-webkit-","-moz-","-o-"],u="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function h(e){var n="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+e+"s "+n+",top "+e+"s "+n;return t.map(l,(function(t){return t+"transition:"+i})).join(";")}function c(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont());var r=t.get("lineHeight");null==r&&(r=Math.round(3*n/2)),n&&e.push("line-height:"+r+"px");var o=t.get("textShadowColor"),s=t.get("textShadowBlur")||0,l=t.get("textShadowOffsetX")||0,u=t.get("textShadowOffsetY")||0;return s&&e.push("text-shadow:"+l+"px "+u+"px "+s+"px "+o),a(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}function d(t){var n=[],i=t.get("transitionDuration"),l=t.get("backgroundColor"),u=t.getModel("textStyle"),d=t.get("padding");return i&&n.push(h(i)),l&&(r.canvasSupported?n.push("background-Color:"+l):(n.push("background-Color:#"+e.toHex(l)),n.push("filter:alpha(opacity=70)"))),a(["width","color","radius"],(function(e){var i="border-"+e,r=s(i),o=t.get(r);null!=o&&n.push(i+":"+o+("color"===e?"":"px"))})),n.push(c(u)),null!=d&&n.push("padding:"+o.normalizeCssArray(d).join("px ")+"px"),n.join(";")+";"}function p(t,e,n,r,o){var a=e&&e.painter;if(n){var s=a&&a.getViewportRoot();s&&i.transformLocalCoord(t,s,document.body,r,o)}else{t[0]=r,t[1]=o;var l=a&&a.getViewportRootOffset();l&&(t[0]+=l.offsetLeft,t[1]+=l.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function f(t,e,i){if(r.wxa)return null;var o=document.createElement("div");o.domBelongToZr=!0,this.el=o;var a=this._zr=e.getZr(),s=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],p(this._styleCoord,a,s,e.getWidth()/2,e.getHeight()/2),s?document.body.appendChild(o):t.appendChild(o),this._container=t,this._show=!1,this._hideTimeout;var l=this;o.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},o.onmousemove=function(t){if(t=t||window.event,!l._enterable){var e=a.handler,i=a.painter.getViewportRoot();n.normalizeEvent(i,t,!0),e.dispatch("mousemove",t)}},o.onmouseleave=function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1}}f.prototype={constructor:f,_enterable:!0,update:function(t){var e=this._container,n=e.currentStyle||document.defaultView.getComputedStyle(e),i=e.style;"absolute"!==i.position&&"absolute"!==n.position&&(i.position="relative"),t.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var t=this._styleCoord[2],e=this._styleCoord[3],n=t*this._zr.getWidth(),i=e*this._zr.getHeight();this.moveTo(n,i)},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,n=this._styleCoord;e.style.cssText=u+d(t)+";left:"+n[0]+"px;top:"+n[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"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 n=this._styleCoord;p(n,this._zr,this._appendToBody,t,e);var i=this.el.style;i.left=n[0]+"px",i.top=n[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(t.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}};var g=f;return p9=g}(),r=function(){if(v9)return g9;v9=1;var t=bW(),e=NZ(),n=zX();function i(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function r(t){var e=this._zr=t.getZr();this._styleCoord=[0,0,0,0],i(this._styleCoord,e,t.getWidth()/2,t.getHeight()/2),this._show=!1,this._hideTimeout}r.prototype={constructor:r,_enterable:!0,update:function(t){t.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var t=this._styleCoord[2],e=this._styleCoord[3],n=t*this._zr.getWidth(),i=e*this._zr.getHeight();this.moveTo(n,i)},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,i,r){this.el&&this._zr.remove(this.el);for(var o={},a=t,s="{marker",l="|}",u=a.indexOf(s);u>=0;){var h=a.indexOf(l),c=a.substr(u+s.length,h-u-s.length);c.indexOf("sub")>-1?o["marker"+c]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:i[c],textOffset:[3,0]}:o["marker"+c]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:i[c]},u=(a=a.substr(h+1)).indexOf("{marker")}var d=r.getModel("textStyle"),p=d.get("fontSize"),f=r.get("textLineHeight");null==f&&(f=Math.round(3*p/2)),this.el=new e({style:n.setTextStyle({},d,{rich:o,text:t,textBackgroundColor:r.get("backgroundColor"),textBorderRadius:r.get("borderRadius"),textFill:r.get("textStyle.color"),textPadding:r.get("padding"),textLineHeight:f}),z:r.get("z")}),this._zr.add(this.el);var g=this;this.el.on("mouseover",(function(){g._enterable&&(clearTimeout(g._hideTimeout),g._show=!0),g._inContent=!0})),this.el.on("mouseout",(function(){g._enterable&&g._show&&g.hideLater(g._hideDelay),g._inContent=!1}))},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){if(this.el){var n=this._styleCoord;i(n,this._zr,t,e),this.el.attr("position",[n[0],n[1]])}},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(t.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var o=r;return g9=o}(),o=ij(),a=YX(),s=zX(),l=x6(),u=rj(),h=VX(),c=C6(),d=zK(),p=Z6(),f=AY().getTooltipRenderMode,g=e.bind,v=e.each,m=a.parsePercent,y=new s.Rect({shape:{x:-1,y:-1,width:2,height:2}}),x=t.extendComponentView({type:"tooltip",init:function(t,e){if(!n.node){var o,a=t.getComponent("tooltip"),s=a.get("renderMode");this._renderMode=f(s),"html"===this._renderMode?(o=new i(e.getDom(),e,{appendToBody:a.get("appendToBody",!0)}),this._newLine="
"):(o=new r(e),this._newLine="\n"),this._tooltipContent=o}},render:function(t,e,i){if(!n.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var r=this._tooltipContent;r.update(t),r.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");c.register("itemTooltip",this._api,g((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})}))}},manuallyShowTip:function(t,e,i,r){if(r.from!==this.uid&&!n.node){var o=b(r,i);this._ticket="";var a=r.dataByCoordSys;if(r.tooltip&&null!=r.x&&null!=r.y){var s=y;s.position=[r.x,r.y],s.update(),s.tooltip=r.tooltip,this._tryShow({offsetX:r.x,offsetY:r.y,target:s},o)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:r.dataByCoordSys,tooltipOption:r.tooltipOption},o);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,r))return;var u=l(r,e),h=u.point[0],c=u.point[1];null!=h&&null!=c&&this._tryShow({offsetX:h,offsetY:c,position:r.position,target:u.el},o)}else null!=r.x&&null!=r.y&&(i.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:i.getZr().findHover(r.x,r.y).target},o))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(b(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===(t=_([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},_tryShow:function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,n){var i=t.get("showDelay");n=e.bind(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},_showAxisTooltip:function(t,n){var i=this._ecModel,r=this._tooltipModel,a=[n.offsetX,n.offsetY],s=[],l=[],u=_([n.tooltipOption,r]),h=this._renderMode,c=this._newLine,f={};v(t,(function(t){v(t.dataByAxis,(function(t){var n=i.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value,a=[];if(n&&null!=r){var u=p.getValueLabel(r,n.axis,i,t.seriesDataIndices,t.valueLabelOpt);e.each(t.seriesDataIndices,(function(o){var s=i.getSeriesByIndex(o.seriesIndex),c=o.dataIndexInside,p=s&&s.getDataParams(c);if(p.axisDim=t.axisDim,p.axisIndex=t.axisIndex,p.axisType=t.axisType,p.axisId=t.axisId,p.axisValue=d.getAxisRawValue(n.axis,r),p.axisValueLabel=u,p){l.push(p);var g,v=s.formatTooltip(c,!0,null,h);if(e.isObject(v)){g=v.html;var m=v.markers;e.merge(f,m)}else g=v;a.push(g)}}));var g=u;"html"!==h?s.push(a.join(c)):s.push((g?o.encodeHTML(g)+c:"")+a.join(c))}}))}),this),s.reverse(),s=s.join(this._newLine+this._newLine);var g=n.position;this._showOrMove(u,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(u,g,a[0],a[1],this._tooltipContent,l):this._showTooltipContent(u,s,l,Math.random(),a[0],a[1],g,void 0,f)}))},_showSeriesItemTooltip:function(t,n,i){var r=this._ecModel,o=n.seriesIndex,a=r.getSeriesByIndex(o),s=n.dataModel||a,l=n.dataIndex,u=n.dataType,h=s.getData(u),c=_([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),d=c.get("trigger");if(null==d||"item"===d){var p,f,g=s.getDataParams(l,u),v=s.formatTooltip(l,!1,u,this._renderMode);e.isObject(v)?(p=v.html,f=v.markers):(p=v,f=null);var m="item_"+s.name+"_"+l;this._showOrMove(c,(function(){this._showTooltipContent(c,p,g,m,t.offsetX,t.offsetY,t.position,t.target,f)})),i({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;"string"==typeof i&&(i={content:i,formatter:i});var r=new h(i,this._tooltipModel,this._ecModel),o=r.get("content"),a=Math.random();this._showOrMove(r,(function(){this._showTooltipContent(r,o,r.get("formatterParams")||{},a,t.offsetX,t.offsetY,t.position,e)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,a,s,l,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent,c=t.get("formatter");s=s||t.get("position");var d=e;if(c&&"string"==typeof c)d=o.formatTpl(c,n,!0);else if("function"==typeof c){var p=g((function(e,i){e===this._ticket&&(h.setContent(i,u,t),this._updatePosition(t,s,r,a,h,n,l))}),this);this._ticket=i,d=c(n,i,p)}h.setContent(d,u,t),h.show(t),this._updatePosition(t,s,r,a,h,n,l)}},_updatePosition:function(t,n,i,r,o,a,s){var l=this._api.getWidth(),h=this._api.getHeight();n=n||t.get("position");var c=o.getSize(),d=t.get("align"),p=t.get("verticalAlign"),f=s&&s.getBoundingRect().clone();if(s&&f.applyTransform(s.transform),"function"==typeof n&&(n=n([i,r],a,o.el,f,{viewSize:[l,h],contentSize:c.slice()})),e.isArray(n))i=m(n[0],l),r=m(n[1],h);else if(e.isObject(n)){n.width=c[0],n.height=c[1];var g=u.getLayoutRect(n,{width:l,height:h});i=g.x,r=g.y,d=null,p=null}else if("string"==typeof n&&s)i=(v=M(n,f,c))[0],r=v[1];else{var v;i=(v=w(i,r,o,l,h,d?null:20,p?null:20))[0],r=v[1]}d&&(i-=I(d)?c[0]/2:"right"===d?c[0]:0),p&&(r-=I(p)?c[1]/2:"bottom"===p?c[1]:0),t.get("confine")&&(i=(v=S(i,r,o,l,h))[0],r=v[1]),o.moveTo(i,r)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&v(e,(function(e,i){var r=e.dataByAxis||{},o=(t[i]||{}).dataByAxis||[];(n&=r.length===o.length)&&v(r,(function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&v(r,(function(t,e){var i=a[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){n.node||(this._tooltipContent.dispose(),c.unregister("itemTooltip",e))}});function _(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(h.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new h(n,e,e.ecModel))}return e}function b(t,n){return t.dispatchAction||e.bind(n.dispatchAction,n)}function w(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}function S(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,[t=Math.max(t,0),e=Math.max(e,0)]}function M(t,e,n){var i=n[0],r=n[1],o=5,a=0,s=0,l=e.width,u=e.height;switch(t){case"inside":a=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":a=e.x+l/2-i/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-i/2,s=e.y+u+o;break;case"left":a=e.x-i-o,s=e.y+u/2-r/2;break;case"right":a=e.x+l+o,s=e.y+u/2-r/2}return[a,s]}function I(t){return"center"===t||"middle"===t}m9=x}(),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}))}(),j6(),function(){if(B9)return k9;B9=1;var t=s$(),e=function(){if(b9)return _9;b9=1;var t=bW(),e=["rect","polygon","keep","clear"];function n(n,r){var o=n&&n.brush;if(t.isArray(o)||(o=o?[o]:[]),o.length){var a=[];t.each(o,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(a=a.concat(e))}));var s=n&&n.toolbox;t.isArray(s)&&(s=s[0]),s||(s={feature:{}},n.toolbox=[s]);var l=s.feature||(s.feature={}),u=l.brush||(l.brush={}),h=u.type||(u.type=[]);h.push.apply(h,a),i(h),r&&!h.length&&h.push.apply(h,e)}}function i(e){var n={};t.each(e,(function(t){n[t]=1})),e.length=0,t.each(n,(function(t,n){e.push(n)}))}return _9=n}();N9(),function(){if(C9)return T9;C9=1,cW().__DEV__;var t=s$(),e=bW(),n=R9(),i=VX(),r=["#ddd"],o=t.extendComponentModel({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&&n.replaceVisualOption(i,t,["inBrush","outOfBrush"]);var o=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:r},o.hasOwnProperty("liftZ")||(o.liftZ=5)},setAreas:function(t){t&&(this.areas=e.map(t,(function(t){return a(this.option,t)}),this))},setBrushOption:function(t){this.brushOption=a(this.option,t),this.brushType=this.brushOption.brushType}});function a(t,n){return e.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new i(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},n,!0)}var s=o;T9=s}(),function(){if(D9)return A9;D9=1;var t=s$(),e=bW(),n=J5(),i=N9().layoutCovers,r=t.extendComponentView({type:"brush",init:function(t,i){this.ecModel=t,this.api=i,this.model,(this._brushController=new n(i.getZr())).on("brush",e.bind(this._onBrush,this)).mount()},render:function(t){return this.model=t,o.apply(this,arguments)},updateTransform:function(t,e){return i(e),o.apply(this,arguments)},updateView:o,dispose:function(){this._brushController.dispose()},_onBrush:function(t,n){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!n.isEnd||n.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:e.clone(t),$from:i}),n.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:e.clone(t),$from:i})}});function o(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}A9=r}(),function(){if(E9)return ntt;E9=1;var t=s$();t.registerAction({type:"brush",event:"brush"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}))}(),function(){if(V9)return z9;V9=1;var t=bW(),e=v7(),n=wq(),i=n.toolbox.brush;function r(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}r.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:t.clone(i.title)};var o=r.prototype;o.render=o.updateView=function(e,n,i){var r,o,a;n.eachComponent({mainType:"brush"},(function(t){r=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length})),this._brushType=r,this._brushMode=o,t.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===r)?"emphasis":"normal")}))},o.getIcons=function(){var e=this.model,n=e.get("icon",!0),i={};return t.each(e.get("type",!0),(function(t){n[t]&&(i[t]=n[t])})),i},o.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.register("brush",r),z9=r}(),t.registerPreprocessor(e)}(),function(){if(F9)return itt;F9=1;var t=bW(),e=s$(),n=zX(),i=rj().getLayoutRect,r=ij().windowOpen;e.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),e.extendComponentView({type:"title",render:function(e,o,a){if(this.group.removeAll(),e.get("show")){var s=this.group,l=e.getModel("textStyle"),u=e.getModel("subtextStyle"),h=e.get("textAlign"),c=t.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),d=new n.Text({style:n.setTextStyle({},l,{text:e.get("text"),textFill:l.getTextColor()},{disableBox:!0}),z2:10}),p=d.getBoundingRect(),f=e.get("subtext"),g=new n.Text({style:n.setTextStyle({},u,{text:f,textFill:u.getTextColor(),y:p.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),v=e.get("link"),m=e.get("sublink"),y=e.get("triggerEvent",!0);d.silent=!v&&!y,g.silent=!m&&!y,v&&d.on("click",(function(){r(v,"_"+e.get("target"))})),m&&g.on("click",(function(){r(m,"_"+e.get("subtarget"))})),d.eventData=g.eventData=y?{componentType:"title",componentIndex:e.componentIndex}:null,s.add(d),f&&s.add(g);var x=s.getBoundingRect(),_=e.getBoxLayoutParams();_.width=x.width,_.height=x.height;var b=i(_,{width:a.getWidth(),height:a.getHeight()},e.get("padding"));h||("middle"===(h=e.get("left")||e.get("right"))&&(h="center"),"right"===h?b.x+=b.width:"center"===h&&(b.x+=b.width/2)),c||("center"===(c=e.get("top")||e.get("bottom"))&&(c="middle"),"bottom"===c?b.y+=b.height:"middle"===c&&(b.y+=b.height/2),c=c||"top"),s.attr("position",[b.x,b.y]);var w={textAlign:h,textVerticalAlign:c};d.setStyle(w),g.setStyle(w),x=s.getBoundingRect();var S=b.margin,M=e.getItemStyle(["color","opacity"]);M.fill=e.get("backgroundColor");var I=new n.Rect({shape:{x:x.x-S[3],y:x.y-S[0],width:x.width+S[1]+S[3],height:x.height+S[0]+S[2],r:e.get("borderRadius")},style:M,subPixelOptimize:!0,silent:!0});s.add(I)}}})}(),function(){if(ett)return rtt;ett=1;var t=s$(),e=function(){if(H9)return G9;H9=1;var t=bW();function e(e){var i=e&&e.timeline;t.isArray(i)||(i=i?[i]:[]),t.each(i,(function(t){t&&n(t)}))}function n(e){var n=e.type,o={number:"value",time:"time"};if(o[n]&&(e.axisType=o[n],delete e.type),i(e),r(e,"controlPosition")){var a=e.controlStyle||(e.controlStyle={});r(a,"position")||(a.position=e.controlPosition),"none"!==a.position||r(a,"show")||(a.show=!1,delete a.position),delete e.controlPosition}t.each(e.data||[],(function(e){t.isObject(e)&&!t.isArray(e)&&(!r(e,"value")&&r(e,"name")&&(e.value=e.name),i(e))}))}function i(e){var n=e.itemStyle||(e.itemStyle={}),i=n.emphasis||(n.emphasis={}),o=e.label||e.label||{},a=o.normal||(o.normal={}),s={normal:1,emphasis:1};t.each(o,(function(t,e){s[e]||r(a,e)||(a[e]=t)})),i.label&&!r(o,"emphasis")&&(o.emphasis=i.label,delete i.label)}function r(t,e){return t.hasOwnProperty(e)}return G9=e}();(function(){if(W9)return ott;W9=1;var t=oj();t.registerSubTypeDefaulter("timeline",(function(){return"slider"}))})(),function(){if(U9)return att;U9=1;var t=s$(),e=bW();t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(t,n){var i=n.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),n.resetOption("timeline"),e.defaults({currentIndex:i.option.currentIndex},t)})),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)}))}(),function(){if(j9)return X9;j9=1;var t=bW(),e=function(){if(Z9)return Y9;Z9=1;var t=bW(),e=oj(),n=tK(),i=AY(),r=e.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:{},label:{color:"#000"},data:[]},init:function(t,e,n){this._data,this._names,this.mergeDefaultAndTheme(t,n),this._initData()},mergeOption:function(t){r.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 e=this.option,r=e.data||[],o=e.axisType,a=this._names=[];if("category"===o){var s=[];t.each(r,(function(e,n){var r,o=i.getDataItemValue(e);t.isObject(e)?(r=t.clone(e)).value=n:r=n,s.push(r),t.isString(o)||null!=o&&!isNaN(o)||(o=""),a.push(o+"")})),r=s}var l={category:"ordinal",time:"time"}[o]||"number";(this._data=new n([{name:"value",type:l}],this)).initData(r,a)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),o=r;return Y9=o}(),n=Hj(),i=e.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",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},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",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});t.mixin(i,n);var r=i;X9=r}(),function(){if(ttt)return Q9;ttt=1;var t=bW(),e=kU(),n=$W(),i=zX(),r=rj(),o=stt(),a=function(){if(J9)return $9;J9=1;var t=bW(),e=o$(),n=function(t,n,i,r){e.call(this,t,n,i),this.type=r||"value",this.model=null};n.prototype={constructor:n,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},t.inherits(n,e);var i=n;return $9=i}(),s=HK().createSymbol,l=zK(),u=YX(),h=ij().encodeHTML,c=t.bind,d=t.each,p=Math.PI,f=o.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,n,i){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var r=this._layout(t,n),o=this._createGroup("mainGroup"),a=this._createGroup("labelGroup"),s=this._axis=this._createAxis(r,t);t.formatTooltip=function(t){return h(s.scale.getLabel(t))},d(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](r,o,s,t)}),this),this._renderAxisLabel(r,a,s,t),this._position(r,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var n=t.get("label.position"),i=t.get("orient"),r=g(t,e);null==n||"auto"===n?n="horizontal"===i?r.y+r.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:p/2},d="vertical"===i?r.height:r.width,f=t.getModel("controlStyle"),v=f.get("show",!0),m=v?f.get("itemSize"):0,y=v?f.get("itemGap"):0,x=m+y,_=t.get("label.rotate")||0;_=_*p/180;var b=f.get("position",!0),w=v&&f.get("showPlayBtn",!0),S=v&&f.get("showPrevBtn",!0),M=v&&f.get("showNextBtn",!0),I=0,T=d;return"left"===b||"bottom"===b?(w&&(o=[0,0],I+=x),S&&(a=[I,0],I+=x),M&&(s=[T-m,0],T-=x)):(w&&(o=[T-m,0],T-=x),S&&(a=[0,0],I+=x),M&&(s=[T-m,0],T-=x)),l=[I,T],t.get("inverse")&&l.reverse(),{viewRect:r,mainLength:d,orient:i,rotation:c[i],labelRotation:_,labelPosOpt:n,labelAlign:t.get("label.align")||u[i],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||h[i],playPosition:o,prevBtnPosition:a,nextBtnPosition:s,axisExtent:l,controlSize:m,controlGap:y}},_position:function(t,e){var i=this._mainGroup,r=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var a=n.create(),s=o.x,l=o.y+o.height;n.translate(a,a,[-s,-l]),n.rotate(a,a,-p/2),n.translate(a,a,[s,l]),(o=o.clone()).applyTransform(a)}var u=y(o),h=y(i.getBoundingRect()),c=y(r.getBoundingRect()),d=i.position,f=r.position;f[0]=d[0]=u[0][0];var g,v=t.labelPosOpt;function m(t){var e=t.position;t.origin=[u[0][0]-e[0],u[1][0]-e[1]]}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function x(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}isNaN(v)?(x(d,h,u,1,g="+"===v?0:1),x(f,c,u,1,1-g)):(x(d,h,u,1,g=v>=0?0:1),f[1]=d[1]+v),i.attr("position",d),r.attr("position",f),i.rotation=r.rotation=t.rotation,m(i),m(r)},_createAxis:function(t,e){var n=e.getData(),i=e.get("axisType"),r=l.createScaleByModel(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return t}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.niceTicks();var s=new a("value",r,t.axisExtent,i);return s.model=e,s},_createGroup:function(t){var e=this["_"+t]=new i.Group;return this.group.add(e),e},_renderAxisLine:function(e,n,r,o){var a=r.getExtent();o.get("lineStyle.show")&&n.add(new i.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:t.extend({lineCap:"round"},o.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,n,r){var o=r.getData(),a=n.scale.getTicks();d(a,(function(t){var a=n.dataToCoord(t),s=o.getItemModel(t),l=s.getModel("itemStyle"),u=s.getModel("emphasis.itemStyle"),h={position:[a,0],onclick:c(this._changeTimeline,this,t)},d=m(s,l,e,h);i.setHoverStyle(d,u.getItemStyle()),s.get("tooltip")?(d.dataIndex=t,d.dataModel=r):d.dataIndex=d.dataModel=null}),this)},_renderAxisLabel:function(t,e,n,r){if(n.getLabelModel().get("show")){var o=r.getData(),a=n.getViewLabels();d(a,(function(r){var a=r.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel("emphasis.label"),h=n.dataToCoord(r.tickValue),d=new i.Text({position:[h,0],rotation:t.labelRotation-t.rotation,onclick:c(this._changeTimeline,this,a),silent:!1});i.setTextStyle(d.style,l,{text:r.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(d),i.setHoverStyle(d,i.setTextStyle({},u))}),this)}},_renderControl:function(t,e,n,r){var o=t.controlSize,a=t.rotation,s=r.getModel("controlStyle").getItemStyle(),l=r.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-o/2,o,o],h=r.getPlayState(),d=r.get("inverse",!0);function p(t,n,h,c){if(t){var d=v(r,n,u,{position:t,origin:[o/2,0],rotation:c?-a:0,rectHover:!0,style:s,onclick:h});e.add(d),i.setHoverStyle(d,l)}}p(t.nextBtnPosition,"controlStyle.nextIcon",c(this._changeTimeline,this,d?"-":"+")),p(t.prevBtnPosition,"controlStyle.prevIcon",c(this._changeTimeline,this,d?"+":"-")),p(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),c(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=c(s._handlePointerDrag,s),t.ondragend=c(s._handlePointerDragend,s),y(t,o,n,i,!0)},onUpdate:function(t){y(t,o,n,i)}};this._currentPointer=m(a,a,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var n=this._toAxisCoord(t)[0],i=this._axis,r=u.asc(i.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),g.coord[p]=v.coord[p]=h,o=[g,v,{type:l,valueIndex:o.valueIndex,value:h}]}return(o=[i.dataTransform(e,o[0]),i.dataTransform(e,o[1]),t.extend({},o[2])])[2].type=o[2].type||"",t.merge(o[2],o[0]),t.merge(o[2],o[1]),o};function l(t){return!isNaN(t)&&!isFinite(t)}function u(t,e,n,i){var r=1-t,o=i.dimensions[t];return l(e[r])&&l(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function h(t,e){if("cartesian2d"===t.type){var n=e[0].coord,r=e[1].coord;if(n&&r&&(u(1,n,r,t)||u(0,n,r,t)))return!0}return i.dataFilter(t,e[0])&&i.dataFilter(t,e[1])}function c(t,e,i,r,o){var a,s=r.coordinateSystem,u=t.getItemModel(e),h=n.parsePercent(u.get("x"),o.getWidth()),c=n.parsePercent(u.get("y"),o.getHeight());if(isNaN(h)||isNaN(c)){if(r.getMarkerPosition)a=r.getMarkerPosition(t.getValues(t.dimensions,e));else{var d=s.dimensions,p=t.get(d[0],e),f=t.get(d[1],e);a=s.dataToPoint([p,f])}if("cartesian2d"===s.type){var g=s.getAxis("x"),v=s.getAxis("y");d=s.dimensions,l(t.get(d[0],e))?a[0]=g.toGlobalCoord(g.getExtent()[i?0:1]):l(t.get(d[1],e))&&(a[1]=v.toGlobalCoord(v.getExtent()[i?0:1]))}isNaN(h)||(a[0]=h),isNaN(c)||(a[1]=c)}else a=[h,c];t.setItemLayout(e,a)}var d=o.extend({type:"markLine",updateTransform:function(t,e,n){e.eachSeries((function(t){var e=t.markLineModel;if(e){var i=e.getData(),r=e.__from,o=e.__to;r.each((function(e){c(r,e,!0,t,n),c(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(e,n,i,o){var a=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new r);this.group.add(h.group);var d=p(a,e,n),f=d.from,g=d.to,v=d.line;n.__from=f,n.__to=g,n.setData(v);var m=n.get("symbol"),y=n.get("symbolSize");function x(t,n,i){var r=t.getItemModel(n);c(t,n,i,e,o),t.setItemVisual(n,{symbolRotate:r.get("symbolRotate"),symbolSize:r.get("symbolSize")||y[i?0:1],symbol:r.get("symbol",!0)||m[i?0:1],color:r.get("itemStyle.color")||l.getVisual("color")})}t.isArray(m)||(m=[m,m]),"number"==typeof y&&(y=[y,y]),d.from.each((function(t){x(f,t,!0),x(g,t,!1)})),v.each((function(t){var e=v.getItemModel(t).get("lineStyle.color");v.setItemVisual(t,{color:e||f.getItemVisual(t,"color")}),v.setItemLayout(t,[f.getItemLayout(t),g.getItemLayout(t)]),v.setItemVisual(t,{fromSymbolRotate:f.getItemVisual(t,"symbolRotate"),fromSymbolSize:f.getItemVisual(t,"symbolSize"),fromSymbol:f.getItemVisual(t,"symbol"),toSymbolRotate:g.getItemVisual(t,"symbolRotate"),toSymbolSize:g.getItemVisual(t,"symbolSize"),toSymbol:g.getItemVisual(t,"symbol")})})),h.updateData(v),d.line.eachItemGraphicEl((function(t,e){t.traverse((function(t){t.dataModel=n}))})),h.__keep=!0,h.group.silent=n.get("silent")||e.get("silent")}});function p(n,r,o){var a;a=n?t.map(n&&n.dimensions,(function(e){var n=r.getData().getDimensionInfo(r.getData().mapDimension(e))||{};return t.defaults({name:e},n)})):[{name:"value",type:"float"}];var l=new e(a,o),u=new e(a,o),c=new e([],o),d=t.map(o.get("data"),t.curry(s,r,n,o));n&&(d=t.filter(d,t.curry(h,n)));var p=n?i.dimValueGetter:function(t){return t.value};return l.initData(t.map(d,(function(t){return t[0]})),null,p),u.initData(t.map(d,(function(t){return t[1]})),null,p),c.initData(t.map(d,(function(t){return t[2]}))),c.hasItemOption=!0,{from:l,to:u,line:c}}Itt=d}(),t.registerPreprocessor((function(t){t.markLine=t.markLine||{}}))}(),function(){if(ktt)return Ntt;ktt=1;var t=s$();(function(){if(Dtt)return Att;Dtt=1;var t=ptt(),e=t.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});Att=e})(),function(){if(Ltt)return Ett;Ltt=1;var t=bW(),e=sU(),n=tK(),i=YX(),r=zX(),o=btt(),a=wtt(),s=function(e,n,i,r){var a=o.dataTransform(e,r[0]),s=o.dataTransform(e,r[1]),l=t.retrieve,u=a.coord,h=s.coord;u[0]=l(u[0],-1/0),u[1]=l(u[1],-1/0),h[0]=l(h[0],1/0),h[1]=l(h[1],1/0);var c=t.mergeAll([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c};function l(t){return!isNaN(t)&&!isFinite(t)}function u(t,e,n,i){var r=1-t;return l(e[r])&&l(n[r])}function h(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!u(1,n,i)&&!u(0,n,i))||o.dataFilter(t,{coord:n,x:e.x0,y:e.y0})||o.dataFilter(t,{coord:i,x:e.x1,y:e.y1})}function c(t,e,n,r,o){var a,s=r.coordinateSystem,u=t.getItemModel(e),h=i.parsePercent(u.get(n[0]),o.getWidth()),c=i.parsePercent(u.get(n[1]),o.getHeight());if(isNaN(h)||isNaN(c)){if(r.getMarkerPosition)a=r.getMarkerPosition(t.getValues(n,e));else{var d=[g=t.get(n[0],e),v=t.get(n[1],e)];s.clampData&&s.clampData(d,d),a=s.dataToPoint(d,!0)}if("cartesian2d"===s.type){var p=s.getAxis("x"),f=s.getAxis("y"),g=t.get(n[0],e),v=t.get(n[1],e);l(g)?a[0]=p.toGlobalCoord(p.getExtent()["x0"===n[0]?0:1]):l(v)&&(a[1]=f.toGlobalCoord(f.getExtent()["y0"===n[1]?0:1]))}isNaN(h)||(a[0]=h),isNaN(c)||(a[1]=c)}else a=[h,c];return a}var d=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];function p(e,i,r){var o,a,l=["x0","y0","x1","y1"];e?(o=t.map(e&&e.dimensions,(function(e){var n=i.getData(),r=n.getDimensionInfo(n.mapDimension(e))||{};return t.defaults({name:e},r)})),a=new n(t.map(l,(function(t,e){return{name:t,type:o[e%2].type}})),r)):a=new n(o=[{name:"value",type:"float"}],r);var u=t.map(r.get("data"),t.curry(s,i,e,r));e&&(u=t.filter(u,t.curry(h,e)));var c=e?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return a.initData(u,null,c),a.hasItemOption=!0,a}a.extend({type:"markArea",updateTransform:function(e,n,i){n.eachSeries((function(e){var n=e.markAreaModel;if(n){var r=n.getData();r.each((function(n){var o=t.map(d,(function(t){return c(r,n,t,e,i)}));r.setItemLayout(n,o),r.getItemGraphicEl(n).setShape("points",o)}))}}),this)},renderSeries:function(n,i,o,a){var s=n.coordinateSystem,u=n.id,h=n.getData(),f=this.markerGroupMap,g=f.get(u)||f.set(u,{group:new r.Group});this.group.add(g.group),g.__keep=!0;var v=p(s,n,i);i.setData(v),v.each((function(e){var i=t.map(d,(function(t){return c(v,e,t,n,a)})),r=!0;t.each(d,(function(t){if(r){var n=v.get(t[0],e),i=v.get(t[1],e);(l(n)||s.getAxis("x").containData(n))&&(l(i)||s.getAxis("y").containData(i))&&(r=!1)}})),v.setItemLayout(e,{points:i,allClipped:r}),v.setItemVisual(e,{color:h.getVisual("color")})})),v.diff(g.__data).add((function(t){var e=v.getItemLayout(t);if(!e.allClipped){var n=new r.Polygon({shape:{points:e.points}});v.setItemGraphicEl(t,n),g.group.add(n)}})).update((function(t,e){var n=g.__data.getItemGraphicEl(e),o=v.getItemLayout(t);o.allClipped?n&&g.group.remove(n):(n?r.updateProps(n,{shape:{points:o.points}},i,t):n=new r.Polygon({shape:{points:o.points}}),v.setItemGraphicEl(t,n),g.group.add(n))})).remove((function(t){var e=g.__data.getItemGraphicEl(t);g.group.remove(e)})).execute(),v.eachItemGraphicEl((function(n,o){var a=v.getItemModel(o),s=a.getModel("label"),l=a.getModel("emphasis.label"),u=v.getItemVisual(o,"color");n.useStyle(t.defaults(a.getModel("itemStyle").getItemStyle(),{fill:e.modifyAlpha(u,.4),stroke:u})),n.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle(),r.setLabelStyle(n.style,n.hoverStyle,s,l,{labelFetcher:i,labelDataIndex:o,defaultText:v.getName(o)||"",isRectText:!0,autoColor:u}),r.setHoverStyle(n,{}),n.dataModel=i})),g.__data=v,g.group.silent=i.get("silent")||n.get("silent")}})}(),t.registerPreprocessor((function(t){t.markArea=t.markArea||{}}))}(),tet||(tet=1,Jtt(),function(){if(Ztt)return Ytt;Ztt=1;var t=Vtt(),e=rj(),n=e.mergeLayoutParam,i=e.getLayoutParams,r=t.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,n,a){var s=i(t);r.superCall(this,"init",t,e,n,a),o(this,t,s)},mergeOption:function(t,e){r.superCall(this,"mergeOption",t,e),o(this,this.option,t)}});function o(t,e,i){var r=[1,1];r[t.getOrient().index]=0,n(e,i,{type:"box",ignoreSize:r})}var a=r;Ytt=a}(),function(){if(jtt)return Xtt;jtt=1;var t=bW(),e=zX(),n=rj(),i=Ktt(),r=e.Group,o=["width","height"],a=["x","y"],s=i.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){s.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new r),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new r),this._showController},resetInner:function(){s.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(n,i,r,o,a,l,u){var h=this;s.superCall(this,"renderInner",n,i,r,o,a,l,u);var c=this._controllerGroup,d=i.get("pageIconSize",!0);t.isArray(d)||(d=[d,d]),f("pagePrev",0);var p=i.getModel("pageTextStyle");function f(n,r){var a=n+"DataIndex",s=e.createIcon(i.get("pageIcons",!0)[i.getOrient().name][r],{onclick:t.bind(h._pageGo,h,a,i,o)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});s.name=n,c.add(s)}c.add(new e.Text({name:"pageText",style:{textFill:p.getTextColor(),font:p.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),f("pageNext",1)},layoutInner:function(e,i,r,s,l,u){var h=this.getSelectorGroup(),c=e.getOrient().index,d=o[c],p=a[c],f=o[1-c],g=a[1-c];l&&n.box("horizontal",h,e.get("selectorItemGap",!0));var v=e.get("selectorButtonGap",!0),m=h.getBoundingRect(),y=[-m.x,-m.y],x=t.clone(r);l&&(x[d]=r[d]-m[d]-v);var _=this._layoutContentAndController(e,s,x,c,d,f,g);if(l){if("end"===u)y[c]+=_[d]+v;else{var b=m[d]+v;y[c]-=b,_[p]-=b}_[d]+=m[d]+v,y[1-c]+=_[g]+_[f]/2-m[f]/2,_[f]=Math.max(_[f],m[f]),_[g]=Math.min(_[g],m[g]+y[1-c]),h.attr("position",y)}return _},_layoutContentAndController:function(i,r,o,a,s,l,u){var h=this.getContentGroup(),c=this._containerGroup,d=this._controllerGroup;n.box(i.get("orient"),h,i.get("itemGap"),a?o.width:null,a?null:o.height),n.box("horizontal",d,i.get("pageButtonItemGap",!0));var p=h.getBoundingRect(),f=d.getBoundingRect(),g=this._showController=p[s]>o[s],v=[-p.x,-p.y];r||(v[a]=h.position[a]);var m=[0,0],y=[-f.x,-f.y],x=t.retrieve2(i.get("pageButtonGap",!0),i.get("itemGap",!0));g&&("end"===i.get("pageButtonPosition",!0)?y[a]+=o[s]-f[s]:m[a]+=f[s]+x),y[1-a]+=p[l]/2-f[l]/2,h.attr("position",v),c.attr("position",m),d.attr("position",y);var _={x:0,y:0};if(_[s]=g?o[s]:p[s],_[l]=Math.max(p[l],f[l]),_[u]=Math.min(0,f[u]+y[1-a]),c.__rectSize=o[s],g){var b={x:0,y:0};b[s]=Math.max(o[s]-f[s]-x,0),b[l]=_[l],c.setClipPath(new e.Rect({shape:b})),c.__rectSize=b[s]}else d.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var w=this._getPageInfo(i);return null!=w.pageIndex&&e.updateProps(h,{position:w.contentPosition},!!g&&i),this._updatePageInfoView(i,w),_},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(e,n){var i=this._controllerGroup;t.each(["pagePrev","pageNext"],(function(t){var r=null!=n[t+"DataIndex"],o=i.childOfName(t);o&&(o.setStyle("fill",r?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var r=i.childOfName("pageText"),o=e.get("pageFormatter"),a=n.pageIndex,s=null!=a?a+1:0,l=n.pageCount;r&&o&&r.setStyle("text",t.isString(o)?o.replace("{current}",s).replace("{total}",l):o({current:s,total:l}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,s=o[r],l=a[r],u=this._findTargetItemIndex(e),h=n.children(),c=h[u],d=h.length,p=d?1:0,f={contentPosition:n.position.slice(),pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return f;var g=_(c);f.contentPosition[r]=-g.s;for(var v=u+1,m=g,y=g,x=null;v<=d;++v)(!(x=_(h[v]))&&y.e>m.s+i||x&&!b(x,m.s))&&(m=y.i>m.i?y:x)&&(null==f.pageNextDataIndex&&(f.pageNextDataIndex=m.i),++f.pageCount),y=x;for(v=u-1,m=g,y=g,x=null;v>=-1;--v)(x=_(h[v]))&&b(y,x.s)||!(m.i=e&&t.s<=e+i}},_findTargetItemIndex:function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n}}),l=s;Xtt=l}(),function(){if(Qtt)return aet;Qtt=1;var t=s$();t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}()),Jtt(),vet||(vet=1,uet(),_et()),_et(),uet(),rnt||(rnt=1,Jet(),ant()),Jet(),ant(),function(){if(cnt)return dnt;cnt=1,function(){if(lnt)return pnt;lnt=1;var t=yW(),e=AW().applyTransform,n=kU(),i=sU(),r=eY(),o=xY(),a=_Y(),s=bY(),l=wY(),u=NZ(),h=PZ(),c=qY(),d=RX(),p=gnt(),f=c.CMD,g=Math.round,v=Math.sqrt,m=Math.abs,y=Math.cos,x=Math.sin,_=Math.max;if(!t.canvasSupported){var b=",",w="progid:DXImageTransform.Microsoft",S=21600,M=S/2,I=1e5,T=1e3,C=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=S+","+S,t.coordorigin="0,0"},A=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},D=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},L=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},k=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},P=function(t,e,n){return(parseFloat(t)||0)*I+(parseFloat(e)||0)*T+n},O=o.parsePercent,R=function(t,e,n){var r=i.parse(e);n=+n,isNaN(n)&&(n=1),r&&(t.color=D(r[0],r[1],r[2]),t.opacity=n*r[3])},N=function(t){var e=i.parse(t);return[D(e[0],e[1],e[2]),e[3]]},E=function(t,n,i){var r=n.fill;if(null!=r)if(r instanceof d){var o,a=0,s=[0,0],l=0,u=1,h=i.getBoundingRect(),c=h.width,p=h.height;if("linear"===r.type){o="gradient";var f=i.transform,g=[r.x*c,r.y*p],v=[r.x2*c,r.y2*p];f&&(e(g,g,f),e(v,v,f));var m=v[0]-g[0],y=v[1]-g[1];(a=180*Math.atan2(m,y)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial",g=[r.x*c,r.y*p],f=i.transform;var x=i.scale,b=c,w=p;s=[(g[0]-h.x)/b,(g[1]-h.y)/w],f&&e(g,g,f),b/=x[0]*S,w/=x[1]*S;var M=_(b,w);l=0/M,u=2*r.r/M-l}var I=r.colorStops.slice();I.sort((function(t,e){return t.offset-e.offset}));for(var T=I.length,C=[],A=[],D=0;D=2){var P=C[0][0],O=C[1][0],E=C[0][1]*n.opacity,z=C[1][1]*n.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=P,t.color2=O,t.colors=A.join(","),t.opacity=z,t.opacity2=E}"radial"===o&&(t.focusposition=s.join(","))}else R(t,r,n.opacity)},z=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof d||R(t,e.stroke,e.opacity)},V=function(t,e,n,i){var r="fill"===e,o=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof d&&k(t,o),o||(o=p.createNode(e)),r?E(o,n,i):z(o,n),L(t,o)):(t[r?"filled":"stroked"]="false",k(t,o))},B=[[],[],[]],F=function(t,n){var i,r,o,a,s,l,u=f.M,h=f.C,c=f.L,d=f.A,p=f.Q,m=[],_=t.data,w=t.len();for(a=0;a.01?W&&(U+=270/S):Math.abs(Y-z)<1e-4?W&&UE?A-=270/S:A+=270/S:W&&Yz?C+=270/S:C-=270/S),m.push(Z,g(((E-V)*O+k)*S-M),b,g(((z-F)*R+P)*S-M),b,g(((E+V)*O+k)*S-M),b,g(((z+F)*R+P)*S-M),b,g((U*O+k)*S-M),b,g((Y*R+P)*S-M),b,g((C*O+k)*S-M),b,g((A*R+P)*S-M)),s=C,l=A;break;case f.R:var X=B[0],j=B[1];X[0]=_[a++],X[1]=_[a++],j[0]=X[0]+_[a++],j[1]=X[1]+_[a++],n&&(e(X,X,n),e(j,j,n)),X[0]=g(X[0]*S-M),j[0]=g(j[0]*S-M),X[1]=g(X[1]*S-M),j[1]=g(j[1]*S-M),m.push(" m ",X[0],b,X[1]," l ",j[0],b,X[1]," l ",j[0],b,j[1]," l ",X[0],b,j[1]);break;case f.Z:m.push(" x ")}if(i>0){m.push(r);for(var q=0;qZ&&(Y=0,U={});var n,i=X.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(Fu){}e={style:i.fontStyle||W,variant:i.fontVariant||W,weight:i.fontWeight||W,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},U[t]=e,Y++}return e};r.$override("measureText",(function(t,e){var n=p.doc;H||((H=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",p.doc.body.appendChild(H));try{H.style.font=e}catch(i){}return H.innerHTML="",H.appendChild(n.createTextNode(t)),{width:H.offsetWidth}}));for(var q=new n,K=function(t,n,i,a){var s=this.style;this.__dirty&&o.normalizeTextStyle(s,!0);var l=s.text;if(null!=l&&(l+=""),l){if(s.rich){var u=r.parseRichText(l,s);l=[];for(var h=0;h18),a&&(n.weChat=!0),e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,o);var a,s,l="sans-serif",u="12px "+l,h=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)o=r*t.length;else for(var l=0;l>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,a),l=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,p=h.top;a.push(d,p),l=l&&o&&d===o[c]&&p===o[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?Jt(s,a):Jt(a,s))}(s,a,r);if(l)return l(t,n,i),!0}return!1}function ne(t){return"CANVAS"===t.nodeName.toUpperCase()}var ie=/([&<>"'])/g,re={"&":"&","<":"<",">":">",'"':""","'":"'"};function oe(t){return null==t?"":(t+"").replace(ie,(function(t,e){return re[e]}))}var ae=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,se=[],le=o.browser.firefox&&+o.browser.version.split(".")[0]<39;function ue(t,e,n,i){return n=n||{},i?he(t,e,n):le&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):he(t,e,n),n}function he(t,e,n){if(o.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(ne(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}if(ee(se,t,i,r))return n.zrX=se[0],void(n.zrY=se[1])}n.zrX=n.zrY=0}function ce(t){return t||window.event}function de(t,e,n){if(null!=(e=ce(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&ue(t,r,e,n)}else{ue(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;return null==n||null==i?e:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&ae.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function pe(t,e,n,i){t.addEventListener(e,n,i)}function fe(t,e,n,i){t.removeEventListener(e,n,i)}var ge=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function ve(t){return 2===t.which||3===t.which}var me=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=ye(r)/ye(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function _e(){return[1,0,0,1,0,0]}function be(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function we(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Se(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function Me(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Ie(t,e,n,i){void 0===i&&(i=[0,0]);var r=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],h=Math.sin(n),c=Math.cos(n);return t[0]=r*c+s*h,t[1]=-r*h+s*c,t[2]=o*c+l*h,t[3]=-o*h+c*l,t[4]=c*(a-i[0])+h*(u-i[1])+i[0],t[5]=c*(u-i[1])-h*(a-i[0])+i[1],t}function Te(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function Ce(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function Ae(t){var e=[1,0,0,1,0,0];return we(e,t),e}const De=Object.freeze(Object.defineProperty({__proto__:null,clone:Ae,copy:we,create:_e,identity:be,invert:Ce,mul:Se,rotate:Ie,scale:Te,translate:Me},Symbol.toStringTag,{value:"Module"}));var Le=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),ke=Math.min,Pe=Math.max,Oe=new Le,Re=new Le,Ne=new Le,Ee=new Le,ze=new Le,Ve=new Le,Be=t("a5",function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=ke(t.x,this.x),n=ke(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Pe(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Pe(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return Me(r,r,[-e.x,-e.y]),Te(r,r,[n,i]),Me(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,d=!(of&&(f=x,gf&&(f=_,m=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Oe.x=Ne.x=n.x,Oe.y=Ee.y=n.y,Re.x=Ee.x=n.x+n.width,Re.y=Ne.y=n.y+n.height,Oe.transform(i),Ee.transform(i),Re.transform(i),Ne.transform(i),e.x=ke(Oe.x,Re.x,Ne.x,Ee.x),e.y=ke(Oe.y,Re.y,Ne.y,Ee.y);var l=Pe(Oe.x,Re.x,Ne.x,Ee.x),u=Pe(Oe.y,Re.y,Ne.y,Ee.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}()),Fe="silent";function Ge(){ge(this.event)}var He=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return i(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(qt),We=function(t,e){this.x=t,this.y=e},Ue=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ye=new Be(0,0,0,0),Ze=function(t){function e(e,n,i,r,o){var a=t.call(this)||this;return a._hovered=new We(0,0),a.storage=e,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new He,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new jt(a),a}return i(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(z(Ue,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=qe(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new We(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new We(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ge}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),r=new We(t,e);if(je(i,r,t,e,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new Be(t-s,e-s,a,a),u=i.length-1;u>=0;u--){var h=i[u];h===n||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(Ye.copy(h.getBoundingRect()),h.transform&&Ye.applyTransform(h.transform),Ye.intersect(l)&&o.push(h))}if(o.length)for(var c=Math.PI/12,d=2*Math.PI,p=0;p=0;o--){var a=t[o],s=void 0;if(a!==r&&!a.ignore&&(s=Xe(a,n,i))&&(!e.topTarget&&(e.topTarget=a),s!==Fe)){e.target=a;break}}}function qe(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}function Ke(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function $e(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Je(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function Qe(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function tn(t,e){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var d=Qe(t[h],t,l,u,0,e);l+=d,0!=(u-=d)&&0!==(c=Je(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[p+l]=t[d+l];if(0===i){m=!0;break}}if(t[c--]=a[h--],1==--s){m=!0;break}if(0!=(v=s-Je(t[u],a,0,s,s-1,e))){for(s-=v,p=1+(c-=v),d=1+(h-=v),l=0;l=7||v>=7);if(m)break;f<0&&(f=0),f+=2}if((r=f)<1&&(r=1),1===s){for(p=1+(c-=i),d=1+(u-=i),l=i-1;l>=0;l--)t[p+l]=t[d+l];t[c]=a[h]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l=0;l--)t[p+l]=t[d+l];t[c]=a[h]}else for(d=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=Ke(t,n,i,e))s&&(l=s),$e(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ze.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=qe(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Bt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));var nn=1,rn=4,on=!1;function an(){on||(on=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function sn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var ln,un=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=sn}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(an(),u.z=0),isNaN(u.z2)&&(an(),u.z2=0),isNaN(u.zlevel)&&(an(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();ln=o.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var hn={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-hn.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*hn.bounceIn(2*t):.5*hn.bounceOut(2*t-1)+.5}},cn=Math.pow,dn=Math.sqrt,pn=1e-8,fn=1e-4,gn=dn(3),vn=1/3,mn=It(),yn=It(),xn=It();function _n(t){return t>-1e-8&&tpn||t<-1e-8}function wn(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Sn(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Mn(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,d=l*l-3*s*u,p=0;if(_n(h)&&_n(c))_n(s)?o[0]=0:(M=-l/s)>=0&&M<=1&&(o[p++]=M);else{var f=c*c-4*h*d;if(_n(f)){var g=c/h,v=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[p++]=M),v>=0&&v<=1&&(o[p++]=v)}else if(f>0){var m=dn(f),y=h*s+1.5*a*(-c+m),x=h*s+1.5*a*(-c-m);(M=(-s-((y=y<0?-cn(-y,vn):cn(y,vn))+(x=x<0?-cn(-x,vn):cn(x,vn))))/(3*a))>=0&&M<=1&&(o[p++]=M)}else{var _=(2*h*s-3*a*c)/(2*dn(h*h*h)),b=Math.acos(_)/3,w=dn(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(v=(-s+w*(S+gn*Math.sin(b)))/(3*a),(-s+w*(S-gn*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[p++]=M),v>=0&&v<=1&&(o[p++]=v),I>=0&&I<=1&&(o[p++]=I)}}return p}function In(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(_n(a))bn(o)&&(h=-s/o)>=0&&h<=1&&(r[l++]=h);else{var u=o*o-4*a*s;if(_n(u))r[0]=-o/(2*a);else if(u>0){var h,c=dn(u),d=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l}function Tn(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function Cn(t,e,n,i,r,o,a,s,l,u,h){var c,d,p,f,g,v=.005,m=1/0;mn[0]=l,mn[1]=u;for(var y=0;y<1;y+=.05)yn[0]=wn(t,n,r,a,y),yn[1]=wn(e,i,o,s,y),(f=Gt(mn,yn))=0&&f=0&&v=1?1:Mn(0,i,o,1,t,s)&&wn(0,r,a,1,s[0])}}}var zn=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||wt,this.ondestroy=t.ondestroy||wt,this.onrestart=t.onrestart||wt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Z(t)?t:hn[t]||En(t)},t}(),Vn=function(t){this.value=t},Bn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Vn(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Fn=function(){function t(t){this._list=new Bn,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Vn(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Gn={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Hn(t){return(t=Math.round(t))<0?0:t>255?255:t}function Wn(t){return t<0?0:t>1?1:t}function Un(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Hn(parseFloat(e)/100*255):Hn(parseInt(e,10))}function Yn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Wn(parseFloat(e)/100):Wn(parseFloat(e))}function Zn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Xn(t,e,n){return t+(e-t)*n}function jn(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function qn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Kn=new Fn(20),$n=null;function Jn(t,e){$n&&qn($n,e),$n=Kn.put(t,$n||e.slice())}function Qn(t,e){if(t){e=e||[];var n=Kn.get(t);if(n)return qn(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Gn)return qn(e,Gn[i]),Jn(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(jn(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),Jn(t,e),e):void jn(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(jn(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),Jn(t,e),e):void jn(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?jn(e,+u[0],+u[1],+u[2],1):jn(e,0,0,0,1);h=Yn(u.pop());case"rgb":return u.length>=3?(jn(e,Un(u[0]),Un(u[1]),Un(u[2]),3===u.length?h:Yn(u[3])),Jn(t,e),e):void jn(e,0,0,0,1);case"hsla":return 4!==u.length?void jn(e,0,0,0,1):(u[3]=Yn(u[3]),ti(u,e),Jn(t,e),e);case"hsl":return 3!==u.length?void jn(e,0,0,0,1):(ti(u,e),Jn(t,e),e);default:return}}jn(e,0,0,0,1)}}function ti(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Yn(t[1]),r=Yn(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return jn(e=e||[],Hn(255*Zn(a,o,n+1/3)),Hn(255*Zn(a,o,n)),Hn(255*Zn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ei(t,e){var n=Qn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return li(n,4===n.length?"rgba":"rgb")}}function ni(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Hn(Xn(a[0],s[0],l)),n[1]=Hn(Xn(a[1],s[1],l)),n[2]=Hn(Xn(a[2],s[2],l)),n[3]=Wn(Xn(a[3],s[3],l)),n}}var ii=ni;function ri(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=Qn(e[r]),s=Qn(e[o]),l=i-r,u=li([Hn(Xn(a[0],s[0],l)),Hn(Xn(a[1],s[1],l)),Hn(Xn(a[2],s[2],l)),Wn(Xn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var oi=ri;function ai(t,e,n,i){var r=Qn(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(r),null!=e&&(r[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=Yn(n)),null!=i&&(r[2]=Yn(i)),li(ti(r),"rgba")}function si(t,e){var n=Qn(t);if(n&&null!=e)return n[3]=Wn(e),li(n,"rgba")}function li(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function ui(t,e){var n=Qn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var hi=new Fn(100);function ci(t){if(X(t)){var e=hi.get(t);return e||(e=ei(t,-.1),hi.put(t,e)),e}if(tt(t)){var n=L({},t);return n.colorStops=V(t.colorStops,(function(t){return{offset:t.offset,color:ei(t.color,-.1)}})),n}return t}const di=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:ni,fastMapToColor:ii,lerp:ri,lift:ei,liftColor:ci,lum:ui,mapToColor:oi,modifyAlpha:si,modifyHSL:ai,parse:Qn,random:function(){return li([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},stringify:li,toHex:function(t){var e=Qn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}},Symbol.toStringTag,{value:"Module"}));var pi=Math.round;function fi(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=Qn(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var gi=1e-4;function vi(t){return t-1e-4}function mi(t){return pi(1e3*t)/1e3}function yi(t){return pi(1e4*t)/1e4}var xi={left:"start",right:"end",center:"middle",middle:"middle"};function _i(t){return t&&!!t.image}function bi(t){return _i(t)||function(t){return t&&!!t.svgElement}(t)}function wi(t){return"linear"===t.type}function Si(t){return"radial"===t.type}function Mi(t){return t&&("linear"===t.type||"radial"===t.type)}function Ii(t){return"url(#"+t+")"}function Ti(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Ci(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*St,r=ot(t.scaleX,1),o=ot(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),1===r&&1===o||l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+pi(a*St)+"deg, "+pi(s*St)+"deg)"),l.join(" ")}var Ai=o.hasGlobalWindow&&Z(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},Di=Array.prototype.slice;function Li(t,e,n){return(e-t)*n+t}function ki(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(E(e)){var l=function(t){return E(t&&t[0])?2:1}(e);a=l,(1===l&&!q(e[0])||2===l&&!q(e[0][0]))&&(o=!0)}else if(q(e)&&!it(e))a=0;else if(X(e))if(isNaN(+e)){var u=Qn(e);u&&(s=u,a=3)}else a=0;else if(tt(e)){var h=L({},s);h.colorStops=V(e.colorStops,(function(t){return{offset:t.offset,color:Qn(t.color)}})),wi(e)?a=4:Si(e)&&(a=5),s=h}0===r?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=Z(n)?n:hn[n]||En(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=Bi(i),l=Vi(i),u=0;u=0&&!(l[n].percent<=e);n--);n=p(n,u-2)}else{for(n=d;ne);n++);n=p(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:p((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var v=o?this._additiveValue:c?Fi:t[h];if(!Bi(s)&&!c||v||(v=this._additiveValue=[]),this.discrete)t[h]=g<1?i.rawValue:r.rawValue;else if(Bi(s))1===s?ki(v,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,Ei(l),i),this._trackKeys.push(a)}s.addKeyframe(t,Ei(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function Wi(){return(new Date).getTime()}var Ui,Yi,Zi=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return i(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=Wi()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,ln((function e(){t._running&&(ln(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=Wi(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Wi(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Wi()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Hi(t,e.loop);return this.addAnimator(n),n},e}(qt),Xi=o.domSupported,ji=(Yi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Ui=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:V(Ui,(function(t){var e=t.replace("mouse","pointer");return Yi.hasOwnProperty(e)?e:t}))}),qi=["mousemove","mouseup"],Ki=["pointermove","pointerup"],$i=!1;function Ji(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Qi(t){t&&(t.zrByTouch=!0)}function tr(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var er=function(t,e){this.stopPropagation=wt,this.stopImmediatePropagation=wt,this.preventDefault=wt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},nr={mousedown:function(t){t=de(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=de(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=de(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){tr(this,(t=de(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){$i=!0,t=de(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){$i||(t=de(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Qi(t=de(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),nr.mousemove.call(this,t),nr.mousedown.call(this,t)},touchmove:function(t){Qi(t=de(this.dom,t)),this.handler.processGesture(t,"change"),nr.mousemove.call(this,t)},touchend:function(t){Qi(t=de(this.dom,t)),this.handler.processGesture(t,"end"),nr.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&nr.click.call(this,t)},pointerdown:function(t){nr.mousedown.call(this,t)},pointermove:function(t){Ji(t)||nr.mousemove.call(this,t)},pointerup:function(t){nr.mouseup.call(this,t)},pointerout:function(t){Ji(t)||nr.mouseout.call(this,t)}};z(["click","dblclick","contextmenu"],(function(t){nr[t]=function(e){e=de(this.dom,e),this.trigger(t,e)}}));var ir={pointermove:function(t){Ji(t)||ir.mousemove.call(this,t)},pointerup:function(t){ir.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function rr(t,e){var n=e.domHandlers;o.pointerEventsSupported?z(ji.pointer,(function(i){ar(e,i,(function(e){n[i].call(t,e)}))})):(o.touchEventsSupported&&z(ji.touch,(function(i){ar(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),z(ji.mouse,(function(i){ar(e,i,(function(r){r=ce(r),e.touching||n[i].call(t,r)}))})))}function or(t,e){function n(n){ar(e,n,(function(i){i=ce(i),tr(t,i.target)||(i=function(t,e){return de(t.dom,new er(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}o.pointerEventsSupported?z(Ki,n):o.touchEventsSupported||z(qi,n)}function ar(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,pe(t.domTarget,e,n,i)}function sr(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&fe(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var lr=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},ur=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new lr(e,nr),Xi&&(i._globalHandlerScope=new lr(document,ir)),rr(i,i._localHandlerScope),i}return i(e,t),e.prototype.dispose=function(){sr(this._localHandlerScope),Xi&&sr(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Xi&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?or(this,e):sr(e)}},e}(qt),hr=1;o.hasGlobalWindow&&(hr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var cr=hr,dr="#333",pr="#ccc",fr=be,gr=5e-5;function vr(t){return t>gr||t<-5e-5}var mr=[],yr=[],xr=[1,0,0,1,0,0],_r=Math.abs,br=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return vr(this.rotation)||vr(this.x)||vr(this.y)||vr(this.scaleX-1)||vr(this.scaleY-1)||vr(this.skewX)||vr(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):fr(n),t&&(e?Se(n,t,n):we(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(fr(n),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(mr);var n=mr[0]<0?-1:1,i=mr[1]<0?-1:1,r=((mr[0]-n)*e+n)/mr[0]||0,o=((mr[1]-i)*e+i)/mr[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Ce(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],Se(yr,t.invTransform,e),e=yr);var n=this.originX,i=this.originY;(n||i)&&(xr[4]=n,xr[5]=i,Se(yr,e,xr),yr[4]-=n,yr[5]-=i,e=yr),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Wt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Wt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&_r(t[0]-1)>1e-10&&_r(t[3]-1)>1e-10?Math.sqrt(_r(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){Sr(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var p=n+a,f=i+s;e[4]=-p*r-c*f*o,e[5]=-f*o-d*p*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=d*r,e[2]=c*o,l&&Ie(e,e,l),e[4]+=n+u,e[5]+=i+h,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),wr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Sr(t,e){for(var n=0;n=0?parseFloat(t)/100*e:parseFloat(t):t}function Pr(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=kr(i[0],n.width),u+=kr(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Or="__zr_normal__",Rr=wr.concat(["ignore"]),Nr=B(wr,(function(t,e){return t[e]=!0,t}),{ignore:!1}),Er={},zr=new Be(0,0,0,0),Vr=function(){function t(t){this.id=I(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copyTransform(e),null!=n.position){var u=zr;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Er,n,u):Pr(Er,n,u),r.x=Er.x,r.y=Er.y,o=Er.align,a=Er.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,d=void 0;"center"===h?(c=.5*u.width,d=.5*u.height):(c=kr(h[0],u.width),d=kr(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+d+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var p=n.offset;p&&(r.x+=p[0],r.y+=p[1],l||(r.originX=-p[0],r.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=void 0,m=void 0,y=void 0;f&&this.canBeInsideText()?(v=n.insideFill,m=n.insideStroke,null!=v&&"auto"!==v||(v=this.getInsideTextFill()),null!=m&&"auto"!==m||(m=this.getInsideTextStroke(v),y=!0)):(v=n.outsideFill,m=n.outsideStroke,null!=v&&"auto"!==v||(v=this.getOutsideFill()),null!=m&&"auto"!==m||(m=this.getOutsideStroke(v),y=!0)),(v=v||"#000")===g.fill&&m===g.stroke&&y===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=v,g.stroke=m,g.autoStroke=y,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=nn,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?pr:dr},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&Qn(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,li(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},L(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(K(t))for(var n=H(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Or,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===Or;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(O(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,h=this._textGuide;return u&&u.useState(t,e,n,l),h&&h.useState(t,e,n,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~nn),s}T("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~nn)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=O(i,t),o=O(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var d=0;d0||r.force&&!a.length){var w,S=void 0,M=void 0,I=void 0;if(s)for(M={},d&&(S={}),_=0;_=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=O(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=O(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function no(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return X(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function io(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),to),t=(+t).toFixed(e),n?t:+t}function ro(t){return t.sort((function(t,e){return t-e})),t}function oo(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return ao(t)}function ao(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function so(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function lo(t,e){var n=B(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return[];for(var i=Math.pow(10,e),r=V(t,(function(t){return(isNaN(t)?0:t)/n*i*100})),o=100*i,a=V(r,(function(t){return Math.floor(t)})),s=B(a,(function(t,e){return t+e}),0),l=V(r,(function(t,e){return t-a[e]}));su&&(u=l[c],h=c);++a[h],l[h]=0,++s}return V(a,(function(t){return t/i}))}function uo(t,e){var n=Math.max(oo(t),oo(e)),i=t+e;return n>to?i:io(i,n)}var ho=9007199254740991;function co(t){var e=2*Math.PI;return(t%e+e)%e}function po(t){return t>-1e-4&&t=10&&e++,e}function yo(t,e){var n=mo(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function xo(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function _o(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&O(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var la=sa([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ua=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return la(this,t,e)},t}(),ha=new Fn(50);function ca(t){if("string"==typeof t){var e=ha.get(t);return e&&e.image}return t}function da(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=ha.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!fa(e=o.image)&&o.pending.push(a):((e=c.loadImage(t,pa,pa)).__zrImageSrc=t,ha.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function pa(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=Ir(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function ya(t,e,n){var i=n.containerWidth,r=n.font,o=n.contentWidth;if(!i)return t.textLine="",void(t.isTruncated=!1);var a=Ir(e,r);if(a<=i)return t.textLine=e,void(t.isTruncated=!1);for(var s=0;;s++){if(a<=o||s>=n.maxIterations){e+=n.ellipsis;break}var l=0===s?xa(e,o,n.ascCharWidth,n.cnCharWidth):a>0?Math.floor(e.length*o/a):0;a=Ir(e=e.substr(0,l),r)}""===e&&(e=n.placeholder),t.textLine=e,t.isTruncated=!0}function xa(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=Ta(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+p,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var v=0;v=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!Ma[t]}function Ta(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+p>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=d,s="",h=u+=p):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=d,h=p)):f?(o.push(l),a.push(u),l=d,u=p):(o.push(d),a.push(p)):(h+=p,f?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var Ca="__zr_style_"+Math.round(10*Math.random()),Aa={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Da={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Aa[Ca]=!0;var La=["z","z2","invisible"],ka=["invisible"],Pa=function(t){function e(e){return t.call(this,e)||this}var n;return i(e,t),e.prototype._init=function(e){for(var n=H(e),i=0;i1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Fa[0]=Va(r)*n+t,Fa[1]=za(r)*i+e,Ga[0]=Va(o)*n+t,Ga[1]=za(o)*i+e,u(s,Fa,Ga),h(l,Fa,Ga),(r%=Ba)<0&&(r+=Ba),(o%=Ba)<0&&(o+=Ba),r>o&&!a?o+=Ba:rr&&(Ha[0]=Va(p)*n+t,Ha[1]=za(p)*i+e,u(s,Ha,s),h(l,Ha,l))}var Ka={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},$a=[],Ja=[],Qa=[],ts=[],es=[],ns=[],is=Math.min,rs=Math.max,os=Math.cos,as=Math.sin,ss=Math.abs,ls=Math.PI,us=2*ls,hs="undefined"!=typeof Float32Array,cs=[];function ds(t){return Math.round(t/ls*1e8)/1e8%2*ls}function ps(t,e){var n=ds(t[0]);n<0&&(n+=us);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=us?r=n+us:e&&n-r>=us?r=n-us:!e&&n>r?r=n+(us-ds(n-r)):e&&n0&&(this._ux=ss(n/cr/t)||0,this._uy=ss(n/cr/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ka.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=ss(t-this._xi),i=ss(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(Ka.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(Ka.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Ka.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),cs[0]=i,cs[1]=r,ps(cs,o),i=cs[0];var a=(r=cs[1])-i;return this.addData(Ka.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=os(r)*n+t,this._yi=as(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ka.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ka.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!hs||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Qa[0]=Qa[1]=es[0]=es[1]=Number.MAX_VALUE,ts[0]=ts[1]=ns[0]=ns[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||ss(v)>i||c===e-1)&&(f=Math.sqrt(D*D+v*v),r=g,o=x);break;case Ka.C:var m=t[c++],y=t[c++],x=(g=t[c++],t[c++]),_=t[c++],b=t[c++];f=An(r,o,m,y,g,x,_,b,10),r=_,o=b;break;case Ka.Q:f=Rn(r,o,m=t[c++],y=t[c++],g=t[c++],x=t[c++],10),r=g,o=x;break;case Ka.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],C=t[c++],A=C+T;c+=1,p&&(a=os(T)*M+w,s=as(T)*I+S),f=rs(M,I)*is(us,Math.abs(C)),r=os(A)*M+w,o=as(A)*I+S;break;case Ka.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case Ka.Z:var D=a-r;v=s-o,f=Math.sqrt(D*D+v*v),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,d=this.data,p=this._ux,f=this._uy,g=this._len,v=e<1,m=0,y=0,x=0;if(!v||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var _=0;_0&&(t.lineTo(h,c),x=0),b){case Ka.M:n=r=d[_++],i=o=d[_++],t.moveTo(r,o);break;case Ka.L:a=d[_++],s=d[_++];var S=ss(a-r),M=ss(s-o);if(S>p||M>f){if(v){if(m+(j=l[y++])>u){var I=(u-m)/j;t.lineTo(r*(1-I)+a*I,o*(1-I)+s*I);break t}m+=j}t.lineTo(a,s),r=a,o=s,x=0}else{var T=S*S+M*M;T>x&&(h=a,c=s,x=T)}break;case Ka.C:var C=d[_++],A=d[_++],D=d[_++],L=d[_++],k=d[_++],P=d[_++];if(v){if(m+(j=l[y++])>u){Tn(r,C,D,k,I=(u-m)/j,$a),Tn(o,A,L,P,I,Ja),t.bezierCurveTo($a[1],Ja[1],$a[2],Ja[2],$a[3],Ja[3]);break t}m+=j}t.bezierCurveTo(C,A,D,L,k,P),r=k,o=P;break;case Ka.Q:if(C=d[_++],A=d[_++],D=d[_++],L=d[_++],v){if(m+(j=l[y++])>u){Pn(r,C,D,I=(u-m)/j,$a),Pn(o,A,L,I,Ja),t.quadraticCurveTo($a[1],Ja[1],$a[2],Ja[2]);break t}m+=j}t.quadraticCurveTo(C,A,D,L),r=D,o=L;break;case Ka.A:var O=d[_++],R=d[_++],N=d[_++],E=d[_++],z=d[_++],V=d[_++],B=d[_++],F=!d[_++],G=N>E?N:E,H=ss(N-E)>.001,W=z+V,U=!1;if(v&&(m+(j=l[y++])>u&&(W=z+V*(u-m)/j,U=!0),m+=j),H&&t.ellipse?t.ellipse(O,R,N,E,B,z,W,F):t.arc(O,R,G,z,W,F),U)break t;w&&(n=os(z)*N+O,i=as(z)*E+R),r=os(W)*N+O,o=as(W)*E+R;break;case Ka.R:n=r=d[_],i=o=d[_+1],a=d[_++],s=d[_++];var Y=d[_++],Z=d[_++];if(v){if(m+(j=l[y++])>u){var X=u-m;t.moveTo(a,s),t.lineTo(a+is(X,Y),s),(X-=Y)>0&&t.lineTo(a+Y,s+is(X,Z)),(X-=Z)>0&&t.lineTo(a+rs(Y-X,0),s+Z),(X-=Y)>0&&t.lineTo(a,s+rs(Z-X,0));break t}m+=j}t.rect(a,s,Y,Z);break;case Ka.Z:if(v){var j;if(m+(j=l[y++])>u){I=(u-m)/j,t.lineTo(r*(1-I)+n*I,o*(1-I)+i*I);break t}m+=j}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=Ka,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function gs(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=_s);var d=Math.atan2(l,s);return d<0&&(d+=_s),d>=i&&d<=r||d+_s>=i&&d+_s<=r}function ws(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var Ss=fs.CMD,Ms=2*Math.PI,Is=[-1,-1,-1],Ts=[-1,-1];function Cs(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=Ts[0],Ts[0]=Ts[1],Ts[1]=h),f=wn(e,i,o,s,Ts[0]),p>1&&(g=wn(e,i,o,s,Ts[1]))),2===p?me&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(_n(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=dn(u),d=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,i,o,s,Is);if(0===l)return 0;var u=kn(e,i,o);if(u>=0&&u<=1){for(var h=0,c=Dn(e,i,o,u),d=0;dn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Is[0]=-l,Is[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Ms-1e-4){i=0,r=Ms;var h=o?1:-1;return a>=Is[0]+t&&a<=Is[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=Ms,r+=Ms);for(var d=0,p=0;p<2;p++){var f=Is[p];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1,g<0&&(g=Ms+g),(g>=i&&g<=r||g+Ms>=i&&g+Ms<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),d+=h)}}return d}function Ls(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,d=0,p=0,f=0,g=0,v=0;v1&&(n||(c+=ws(d,p,f,g,i,r))),y&&(f=d=u[v],g=p=u[v+1]),m){case Ss.M:d=f=u[v++],p=g=u[v++];break;case Ss.L:if(n){if(gs(d,p,u[v],u[v+1],e,i,r))return!0}else c+=ws(d,p,u[v],u[v+1],i,r)||0;d=u[v++],p=u[v++];break;case Ss.C:if(n){if(vs(d,p,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],e,i,r))return!0}else c+=Cs(d,p,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],i,r)||0;d=u[v++],p=u[v++];break;case Ss.Q:if(n){if(ms(d,p,u[v++],u[v++],u[v],u[v+1],e,i,r))return!0}else c+=As(d,p,u[v++],u[v++],u[v],u[v+1],i,r)||0;d=u[v++],p=u[v++];break;case Ss.A:var x=u[v++],_=u[v++],b=u[v++],w=u[v++],S=u[v++],M=u[v++];v+=1;var I=!!(1-u[v++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,y?(f=o,g=a):c+=ws(d,p,o,a,i,r);var T=(i-x)*w/b+x;if(n){if(bs(x,_,w,S,S+M,I,e,T,r))return!0}else c+=Ds(x,_,w,S,S+M,I,T,r);d=Math.cos(S+M)*b+x,p=Math.sin(S+M)*w+_;break;case Ss.R:if(f=d=u[v++],g=p=u[v++],o=f+u[v++],a=g+u[v++],n){if(gs(f,g,o,g,e,i,r)||gs(o,g,o,a,e,i,r)||gs(o,a,f,a,e,i,r)||gs(f,a,f,g,e,i,r))return!0}else c+=ws(o,g,o,a,i,r),c+=ws(f,a,f,g,i,r);break;case Ss.Z:if(n){if(gs(d,p,f,g,e,i,r))return!0}else c+=ws(d,p,f,g,i,r);d=f,p=g}}return n||(s=p,l=g,Math.abs(s-l)<1e-4)||(c+=ws(d,p,f,g,i,r)||0),0!==c}var ks=k({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Aa),Ps={style:k({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Da.style)},Os=wr.concat(["invisible","culling","z","z2","zlevel","parent"]),Rs=function(t){function e(e){return t.call(this,e)||this}var n;return i(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?dr:e>.2?"#eee":pr}if(t)return pr}return dr},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(X(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==ui(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~rn},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new fs(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||this.__dirty&rn)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return Ls(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Ls(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=rn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:L(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&rn)},e.prototype.createStyle=function(t){return xt(ks,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=L({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=L({},i.shape),L(s,n.shape)):(s=L({},r?this.shape:i.shape),L(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=L({},this.shape);for(var u={},h=H(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return xt(Ns,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=Cr(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(Pa);Es.prototype.type="tspan";var zs=k({x:0,y:0},Aa),Vs={style:k({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Da.style)},Bs=t("Z",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.createStyle=function(t){return xt(zs,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Vs},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Be(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Pa));Bs.prototype.type="image";var Fs=Math.round;function Gs(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(Fs(2*i)===Fs(2*r)&&(t.x1=t.x2=Ws(i,s,!0)),Fs(2*o)===Fs(2*a)&&(t.y1=t.y2=Ws(o,s,!0)),t):t}}function Hs(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=Ws(i,s,!0),t.y=Ws(r,s,!0),t.width=Math.max(Ws(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(Ws(r+a,s,!1)-t.y,0===a?0:1),t):t}}function Ws(t,e,n){if(!e)return t;var i=Fs(2*t);return(i+Fs(e))%2==0?i/2:(i+(n?1:-1))/2}var Us=function(){this.x=0,this.y=0,this.width=0,this.height=0},Ys={},Zs=t("R",function(t){function e(e){return t.call(this,e)||this}return i(e,t),e.prototype.getDefaultShape=function(){return new Us},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=Hs(Ys,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Rs));Zs.prototype.type="rect";var Xs={fill:"#000"},js={style:k({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Da.style)},qs=t("O",function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Xs,n.attr(e),n}return i(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ef&&h){var g=Math.floor(f/l);c=c||n.length>g,n=n.slice(0,g)}if(t&&a&&null!=d)for(var v=ma(d,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m={},y=0;y0,T=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),C=i.calculatedLineHeight,A=0;Al&&Sa(n,t.substring(l,u),e,s),Sa(n,i[2],e,s,i[1]),l=ga.lastIndex}lo){var A=n.lines.length;w>0?(x.tokens=x.tokens.slice(0,w),m(x,b,_),n.lines=n.lines.slice(0,y+1)):n.lines=n.lines.slice(0,y),n.isTruncated=n.isTruncated||n.lines.length=0&&"right"===(C=x[T]).align;)this._placeToken(C,t,b,f,I,"right",v),w-=C.width,I-=C.width,T--;for(M+=(n-(M-p)-(g-I)-w)/2;S<=T;)C=x[S],this._placeToken(C,t,b,f,M+C.width/2,"center",v),M+=C.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,h=i+n/2;"top"===l?h=i+t.height/2:"bottom"===l&&(h=i+n-t.height/2),!t.isLineHolder&&sl(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,h-t.height/2,t.width,t.height);var c=!!s.backgroundColor,d=t.textPadding;d&&(r=ol(r,o,d),h-=t.height/2-d[0]-t.innerHeight/2);var p=this._getOrCreateChild(Es),f=p.createStyle();p.useStyle(f);var g=this._defaultStyle,v=!1,m=0,y=rl("fill"in s?s.fill:"fill"in e?e.fill:(v=!0,g.fill)),x=il("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||a||g.autoStroke&&!v?null:(m=2,g.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=r,f.y=h,_&&(f.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,f.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||u,f.opacity=at(s.opacity,e.opacity,1),tl(f,s),x&&(f.lineWidth=at(s.lineWidth,e.lineWidth,m),f.lineDash=ot(s.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=x),y&&(f.fill=y);var b=t.contentWidth,w=t.contentHeight;p.setBoundingRect(new Be(Ar(f.x,b,f.textAlign),Dr(f.y,w,f.textBaseline),b,w))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,d=u&&u.image,p=u&&!d,f=t.borderRadius,g=this;if(p||t.lineHeight||h&&c){(a=this._getOrCreateChild(Zs)).useStyle(a.createStyle()),a.style.fill=null;var v=a.shape;v.x=n,v.y=i,v.width=r,v.height=o,v.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=ot(t.fillOpacity,1);else if(d){(s=this._getOrCreateChild(Bs)).onload=function(){g.dirtyStyle()};var m=s.style;m.image=u.image,m.x=n,m.y=i,m.width=r,m.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=ot(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=t.shadowBlur||0,y.shadowColor=t.shadowColor||"transparent",y.shadowOffsetX=t.shadowOffsetX||0,y.shadowOffsetY=t.shadowOffsetY||0,y.opacity=at(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return el(t)&&(e=[t.fontStyle,t.fontWeight,Qs(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&ht(e)||t.textFont||t.font},e}(Pa)),Ks={left:!0,right:1,center:1},$s={top:1,bottom:1,middle:1},Js=["fontStyle","fontWeight","fontSize","fontFamily"];function Qs(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function tl(t,e){for(var n=0;n=0,o=!1;if(t instanceof Rs){var a=dl(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(wl(s)||wl(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=L({},i),(u=L({},u)).fill=s):!wl(u.fill)&&wl(s)?(o=!0,i=L({},i),(u=L({},u)).fill=ci(s)):!wl(u.stroke)&&wl(l)&&(o||(i=L({},i),u=L({},u)),u.stroke=ci(l)),i.style=u}}if(i&&null==i.z2){o||(i=L({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:vl)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=O(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function Kl(t,e,n){nu(t,!0),kl(t,Rl),Jl(t,e,n)}function $l(t,e,n,i){i?function(t){nu(t,!1)}(t):Kl(t,e,n)}function Jl(t,e,n){var i=ll(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var Ql=["emphasis","blur","select"],tu={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function eu(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=cu(f),s*=cu(f));var g=(r===o?-1:1)*cu((a*a*(s*s)-a*a*(p*p)-s*s*(d*d))/(a*a*(p*p)+s*s*(d*d)))||0,v=g*a*p/s,m=g*-s*d/a,y=(t+n)/2+pu(c)*v-du(c)*m,x=(e+i)/2+du(c)*v+pu(c)*m,_=mu([1,0],[(d-v)/a,(p-m)/s]),b=[(d-v)/a,(p-m)/s],w=[(-1*d-v)/a,(-1*p-m)/s],S=mu(b,w);if(vu(b,w)<=-1&&(S=fu),vu(b,w)>=1&&(S=0),S<0){var M=Math.round(S/fu*1e6)/1e6;S=2*fu+M%2*fu}h.addData(u,y,x,a,s,_,S,c,o)}var xu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,_u=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,bu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.applyTransform=function(t){},e}(Rs);function wu(t){return null!=t.setData}function Su(t,e){var n=function(t){var e=new fs;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=fs.CMD,l=t.match(xu);if(!l)return e;for(var u=0;uL*L+k*k&&(M=T,I=C),{cx:M,cy:I,x0:-h,y0:-c,x1:M*(r/b-1),y1:I*(r/b-1)}}function Hu(t,e){var n,i=Vu(e.r,0),r=Vu(e.r0||0,0),o=i>0;if(o||r>0){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,h=e.cy,c=!!e.clockwise,d=Eu(l-s),p=d>ku&&d%ku;if(p>Fu&&(d=p),i>Fu)if(d>ku-Fu)t.moveTo(u+i*Ou(s),h+i*Pu(s)),t.arc(u,h,i,s,l,!c),r>Fu&&(t.moveTo(u+r*Ou(l),h+r*Pu(l)),t.arc(u,h,r,l,s,c));else{var f=void 0,g=void 0,v=void 0,m=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=void 0,I=void 0,T=void 0,C=void 0,A=void 0,D=void 0,L=i*Ou(s),k=i*Pu(s),P=r*Ou(l),O=r*Pu(l),R=d>Fu;if(R){var N=e.cornerRadius;N&&(n=function(t){var e;if(Y(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(N),f=n[0],g=n[1],v=n[2],m=n[3]);var E=Eu(i-r)/2;if(y=Bu(E,v),x=Bu(E,m),_=Bu(E,f),b=Bu(E,g),M=w=Vu(y,x),I=S=Vu(_,b),(w>Fu||S>Fu)&&(T=i*Ou(l),C=i*Pu(l),A=r*Ou(s),D=r*Pu(s),dFu){var U=Bu(v,M),Z=Bu(m,M),X=Gu(A,D,L,k,i,U,c),j=Gu(T,C,P,O,i,Z,c);t.moveTo(u+X.cx+X.x0,h+X.cy+X.y0),M0&&t.arc(u+X.cx,h+X.cy,U,Nu(X.y0,X.x0),Nu(X.y1,X.x1),!c),t.arc(u,h,i,Nu(X.cy+X.y1,X.cx+X.x1),Nu(j.cy+j.y1,j.cx+j.x1),!c),Z>0&&t.arc(u+j.cx,h+j.cy,Z,Nu(j.y1,j.x1),Nu(j.y0,j.x0),!c))}else t.moveTo(u+L,h+k),t.arc(u,h,i,s,l,!c);else t.moveTo(u+L,h+k);r>Fu&&R?I>Fu?(U=Bu(f,I),X=Gu(P,O,T,C,r,-(Z=Bu(g,I)),c),j=Gu(L,k,A,D,r,-U,c),t.lineTo(u+X.cx+X.x0,h+X.cy+X.y0),I0&&t.arc(u+X.cx,h+X.cy,Z,Nu(X.y0,X.x0),Nu(X.y1,X.x1),!c),t.arc(u,h,r,Nu(X.cy+X.y1,X.cx+X.x1),Nu(j.cy+j.y1,j.cx+j.x1),c),U>0&&t.arc(u+j.cx,h+j.cy,U,Nu(j.y1,j.x1),Nu(j.y0,j.x0),!c))):(t.lineTo(u+P,h+O),t.arc(u,h,r,l,s,c)):t.lineTo(u+P,h+O)}else t.moveTo(u,h);t.closePath()}}}var Wu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Uu=function(t){function e(e){return t.call(this,e)||this}return i(e,t),e.prototype.getDefaultShape=function(){return new Wu},e.prototype.buildPath=function(t,e){Hu(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Rs);Uu.prototype.type="sector";var Yu=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Zu=function(t){function e(e){return t.call(this,e)||this}return i(e,t),e.prototype.getDefaultShape=function(){return new Yu},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(Rs);function Xu(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;ddh[1]){if(a=!1,r)return a;var u=Math.abs(dh[0]-ch[1]),h=Math.abs(ch[0]-dh[1]);Math.min(u,h)>i.len()&&(u0){var c={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,c):e.animateTo(n,c)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function bh(t,e,n,i,r,o){_h("update",t,e,n,i,r,o)}function wh(t,e,n,i,r,o){_h("enter",t,e,n,i,r,o)}function Sh(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Zh(t){return!t.isGroup}function Xh(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){Zh(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(Zh(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),bh(t,i,n,ll(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=L({},t.shape)),e}}function jh(t,e){return V(t,(function(t){var n=t[0];n=Ah(n,e.x),n=Dh(n,e.x+e.width);var i=t[1];return i=Ah(i,e.y),[n,i=Dh(i,e.y+e.height)]}))}function qh(t,e){var n=Ah(t.x,e.x),i=Dh(t.x+t.width,e.x+e.width),r=Ah(t.y,e.y),o=Dh(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Kh(t,e,n){var i=L({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),k(r,n),new Bs(i)):Eh(t.replace("path://",""),i,n,"center")}function $h(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,v=Qh(f,g,u,h)/p;if(v<0||v>1)return!1;var m=Qh(f,g,c,d)/p;return!(m<0||m>1)}function Qh(t,e,n,i){return t*i-n*e}function tc(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=X(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&z(H(l),(function(t){bt(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=ll(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:k({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function ec(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function nc(t,e){if(t)if(Y(t))for(var n=0;n-1?Nc:zc;function Gc(t,e){t=t.toUpperCase(),Bc[t]=new kc(e),Vc[t]=e}function Hc(t){return Bc[t]}Gc(Ec,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Gc(Nc,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Wc=1e3,Uc=6e4,Yc=36e5,Zc=864e5,Xc=31536e6,jc={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},qc="{yyyy}-{MM}-{dd}",Kc={year:"{yyyy}",month:"{yyyy}-{MM}",day:qc,hour:qc+" "+jc.hour,minute:qc+" "+jc.minute,second:qc+" "+jc.second,millisecond:jc.none},$c=["year","month","day","hour","minute","second","millisecond"],Jc=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Qc(t,e){return"0000".substr(0,e-(t+="").length)+t}function td(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function ed(t){return t===td(t)}function nd(t,e,n,i){var r=go(t),o=r[od(n)](),a=r[ad(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[sd(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[ld(n)](),c=(h-1)%12+1,d=r[ud(n)](),p=r[hd(n)](),f=r[cd(n)](),g=h>=12?"pm":"am",v=g.toUpperCase(),m=(i instanceof kc?i:Hc(i||Fc)||Bc[zc]).getModel("time"),y=m.get("month"),x=m.get("monthAbbr"),_=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,Qc(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,Qc(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Qc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Qc(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Qc(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Qc(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,Qc(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Qc(f,3)).replace(/{S}/g,f+"")}function id(t,e){var n=go(t),i=n[ad(e)]()+1,r=n[sd(e)](),o=n[ld(e)](),a=n[ud(e)](),s=n[hd(e)](),l=0===n[cd(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,d=c&&1===r;return d&&1===i?"year":d?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function rd(t,e,n){var i=q(t)?go(t):t;switch(e=e||id(t,n)){case"year":return i[od(n)]();case"half-year":return i[ad(n)]()>=6?1:0;case"quarter":return Math.floor((i[ad(n)]()+1)/4);case"month":return i[ad(n)]();case"day":return i[sd(n)]();case"half-day":return i[ld(n)]()/24;case"hour":return i[ld(n)]();case"minute":return i[ud(n)]();case"second":return i[hd(n)]();case"millisecond":return i[cd(n)]()}}function od(t){return t?"getUTCFullYear":"getFullYear"}function ad(t){return t?"getUTCMonth":"getMonth"}function sd(t){return t?"getUTCDate":"getDate"}function ld(t){return t?"getUTCHours":"getHours"}function ud(t){return t?"getUTCMinutes":"getMinutes"}function hd(t){return t?"getUTCSeconds":"getSeconds"}function cd(t){return t?"getUTCMilliseconds":"getMilliseconds"}function dd(t){return t?"setUTCFullYear":"setFullYear"}function pd(t){return t?"setUTCMonth":"setMonth"}function fd(t){return t?"setUTCDate":"setDate"}function gd(t){return t?"setUTCHours":"setHours"}function vd(t){return t?"setUTCMinutes":"setMinutes"}function md(t){return t?"setUTCSeconds":"setSeconds"}function yd(t){return t?"setUTCMilliseconds":"setMilliseconds"}function xd(t){if(!wo(t))return X(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function _d(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var bd=lt;function wd(t,e,n){function i(t){return t&&ht(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?go(t):t;if(!isNaN(+s))return nd(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return j(t)?i(t):q(t)&&r(t)?t+"":"-";var l=bo(t);return r(l)?xd(l):j(t)?i(t):"boolean"==typeof t?t+"":"-"}var Sd=["a","b","c","d","e","f","g"],Md=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Id(t,e,n){Y(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Cd(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=go(e),r=n?"getUTC":"get",o=i[r+"FullYear"](),a=i[r+"Month"]()+1,s=i[r+"Date"](),l=i[r+"Hours"](),u=i[r+"Minutes"](),h=i[r+"Seconds"](),c=i[r+"Milliseconds"]();return t=t.replace("MM",Qc(a,2)).replace("M",a).replace("yyyy",o).replace("yy",Qc(o%100+"",2)).replace("dd",Qc(s,2)).replace("d",s).replace("hh",Qc(l,2)).replace("h",l).replace("mm",Qc(u,2)).replace("m",u).replace("ss",Qc(h,2)).replace("s",h).replace("SSS",Qc(c,3))}function Ad(t,e){return e=e||"transparent",X(t)?t:K(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Dd(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Ld=z,kd=["left","right","top","bottom","width","height"],Pd=[["width","left","right"],["height","top","bottom"]];function Od(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var v=d.height+(f?-f.y+d.y:0);(c=a+v)>r||l.newline?(o+=s+n,a=0,c=v,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var Rd=Od;function Nd(t,e,n){n=bd(n||0);var i=e.width,r=e.height,o=no(t.left,i),a=no(t.top,r),s=no(t.right,i),l=no(t.bottom,r),u=no(t.width,i),h=no(t.height,r),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=p&&(isNaN(u)&&isNaN(h)&&(p>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=p*h),isNaN(h)&&(h=u/p)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new Be(o+n[3],a+n[0],u,h);return f.margin=n,f}function Ed(t,e,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new Be(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(a=a.clone()).applyTransform(h)}var c=Nd(k({width:a.width,height:a.height},e),n,i),d=s?c.x-a.x:0,p=l?c.y-a.y:0;return"raw"===u?(o.x=d,o.y=p):(o.x+=d,o.y+=p),o===t&&t.markRedraw(),!0}function zd(t){var e=t.layoutMode||t.constructor.layoutMode;return K(e)?e:e?{type:e}:null}function Vd(t,e,n){var i=n&&n.ignoreSize;!Y(i)&&(i=[i,i]);var r=a(Pd[0],0),o=a(Pd[1],1);function a(n,r){var o={},a=0,u={},h=0;if(Ld(n,(function(e){u[e]=t[e]})),Ld(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=A(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return jo(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(kc));na(Hd,kc),aa(Hd),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=ta(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=ta(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(Hd),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return z(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return z(t,(function(t){O(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),z(s,(function(t){O(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);O(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(z(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],d=!!u[h];d&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),z(c.successor,d?f:p)}z(u,(function(){throw new Error("")}))}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,p(t)}}}(Hd,(function(t){var e=[];return z(Hd.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=V(e,(function(t){return ta(t).main})),"dataset"!==t&&O(e,"dataset")<=0&&e.unshift("dataset"),e}));var Wd="";"undefined"!=typeof navigator&&(Wd=navigator.platform||"");var Ud="rgba(0, 0, 0, 0.2)";const Yd={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Ud,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ud,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ud,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ud,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ud,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ud,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Wd.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Zd=mt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Xd="original",jd="arrayRows",qd="objectRows",Kd="keyedColumns",$d="typedArray",Jd="unknown",Qd="column",tp="row",ep={Must:1,Might:2,Not:3},np=Ho();function ip(t,e,n){var i={},r=op(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=np(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;z(t=t.slice(),(function(e,n){var r=K(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var d=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function p(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var mp="\0_ec_inner",yp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new kc(i),this._locale=new kc(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=bp(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,bp(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):hp(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&z(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=mt(),s=e&&e.replaceMergeMainTypeMap;np(this).datasetMap=mt(),z(t,(function(t,e){null!=t&&(Hd.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?C(t):A(n[e],t,!0))})),s&&s.each((function(t,e){Hd.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),Hd.topologicalTravel(o,Hd.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=cp.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,Lo(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=No(a,o,l);(function(t,e,n){z(t,(function(t){var i=t.newOption;K(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,Hd),n[e]=null,i.set(e,null),r.set(e,0);var h,c=[],d=[],p=0;z(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o="series"===e,a=Hd.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(h)return;h=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=L({componentIndex:n},t.keyInfo);L(i=new a(r,this,this,s),s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(c.push(i.option),d.push(i),p++):(c.push(void 0),d.push(void 0))}),this),n[e]=c,i.set(e,d),r.set(e,p),"series"===e&&lp(this)}),this),this._seriesIndices||lp(this)},e.prototype.getOption=function(){var t=C(this.option);return z(t,(function(e,n){if(Hd.hasClass(n)){for(var i=Lo(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Fo(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t[mp],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var Dp=z,Lp=K,kp=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Pp(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=kp.length;n=0;g--){var v=t[g];if(s||(d=v.data.rawIndexOf(v.stackedByDimension,c)),d>=0){var m=v.data.getByRawIndex(v.stackResultDimension,d);if("all"===l||"positive"===l&&m>0||"negative"===l&&m<0||"samesign"===l&&p>=0&&m>0||"samesign"===l&&p<=0&&m<0){p=uo(p,m),f=m;break}}}return i[0]=p,i[1]=f,i}))}))}var Kp,$p,Jp,Qp,tf,ef=function(){return function(t){this.data=t.data||(t.sourceFormat===Kd?{}:[]),this.sourceFormat=t.sourceFormat||Jd,this.seriesLayoutBy=t.seriesLayoutBy||Qd,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return bf(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function Mf(t){var e,n;return K(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function If(t){return new Tf(t)}var Tf=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,a=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||d1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},Pf=function(){function t(t,e){q(e)||To(""),this._opFn=kf[t],this._rvalFloat=bo(e)}return t.prototype.evaluate=function(t){return q(t)?this._opFn(t,this._rvalFloat):this._opFn(bo(t),this._rvalFloat)},t}(),Of=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=q(t)?t:bo(t),i=q(e)?e:bo(e),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=X(t),s=X(e);a&&(n=s?t:0),s&&(i=a?e:0)}return ni?-this._resultLT:0},t}(),Rf=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=bo(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=bo(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Nf(t,e){return"eq"===t||"ne"===t?new Rf("eq"===t,e):bt(kf,t)?new Pf(t,e):null}var Ef=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return Af(t,e)},t}();function zf(t){return Wf(t.sourceFormat)||To(""),t.data}function Vf(t){var e=t.sourceFormat,n=t.data;if(Wf(e)||To(""),e===jd){for(var i=[],r=0,o=n.length;r65535?Zf:Xf}function Jf(t,e,n,i,r){var o=Kf[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=V(o,(function(t){return t.property})),u=0;uv[1]&&(v[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=u&&x<=h||isNaN(x))&&(a[s++]=p),p++;d=!0}else if(2===r){f=c[i[0]];var v=c[i[1]],m=t[i[1]][0],y=t[i[1]][1];for(g=0;g=u&&x<=h||isNaN(x))&&(_>=m&&_<=y||isNaN(_))&&(a[s++]=p),p++}d=!0}}if(!d)if(1===r)for(g=0;g=u&&x<=h||isNaN(x))&&(a[s++]=b)}else for(g=0;gt[M][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return sv[1]&&(v[1]=g)}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new($f(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var d=1;dn&&(n=i,r=I)}M>0&&M<_-x&&(c[l++]=Math.min(S,r),r=Math.max(S,r)),c[l++]=r,h=r}return c[l++]=this.getRawIndex(s-1),o._count=l,o._indices=c,o.getRawIndex=this._getRawIdx,o},t.prototype.minmaxDownSample=function(t,e){for(var n=this.clone([t],!0),i=n._chunks,r=Math.floor(1/e),o=i[t],a=this.count(),s=new($f(this._rawCount))(2*Math.ceil(a/r)),l=0,u=0;ua&&(f=a-u);for(var g=0;gp&&(p=v,d=u+g)}var m=this.getRawIndex(h),y=this.getRawIndex(d);hu-p&&(s=u-p,a.length=s);for(var f=0;fh[1]&&(h[1]=v),c[d++]=m}return r._count=d,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return Af(t[i],this._dimensions[i])}Uf={arrayRows:t,objectRows:function(t,e,n,i){return Af(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return Af(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),tg=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(ng(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=J(a=o.get("data",!0))?$d:Xd,e=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},d=ot(h.seriesLayoutBy,c.seriesLayoutBy)||null,p=ot(h.sourceHeader,c.sourceHeader),f=ot(h.dimensions,c.dimensions);t=d!==c.seriesLayoutBy||!!p!=!!c.sourceHeader||f?[rf(a,{seriesLayoutBy:d,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(r){var v=this._applyTransform(i);t=v.sourceList,e=v.upstreamSignList}else t=[rf(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);null!=r&&1!==t.length&&ig("");var o,a=[],s=[];return z(t,(function(t){t.prepareSource();var e=t.getSource(r||0);null==r||e||ig(""),a.push(e),s.push(t._getVersionSign())})),i?e=function(t,e){var n=Lo(t),i=n.length;i||To("");for(var r=0,o=i;r1||n>0&&!t.noHeader;return z(t.blocks,(function(t){var n=cg(t);n>=e&&(e=n+ +(i&&(!n||ug(t)&&!t.noHeader)))})),e}return 0}function dg(t,e,n,i){var r,o=e.noHeader,a=(r=cg(e),{html:ag[r],richText:sg[r]}),s=[],l=e.blocks||[];ut(!l||Y(l)),l=l||[];var u=t.orderMode;if(e.sortBlocks&&u){l=l.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(bt(h,u)){var c=new Of(h[u],null);l.sort((function(t,e){return c.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===u&&l.reverse()}z(l,(function(n,r){var o=e.valueFormatter,l=hg(n)(o?L(L({},t),{valueFormatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)}));var d="richText"===t.renderMode?s.join(a.richText):gg(i,s.join(""),o?n:a.html);if(o)return d;var p=wd(e.header,"ordinal",t.useUTC),f=og(i,t.renderMode).nameStyle,g=rg(i);return"richText"===t.renderMode?vg(t,p,f)+a.richText+d:gg(i,'
'+oe(p)+"
"+d,n)}function pg(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return V(t=Y(t)?t:[t],(function(t,e){return wd(t,Y(p)?p[e]:p,u)}))};if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),d=o?"":wd(l,"ordinal",u),p=e.valueType,f=a?[]:h(e.value,e.dataIndex),g=!s||!o,v=!s&&o,m=og(i,r),y=m.nameStyle,x=m.valueStyle;return"richText"===r?(s?"":c)+(o?"":vg(t,d,y))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(Y(e)?e.join(" "):e,o)}(t,f,g,v,x)):gg(i,(s?"":c)+(o?"":function(t,e,n){return''+oe(t)+""}(d,!s,y))+(a?"":function(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=Y(t)?t:[t],''+V(t,(function(t){return oe(t)})).join("  ")+""}(f,g,v,x)),n)}}function fg(t,e,n,i,r,o){if(t)return hg(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function gg(t,e,n){return'
'+e+'
'}function vg(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function mg(t,e){return Ad(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function yg(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var xg=function(){function t(){this.richTextStyles={},this._nextStyleNameId=So()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=Td({color:e,type:t,renderMode:n,markerId:i});return X(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};Y(e)?z(e,(function(t){return L(n,t)})):L(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function _g(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),d=Y(c),p=mg(o,a);if(h>1||d&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=B(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(lg("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?z(i,(function(t){h(bf(o,n,t),t)})):z(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,p);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=bf(l,a,u[0]),n=g.type}else r=e=d?c[0]:c;var v=Bo(o),m=v&&o.name||"",y=l.getName(a),x=s?m:y;return lg("section",{header:m,noHeader:s||!v,sortParam:r,blocks:[lg("nameValue",{markerType:"item",markerColor:p,name:x,noName:!ht(x),value:e,valueType:n,dataIndex:a})].concat(i||[])})}var bg=Ho();function wg(t,e){return t.getName(e)||t.getId(e)}var Sg="__universalTransitionEnabled",Mg=t("aj",function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return i(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=If({count:Tg,reset:Cg}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(bg(this).sourceManager=new tg(this)).prepareSource();var i=this.getInitialData(t,n);Dg(i,this),this.dataTask.context.data=i,bg(this).dataBeforeProcessed=i,Ig(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=zd(this),i=n?Bd(t):{},r=this.subType;Hd.hasClass(r)&&(r+="Series"),A(t,e.getTheme().get(this.subType)),A(t,this.getDefaultOption()),ko(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Vd(t,i,n)},e.prototype.mergeOption=function(t,e){t=A(this.option,t,!0),this.fillDataTextStyle(t.data);var n=zd(this);n&&Vd(this.option,t,n);var i=bg(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);Dg(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,bg(this).dataBeforeProcessed=r,Ig(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!J(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=fp.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[wg(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Sg])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){K(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l0&&this._innerSelect(t,e)}},e.registerClass=function(t){return Hd.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Hd));function Ig(t){var e=t.name;Bo(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return z(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function Tg(t){return t.model.getRawData().count()}function Cg(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Ag}function Ag(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Dg(t,e){z(yt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,U(Lg,e))}))}function Lg(t,e){var n=kg(t);return n&&n.setOutputEnd((e||this).count()),e}function kg(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}N(Mg,Sf),N(Mg,fp),na(Mg,Hd);var Pg=t("Q",function(){function t(){this.group=new Wr,this.uid=Oc("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}());function Og(){var t=Ho();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}ea(Pg),aa(Pg);var Rg=Ho(),Ng=Og(),Eg=t("ak",function(){function t(){this.group=new Wr,this.uid=Oc("viewChart"),this.renderTask=If({plan:Bg,reset:Fg}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Vg(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Vg(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){nc(this.group,t)},t.markUpdateMethod=function(t,e){Rg(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}());function zg(t,e,n){t&&iu(t)&&("emphasis"===e?zl:Vl)(t,n)}function Vg(t,e,n){var i=Go(t,e),r=e&&null!=e.highlightKey?function(t){var e=cl[t];return null==e&&hl<=32&&(e=cl[t]=hl++),e}(e.highlightKey):null;null!=i?z(Lo(i),(function(e){zg(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){zg(t,n,r)}))}function Bg(t){return Ng(t.model)}function Fg(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Rg(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),Gg[l]}ea(Eg),aa(Eg);var Gg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Hg="\0__throttleOriginMethod",Wg="\0__throttleRate",Ug="\0__throttleType";function Yg(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?c():h=setTimeout(c,-r),l=i};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}function Zg(t,e,n,i){var r=t[e];if(r){var o=r[Hg]||r,a=r[Ug];if(r[Wg]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=Yg(o,n,"debounce"===i))[Hg]=o,r[Ug]=i,r[Wg]=n}return r}}function Xg(t,e){var n=t[e];n&&n[Hg]&&(n.clear&&n.clear(),t[e]=n[Hg])}var jg=Ho(),qg={itemStyle:sa(Ac,!0),lineStyle:sa(Ic,!0)},Kg={lineStyle:"stroke",itemStyle:"fill"};function $g(t,e){var n=t.visualStyleMapper||qg[e];return n||(console.warn("Unknown style type '"+e+"'."),qg.itemStyle)}function Jg(t,e){var n=t.visualDrawType||Kg[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var Qg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=$g(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Jg(t,i),l=o[s],u=Z(l)?l:null,h="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||h){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Z(o.fill)?c:o.fill,o.stroke="auto"===o.stroke||Z(o.stroke)?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=L({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},tv=new kc,ev={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=$g(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){tv.option=n[i];var a=r(tv);L(t.ensureUniqueItemVisual(e,"style"),a),tv.option.decal&&(t.setItemVisual(e,"decal",tv.option.decal),tv.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},nv={performRawSeries:!0,overallReset:function(t){var e=mt();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),jg(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=jg(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=Jg(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},iv=Math.PI,rv=function(){function t(t,e,n,i){this._stageTaskMap=mt(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=mt();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;z(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{});ut(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}z(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,i.block);d.each((function(t){t.perform(p)})),h.perform(p)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=mt(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||If({plan:uv,reset:hv,count:pv}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||If({reset:ov});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=mt(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1;function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,If({reset:av,onDirty:lv})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}ut(!t.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,z(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return Z(t)&&(t={overallReset:t,seriesType:fv(t)}),t.uid=Oc("stageHandler"),e&&(t.visualType=e),t},t}();function ov(t){t.overallReset(t.ecModel,t.api,t.payload)}function av(t){return t.overallProgress&&sv}function sv(){this.agent.dirty(),this.getDownstream().dirty()}function lv(){this.agent&&this.agent.dirty()}function uv(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function hv(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Lo(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?V(e,(function(t,e){return dv(e)})):cv}var cv=dv(0);function dv(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Cv=["symbol","symbolSize","symbolRotate","symbolOffset"],Av=Cv.concat(["symbolKeepAspect"]),Dv={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a=0&&$v(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=$v(i)?i:0,r=$v(r)?r:1,o=$v(o)?o:0,a=$v(a)?a:0,t.createLinearGradient(i,o,r,a)}(t,e,n),r=e.colorStops,o=0;o0&&(e=i.lineDash,n=i.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:q(e)?[e]:Y(e)?e:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(r=V(r,(function(t){return t/a})),o/=a)}return[r,o]}var nm=new fs(!0);function im(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function rm(t){return"string"==typeof t&&"none"!==t}function om(t){var e=t.fill;return null!=e&&"none"!==e}function am(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function sm(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function lm(t,e,n){var i=da(e.image,e.__image,n);if(fa(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*St),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}var um=["shadowBlur","shadowOffsetX","shadowOffsetY"],hm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function cm(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){ym(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Aa.opacity:a}(i||e.blend!==n.blend)&&(o||(ym(t,r),o=!0),t.globalCompositeOperation=e.blend||Aa.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[Nm])if(this._disposed)this.id;else{var i,r,o;if(K(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[Nm]=!0,!this._model||e){var a=new Cp(this._api),s=this._theme,l=this._model=new yp;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},gy);var u={seriesTransition:o,optionChanged:!0};if(n)this[Em]={silent:i,updateParams:u},this[Nm]=!1,this.getZr().wakeUp();else{try{Wm(this),Zm.update.call(this,null,u)}catch(Fu){throw this[Em]=null,this[Nm]=!1,Fu}this._ssr||this._zr.flush(),this[Em]=null,this[Nm]=!1,Km.call(this,i),$m.call(this,i)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||o.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(o.svgSupported){var t=this._zr;return z(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;z(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return z(i,(function(t){t.group.ignore=!1})),o}this.id},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(_y[n]){var a=o,s=o,l=-1/0,u=-1/0,h=[],d=t&&t.pixelRatio||this.getDevicePixelRatio();z(xy,(function(o,c){if(o.group===n){var d=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(C(t)),p=o.getDom().getBoundingClientRect();a=i(p.left,a),s=i(p.top,s),l=r(p.right,l),u=r(p.bottom,u),h.push({dom:d,left:p.left,top:p.top})}}));var p=(l*=d)-(a*=d),f=(u*=d)-(s*=d),g=c.createCanvas(),v=jr(g,{renderer:e?"svg":"canvas"});if(v.resize({width:p,height:f}),e){var m="";return z(h,(function(t){var e=t.left-a,n=t.top-s;m+=''+t.dom+""})),v.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new Zs({shape:{x:0,y:0,width:p,height:f},style:{fill:t.connectedBackgroundColor}})),z(h,(function(t){var e=new Bs({style:{x:t.left*d-a,y:t.top*d-s,image:t.dom}});v.add(e)})),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}this.id},e.prototype.convertToPixel=function(t,e){return Xm(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Xm(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return z(Uo(this._model,t),(function(t,i){i.indexOf("Models")>=0&&z(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}}),this)}),this),!!n;this.id},e.prototype.getVisual=function(t,e){var n=Uo(this._model,t,{defaultMainType:"series"}),i=n.seriesModel.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=r?kv(i,r,e):Pv(i,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;z(cy,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target;if("globalout"===t?n={}:o&&Ev(o,(function(t){var e=ll(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return n=L({},e.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&r.getComponent(a,s),u=l&&i["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),z(py,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),z(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?(Nv("map","selectchanged",e,i,t),Nv("pie","selectchanged",e,i,t)):"select"===t.fromAction?(Nv("map","selected",e,i,t),Nv("pie","selected",e,i,t)):"unselect"===t.fromAction&&(Nv("map","unselected",e,i,t),Nv("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&qo(this.getDom(),Sy,"");var t=this,e=t._api,n=t._model;z(t._componentsViews,(function(t){t.dispose(n,e)})),z(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete xy[t.id]}},e.prototype.resize=function(t){if(!this[Nm])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[Em]&&(null==i&&(i=this[Em].silent),n=!0,this[Em]=null),this[Nm]=!0;try{n&&Wm(this),Zm.update.call(this,{type:"resize",animation:L({duration:0},t&&t.animation)})}catch(Fu){throw this[Nm]=!1,Fu}this[Nm]=!1,Km.call(this,i),$m.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)this.id;else if(K(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),yy[t]){var n=yy[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=L({},t);return e.type=py[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)this.id;else if(K(e)||(e={silent:!!e}),dy[t.type]&&this._model)if(this[Nm])this._pendingActions.push(t);else{var n=e.silent;qm.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&o.browser.weChat&&this._throttledZrFlush(),Km.call(this,n),$m.call(this,n)}},e.prototype.updateLabelLayout=function(){Dm.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(Sh(t))return;if(t instanceof Rs&&function(t){var e=dl(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Wm=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Um(t,!0),Um(t,!1),e.plan()},Um=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!o.node&&!o.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),Dm.trigger("series:afterupdate",e,i,l)},oy=function(t){t[zm]=!0,t.getZr().wakeUp()},ay=function(t){t[zm]&&(t.getZr().storage.traverse((function(t){Sh(t)||e(t)})),t[zm]=!1)},iy=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){zl(e,n),oy(t)},n.prototype.leaveEmphasis=function(e,n){Vl(e,n),oy(t)},n.prototype.enterBlur=function(e){Bl(e),oy(t)},n.prototype.leaveBlur=function(e){Fl(e),oy(t)},n.prototype.enterSelect=function(e){Gl(e),oy(t)},n.prototype.leaveSelect=function(e){Hl(e),oy(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(Sp))(t)},ry=function(t){function e(t,e){for(var n=0;n=0)){By.push(n);var o=rv.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Gy(t,e){yy[t]=e}function Hy(t,e,n){var i=km("registerMap");i&&i(t,e,n)}function Wy(t){var e=km("getMap");return e&&e(t)}var Uy=function(t){var e=(t=C(t)).type;e||To("");var n=e.split(":");2!==n.length&&To("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,Gf.set(e,t)};function Yy(t){return null==t?0:t.length||1}function Zy(t){return t}Vy(Pm,Qg),Vy(Om,ev),Vy(Om,nv),Vy(Pm,Dv),Vy(Om,Lv),Vy(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=Im(n,e))}));var r=i.getVisual("decal");r&&(i.getVisual("style").decal=Im(r,e))}}))})),Dy(jp),Ly(900,(function(t){var e=mt();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(qp)})),Gy("default",(function(t,e){k(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Wr,i=new Zs({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new qs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Zs({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new ah({shape:{startAngle:-iv/2,endAngle:-iv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*iv/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*iv/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),Ry({type:ml,event:ml,update:ml},wt),Ry({type:yl,event:yl,update:yl},wt),Ry({type:xl,event:xl,update:xl},wt),Ry({type:_l,event:_l,update:_l},wt),Ry({type:bl,event:bl,update:bl},wt),Ay("light",_v),Ay("dark",Iv);var Xy=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||Zy,this._newKeyGetter=i||Zy,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(h>1)for(var d=0;d1)for(var a=0;a30}var ox,ax,sx,lx,ux,hx,cx,dx=K,px=V,fx="undefined"==typeof Int32Array?Array:Int32Array,gx=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],vx=["_approximateExtent"],mx=t("a3",function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var i=!1;ex(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===Xd&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(Y(r=this.getVisual(e))?r=r.slice():dx(r)&&(r=L({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,dx(e)?L(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){dx(t)?L(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?L(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;ul(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){z(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:px(this.dimensions,this._getDimInfo,this),this.hostModel)),ux(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];Z(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(st(arguments)))})},t.internalField=(ox=function(t){var e=t._invertedIndicesMap;z(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new fx(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),t}());function yx(t,e){return xx(t,e).dimensions}function xx(t,e){nf(t)||(t=of(t));var n=(e=e||{}).coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=mt(),o=[],a=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return z(e,(function(t){var e;K(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&rx(a),l=i===t.dimensionsDefine,u=l?ix(t):nx(i),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(t,a));for(var c=mt(h),d=new jf(a),p=0;p0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(o),new tx({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function _x(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var bx=function(){return function(t){this.coordSysDims=[],this.axisMap=mt(),this.categoryAxisMap=mt(),this.coordSysName=t}}(),Sx={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",Zo).models[0],o=t.getReferringComponents("yAxis",Zo).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),Mx(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Mx(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",Zo).models[0];e.coordSysDims=["single"],n.set("single",r),Mx(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",Zo).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),Mx(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),Mx(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();z(o.parallelAxisIndex,(function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),Mx(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function Mx(t){return"category"===t.get("type")}function Ix(t,e,n){var i,r,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(t){return!ex(t.schema)}(e)?(r=e.schema,i=r.dimensions,o=e.store):i=e;var l,u,h,c,d=!(!t||!t.get("stack"));if(z(i,(function(t,e){X(t)&&(i[e]=t={name:t}),d&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,g=0;z(i,(function(t){t.coordDim===p&&g++}));var v={name:h,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},m={name:c,coordDim:c,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(v.storeDimIndex=o.ensureCalculationDimension(c,f),m.storeDimIndex=o.ensureCalculationDimension(h,f)),r.appendCalculationDimension(v),r.appendCalculationDimension(m)):(i.push(v),i.push(m))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:h}}function Tx(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Cx(t,e){return Tx(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Ax(t,e,n){n=n||{};var i,r=e.getSourceManager(),o=!1;t?(o=!0,i=of(t)):o=(i=r.getSource()).sourceFormat===Xd;var a=function(t){var e=t.get("coordinateSystem"),n=new bx(e),i=Sx[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=function(t,e){var n,i=t.get("coordinateSystem"),r=Ip.get(i);return e&&e.coordSysDims&&(n=V(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=Ky(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(e,a),l=n.useEncodeDefaulter,u=Z(l)?l:l?U(ip,s,e):null,h=xx(i,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),c=function(t,e,n){var i,r;return n&&z(t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)})),r||null==i||(t[i].otherDims.itemName=0),i}(h.dimensions,n.createInvertedIndices,a),d=o?null:r.getSharedDataStore(h),p=Ix(e,{schema:h,store:d}),f=new mx(h,e);f.setCalculationInfo(p);var g=null!=c&&function(t){if(t.sourceFormat===Xd){var e=function(t){for(var e=0;ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();aa(Dx);var Lx=0,kx=t("$",function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Lx}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&V(i,Px);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!X(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=mt(this.categories))},t}());function Px(t){return K(t)&&null!=t.value?t.value:t+""}function Ox(t){return"interval"===t.type||"log"===t.type}function Rx(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=yo(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=Ex(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),zx(t,0,e),zx(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[io(Math.ceil(t[0]/a)*a,s),io(Math.floor(t[1]/a)*a,s)],t),r}function Nx(t){var e=Math.pow(10,mo(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,io(n*e)}function Ex(t){return oo(t)+2}function zx(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Vx(t,e){return t>=e[0]&&t<=e[1]}function Bx(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Fx(t,e){return t*(e[1]-e[0])+e[0]}var Gx=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new kx({})),Y(i)&&(i=new kx({categories:V(i,(function(t){return K(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return i(e,t),e.prototype.parse=function(t){return null==t?NaN:X(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Vx(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return Bx(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Fx(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Dx);Dx.registerClass(Gx);var Hx=io,Wx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return i(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Vx(t,this._extent)},e.prototype.normalize=function(t){return Bx(t,this._extent)},e.prototype.scale=function(t){return Fx(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ex(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:Hx(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return z(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var d=no(t.get("barWidth"),i),p=no(t.get("barMaxWidth"),i),f=no(t.get("barMinWidth")||(n_(t)?.5:1),i),g=t.get("barGap"),v=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:v,axisKey:qx(r),stackId:jx(t)})})),Jx(n)}function Jx(t){var e={};z(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return z(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=H(i).length;o=Math.max(35-4*a,15)+"%"}var s=no(o,r),l=no(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),z(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width)i=t.width,e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--;else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var d,p=0;z(i,(function(t,e){t.width||(t.width=c),d=t,p+=t.width*(1+l)})),d&&(p-=d.width*l);var f=-p/2;z(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function Qx(t,e){var n=Kx(t,e),i=$x(n);z(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=jx(t),o=i[qx(n)][r],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function t_(t){return{seriesType:t,plan:Og(),reset:function(t){if(e_(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(r.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(r.dim),u=e.getCalculationInfo("stackResultDimension"),h=Tx(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),c=r.isHorizontal(),d=function(t,e){var n=e.model.get("startValue");return n||(n=0),e.toGlobalCoord(e.dataToCoord("log"===e.type?n>0?n:1:n))}(0,r),p=n_(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),v=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,l=p&&Zx(3*r),u=p&&s&&Zx(3*r),y=p&&Zx(r),x=n.master.getRect(),_=c?x.width:x.height,b=e.getStore(),w=0;null!=(i=t.next());){var S=b.get(h?g:o,i),M=b.get(a,i),I=d,T=void 0;h&&(T=+S-b.get(o,i));var C=void 0,A=void 0,D=void 0,L=void 0;if(c){var k=n.dataToPoint([S,M]);h&&(I=n.dataToPoint([T,M])[0]),C=I,A=k[1]+m,D=k[0]-I,L=v,Math.abs(D)0)for(var s=0;s<$c.length;++s)a[$c[s]]="{primary|"+a[$c[s]]+"}";var l=n?!1===n.inherit?n:k(n,a):a,u=id(t.value,r);if(l[u])o=l[u];else if(l.inherit){for(s=Jc.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Y(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return nd(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),r=function(t,e,n,i){var r=1e4,o=Jc,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-d})}}for(u=0;u=i[0]&&m<=i[1]&&c++)}var y=(i[1]-i[0])/e;if(c>1.5*y&&d>y/1.5)break;if(u.push(g),c>y||t===o[p])break}h=[]}}var x=F(V(u,(function(t){return F(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),_=[],b=x.length-1;for(p=0;pn&&(this._approxInterval=n);var o=r_.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function a_(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function s_(t){return(t/=Yc)>12?12:t>6?6:t>3.5?4:t>2?2:1}function l_(t,e){return(t/=e?Uc:Wc)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function u_(t){return yo(t,!0)}function h_(t,e,n){var i=new Date(t);switch(td(e)){case"year":case"month":i[pd(n)](0);case"day":i[fd(n)](1);case"hour":i[gd(n)](0);case"minute":i[vd(n)](0);case"second":i[md(n)](0),i[yd(n)](0)}return i.getTime()}Dx.registerClass(i_);var c_=Dx.prototype,d_=Wx.prototype,p_=io,f_=Math.floor,g_=Math.ceil,v_=Math.pow,m_=Math.log,y_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Wx,e._interval=0,e}return i(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return V(d_.getTicks.call(this,t),(function(t){var e=t.value,r=io(v_(this.base,e));return r=e===n[0]&&this._fixMin?__(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?__(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=m_(this.base);t=m_(Math.max(0,t))/n,e=m_(Math.max(0,e))/n,d_.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=c_.getExtent.call(this);e[0]=v_(t,e[0]),e[1]=v_(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=__(e[0],n[0])),this._fixMax&&(e[1]=__(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=m_(t[0])/m_(e),t[1]=m_(t[1])/m_(e),c_.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=vo(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[io(g_(e[0]/i)*i),io(f_(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){d_.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Vx(t=m_(t)/m_(this.base),this._extent)},e.prototype.normalize=function(t){return Bx(t=m_(t)/m_(this.base),this._extent)},e.prototype.scale=function(t){return t=Fx(t,this._extent),v_(this.base,t)},e.type="log",e}(Dx),x_=y_.prototype;function __(t,e){return p_(t,oo(e))}x_.getMinorTicks=d_.getMinorTicks,x_.getLabel=d_.getLabel,Dx.registerClass(y_);var b_=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,d=this._determinedMax;return null!=c&&(a=c,l=!0),null!=d&&(s=d,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[S_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[w_[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),w_={min:"_determinedMin",max:"_determinedMax"},S_={min:"_dataMin",max:"_dataMax"};function M_(t,e,n){var i=t.rawExtentInfo;return i||(i=new b_(t,e,n),t.rawExtentInfo=i,i)}function I_(t,e){return null==e?null:it(e)?NaN:t.parse(e)}function T_(t,e){var n=t.type,i=M_(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=Kx("bar",a),l=!1;if(z(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=$x(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=Math.abs(r[1]-r[0]),a=function(t,e){if(t&&e)return t[qx(e)]}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;z(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;z(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function C_(t,e){var n=e,i=T_(t,n),r=i.extent,o=n.get("splitNumber");t instanceof y_&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function A_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Gx({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new i_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Dx.getClass(e)||Wx)}}function D_(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):X(i)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):Z(i)?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(L_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function L_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function k_(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new Be(t.x,t.y,o,a)}function P_(t){var e=t.get("interval");return null==e?"auto":e}function O_(t){return"category"===t.type&&0===P_(t.getLabelModel())}function R_(t,e){var n={};return z(t.mapDimensionsAll(e),(function(e){n[Cx(t,e)]=!0})),H(n)}var N_=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();function E_(t){return Ax(null,t)}var z_=t("ab",{isDimensionStacked:Tx,enableDataStack:Ix,getStackedDimension:Cx});function V_(t,e){var n=e;e instanceof kc||(n=new kc(e));var i=A_(n);return i.setExtent(t[0],t[1]),C_(i,n),i}function B_(t){N(t,N_)}const F_=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:yx,createList:E_,createScale:V_,createSymbol:jv,createTextStyle:function(t,e){return uc(t,null,null,"normal"!==(e=e||{}).state)},dataStack:z_,enableHoverEmphasis:Kl,getECData:ll,getLayoutRect:Nd,mixinAxisModelCommonMethods:B_},Symbol.toStringTag,{value:"Module"}));var G_=[],H_={registerPreprocessor:Dy,registerProcessor:Ly,registerPostInit:ky,registerPostUpdate:Py,registerUpdateLifecycle:Oy,registerAction:Ry,registerCoordinateSystem:Ny,registerLayout:zy,registerVisual:Vy,registerTransform:Uy,registerLoading:Gy,registerMap:Hy,registerImpl:function(t,e){Lm[t]=e},PRIORITY:Rm,ComponentModel:Hd,ComponentView:Pg,SeriesModel:Mg,ChartView:Eg,registerComponentModel:function(t){Hd.registerClass(t)},registerComponentView:function(t){Pg.registerClass(t)},registerSeriesModel:function(t){Mg.registerClass(t)},registerChartView:function(t){Eg.registerClass(t)},registerSubTypeDefaulter:function(t,e){Hd.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){qr(t,e)}};function W_(t){Y(t)?z(t,(function(t){W_(t)})):O(G_,t)>=0||(G_.push(t),Z(t)&&(t={install:t}),t.install(H_))}function U_(t,e){return Math.abs(t-e)<1e-8}function Y_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;on&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function nb(t,e){return V(F((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;return null==n&&(n=1024),z(e.features,(function(t){var e=t.geometry,i=e.encodeOffsets,r=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=eb(r,i,n);break;case"Polygon":case"MultiLineString":tb(r,i,n);break;case"MultiPolygon":z(r,(function(t,e){return tb(t,i[e],n)}))}})),e.UTF8Encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new K_(o[0],o.slice(1)));break;case"MultiPolygon":z(i.coordinates,(function(t){t[0]&&r.push(new K_(t[0],t.slice(1)))}));break;case"LineString":r.push(new $_([i.coordinates]));break;case"MultiLineString":r.push(new $_(i.coordinates))}var a=new J_(n[e||"name"],r,n.cp);return a.properties=n,a}))}const ib=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:ho,asc:ro,getPercentWithPrecision:function(t,e,n){return t[e]&&lo(t,n)[e]||0},getPixelPrecision:so,getPrecision:oo,getPrecisionSafe:ao,isNumeric:wo,isRadianAroundZero:po,linearMap:eo,nice:yo,numericToNumber:bo,parseDate:go,quantile:xo,quantity:vo,quantityExponent:mo,reformIntervals:_o,remRadian:co,round:io},Symbol.toStringTag,{value:"Module"})),rb=Object.freeze(Object.defineProperty({__proto__:null,format:nd,parse:go},Symbol.toStringTag,{value:"Module"})),ob=Object.freeze(Object.defineProperty({__proto__:null,Arc:ah,BezierCurve:rh,BoundingRect:Be,Circle:Cu,CompoundPath:sh,Ellipse:Du,Group:Wr,Image:Bs,IncrementalDisplayable:mh,Line:th,LinearGradient:uh,Polygon:qu,Polyline:$u,RadialGradient:hh,Rect:Zs,Ring:Zu,Sector:Uu,Text:qs,clipPointsByRect:jh,clipRectByRect:qh,createIcon:Kh,extendPath:Oh,extendShape:kh,getShapeClass:Nh,getTransform:Wh,initProps:wh,makeImage:zh,makePath:Eh,mergePath:Bh,registerShape:Rh,resizePath:Fh,updateProps:bh},Symbol.toStringTag,{value:"Module"})),ab=Object.freeze(Object.defineProperty({__proto__:null,addCommas:xd,capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},encodeHTML:oe,formatTime:Cd,formatTpl:Id,getTextRect:function(t,e,n,i,r,o,a,s){return new qs({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()},getTooltipMarker:Td,normalizeCssArray:bd,toCamelCase:_d,truncateText:function(t,e,n,i,r){var o={};return va(o,t,e,n,i,r),o.text}},Symbol.toStringTag,{value:"Module"})),sb=Object.freeze(Object.defineProperty({__proto__:null,bind:W,clone:C,curry:U,defaults:k,each:z,extend:L,filter:F,indexOf:O,inherits:R,isArray:Y,isFunction:Z,isObject:K,isString:X,map:V,merge:A,reduce:B},Symbol.toStringTag,{value:"Module"}));var lb=Ho();function ub(t,e){var n=V(e,(function(e){return t.scale.parse(e)}));return"time"===t.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function hb(t){var e=t.getLabelModel().get("customValues");if(e){var n=D_(t),i=t.scale.getExtent();return{labels:V(F(ub(t,e),(function(t){return t>=i[0]&&t<=i[1]})),(function(e){var i={value:e};return{formattedLabel:n(i),rawLabel:t.scale.getLabel(i),tickValue:e}}))}}return"category"===t.type?function(t){var e=t.getLabelModel(),n=db(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=D_(t);return{labels:V(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function cb(t,e){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent();return{ticks:F(ub(t,n),(function(t){return t>=i[0]&&t<=i[1]}))}}return"category"===t.type?function(t,e){var n,i,r=pb(t,"ticks"),o=P_(e),a=fb(r,o);if(a)return a;if(e.get("show")&&!t.scale.isBlank()||(n=[]),Z(o))n=mb(t,o,!0);else if("auto"===o){var s=db(t,t.getLabelModel());i=s.labelCategoryInterval,n=V(s.labels,(function(t){return t.tickValue}))}else n=vb(t,i=o,!0);return gb(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:V(t.scale.getTicks(),(function(t){return t.value}))}}function db(t,e){var n,i,r=pb(t,"labels"),o=P_(e),a=fb(r,o);return a||(Z(o)?n=mb(t,o):(i="auto"===o?function(t){var e=lb(t).autoInterval;return null!=e?e:lb(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=vb(t,i)),gb(r,o,{labels:n,labelCategoryInterval:i}))}function pb(t,e){return lb(t)[e]||(lb(t)[e]=[])}function fb(t,e){for(var n=0;n1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=O_(t),d=a.get("showMinLabel")||c,p=a.get("showMaxLabel")||c;d&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return p&&f-l!==o[1]&&g(o[1]),s}function mb(t,e,n){var i=t.scale,r=D_(t),o=[];return z(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var yb=[0,1],xb=t("V",function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return so(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&_b(n=n.slice(),i.count()),eo(t,yb,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&_b(n=n.slice(),i.count());var r=eo(t,n,yb,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=V(cb(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(t.onBand&&!n&&r){var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[1],tickValue:e[0].tickValue};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;z(e,(function(t){t.coord-=u/2}));var h=t.scale.getExtent();a=1+h[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a,tickValue:h[1]+1},e.push(o)}var c=s[0]>s[1];d(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift()),i&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]}),d(s[1],o.coord)&&(i?o.coord=s[1]:e.pop()),i&&d(o.coord,s[1])&&e.push({coord:s[1]})}function d(t,e){return t=io(t),e=io(e),c?t>e:t0&&t<100||(t=5),V(this.scale.getMinorTicks(t),(function(t){return V(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return hb(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=D_(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),d=0,p=0;l<=o[1];l+=s){var f,g,v=Cr(n({value:l}),e.font,"center","top");f=1.3*v.width,g=1.3*v.height,d=Math.max(d,f,7),p=Math.max(p,g,7)}var m=d/h,y=p/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(m,y))),_=lb(t.model),b=t.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},t}());function _b(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var bb=2*Math.PI,wb=fs.CMD,Sb=["top","right","bottom","left"];function Mb(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function Ib(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%bb<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var d=i;i=xs(r),r=xs(d)}else i=xs(i),r=xs(r);i>r&&(r+=bb);var p=Math.atan2(s,a);if(p<0&&(p+=bb),p>=i&&p<=r||p+bb>=i&&p+bb<=r)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,v=n*Math.cos(r)+t,m=n*Math.sin(r)+e,y=(f-a)*(f-a)+(g-s)*(g-s),x=(v-a)*(v-a)+(m-s)*(m-s);return y0){e=e/180*Math.PI,kb.fromArray(t[0]),Pb.fromArray(t[1]),Ob.fromArray(t[2]),Le.sub(Rb,kb,Pb),Le.sub(Nb,Ob,Pb);var n=Rb.len(),i=Nb.len();if(!(n<.001||i<.001)){Rb.scale(1/n),Nb.scale(1/i);var r=Rb.dot(Nb);if(Math.cos(e)1&&Le.copy(Vb,Ob),Vb.toArray(t[1])}}}}function Fb(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,kb.fromArray(t[0]),Pb.fromArray(t[1]),Ob.fromArray(t[2]),Le.sub(Rb,Pb,kb),Le.sub(Nb,Ob,Pb);var i=Rb.len(),r=Nb.len();if(!(i<.001||r<.001)&&(Rb.scale(1/i),Nb.scale(1/r),Rb.dot(e)=a)Le.copy(Vb,Ob);else{Vb.scaleAndAdd(Nb,o/Math.tan(Math.PI/2-s));var l=Ob.x!==Pb.x?(Vb.x-Pb.x)/(Ob.x-Pb.x):(Vb.y-Pb.y)/(Ob.y-Pb.y);if(isNaN(l))return;l<0?Le.copy(Vb,Pb):l>1&&Le.copy(Vb,Ob)}Vb.toArray(t[1])}}}function Gb(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Hb(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Bt(i[0],i[1]),o=Bt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Ht([],i[1],i[0],a/r),l=Ht([],i[1],i[2],a/o),u=Ht([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0){x(i*n,0,a);var r=i+t;r<0&&_(-r*n,1)}else _(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--)x(-o[l-1]*c,l,a)}}function b(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function Xb(t,e,n,i){return Zb(t,"y","height",e,n)}function jb(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new Be(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r=0&&n.attr(p.oldLayoutSelect),O(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),bh(n,s,e,a)}else if(n.attr(s),!vc(n).valueAnimation){var h=ot(n.style.opacity,1);n.style.opacity=0,wh(n,{style:{opacity:h}},e,a)}if(p.oldLayout=s,n.states.select){var c=p.oldLayoutSelect={};ew(c,s,nw),ew(c,n.states.select,nw)}if(n.states.emphasis){var d=p.oldLayoutEmphasis={};ew(d,s,nw),ew(d,n.states.emphasis,nw)}yc(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(p=tw(i)).oldLayout;var p,f={points:i.shape.points};r?(i.attr({shape:r}),bh(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,wh(i,{style:{strokePercent:1}},e)),p.oldLayout=f}},t}(),rw=Ho();function ow(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var i=rw(e).labelManager;i||(i=rw(e).labelManager=new iw),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var i=rw(e).labelManager;n.updatedSeries.forEach((function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()}))}const aw=Object.freeze(Object.defineProperty({__proto__:null,Axis:xb,ChartView:Eg,ComponentModel:Hd,ComponentView:Pg,List:mx,Model:kc,PRIORITY:Rm,SeriesModel:Mg,color:di,connect:function(t){if(Y(t)){var e=t;t=null,z(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+wy++,z(e,(function(e){e.group=t}))}return _y[t]=!0,t},dataTool:{},dependencies:{zrender:"5.6.1"},disConnect:Ty,disconnect:Iy,dispose:function(t){X(t)?t=xy[t]:t instanceof uy||(t=Cy(t)),t instanceof uy&&!t.isDisposed()&&t.dispose()},env:o,extendChartView:function(t){var e=Eg.extend(t);return Eg.registerClass(e),e},extendComponentModel:function(t){var e=Hd.extend(t);return Hd.registerClass(e),e},extendComponentView:function(t){var e=Pg.extend(t);return Pg.registerClass(e),e},extendSeriesModel:function(t){var e=Mg.extend(t);return Mg.registerClass(e),e},format:ab,getCoordinateSystemDimensions:Ey,getInstanceByDom:Cy,getInstanceById:function(t){return xy[t]},getMap:Wy,graphic:ob,helper:F_,init:My,innerDrawElementOnCanvas:_m,matrix:De,number:ib,parseGeoJSON:nb,parseGeoJson:nb,registerAction:Ry,registerCoordinateSystem:Ny,registerLayout:zy,registerLoading:Gy,registerLocale:Gc,registerMap:Hy,registerPostInit:ky,registerPostUpdate:Py,registerPreprocessor:Dy,registerProcessor:Ly,registerTheme:Ay,registerTransform:Uy,registerUpdateLifecycle:Oy,registerVisual:Vy,setCanvasCreator:function(t){d({createCanvas:t})},setPlatformAPI:d,throttle:Yg,time:rb,use:W_,util:sb,vector:Zt,version:"5.6.0",zrUtil:Mt,zrender:Jr},Symbol.toStringTag,{value:"Module"}));t("e",aw);var sw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return i(e,t),e.prototype.getInitialData=function(t){return Ax(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new Wr,n=jv("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*t.itemHeight,s=jv(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?r:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Mg);function lw(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=bf(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}var hw=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return i(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=jv(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=cw,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){zl(this.childAt(0))},e.prototype.downplay=function(){Vl(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,h)}else{(d=this.childAt(0)).silent=!1;var c={scaleX:s[0]/2,scaleY:s[1]/2};u?d.attr(c):bh(d,c,a,n),Ch(d)}if(this._updateCommon(t,n,s,i,r),l){var d=this.childAt(0);u||(c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}},d.scaleX=d.scaleY=0,d.style.opacity=0,wh(d,c,a,n))}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,l,u,h,c,d,p,f=this.childAt(0),g=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,c=i.labelStatesModels,d=i.hoverScale,p=i.cursorStyle,h=i.emphasisDisabled),!i||t.hasItemOption){var v=i&&i.itemModel?i.itemModel:t.getItemModel(e),m=v.getModel("emphasis");o=m.getModel("itemStyle").getItemStyle(),s=v.getModel(["select","itemStyle"]).getItemStyle(),a=v.getModel(["blur","itemStyle"]).getItemStyle(),l=m.get("focus"),u=m.get("blurScope"),h=m.get("disabled"),c=lc(v),d=m.getShallow("scale"),p=v.getShallow("cursor")}var y=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=Kv(t.getItemVisual(e,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var _=t.getItemVisual(e,"style"),b=_.fill;if(f instanceof Bs){var w=f.style;f.useStyle(L({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(L({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=f.z2,f.z2+=S):null!=M&&(f.z2=M,this._z2=null);var I=r&&r.useNameLabel;sc(f,c,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return I?t.getName(e):lw(t,e)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var T=f.ensureState("emphasis");T.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var C=null==d||!0===d?Math.max(1.1,3/this._sizeY):isFinite(d)&&d>0?+d:1;T.scaleX=this._sizeX*C,T.scaleY=this._sizeY*C,this.setSymbolScale(1),$l(this,l,u,h)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=ll(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&Mh(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Mh(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return qv(t.getItemVisual(e,"symbolSize"))},e}(Wr);function cw(t,e){this.parent.drift(t,e)}function dw(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function pw(t){return null==t||K(t)||(t={isIgnore:t}),t||{}}function fw(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:lc(e),cursorStyle:e.get("cursor")}}var gw=function(){function t(t){this.group=new Wr,this._SymbolCtor=t||hw}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=pw(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=fw(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=u(i);if(dw(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(h,c){var d=r.getItemGraphicEl(c),p=u(h);if(dw(t,p,h,e)){var f=t.getItemVisual(h,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==f)n.remove(d),(d=new o(t,h,s,l)).setPosition(p);else{d.updateData(t,h,s,l);var v={x:p[0],y:p[1]};a?d.attr(v):bh(d,v,i)}n.add(d),t.setItemGraphicEl(h,d)}else n.remove(d)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=fw(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=pw(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]),n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=V(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,p=e.getCalculationInfo("stackResultDimension");return Tx(e,c[0])&&(d=!0,c[0]=p),Tx(e,c[1])&&(d=!0,c[1]=p),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function mw(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var yw=Math.min,xw=Math.max;function _w(t,e){return isNaN(t)||isNaN(e)}function bw(t,e,n,i,r,o,a,s,l){for(var u,h,c,d,p,f,g=n,v=0;v=r||g<0)break;if(_w(m,y)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](m,y),c=m,d=y;else{var x=m-u,_=y-h;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===m&&S===y&&v=i||_w(w,S))p=m,f=y;else{T=w-u,C=S-h;var L=m-u,k=w-m,P=y-h,O=S-y,R=void 0,N=void 0;if("x"===s){var E=T>0?1:-1;p=m-E*(R=Math.abs(L))*a,f=y,A=m+E*(N=Math.abs(k))*a,D=y}else if("y"===s){var z=C>0?1:-1;p=m,f=y-z*(R=Math.abs(P))*a,A=m,D=y+z*(N=Math.abs(O))*a}else R=Math.sqrt(L*L+P*P),p=m-T*a*(1-(I=(N=Math.sqrt(k*k+O*O))/(N+R))),f=y-C*a*(1-I),D=y+C*a*I,A=yw(A=m+T*a*I,xw(w,m)),D=yw(D,xw(S,y)),A=xw(A,yw(w,m)),f=y-(C=(D=xw(D,yw(S,y)))-y)*R/N,p=yw(p=m-(T=A-m)*R/N,xw(u,m)),f=yw(f,xw(h,y)),A=m+(T=m-(p=xw(p,yw(u,m))))*N/R,D=y+(C=y-(f=xw(f,yw(h,y))))*N/R}t.bezierCurveTo(c,d,p,f,m,y),c=A,d=D}else t.lineTo(m,y)}u=m,h=y,g+=o}return v}var ww=function(){this.smooth=0,this.smoothConstraint=!0},Sw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return i(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ww},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&_w(n[2*r-2],n[2*r-1]);r--);for(;i=0){var v=a?(h-i)*g+i:(u-n)*g+n;return a?[t,v]:[v,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],d=r[l++],p=r[l++],f=r[l++];var m=a?Mn(n,u,c,p,t,s):Mn(i,h,d,f,t,s);if(m>0)for(var y=0;y=0)return v=a?wn(i,h,d,f,x):wn(n,u,c,p,x),a?[t,v]:[v,t]}n=p,i=f}}},e}(Rs),Mw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(ww),Iw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return i(e,t),e.prototype.getDefaultShape=function(){return new Mw},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&_w(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=V(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var d=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:ri((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),p=d.length;if(!p&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var f=d[0].coord-10,g=d[p-1].coord+10,v=g-f;if(v<.001)return"transparent";z(d,(function(t){t.offset=(t.coord-f)/v})),d.push({offset:p?d[p-1].offset:.5,color:c[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:c[0]||"transparent"});var m=new uh(0,0,0,0,d,!0);return m[r]=f,m[r+"2"]=g,m}}}function Ew(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return z(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function zw(t,e){return[t[2*e],t[2*e+1]]}function Vw(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1),ll(d).seriesIndex=t.seriesIndex,$l(d,D,L,P);var O=Ow(t.get("smooth")),R=t.get("smoothMonotone");if(d.setShape({smooth:O,smoothMonotone:R,connectNulls:b}),p){var N=o.getCalculationInfo("stackedOnSeries"),E=0;p.useStyle(k(s.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),N&&(E=Ow(N.get("smooth"))),p.setShape({smooth:O,stackedOnSmooth:E,smoothMonotone:R,connectNulls:b}),eu(p,t,"areaStyle"),ll(p).seriesIndex=t.seriesIndex,$l(p,D,L,P)}var z=this._changePolyState;o.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=z)})),this._polyline.onHoverStateChange=z,this._data=o,this._coordSys=i,this._stackedOnPoints=x,this._points=l,this._step=I,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,d),p&&this.packEventData(t,p))},e.prototype.packEventData=function(t,e){ll(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Go(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel")||0,c=t.get("z")||0;(s=new hw(r,o)).x=l,s.y=u,s.setZ(h,c);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=c,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Eg.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Go(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Eg.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;Pl(this._polyline,t),e&&Pl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Sw({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Iw({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");Z(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=Z(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],d=void 0,p=void 0,f=void 0;if(n)if(r){var g=n,v=e.pointToCoord(c);i?(d=g.startAngle,p=g.endAngle,f=-v[1]/180*Math.PI):(d=g.r0,p=g.r,f=v[0])}else{var m=n;i?(d=m.x,p=m.x+m.width,f=t.x):(d=m.y+m.height,p=m.y,f=t.y)}var y=p===d?0:(f-d)/(p-d);a&&(y=1-y);var x=Z(u)?u(o):l*y+h,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(Vw(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new qs({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&(sc(o,lc(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?uw(r,n):lw(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),v=f.inverse,m=e.shape,y=v?g?m.x:m.y+m.height:g?m.x+m.width:m.y,x=(g?p:0)*(v?-1:1),_=(g?0:-p)*(v?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,y,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!c){var T=zw(u,S[0]);s.attr({x:T[0]+x,y:T[1]+_}),r&&(I=h.getRawValue(S[0]))}else{(T=l.getPointOn(y,b))&&s.attr({x:T[0]+x,y:T[1]+_});var C=h.getRawValue(S[0]),A=h.getRawValue(S[1]);r&&(I=$o(n,d,C,A,w.t))}i.lastFrameIndex=S[0]}else{var D=1===t||i.lastFrameIndex>0?S[0]:0;T=zw(u,D),r&&(I=h.getRawValue(D)),s.attr({x:T[0]+x,y:T[1]+_})}if(r){var L=vc(s);"function"==typeof L.setLabelText&&L.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a){for(var s=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),l=[],u=[],h=[],c=[],d=[],p=[],f=[],g=vw(r,e,a),v=t.getLayout("points")||[],m=e.getLayout("points")||[],y=0;y3e3||l&&Pw(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:p}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),bh(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:d}),l.stopAnimation(),bh(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var v=[],m=h.status,y=0;ye&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),d=Math.round(a/c);if(isFinite(d)&&d>1){"lttb"===r?t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d)):"minmax"===r&&t.setData(i.minmaxDownSample(i.mapDimension(l.dim),1/d));var p=void 0;X(r)?p=Hw[r]:Z(r)&&(p=r),p&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,p,Ww))}}}}}function Yw(t){t.registerChartView(Fw),t.registerSeriesModel(sw),t.registerLayout(Gw("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Uw("line"))}var Zw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.getInitialData=function(t,e){return Ax(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var r=i.clampData(t),o=i.dataToPoint(r);if(n)z(i.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=r[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),i.length<2)return;if(2===i.length)return void(o[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,h=void 0,c=1,d=0;ds){h=(p+u)/2;break}1===d&&(c=f-i[0].tickValue)}null==h&&(u?u&&(h=i[i.length-1].coord):h=i[0].coord),o[n]=t.toGlobalCoord(h)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=i.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Mg);Mg.registerClass(Zw);var Xw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.getInitialData=function(){return Ax(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Rc(Zw.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Zw),jw=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},qw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return i(e,t),e.prototype.getDefaultShape=function(){return new jw},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,d=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){Th(e,t,ll(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Eg),nS={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=Qw(e.x,t.x),s=tS(e.x+e.width,r),l=Qw(e.y,t.y),u=tS(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=tS(e.r,t.r),o=Qw(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;return n<0&&(i=e.r,e.r=e.r0,e.r0=i),a}},iS={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new Zs({shape:L({},i),z2:1});return u.__dataIndex=n,u.name="item",o&&(u.shape[r?"height":"width"]=0),u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?qw:Uu,h=new u({shape:i,z2:1});h.name="item";var c,d,p=hS(r);if(h.calculateTextPosition=(c=p,d=({isRoundCap:u===qw}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return Pr(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,p=(u+h)/2,f=a.startAngle,g=a.endAngle,v=(f+g)/2,m=d?Math.abs(u-h)/2:0,y=Math.cos,x=Math.sin,_=s+u*y(f),b=l+u*x(f),w="left",S="top";switch(r){case"startArc":_=s+(h-o)*y(v),b=l+(h-o)*x(v),w="center",S="top";break;case"insideStartArc":_=s+(h+o)*y(v),b=l+(h+o)*x(v),w="center",S="bottom";break;case"startAngle":_=s+p*y(f)+Kw(f,o+m,!1),b=l+p*x(f)+$w(f,o+m,!1),w="right",S="middle";break;case"insideStartAngle":_=s+p*y(f)+Kw(f,-o+m,!1),b=l+p*x(f)+$w(f,-o+m,!1),w="left",S="middle";break;case"middle":_=s+p*y(v),b=l+p*x(v),w="center",S="middle";break;case"endArc":_=s+(u+o)*y(v),b=l+(u+o)*x(v),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*y(v),b=l+(u-o)*x(v),w="center",S="top";break;case"endAngle":_=s+p*y(g)+Kw(g,o+m,!0),b=l+p*x(g)+$w(g,o+m,!0),w="left",S="middle";break;case"insideEndAngle":_=s+p*y(g)+Kw(g,-o+m,!0),b=l+p*x(g)+$w(g,-o+m,!0),w="right",S="middle";break;default:return Pr(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?bh:wh)(h,{shape:g},o)}return h}};function rS(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?bh:wh)(n,{shape:l},e,r,null),(a?bh:wh)(n,{shape:u},e?t.baseAxis.model:null,r)}function oS(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function hS(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function cS(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape;L(u,Jw(i.getModel("itemStyle"),u,!0)),t.setShape(u)}}else{var h=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",h)}t.useStyle(l);var c=i.getShallow("cursor");c&&t.attr("cursor",c);var d=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",p=lc(i);sc(t,p,{labelFetcher:o,labelDataIndex:n,defaultText:lw(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var f=t.getTextContent();if(s&&f){var g=i.get(["label","position"]);t.textConfig.inside="middle"===g||null,function(t,e,n,i){if(q(i))t.setTextConfig({rotation:i});else if(Y(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===g?d:g,hS(a),i.get(["label","rotate"]))}mc(f,p,o.getRawValue(n),(function(t){return uw(e,t)}));var v=i.getModel(["emphasis"]);$l(t,v.get("focus"),v.get("blurScope"),v.get("disabled")),eu(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",z(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var dS=function(){return function(){}}(),pS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return i(e,t),e.prototype.getDefaultShape=function(){return new dS},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);ll(this).dataIndex=e>=0?e:null}),30,!1);function vS(t,e,n){if(Dw(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}function mS(t){t.registerChartView(eS),t.registerSeriesModel(Xw),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,U(Qx,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,t_("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Uw("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)}))}))}var yS=2*Math.PI,xS=Math.PI/180;function _S(t,e){return Nd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function bS(t,e){var n=_S(t,e),i=t.get("center"),r=t.get("radius");Y(r)||(r=[0,r]);var o,a,s=no(n.width,e.getWidth()),l=no(n.height,e.getHeight()),u=Math.min(s,l),h=no(r[0],u/2),c=no(r[1],u/2),d=t.coordinateSystem;if(d){var p=d.dataToPoint(i);o=p[0]||0,a=p[1]||0}else Y(i)||(i=[i,i]),o=no(i[0],s)+n.x,a=no(i[1],l)+n.y;return{cx:o,cy:a,r0:h,r:c}}function wS(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=_S(t,n),o=bS(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*xS,c=t.get("endAngle"),d=t.get("padAngle")*xS;c="auto"===c?h-yS:-c*xS;var p=t.get("minAngle")*xS+d,f=0;e.each(i,(function(t){!isNaN(t)&&f++}));var g=e.getSum(i),v=Math.PI/(g||f)*2,m=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),_=e.getDataExtent(i);_[0]=0;var b=m?1:-1,w=[h,c],S=b*d/2;ps(w,!m),h=w[0],c=w[1];var M=SS(t);M.startAngle=h,M.endAngle=c,M.clockwise=m;var I=Math.abs(c-h),T=I,C=0,A=h;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:a,cy:s,r0:u,r:y?NaN:l});else{(i="area"!==y?0===g&&x?v:t*v:I/f)i?h=o=A+b*i/2:(o=A+S,h=r-S),e.setItemLayout(n,{angle:i,startAngle:o,endAngle:h,clockwise:m,cx:a,cy:s,r0:u,r:y?eo(t,_,[u,l]):l}),A=r}})),Tn?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,d=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var v=(i.style.margin||0)+2.1;o.height=g.height+v,o.y-=(o.height-c)/2}}}function AS(t){return"center"===t.position}function DS(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*IS,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,d=s.height;function p(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,d=s.getTextContent(),f=s.getTextGuideLine(),g=i.getItemModel(t),v=g.getModel("label"),m=v.get("position")||g.get(["emphasis","label","position"]),y=v.get("distanceToLabelLine"),x=v.get("alignTo"),_=no(v.get("edgeDistance"),u),b=v.get("bleedMargin"),w=g.getModel("labelLine"),S=w.get("length");S=no(S,u);var M=w.get("length2");if(M=no(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":L>0?"left":"right"}var B=Math.PI,F=0,G=v.get("rotate");if(q(G))F=G*(B/180);else if("center"===m)F=0;else if("radial"===G||!0===G)F=L<0?-D+B:-D;else if("tangential"===G&&"outside"!==m&&"outer"!==m){var H=Math.atan2(L,k);H<0&&(H=2*B+H),k>0&&(H=B+H),F=H-B}if(o=!!F,d.x=I,d.y=T,d.rotation=F,d.setStyle({verticalAlign:"middle"}),P){d.setStyle({align:A});var W=d.states.select;W&&(W.x+=d.x,W.y+=d.y)}else{var U=d.getBoundingRect().clone();U.applyTransform(d.getComputedTransform());var Y=(d.style.margin||0)+2.1;U.y-=Y/2,U.height+=Y,r.push({label:d,labelLine:f,position:m,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new Le(L,k),linePoints:C,textAlign:A,labelDistance:y,labelAlignTo:x,edgeDistance:_,bleedMargin:b,rect:U,unconstrainedWidth:U.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:P})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(Eg);function PS(t,e,n){e=Y(e)&&{coordDimensions:e}||L({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=xx(i,e).dimensions,o=new mx(r,t);return o.initData(i,n),o}var OS=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),RS=Ho(),NS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new OS(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return PS(this,{coordDimensions:["value"],encodeDefaulter:U(rp,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=RS(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),(function(t){o.push(t)})),r=i.seats=lo(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=r[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){ko(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Mg);function ES(t){t.registerChartView(kS),t.registerSeriesModel(NS),Rv("pie",t.registerAction),t.registerLayout(U(wS,"pie")),t.registerProcessor(MS("pie")),t.registerProcessor(function(t){return{seriesType:t,reset:function(t,e){var n=t.getData();n.filterSelf((function(t){var e=n.mapDimension("value"),i=n.get(e,t);return!(q(i)&&!isNaN(i)&&i<0)}))}}}("pie"))}var zS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return i(e,t),e.prototype.getInitialData=function(t,e){return Ax(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Mg),VS=function(){},BS=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return i(e,t),e.prototype.getDefaultShape=function(){return new VS},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),GS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=Gw("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new FS:new gw,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Eg),HS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Hd),WS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Zo).models[0]},e.type="cartesian2dAxis",e}(Hd);N(WS,N_);var US={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},YS=A({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},US),ZS=A({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},US);const XS={category:YS,value:ZS,time:A({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ZS),log:k({logBase:10},ZS)};var jS={value:1,category:1,time:1,log:1};function qS(t,e,n,r){z(jS,(function(o,a){var s=A(A({},XS[a],!0),r,!0),l=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return i(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=zd(this),i=n?Bd(t):{};A(t,e.getTheme().get(a+"Axis")),A(t,this.getDefaultOption()),t.type=KS(t),n&&Vd(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=kx.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+a,n.defaultOption=s,n}(n);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",KS)}function KS(t){return t.type||(t.data?"category":"value")}var $S=t("T",function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return V(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),F(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}()),JS=["x","y"];function QS(t){return"interval"===t.type||"time"===t.type}var tM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=JS,e}return i(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(QS(t)&&QS(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,d=this._transform=[l,0,0,u,h,c];this._invTransform=Ce([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new Be(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return Wt(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return Wt(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,r=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-r+t;return new Be(i,r,o,a)},e}($S),eM=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return i(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(xb);function nM(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,f="x"===u?[c[2]-p,c[3]+p]:[c[0]-p,c[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[d.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[d[l]]:c[0],"x"===u?f[d[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[d[s]]-f[d.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),rt(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var v=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-v:v,o.z2=1,o}function iM(t){return"cartesian2d"===t.get("coordinateSystem")}function rM(t){var e={xAxisModel:null,yAxisModel:null};return z(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Zo).models[0];e[i]=o})),e}var oM=Math.log;function aM(t,e,n){var i=Wx.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=T_(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var d=oM(t.base);u=[oM(u[0])/d,oM(u[1])/d]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var p=i.getExtent.call(t);h&&(u[0]=p[0]),c&&(u[1]=p[1]);var f=i.getInterval.call(t),g=u[0],v=u[1];if(h&&c)f=(v-g)/a;else if(h)for(v=u[0]+f*a;vu[0]&&isFinite(g)&&isFinite(u[0]);)f=Nx(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=Nx(f));var m=f*a;(g=io((v=Math.ceil(u[1]/f)*f)-m))<0&&u[0]>=0?(g=0,v=io(m)):v>0&&u[1]<=0&&(v=0,g=-io(m))}var y=(r[0].value-o[0].value)/s,x=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*y,v+f*x),i.setInterval.call(t,f),(y||x)&&i.setNiceExtent.call(t,g+f,v-f)}var sM=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=JS,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=H(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;Ox(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(C_(l,s),Ox(l)&&(e=a))}r.length&&(e||C_((e=r.pop()).scale,e.model),z(r,(function(t){aM(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};z(n.x,(function(t){uM(n,"y",t,r)})),z(n.y,(function(t){uM(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=Nd(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){z(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(z(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof Gx?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=D_(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var cM=Math.PI,dM=function(){function t(t,e){this.group=new Wr,this.opt=e,this.axisModel=t,k(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Wr({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!pM[t]},t.prototype.add=function(t){pM[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=co(e-t);return po(o)?(r=n>0?"top":"bottom",i="center"):po(o-cM)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),pM={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(Wt(s,s,a),Wt(l,l,a));var h=L({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new th({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Gh(c.shape,c.style.lineWidth),c.anid="line",n.add(c);var d=e.get(["axisLine","symbol"]);if(null!=d){var p=e.get(["axisLine","symbolSize"]);X(d)&&(d=[d,d]),(X(p)||q(p))&&(p=[p,p]);var f=Kv(e.get(["axisLine","symbolOffset"])||0,p),g=p[0],v=p[1];z([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==d[i]&&null!=d[i]){var r=jv(d[i],-g/2,-v/2,g,v,h.stroke,!0),o=e.r+e.offset,a=u?l:s;r.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");if("auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick")),a&&!r.scale.isBlank()){for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=mM(r.getTicksCoords(),e.transform,l,k(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,p=["start"===s?c[0]-d*h:"end"===s?c[1]+d*h:(c[0]+c[1])/2,vM(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*cM/180),vM(s)?o=dM.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=co(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return po(a-cM/2)?(o=l?"bottom":"top",r="center"):po(a-1.5*cM)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*cM&&a>cM/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=rt(t.nameTruncateMaxWidth,v.maxWidth,a),x=new qs({x:p[0],y:p[1],rotation:o.rotation,silent:dM.isLabelSilent(e),style:uc(u,{text:r,font:g,overflow:"truncate",width:y,ellipsis:m,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(tc({el:x,componentModel:e,itemName:r}),x.__fullText=r,x.anid="name",e.get("triggerEvent")){var _=dM.makeAxisEventDataBase(e);_.targetType="axisName",_.name=r,ll(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function fM(t){t&&(t.ignore=!0)}function gM(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=be([]);return Ie(r,r,-t.rotation),n.applyTransform(Se([],r,t.getLocalTransform())),i.applyTransform(Se([],r,e.getLocalTransform())),n.intersect(i)}}function vM(t){return"middle"===t||"center"===t}function mM(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function _M(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[wM(t)]}function bM(t){return!!t.get(["handle","show"])}function wM(t){return t.type+"||"+t.id}var SM={},MM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(e,n,i,r){this.axisPointerClass&&function(t){var e=_M(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=bM(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=a;null!=c.color&&(d=k({color:c.color},a));var p=A(C(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:h},!1);if(X(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else Z(l)&&(p.name=l(p.name,p));var g=new kc(p,null,this.ecModel);return N(g,N_.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:A({lineStyle:{color:"#bbb"}},WM.axisLine),axisLabel:UM(WM.axisLabel,!1),axisTick:UM(WM.axisTick,!1),splitLine:UM(WM.splitLine,!0),splitArea:UM(WM.splitArea,!0),indicator:[]},e}(Hd),ZM=["axisLine","axisTickLabel","axisName"],XM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;z(V(e.getIndicatorAxes(),(function(t){var n=t.model.get("showName")?t.name:"";return new dM(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){z(ZM,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),d=Y(h)?h:[h],p=Y(c)?c:[c],f=[],g=[];if("circle"===i)for(var v=n[0].getTicksCoords(),m=e.cx,y=e.cy,x=0;x3?1.4:r>1?1.2:1.1;eI(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);eI(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){JM(this._zr,"globalPan")||eI(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(qt);function eI(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(ge(i.event),nI(t,e,n,i,r))}function nI(t,e,n,i,r){r.isAvailableBehavior=W(iI,null,n,i),t.trigger(e,r)}function iI(t,e,n){var i=n[t];return!t||i&&(!X(i)||e.event[i+"Key"])}function rI(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function oI(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var aI,sI={axisPointer:1,tooltip:1,brush:1};function lI(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!sI.hasOwnProperty(i.mainType)&&r&&r.model!==n}function uI(t){X(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var hI={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},cI=H(hI),dI={"alignment-baseline":"textBaseline","stop-color":"stopColor"},pI=H(dI),fI=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=uI(t);this._defsUsePending=[];var i=new Wr;this._root=i;var r=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),_I(n,i,null,!0,!1);for(var l,u,h=n.firstChild;h;)this._parseNode(h,i,r,null,!1,!1),h=h.nextSibling;if(function(t,e){for(var n=0;n=4&&(l={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(l&&null!=a&&null!=s&&(u=DI(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var d=i;(i=new Wr).add(d),d.scaleX=d.scaleY=u.scale,d.x=u.x,d.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new Zs({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=aI[s];if(u&&bt(aI,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=gI[s];if(d&&bt(gI,s)){var p=d.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new Es({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});yI(e,n),_I(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(aI={g:function(t,e){var n=new Wr;return yI(e,n),_I(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Zs;return yI(e,n),_I(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new Cu;return yI(e,n),_I(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new th;return yI(e,n),_I(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new Du;return yI(e,n),_I(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=xI(i));var r=new qu({shape:{points:n||[]},silent:!0});return yI(e,r),_I(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=xI(i));var r=new $u({shape:{points:n||[]},silent:!0});return yI(e,r),_I(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new Bs;return yI(e,n),_I(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Wr;return yI(e,a),_I(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Wr;return yI(e,a),_I(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=Mu(t.getAttribute("d")||"");return yI(e,n),_I(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),gI={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new uh(e,n,i,r);return vI(t,o),mI(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new hh(e,n,i);return vI(t,r),mI(t,r),r}};function vI(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function mI(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};AI(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function yI(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),k(e.__inheritedStyle,t.__inheritedStyle))}function xI(t){for(var e=MI(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=MI(a);switch(r=r||[1,0,0,1,0,0],s){case"translate":Me(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Te(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Ie(r,r,-parseFloat(l[0])*TI,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":Se(r,[1,0,Math.tan(parseFloat(l[0])*TI),1,0,0],r);break;case"skewY":Se(r,[1,Math.tan(parseFloat(l[0])*TI),0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),AI(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=mt(),n=mt(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(d=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;sc(e,lc(i),{labelFetcher:d,labelDataIndex:c,defaultText:n},p);var f=e.getTextContent();if(f&&(jI(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function tT(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):ll(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function eT(t,e,n,i,r){t.data||tc({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function nT(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return $l(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&function(t,e,n){var i=ll(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,r,n),a}function iT(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),z(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Mg);function aT(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),z(e,(function(t,e){for(var n,i,r,o=(n=V(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},z(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(p.width=d,p.height=d/x):(p.height=d,p.width=d*x),p.y=c[1]-p.height/2,p.x=c[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=x,p=Nd(b,{width:m,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}N(pT,uT);var vT=function(){function t(){this.dimensions=dT}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new pT(o+r,o,L({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=gT,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),z(r,(function(t,r){var o=V(t,(function(t){return t.get("nameMap")})),a=new pT(r,r,L({nameMap:D(o)},i(t[0])));a.zoomLimit=rt.apply(null,V(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=gT,a.resize(t[0],e),z(t,(function(t){t.coordinateSystem=a,function(t,e){z(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=mt(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=DT(s),o=LT(o),s&&o;){r=DT(r),a=LT(a),r.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);d>0&&(PT(kT(s,t,n),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!DT(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!LT(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function TT(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function CT(t){return arguments.length?t:OT}function AT(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function DT(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function LT(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function kT(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function PT(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function OT(t,e){return t.parentNode===e.parentNode?1:2}var RT=function(){return function(){this.parentPoint=[],this.childPoints=[]}}(),NT=function(t){function e(e){return t.call(this,e)||this}return i(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new RT},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=no(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var d=1;dy.x)||(_-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),T=I*(Math.PI/180),C=v.getTextContent();C&&(v.setTextConfig({position:M.get("position")||S,rotation:null==I?-_:T,origin:"center"}),C.setStyle("verticalAlign","middle"))}var A=s.get(["emphasis","focus"]),D="relative"===A?yt(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===A?a.getAncestorsIndices():"descendant"===A?a.getDescendantIndices():null;D&&(ll(n).focus=D),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),d=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new rh({shape:HT(h,c,d,r,r)})),bh(g,{shape:HT(h,c,d,o,a)},t));else if("polyline"===u&&"orthogonal"===h&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var v=e.children,m=[],y=0;ye&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(X(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function eC(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function nC(t,e){return O(eC(t),e)>=0}function iC(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var rC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return i(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new kc(n,this,this.ecModel),r=QT.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))})),o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return lg("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=iC(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Mg);function oC(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function aC(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return Nd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=CT((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=CT());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var d=u===h?1:a(u,h)/2,p=d-u.getLayout().x,f=0,g=0,v=0,m=0;if("radial"===i)f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),oC(l,(function(t){v=(t.getLayout().x+p)*f,m=(t.depth-1)*g;var e=AT(v,m);t.setLayout({x:e.x,y:e.y,rawX:v,rawY:m},!0)}));else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+p),f=r/(c.depth-1||1),oC(l,(function(t){m=(t.getLayout().x+p)*g,v="LR"===y?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:v,y:m},!0)}))):"TB"!==y&&"BT"!==y||(f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),oC(l,(function(t){v=(t.getLayout().x+p)*f,m="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:v,y:m},!0)})))}}}(t,e)}))}function sC(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();L(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}var lC=["treemapZoomToNode","treemapRender","treemapMove"];function uC(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=gp(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var hC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return i(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};cC(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new kc({itemStyle:r},this,e);i=t.levels=function(t,e){var n,i,r=Lo(e.get("color")),o=Lo(e.get(["aria","decal","decals"]));if(r){z(t=t||[],(function(t){var e=new kc(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});return n||(a.color=r.slice()),!i&&o&&(a.decal=o.slice()),t}}(i,e);var a=V(i||[],(function(t){return new kc(t,o,e)}),this),s=QT.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return lg("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=iC(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},L(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=mt(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){uC(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Mg);function cC(t){var e=0;z(t.children,(function(t){cC(t);var n=t.value;Y(n)&&(n=n[0]),e+=n}));var n=t.value;Y(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Y(t.value)?t.value[0]=n:t.value=n}var dC=function(){function t(t){this.group=new Wr,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=r.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),h={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,h,l),this._renderContent(t,h,a,s,l,u,i),Ed(o,h.pos,h.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=Vo(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r,o,a){for(var s,l,u,h,c,d,p,f,g,v=0,m=e.emptyItemWidth,y=t.get(["breadcrumb","height"]),x=(s=e.pos,l=e.box,h=l.width,c=l.height,d=no(s.left,h),p=no(s.top,c),f=no(s.right,h),g=no(s.bottom,c),(isNaN(d)||isNaN(parseFloat(s.left)))&&(d=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=h),(isNaN(p)||isNaN(parseFloat(s.top)))&&(p=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=c),u=bd(u||0),{width:Math.max(f-d-u[1]-u[3],0),height:Math.max(g-p-u[0]-u[2],0)}),_=e.totalWidth,b=e.renderList,w=i.getModel("itemStyle").getItemStyle(),S=b.length-1;S>=0;S--){var M=b[S],I=M.node,T=M.width,C=M.text;_>x.width&&(_-=T-m,T=m,C=null);var A=new qu({shape:{points:pC(v,0,T,y,S===b.length-1,0===S)},style:k(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new qs({style:uc(r,{text:C})}),textConfig:{position:"inside"},z2:1e5,onclick:U(a,I)});A.disableLabelAnimation=!0,A.getTextContent().ensureState("emphasis").style=uc(o,{text:C}),A.ensureState("emphasis").style=w,$l(A,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(A),fC(A,t,I),v+=T+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function pC(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function fC(t,e,n){ll(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&iC(n,e)}}var gC=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY,i=t.scale;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var o=r.getLayout();if(!o)return;var a,s=new Be(o.x,o.y,o.width,o.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=i,a){var h=a.min||0,c=a.max||1/0;u=Math.max(Math.min(c,u),h)}var d=u/l.zoom;l.zoom=u;var p=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];Me(f,f,[-(e-=p.x),-(n-=p.y)]),Te(f,f,[d,d]),Me(f,f,[e,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Dd(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new dC(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(nC(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(Eg),MC=z,IC=K,TC=-1,CC=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=C(e);this.type=i,this.mappingMethod=n,this._normalizeData=zC[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(AC(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,z(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(MC(e,(function(t,e){n[t]=e})),!Y(i)){var r=[];K(i)?MC(i,(function(t,e){var i=n[e];r[null!=i?i:TC]=t})):r[-1]=i,i=EC(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):AC(r,!0):(ut("linear"!==n||r.dataExtent),AC(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return W(this._normalizeData,this)},t.listVisualTypes=function(){return H(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){K(t)?z(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=Y(e)?[]:K(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&MC(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(Y(t))t=t.slice();else{if(!IC(t))return[];var e=[];MC(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new CC(c);return BC(d).drColorMappingBy=h,d}}}(0,r,o,0,u,p);z(p,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=L({},e);if(r){var s=r.type,l="color"===s&&BC(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,f,i);GC(t,o,n,i)}}))}else s=HC(u),h.fill=s}}function HC(t){var e=WC(t,"color");if(e){var n=WC(t,"colorAlpha"),i=WC(t,"colorSaturation");return i&&(e=ai(e,null,null,i)),n&&(e=si(e,n)),e}}function WC(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function UC(t,e){var n=t.get(e);return Y(n)&&n.length?{name:e,range:n}:null}var YC=Math.max,ZC=Math.min,XC=rt,jC=z,qC=["itemStyle","borderWidth"],KC=["itemStyle","gapWidth"],$C=["upperLabel","show"],JC=["upperLabel","height"];const QC={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Nd(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=no(XC(s.width,l[0]),r),h=no(XC(s.height,l[1]),o),c=i&&i.type,d=tC(i,["treemapZoomToNode","treemapRootToNode"],t),p="treemapRender"===c||"treemapMove"===c?i.rootRect:null,f=t.getViewRoot(),g=eC(f);if("treemapMove"!==c){var v="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;for(var l=i*r,u=l*t.option.zoomToNodeRatio;o=a.parentNode;){for(var h=0,c=o.children,d=0,p=c.length;dho&&(u=ho),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN],{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?YC(u*i/l,l/(u*r)):1/0}function nA(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,d=t.length;ci&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var _=m[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(m[1],m[0]);u[0].8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+w,c=m[0]<0?"right":"left",i.originX=-f*_,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+w,c="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+w,c=m[0]>=0?"right":"left",i.originX=f*_,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(Wr),GA=function(){function t(t){this.group=new Wr,this._LineCtor=t||FA}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=HA(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=HA(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function JA(t,e){var n=[],i=Pn,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[Ct(l[0]),Ct(l[1])],l[2]&&l.__original.push(Ct(l[2])));var c=l.__original;if(null!=l[2]){if(Tt(r[0],c[0]),Tt(r[1],c[2]),Tt(r[2],c[1]),u&&"none"!==u){var d=_A(t.node1),p=$A(r,c[0],d*e);i(r[0][0],r[1][0],r[2][0],p,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],p,n),r[0][1]=n[3],r[1][1]=n[4]}h&&"none"!==h&&(d=_A(t.node2),p=$A(r,c[1],d*e),i(r[0][0],r[1][0],r[2][0],p,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],p,n),r[1][1]=n[1],r[2][1]=n[2]),Tt(l[0],r[0]),Tt(l[1],r[2]),Tt(l[2],r[1])}else Tt(o[0],c[0]),Tt(o[1],c[1]),kt(a,o[1],o[0]),zt(a,a),u&&"none"!==u&&(d=_A(t.node1),Lt(o[0],o[0],a,d*e)),h&&"none"!==h&&(d=_A(t.node2),Lt(o[1],o[1],a,-d*e)),Tt(l[0],o[0]),Tt(l[1],o[1])}))}function QA(t){return"view"===t.type}var tD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.init=function(t,e){var n=new gw,i=new GA,r=this.group;this._controller=new tI(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(QA(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):bh(s,l,t)}JA(t.getGraph(),xA(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,d);var p=t.get("layout");u.graph.eachNode((function(e){var n=e.dataIndex,r=e.getGraphicEl(),o=e.getModel();if(r){r.off("drag").off("dragend");var a=o.get("draggable");a&&r.on("drag",(function(o){switch(p){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,d),c.setFixed(n),u.setItemLayout(n,[r.x,r.y]);break;case"circular":u.setItemLayout(n,[r.x,r.y]),e.setLayout({fixed:!0},!0),SA(t,"symbolSize",e,[o.offsetX,o.offsetY]),i.updateLayout(t);break;default:u.setItemLayout(n,[r.x,r.y]),mA(t.getGraph(),t),i.updateLayout(t)}})).on("dragend",(function(){c&&c.setUnfixed(n)})),r.setDraggable(a,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(ll(r).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(ll(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=u.getLayout("cx"),v=u.getLayout("cy");u.graph.eachNode((function(t){IA(t,f,g,v)})),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var n=this;!function i(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())}))}()},e.prototype._updateController=function(t,e,n){var i=this,r=this._controller,o=this._controllerHost,a=this.group;r.setPointerChecker((function(e,i,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(i,r)&&!lI(e,n,t)})),QA(t.coordinateSystem)?(r.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(e){rI(o,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){oI(o,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(),JA(t.getGraph(),xA(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()}))):r.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=xA(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(n)}))},e.prototype.updateLayout=function(t){JA(t.getGraph(),xA(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Eg);function eD(t){return"_EC_"+t}var nD=t("as",function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[eD(t)]){var i=new iD(t,e);return i.hostGraph=this,this.nodes.push(i),n[eD(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[eD(t)]},t.prototype.addEdge=function(t,e,n){var i=this._nodesMap,r=this._edgesMap;if(q(t)&&(t=this.nodes[t]),q(e)&&(e=this.nodes[e]),t instanceof iD||(t=i[eD(t)]),e instanceof iD||(e=i[eD(e)]),t&&e){var o=t.id+"-"+e.id,a=new rD(t,e,n);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),r[o]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof iD&&(t=t.id),e instanceof iD&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof iD||(e=this._nodesMap[eD(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0})),r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function aD(t,e,n,i,r){for(var o=new nD(i),a=0;a "+d)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=Ax(t,n);else{var g=Ip.get(f),v=g&&g.dimensions||[];O(v,"value")<0&&v.concat(["value"]);var m=xx(t,{coordDimensions:v,encodeDefine:n.getEncode()}).dimensions;(p=new mx(m,n)).initData(t)}var y=new mx(["value"],n);return y.initData(l,s),r&&r(p,y),UT({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}N(iD,oD("hostGraph","data")),N(rD,oD("hostGraph","edgeData"));var sD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return i(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new OS(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),ko(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){hA(n=this)&&(n.__curvenessList=[],n.__edgeMap={},cA(n));var a=aD(r,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=kc.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=r,t.getModel=i,t}))}));return z(a.edges,(function(t){!function(t,e,n,i){if(hA(n)){var r=dA(t,e,n),o=n.__edgeMap,a=o[pA(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),lg("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return _g({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=V(this.option.categories||[],(function(t){return null!=t.value?t:L({value:0},t)})),e=new mx(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Mg),lD={type:"graphRoam",event:"graphRoam",update:"none"},uD=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},hD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return i(e,t),e.prototype.getDefaultShape=function(){return new uD},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(Rs);function cD(t,e){var n=null==t?"":t+"";return e&&(X(e)?n=e.replace("{value}",n):Z(e)&&(n=e(t))),n}var dD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:no(n[0],e.getWidth()),cy:no(n[1],e.getHeight()),r:no(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?qw:Uu,c=u.get("show"),d=u.getModel("lineStyle"),p=d.get("width"),f=[s,l];ps(f,!a);for(var g=(l=f[1])-(s=f[0]),v=s,m=[],y=0;c&&y=t&&(0===e?0:i[e-1][0])Math.PI/2&&(V+=Math.PI):"tangential"===z?V=-M-Math.PI/2:q(z)&&(V=z*Math.PI/180),0===V?c.add(new qs({style:uc(x,{text:O,x:N,y:E,verticalAlign:h<-.8?"top":h>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0})):c.add(new qs({style:uc(x,{text:O,x:N,y:E,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:N,originY:E,rotation:V}))}if(y.get("show")&&L!==_){P=(P=y.get("distance"))?P+l:l;for(var B=0;B<=b;B++){u=Math.cos(M),h=Math.sin(M);var F=new th({shape:{x1:u*(f-P)+d,y1:h*(f-P)+p,x2:u*(f-S-P)+d,y2:h*(f-S-P)+p},silent:!0,style:A});"auto"===A.stroke&&F.setStyle({stroke:i((L+B/b)/_)}),c.add(F),M+=T}M-=T}else M+=I}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,h=this._data,c=this._progressEls,d=[],p=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),v=t.getData(),m=v.mapDimension("value"),y=+t.get("min"),x=+t.get("max"),_=[y,x],b=[o,a];function w(e,n){var i,o=v.getItemModel(e).getModel("pointer"),a=no(o.get("width"),r.r),s=no(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),h=no(u[0],r.r),c=no(u[1],r.r),d=o.get("keepAspect");return(i=l?jv(l,h-a/2,c-s,a,s,null,d):new hD({shape:{angle:-Math.PI/2,width:a,r:s,x:h,y:c}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?qw:Uu,i=f.get("overlap"),a=i?f.get("width"):l/v.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=eo(v.get(m,t),[y,x],[100,0],!0)),c}(g||p)&&(v.diff(h).add((function(e){var n=v.get(m,e);if(p){var i=w(e,o);wh(i,{rotation:-((isNaN(+n)?b[0]:eo(n,_,b,!0))+Math.PI/2)},t),u.add(i),v.setItemGraphicEl(e,i)}if(g){var r=S(e,o),a=f.get("clip");wh(r,{shape:{endAngle:eo(n,_,b,a)}},t),u.add(r),ul(t.seriesIndex,v.dataType,e,r),d[e]=r}})).update((function(e,n){var i=v.get(m,e);if(p){var r=h.getItemGraphicEl(n),a=r?r.rotation:o,s=w(e,a);s.rotation=a,bh(s,{rotation:-((isNaN(+i)?b[0]:eo(i,_,b,!0))+Math.PI/2)},t),u.add(s),v.setItemGraphicEl(e,s)}if(g){var l=c[n],y=S(e,l?l.shape.endAngle:o),x=f.get("clip");bh(y,{shape:{endAngle:eo(i,_,b,x)}},t),u.add(y),ul(t.seriesIndex,v.dataType,e,y),d[e]=y}})).execute(),v.each((function(t){var e=v.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(p){var s=v.getItemGraphicEl(t),l=v.getItemVisual(t,"style"),u=l.fill;if(s instanceof Bs){var h=s.style;s.useStyle(L({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(eo(v.get(m,t),_,[0,1],!0))),s.z2EmphasisLift=0,eu(s,e),$l(s,r,o,a)}if(g){var c=d[t];c.useStyle(v.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,eu(c,e),$l(c,r,o,a)}})),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=jv(r,e.cx-i/2+no(o[0],e.r),e.cy-i/2+no(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new Wr,c=[],d=[],p=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){c[t]=new qs({silent:!0}),d[t]=new qs({silent:!0})})).update((function(t,e){c[t]=o._titleEls[e],d[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),g=new Wr,v=i(eo(o,[l,u],[0,1],!0)),m=n.getModel("title");if(m.get("show")){var y=m.get("offsetCenter"),x=r.cx+no(y[0],r.r),_=r.cy+no(y[1],r.r);(A=c[e]).attr({z2:f?0:2,style:uc(m,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:v})}),g.add(A)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),S=r.cx+no(w[0],r.r),M=r.cy+no(w[1],r.r),I=no(b.get("width"),r.r),T=no(b.get("height"),r.r),C=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:v,A=d[e],D=b.get("formatter");A.attr({z2:f?0:2,style:uc(b,{x:S,y:M,text:cD(o,D),width:isNaN(I)?null:I,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:C})}),mc(A,{normal:b},o,(function(t){return cD(t,D)})),p&&yc(A,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return cD(a?a.interpolatedValue:o,D)}}),g.add(A)}h.add(g)})),this.group.add(h),this._titleEls=c,this._detailEls=d},e.type="gauge",e}(Eg),pD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return i(e,t),e.prototype.getInitialData=function(t,e){return PS(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Mg),fD=["itemStyle","opacity"],gD=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new $u,a=new qs;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return i(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(fD);l=null==l?1:l,n||Ch(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,wh(i,{style:{opacity:l}},r,e)):bh(i,{style:{opacity:l},shape:{points:a.points}},r,e),eu(i,o),this._updateLabel(t,e),$l(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;sc(r,lc(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Le(h[0][0],h[0][1]):null},bh(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Wb(n,Ub(a),{stroke:u})},e}(qu),vD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return i(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new gD(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){Th(r.getItemGraphicEl(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Eg),mD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new OS(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return PS(this,{coordDimensions:["value"],encodeDefaulter:U(rp,this)})},e.prototype._defaultLabelLine=function(t){ko(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Mg);function yD(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Nd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&kD(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function kD(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var PD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&A(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){z(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];z(F(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Hd),OD=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return i(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(xb);function RD(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=ED(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=ED(s,[0,a]),r=o=ED(s,[r,o]),i=0}e[0]=ED(e[0],n),e[1]=ED(e[1],n);var l=ND(e,i);e[i]+=t;var u,h=r||0,c=n.slice();return l.sign<0?c[0]+=h:c[1]-=h,e[i]=ED(e[i],c),u=ND(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function ND(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function ED(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var zD=z,VD=Math.min,BD=Math.max,FD=Math.floor,GD=Math.ceil,HD=io,WD=Math.PI,UD=function(){function t(t,e,n){this.type="parallel",this._axesMap=mt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;zD(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new OD(t,A_(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();zD(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),C_(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Nd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=YD(e.get("axisExpandWidth"),l),c=YD(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,p=e.get("axisExpandWindow");p?(t=YD(p[1]-p[0],l),p[1]=p[0]+t):(t=YD(h*(c-1),l),(p=[h*(e.get("axisExpandCenter")||FD(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[FD(HD(p[0]/h,1))+1,GD(HD(p[1]/h,1))-1],v=f/h*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:v}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),zD(n,(function(e,n){var o=(i.axisExpandable?XD:ZD)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:WD/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];Ie(h,h,u),Me(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];z(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?RD(a,i,o,"all"):l="none";else{var d=i[1]-i[0];(i=[BD(0,o[1]*s/d-d/2)])[1]=VD(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},t}();function YD(t,e){return VD(BD(t,e[0]),e[1])}function ZD(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function XD(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)ro(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&fL(t);var l=C(s);l.brushType=kL(l.brushType,a),l.panelId=a===KD?null:a.panelId,o=t._creatingCover=aL(t,l),t._covers.push(o)}if(o){var u=RL[kL(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(CL(t,o,t._track)),i&&(sL(t,o),u.updateCommon(t,o)),lL(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&dL(t,e,n)&&fL(t)&&(r={isEnd:i,removeOnClick:!0});return r}function kL(t,e){return"auto"===t?e.defaultBrushType:t}var PL={mousedown:function(t){if(this._dragging)OL(this,t);else if(!t.target||!t.target.draggable){AL(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=dL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=dL(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new kc(r[a],this,e));var s=aD(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))}));return s.data},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return lg("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return lg("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Mg);function KL(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Nd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){z(t,(function(t){var e=ak(t.outEdges,ok),n=ak(t.inEdges,ok),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,d=0;d=0;m&&v.depth>p&&(p=v.depth),g.setLayout({depth:m?v.depth:c},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var y=0;yc-1?p:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)QL(s,l*=.99,a),JL(s,r,n,i,a),sk(s,l,a),JL(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";z(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),z(t,(function(t){var e=0,n=0;z(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),z(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==F(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function $L(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function JL(t,e,n,i,r){var o="vertical"===r?"x":"y";z(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0)for(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a,d=h-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}))}function QL(t,e,n){z(t.slice().reverse(),(function(t){z(t,(function(t){if(t.outEdges.length){var i=ak(t.outEdges,tk,n)/ak(t.outEdges,ok);if(isNaN(i)){var r=t.outEdges.length;i=r?ak(t.outEdges,ek,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-rk(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-rk(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function tk(t,e){return rk(t.node2,e)*t.getValue()}function ek(t,e){return rk(t.node2,e)}function nk(t,e){return rk(t.node1,e)*t.getValue()}function ik(t,e){return rk(t.node1,e)}function rk(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function ok(t){return t.getValue()}function ak(t,e,n){for(var i=0,r=t.length,o=-1;++oo&&(o=e)})),z(n,(function(e){var n=new CC({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),i=e.getModel().get(["itemStyle","color"]);null!=i?(e.setVisual("color",i),e.setVisual("style",{fill:i})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))}))}i.length&&z(i,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var uk=function(){function t(){}return t.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&null!=e.get(t)},t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!this._hasEncodeRule("x")):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[r,o],p=d[u].get("type"),f=d[1-u].get("type"),g=t.data;if(g&&i){var v=[];z(g,(function(t,e){var n;Y(t)?(n=t.slice(),t.unshift(e)):Y(t.value)?((n=L({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,v.push(n)})),t.data=v}var m=this.defaultValueDimensions,y=[{name:h,type:Ky(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Ky(f),dimsDef:m.slice()}];return PS(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:U(ip,y,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),hk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return i(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Mg);N(hk,uk,!0);var ck=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=fk(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?(Ch(n),gk(s,n,i,t)):n=fk(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(Eg),dk=function(){},pk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return i(e,t),e.prototype.getDefaultShape=function(){return new dk},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig){var _=[m,x];i.push(_)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}},_k=["itemStyle","borderColor"],bk=["itemStyle","borderColor0"],wk=["itemStyle","borderColorDoji"],Sk=["itemStyle","color"],Mk=["itemStyle","color0"];function Ik(t,e){return e.get(t>0?Sk:Mk)}function Tk(t,e){return e.get(0===t?wk:t>0?_k:bk)}var Ck={seriesType:"candlestick",plan:Og(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var n;null!=(n=t.next());){var i=e.getItemModel(n),r=e.getItemLayout(n).sign,o=i.getItemStyle();o.fill=Ik(r,i),o.stroke=Tk(r,i)||o.fill,L(e.ensureUniqueItemVisual(n,"style"),o)}}}}},Ak=["color","borderColor"],Dk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){nc(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&Ok(s,a))return;var l=Pk(a,0,!0);wh(l,{shape:{points:a.ends}},t,n),Rk(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&Ok(s,h)?i.remove(u):(u?(bh(u,{shape:{points:h.ends}},t,a),Ch(u)):u=Pk(h),Rk(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),Vk(t,this.group);var e=t.get("clip",!0)?Aw(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=Pk(i.getItemLayout(n));Rk(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){Vk(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Eg),Lk=function(){},kk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return i(e,t),e.prototype.getDefaultShape=function(){return new Lk},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Rs);function Pk(t,e,n){var i=t.ends;return new kk({shape:{points:n?Nk(i,t):i},z2:100})}function Ok(t,e){for(var n=!0,i=0;ip?x[1]:y[1],ends:w,brushRect:T(f,g,c)})}function M(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function I(t,e,n){var r=e.slice(),o=e.slice();r[0]=Hh(r[0]+i/2,1,!1),o[0]=Hh(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function T(t,e,n){var r=M(t,n),o=M(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function C(t){return t[0]=Hh(t[0],1),t}}}}};function Wk(t,e,n,i,r,o){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function Uk(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var Yk=function(t){function e(e,n){var i=t.call(this)||this,r=new hw(e,n),o=new Wr;return i.add(r),i.add(o),i.updateData(e,n),i}return i(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),o=0;o0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var h=void 0;h=Z(u)?u(n):u,i.__t>0&&(h=-o*i.__t),this._animateSymbol(i,o,h,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,n,i,r){if(e>0){t.__t=0;var o=this,a=t.animate("",i).when(r?2*e:e,{__t:r?2:1}).delay(n).during((function(){o._updateSymbolPosition(t)}));i||a.done((function(){o.remove(t)})),a.start()}},e.prototype._getLineLength=function(t){return Bt(t.__p1,t.__cp1)+Bt(t.__cp1,t.__p2)},e.prototype._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]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],a=o.slice(),s=Dn,l=Ln;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=t.__t<1?l(e[0],i[0],n[0],r):l(n[0],i[0],e[0],1-r),h=t.__t<1?l(e[1],i[1],n[1],r):l(n[1],i[1],e[1],1-r);t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=t.__t<1?u[0]-l[0]:l[0]-u[0],c=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(jk),$k=function(){this.polyline=!1,this.curveness=0,this.segs=[]},Jk=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return i(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $k},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,d=(l+h)/2-(u-s)*r;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){if(ms(u,h,(u+d)/2-(h-p)*r,(h+p)/2-(d-u)*r,d,p,o,t,e))return a}else if(gs(u,h,d,p,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),tP={seriesType:"lines",plan:Og(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&Aw(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=tP.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),r=!!e.get("polyline"),o=e.pipelineContext.large;return n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new Qk:new GA(r?i?Kk:qk:i?jk:FA),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(Eg),nP="undefined"==typeof Uint32Array?Array:Uint32Array,iP="undefined"==typeof Float64Array?Array:Float64Array;function rP(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=V(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),D([e,t[0],t[1]])})))}var oP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return i(e,t),e.prototype.init=function(e){e.data=e.data||[],rP(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(rP(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=yt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=yt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!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,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Mg);function aP(t){return t instanceof Array||(t=[t,t]),t}var sP={seriesType:"lines",reset:function(t){var e=aP(t.get("symbol")),n=aP(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=aP(n.getShallow("symbol",!0)),r=aP(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}},lP=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=c.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=n;for(var p=0;p0){var I=o(m)?s:l;m>0&&(m=m*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*m*256}else _+=4}return c.putImageData(y,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=c.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function uP(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var hP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):uP(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(uP(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){nc(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,h=Dw(u,"cartesian2d");if(h){var c=u.getAxis("x"),d=u.getAxis("y");o=c.getBandWidth()+.5,a=d.getBandWidth()+.5,s=c.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),v=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),y=t.get(["itemStyle","borderRadius"]),x=lc(t),_=t.getModel("emphasis"),b=_.get("focus"),w=_.get("blurScope"),S=_.get("disabled"),M=h?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;Is[1]||Dl[1])continue;var L=u.dataToPoint([A,D]);T=new Zs({shape:{x:L[0]-o/2,y:L[1]-a/2,width:o,height:a},style:C})}else{if(isNaN(f.get(M[1],I)))continue;T=new Zs({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:C})}if(f.hasItemOption){var k=f.getItemModel(I),P=k.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),v=k.getModel(["blur","itemStyle"]).getItemStyle(),m=k.getModel(["select","itemStyle"]).getItemStyle(),y=k.get(["itemStyle","borderRadius"]),b=P.get("focus"),w=P.get("blurScope"),S=P.get("disabled"),x=lc(k)}T.shape.r=y;var O=t.getRawValue(I),R="-";O&&null!=O[2]&&(R=O[2]+""),sc(T,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:C.opacity,defaultText:R}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=v,T.ensureState("select").style=m,$l(T,b,w,S),T.incremental=r,r&&(T.states.emphasis.hoverLayer=!0),p.add(T),f.setItemGraphicEl(I,T),this._progressiveEls&&this._progressiveEls.push(T)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new lP;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(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),p=Math.min(l.height+l.y,i.getHeight()),f=d-h,g=p-c,v=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],m=a.mapArray(v,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),y=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(y,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=V(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i=0?1:-1:o>0?1:-1}(n,o,r,i,c),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,d=l.categoryDim,p=Math.abs(n[d.wh]),f=t.getItemVisual(e,"symbolSize");(h=Y(f)?f.slice():null==f?["100%","100%"]:[f,f])[d.index]=no(h[d.index],p),h[c.index]=no(h[c.index],i?p:Math.abs(o)),u.symbolSize=h;var g=u.symbolScale=[h[0]/s,h[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,c.boundingLength,c.pxSign,u,i,c),function(t,e,n,i,r){var o=t.get(dP)||0;o&&(fP.attr({scaleX:e[0],scaleY:e[1],rotation:n}),fP.updateTransform(),o/=fP.getLineScale(),o*=e[i.valueDim.index]),r.valueLineWidth=o||0}(n,c.symbolScale,l,i,c);var d=c.symbolSize,p=Kv(n.get("symbolOffset"),d);return function(t,e,n,i,r,o,a,s,l,u,h,c){var d=h.categoryDim,p=h.valueDim,f=c.pxSign,g=Math.max(e[p.index]+s,0),v=g;if(i){var m=Math.abs(l),y=rt(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=no(y,e[p.index]),b=Math.max(g+2*_,0),w=x?0:2*_,S=wo(i),M=S?i:PP((m+w)/b);b=g+2*(_=(m-M*g)/2/(x?M:Math.max(M-1,1))),w=x?0:2*_,S||"fixed"===i||(M=u?PP((Math.abs(u)+w)/b):0),v=M*b-w,c.repeatTimes=M,c.symbolMargin=_}var I=f*(v/2),T=c.pathPosition=[];T[d.index]=n[d.wh]/2,T[p.index]="start"===a?I:"end"===a?l-I:l/2,o&&(T[0]+=o[0],T[1]+=o[1]);var C=c.bundlePosition=[];C[d.index]=n[d.xy],C[p.index]=n[p.xy];var A=c.barRectShape=L({},n);A[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(T[p.index]+I)),A[d.wh]=n[d.wh];var D=c.clipShape={};D[d.xy]=-n[d.xy],D[d.wh]=h.ecSize[d.wh],D[p.xy]=0,D[p.wh]=n[p.wh]}(n,d,r,o,0,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function mP(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function yP(t){var e=t.symbolPatternSize,n=jv(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function xP(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(DP(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function _P(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?LP(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=yP(n),r.add(o),LP(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function bP(t,e,n){var i=L({},e.barRectShape),r=t.__pictorialBarRect;r?LP(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new Zs({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function wP(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=L({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)bh(r,{shape:o},s,l);else{o[a.wh]=0,r=new Zs({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],ic[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function SP(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=MP,n.isAnimationEnabled=IP,n}function MP(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function IP(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function TP(t,e,n,i){var r=new Wr,o=new Wr;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?xP(r,e,n):_P(r,0,n),bP(r,n,i),wP(r,e,n,i),r.__pictorialShapeStr=AP(t,n),r.__pictorialSymbolMeta=n,r}function CP(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];DP(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),z(o,(function(t){Mh(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function AP(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function DP(t,e,n){z(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function LP(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&ic[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function kP(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),d=o.get("scale");DP(t,(function(t){if(t instanceof Bs){var e=t.style;t.useStyle(L({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var p=e.valueDim.posDesc[+(n.boundingLength>0)],f=t.__pictorialBarRect;f.ignoreClip=!0,sc(f,lc(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:lw(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),$l(t,h,c,o.get("disabled"))}function PP(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var OP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return i(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Rc(Zw.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Zw),RP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return i(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var c=new Xy(this._layersSeries||[],a,h,h),d=[];function p(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,c=[],p=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,d=o.length,p=o[0].indices.length,f=0;fI&&!po(C-I)&&C0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new VP(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");a&&Dd(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:BP,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(Eg),HP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return i(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};WP(n);var i=this._levelModels=V(t.levels||[],(function(t){return new kc(t,this,e)}),this),r=QT.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=iC(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){uC(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Mg);function WP(t){var e=0;z(t.children,(function(t){WP(t);var n=t.value;Y(n)&&(n=n[0]),e+=n}));var n=t.value;Y(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Y(t.value)?t.value[0]=n:t.value=n}var UP=Math.PI/180;function YP(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");Y(i)||(i=[0,i]),Y(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=no(e[0],r),l=no(e[1],o),u=no(i[0],a/2),h=no(i[1],a/2),c=-t.get("startAngle")*UP,d=t.get("minAngle")*UP,p=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,v=t.get("sort");null!=v&&ZP(f,v);var m=0;z(f.children,(function(t){!isNaN(t.getValue())&&m++}));var y=f.getValue(),x=Math.PI/(y||m)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(h-u)/(b||1),S=t.get("clockwise"),M=t.get("stillShowZeroSum"),I=S?1:-1,T=function(e,n){if(e){var i=n;if(e!==p){var r=e.getValue(),o=0===y&&M?x:r*x;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&X(o)&&(o=ei(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),L(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)}))}))}var jP={color:"fill",borderColor:"stroke"},qP={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},KP=Ho(),$P=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return Ax(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=KP(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Mg);function JP(t,e){return e=e||[0,0],V(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function QP(t,e){return e=e||[0,0],V([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function tO(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function eO(t,e){return e=e||[0,0],V(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function nO(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||bt(t,"text")))}function iO(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},bt(a,"text")&&(o.text=a.text),bt(a,"rich")&&(o.rich=a.rich),bt(a,"textFill")&&(o.fill=a.textFill),bt(a,"textStroke")&&(o.stroke=a.textStroke),bt(a,"fontFamily")&&(o.fontFamily=a.fontFamily),bt(a,"fontSize")&&(o.fontSize=a.fontSize),bt(a,"fontStyle")&&(o.fontStyle=a.fontStyle),bt(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=bt(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),bt(a,"textPosition")&&(i.position=a.textPosition),bt(a,"textOffset")&&(i.offset=a.textOffset),bt(a,"textRotation")&&(i.rotation=a.textRotation),bt(a,"textDistance")&&(i.distance=a.textDistance)}return rO(o,t),z(o.rich,(function(t){rO(t,t)})),{textConfig:i,textContent:r}}function rO(t,e){e&&(e.font=e.textFont||e.font,bt(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),bt(e,"textAlign")&&(t.align=e.textAlign),bt(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),bt(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),bt(e,"textWidth")&&(t.width=e.textWidth),bt(e,"textHeight")&&(t.height=e.textHeight),bt(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),bt(e,"textPadding")&&(t.padding=e.textPadding),bt(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),bt(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),bt(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),bt(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),bt(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),bt(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),bt(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function oO(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";aO(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,z(e.rich,(function(t){aO(t,t)})),i}function aO(t,e){e&&(bt(e,"fill")&&(t.textFill=e.fill),bt(e,"stroke")&&(t.textStroke=e.fill),bt(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),bt(e,"font")&&(t.font=e.font),bt(e,"fontStyle")&&(t.fontStyle=e.fontStyle),bt(e,"fontWeight")&&(t.fontWeight=e.fontWeight),bt(e,"fontSize")&&(t.fontSize=e.fontSize),bt(e,"fontFamily")&&(t.fontFamily=e.fontFamily),bt(e,"align")&&(t.textAlign=e.align),bt(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),bt(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),bt(e,"width")&&(t.textWidth=e.width),bt(e,"height")&&(t.textHeight=e.height),bt(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),bt(e,"padding")&&(t.textPadding=e.padding),bt(e,"borderColor")&&(t.textBorderColor=e.borderColor),bt(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),bt(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),bt(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),bt(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),bt(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),bt(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),bt(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),bt(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),bt(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),bt(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var sO={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},lO=H(sO);B(wr,(function(t,e){return t[e]=1,t}),{}),wr.join(", ");var uO=["","style","shape","extra"],hO=Ho();function cO(t,e,n,i,r){var o=t+"Animation",a=xh(t,i,r)||{},s=hO(e).userDuring;return a.duration>0&&(a.during=s?W(yO,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),L(a,n[o]),a}function dO(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=hO(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),d=c?c.style:null;if(d){!r&&(r=i.style={});var p=H(n);for(u=0;u0&&t.animateFrom(d,p)}else!function(t,e,n,i,r){if(r){var o=cO("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);pO(t,e),u?t.dirty():t.markRedraw()}function pO(t,e){for(var n=hO(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var d=H(a);for(h=0;hi[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:W(eO,t)}}},calendar:function(t){var e=t.getRect(),n=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:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function EO(t){return t instanceof Rs}function zO(t){return t instanceof Pa}var VO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=WO(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){YO(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);n&&fO(n,KP(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);YO(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?Aw(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=WO(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){null==i&&(i=s);var r=y(i,TO).getItemStyle(),o=x(i,TO),a=uc(o,null,null,!0,!0);a.text=o.getShallow("show")?at(t.getFormattedLabel(i,TO),t.getFormattedLabel(i,CO),lw(e,i)):null;var l=hc(o,null,!0);return b(n,r),r=oO(r,a,l),n&&_(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),bt(jP,t)){var i=e.getItemVisual(n,"style");return i?i[jP[t]]:null}if(bt(qP,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type)return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o=c;f--){var g=e.childAt(f);$O(e,g,r)}}}(t,c,n,i,r),a>=0?o.replaceAt(c,a):o.add(c),c}function XO(t,e,n){var i,r=KP(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&(i=a)&&(bt(i,"pathData")||bt(i,"d"))&&eR(a)!==r.customPathData||"image"===o&&bt(s,"image")&&s.image!==r.customImagePath}function jO(t,e,n){var i=e?qO(t,e):t,r=e?KO(t,i,TO):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?qO(s,e):s:null;if(r&&(n.isLegacy||nO(r,o,!!a,!!l))){n.isLegacy=!0;var u=iO(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function qO(t,e){return e?t?t[e]:null:t}function KO(t,e,n){var i=e&&e.style;return null==i&&n===TO&&t&&(i=t.styleEmphasis),i}function $O(t,e,n){e&&fO(e,KP(t).option,n)}function JO(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function QO(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;ZO(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function tR(t){var e=this.context,n=e.oldChildren[t];n&&fO(n,KP(n).option,e.seriesModel)}function eR(t){return t&&(t.pathData||t.d)}var nR=Ho(),iR=C,rR=W,oR=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=U(aR,e,h);this.updatePointerEl(a,l,c),this.updateLabelEl(a,l,c,e)}else a=this._group=new Wr,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);hR(a,e,!0),this._renderHandle(r)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=_M(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=nR(t).pointerEl=new ic[r.type](iR(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=nR(t).labelEl=new qs(iR(e.label));t.add(r),lR(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=nR(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=nR(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),lR(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Kh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ge(t.event)},onmousedown:rR(this._onHandleDragMove,this,0,0),drift:rR(this._onHandleDragMove,this),ondragend:rR(this._onHandleDragEnd,this)}),i.add(r)),hR(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Y(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Zg(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){aR(this._axisPointerModel,!e&&this._moveAnimation,this._handle,uR(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(uR(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(uR(i)),nR(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._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}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Xg(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function aR(t,e,n,i){sR(nR(n).lastProp,i)||(nR(n).lastProp=i,e?bh(n,i,t):(n.stopAnimation(),n.attr(i)))}function sR(t,e){if(K(t)&&K(e)){var n=!0;return z(e,(function(e,i){n=n&&sR(t[i],e)})),!!n}return t===e}function lR(t,e){t[e.get(["label","show"])?"show":"hide"]()}function uR(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function hR(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function cR(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function dR(t,e,n,i,r){var o=pR(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=bd(a.get("padding")||0),l=a.getFont(),u=Cr(o,l),h=r.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],p=r.align;"right"===p&&(h[0]-=c),"center"===p&&(h[0]-=c/2);var f=r.verticalAlign;"bottom"===f&&(h[1]-=d),"middle"===f&&(h[1]-=d/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,d,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:uc(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function pR(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:L_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};z(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),X(a)?o=a.replace("{value}",o):Z(a)&&(o=a(s))}return o}function fR(t,e,n){var i=[1,0,0,1,0,0];return Ie(i,i,n.rotation),Me(i,i,n.position),Uh([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function gR(t,e,n,i,r,o){var a=dM.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),dR(e,i,r,o,{position:fR(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function vR(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function mR(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function yR(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var xR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=_R(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=cR(i),c=bR[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}gR(e,t,nM(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=nM(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=fR(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=_R(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];return c[l]=u[l],{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(oR);function _R(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var bR={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:vR([e,n[0]],[e,n[1]],wR(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:mR([e-i/2,n[0]],[i,r],wR(t))}}};function wR(t){return"x"===t.dim?0:1}var SR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Hd),MR=Ho(),IR=z;function TR(t,e,n){if(!o.node){var i=e.getZr();MR(i).records||(MR(i).records={}),function(t,e){function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);IR(MR(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}MR(t).initialized||(MR(t).initialized=!0,n("click",U(AR,"click")),n("mousemove",U(AR,"mousemove")),n("globalout",CR))}(i,e),(MR(i).records[t]||(MR(i).records[t]={})).handler=n}}function CR(t,e,n){t.handler("leave",null,n)}function AR(t,e,n,i){e.handler(t,n,i)}function DR(t,e){if(!o.node){var n=e.getZr();(MR(n).records||{})[t]&&(MR(n).records[t]=null)}}var LR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";TR("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){DR("axisPointer",e)},e.prototype.dispose=function(t,e){DR("axisPointer",e)},e.type="axisPointer",e}(Pg);function kR(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Go(o,t);if(null==a||a<0||Y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,d="x"===h||"radius"===h?1:0,p=o.mapDimension(c),f=[];f[d]=o.get(p,a),f[1-d]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(V(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var PR=Ho();function OR(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||W(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){VR(r)&&(r=kR({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=VR(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||VR(r),d={},p={},f={list:[],map:{}},g={showPointer:U(NR,p),showTooltip:U(ER,f)};z(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);z(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&RR(t,a,g,!1,d)}}))}));var v={};return z(h,(function(t,e){var n=t.linkGroup;n&&!p[e]&&z(n.axesInfo,(function(e,i){var r=p[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,zR(e),zR(t)))),v[t.key]=o}}))})),z(v,(function(t,e){RR(h[e],t,g,!0,d)})),function(t,e,n){var i=n.axesInfo=[];z(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(p,h,d),function(t,e,n,i){if(!VR(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=PR(i)[r]||{},a=PR(i)[r]={};z(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&z(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];z(o,(function(t,e){!a[e]&&l.push(t)})),z(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),d}}function RR(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return z(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,n);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var p=t-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,r=u,o.length=0),z(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&L(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function NR(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function ER(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=wM(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function zR(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function VR(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function BR(t){MM.registerAxisPointerClass("CartesianAxisPointer",xR),t.registerComponentModel(SR),t.registerComponentView(LR),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Y(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=yM(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},OR)}function FR(t){W_(EM),W_(BR)}var GR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=cR(i),c=HR[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var d=[1,0,0,1,0,0];Ie(d,d,s),Me(d,d,[i.cx,i.cy]),l=Uh([a,-r],d);var p=e.getModel("axisLabel").get("rotate")||0,f=dM.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var v=i.cx,m=i.cy;u=Math.abs(l[0]-v)/g<.3?"center":l[0]>v?"left":"right",h=Math.abs(l[1]-m)/g<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));dR(t,n,i,r,d)},e}(oR),HR={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:vR(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:yR(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:yR(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},WR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Hd),UR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Zo).models[0]},e.type="polarAxis",e}(Hd);N(UR,N_);var YR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="angleAxis",e}(UR),ZR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="radiusAxis",e}(UR),XR=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return i(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(xb);XR.prototype.dataToRadius=xb.prototype.dataToCoord,XR.prototype.radiusToData=xb.prototype.coordToData;var jR=Ho(),qR=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return i(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=Cr(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=jR(t.model),d=c.lastAutoInterval,p=c.lastTickCount;return null!=d&&null!=p&&Math.abs(d-h)<=1&&Math.abs(p-r)<=1&&d>h?h=d:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(xb);qR.prototype.dataToAngle=xb.prototype.dataToCoord,qR.prototype.angleToData=xb.prototype.coordToData;var KR=["radius","angle"],$R=function(){function t(t){this.dimensions=KR,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new XR,this._angleAxis=new qR,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180,r=1e-4;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,o=n*n+i*i,a=this.r,s=this.r0;return a!==s&&o-r<=a*a&&o+r>=s*s}}},t.prototype.convertToPixel=function(t,e,n){return JR(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return JR(e)===this?this.pointToData(n):null},t}();function JR(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function QR(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();z(R_(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),z(R_(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),C_(i.scale,i.model),C_(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function tN(t,e){var n;if(t.type=e.get("type"),t.scale=A_(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),r=null!==(n=e.get("endAngle"))&&void 0!==n?n:i+(t.inverse?-360:360);t.setExtent(i,r)}e.axis=t,t.model=e}var eN={dimensions:KR,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new $R(i+"");r.update=QR;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");tN(o,s),tN(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=no(i[0],r),t.cy=no(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:Y(l)||(l=[0,l]);var u=[no(l[0],s),no(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Zo).models[0];t.coordinateSystem=e.coordinateSystem}})),n}},nN=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function iN(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function rN(t){return t.getRadiusAxis().inverse?0:1}function oN(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var aN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return i(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=V(n.getViewLabels(),(function(t){t=C(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));oN(s),oN(o),z(nN,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||sN[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(MM),sN={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,h=l.getExtent(),c=rN(n),d=c?0:1,p=360===Math.abs(h[1]-h[0])?"Circle":"Arc";(a=0===o[d]?new ic[p]({shape:{cx:n.cx,cy:n.cy,r:o[c],startAngle:-h[0]*u,endAngle:-h[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new Zu({shape:{cx:n.cx,cy:n.cy,r:o[c],r0:o[d]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[rN(n)],u=V(i,(function(t){return new th({shape:iN(n,[l,l+s],t.coord)})}));t.add(Bh(u,{style:k(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[rN(n)],h=[],c=0;cf?"left":"right",m=Math.abs(p[1]-g)/d<.3?"middle":p[1]>g?"top":"bottom";if(s&&s[c]){var y=s[c];K(y)&&y.textStyle&&(a=new kc(y.textStyle,l,l.ecModel))}var x=new qs({silent:dM.isLabelSilent(e),style:uc(a,{x:p[0],y:p[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:v,verticalAlign:m})});if(t.add(x),h){var _=dM.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=i.rawLabel,ll(x).eventData=_}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",C=b;y&&(i[s][I]||(i[s][I]={p:b,n:b}),C=i[s][I][T]);var A=void 0,D=void 0,L=void 0,k=void 0;if("radius"===c.dim){var P=c.dataToCoord(M)-b,O=o.dataToCoord(I);Math.abs(P)=k})}}}))}var gN={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},vN={splitNumber:5},mN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="polar",e}(Pg);function yN(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]],r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a],r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),rt(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-h:h,r.z2=1,r}var xN=["axisLine","axisTickLabel","axisName"],_N=["splitArea","splitLine"],bN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return i(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Wr;var s=yN(e),l=new dM(e,s);z(xN,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),z(_N,(function(t){e.get([t,"show"])&&wN[t](this,this.group,this._axisGroup,e)}),this),Xh(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){CM(this)},e.type="singleAxis",e}(MM),wN={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=i.coordinateSystem.getRect(),h=r.isHorizontal(),c=[],d=0,p=r.getTicksCoords({tickModel:o}),f=[],g=[],v=0;v=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return CN(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return CN(e)===this?this.pointToData(n):null},t}();function CN(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var AN={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new TN(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Zo).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:IN},DN=["x","y"],LN=["width","height"],kN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=RN(a,1-ON(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=cR(i),c=PN[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}gR(e,t,yN(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=yN(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=fR(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=ON(r),s=RN(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=RN(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(oR),PN={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:vR([e,n[0]],[e,n[1]],ON(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:mR([e-i/2,n[0]],[i,r],ON(t))}}};function ON(t){return t.isHorizontal()?0:1}function RN(t,e){var n=t.getRect();return[n[DN[e]],n[DN[e]]+n[LN[e]]]}var NN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="single",e}(Pg),EN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.init=function(e,n,i){var r=Bd(e);t.prototype.init.apply(this,arguments),zN(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),zN(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Hd);function zN(t,e){var n,i=t.cellSize;1===(n=Y(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=V([0,1],(function(t){return function(t,e){return null!=t[Pd[e][0]]||null!=t[Pd[e][1]]&&null!=t[Pd[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));Vd(t,e,{type:"box",ignoreSize:r})}var VN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new Zs({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new $u({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return X(t)&&t?(n=t,z(e,(function(t,e){n=n.replace("{"+e+"}",t)})),n):Z(t)?t(e):e.nameMap;var n},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),v=new qs({z2:30,style:uc(r,{text:g}),silent:r.get("silent")});v.attr(this._yearTextPositionControl(v,c[a],n,a,o)),i.add(v)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!X(o)||(o&&(e=Hc(o)||e),o=e.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var d="center"===l,p=r.get("silent"),f=0;f=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/BN)-Math.floor(n[0].time/BN)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(e){var n=new t(e);i.push(n),e.coordinateSystem=n})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function GN(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}function HN(t,e){var n;return z(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var WN=["transition","enterFrom","leaveTo"],UN=WN.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function YN(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?WN:UN,r=0;r=0;l--){var d,p,f;if(f=null!=(p=Vo((d=n[l]).id,null))?r.get(p):null){var g=f.parent,v=(c=jN(g),{}),m=Ed(f,d,g===i?{width:o,height:a}:{width:c.width,height:c.height},null,{hv:d.hv,boundingMode:d.bounding},v);if(!jN(f).isNew&&m){for(var y=d.transition,x={},_=0;_=0)?x[b]=w:f[b]=w}bh(f,x,t,0)}else f.attr(v)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){JN(n,jN(n).option,e,t._lastGraphicModel)})),this._elMap=mt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Pg);function KN(t){var e=new(bt(XN,t)?XN[t]:Nh(t))({});return jN(e).type=t,e}function $N(t,e,n,i){var r=KN(n);return e.add(r),i.set(t,r),jN(r).id=t,jN(r).isNew=!0,r}function JN(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){JN(t,e,n,i)})),fO(t,e,i),n.removeKey(jN(t).id))}function QN(t,e,n,i){t.isGroup||z([["cursor",Pa.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];bt(e,i)?t[i]=ot(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),z(H(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=Z(i)?i:null}})),bt(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}function tE(t){t.registerComponentModel(ZN),t.registerComponentView(qN),t.registerPreprocessor((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 eE=["x","y","radius","angle","single"],nE=["cartesian2d","polar","singleAxis"];function iE(t){return t+"Axis"}function rE(t,e){var n,i=mt(),r=[],o=mt();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function oE(t){var e=t.ecModel,n={infoList:[],infoMap:mt()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(iE(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var aE=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),sE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return i(e,t),e.prototype.init=function(t,e,n){var i=lE(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=lE(t);A(this.option,t,!0),A(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;z([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=mt();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return z(eE,(function(n){var i=this.getReferringComponents(iE(n),Xo);if(i.specified){e=!0;var r=new aE;z(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}function o(e,n){var r=e[0];if(r){var o=new aE;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Zo).models[0];a&&z(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Zo).models[0]&&o.add(t.componentIndex)}))}}}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),i&&z(eE,(function(e){if(i){var r=n.findComponents({mainType:iE(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new aE;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");z([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(iE(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){z(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(iE(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;z([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;z(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=iE(this._dimName),i=e.getReferringComponents(n,Zo).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return C(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];dE(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(eo(h,o,n))):(e=!0,h=eo(c=null==c?n[u]:i.parse(c),n,o)),s[u]=null==c||isNaN(c)?n[u]:c,a[u]=null==h||isNaN(h)?o[u]:h})),pE(s),pE(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";RD(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=eo(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];dE(n,(function(t){!function(t,e,n){e&&z(R_(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=M_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&dE(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=e.getStore(),s=V(i,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,r,l=0;lo[1];if(h&&!c&&!d)return!0;h&&(r=!0),c&&(e=!0),d&&(n=!0)}return r&&e&&n}))}else dE(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}}));dE(i,(function(t){e.setApproximateExtent(o,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;dE(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=eo(n[0]+o,n,[0,100],!0):null!=r&&(o=eo(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=so(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}(),gE={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(iE(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new fE(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=mt();return z(n,(function(t){z(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}},vE=!1;function mE(t){vE||(vE=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,gE),function(t){t.registerAction("dataZoom",(function(t,e){z(rE(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function yE(t){t.registerComponentModel(uE),t.registerComponentView(cE),mE(t)}var xE=function(){},_E={};function bE(t,e){_E[t]=e}function wE(t){return _E[t]}var SE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;z(this.option.feature,(function(t,n){var i=wE(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),A(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Hd);function ME(t,e){var n=bd(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Zs({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var IE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),u=[];z(s,(function(t,e){u.push(e)})),new Xy(this._featureNames||[],u).add(h).update(h).remove(U(h,null)).execute(),this._featureNames=u,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Nd(i,o,r);Rd(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Ed(t,i,o,r)}(r,t,n),r.add(ME(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!Z(l)&&e){var u=l.style||(l.style={}),h=Cr(e,qs.makeFont(u)),c=t.x+r.x,d=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",d=!0);var p=d?-5-h.height:o+10;c+h.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):c-h.width/2<0&&(a.position=[0,p],u.align="left")}}))}function h(h,c){var d,p=u[h],f=u[c],g=s[p],v=new kc(g,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===p&&(g.title=i.newTitle),p&&!f){if(function(t){return 0===t.indexOf("my")}(p))d={onclick:v.option.onclick,featureName:p};else{var m=wE(p);if(!m)return;d=new m}l[p]=d}else if(!(d=l[f]))return;d.uid=Oc("toolbox-feature"),d.model=v,d.ecModel=e,d.api=n;var y=d instanceof xE;p||!f?!v.get("show")||y&&d.unusable?y&&d.remove&&d.remove(e,n):(function(i,s,l){var u,h,c=i.getModel("iconStyle"),d=i.getModel(["emphasis","iconStyle"]),p=s instanceof xE&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};X(p)?(u={})[l]=p:u=p,X(f)?(h={})[l]=f:h=f;var g=i.iconPaths={};z(u,(function(l,u){var p=Kh(l,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(c.getItemStyle()),p.ensureState("emphasis").style=d.getItemStyle();var f=new qs({style:{text:h[u],align:d.get("textAlign"),borderRadius:d.get("textBorderRadius"),padding:d.get("textPadding"),fill:null,font:gc({fontStyle:d.get("textFontStyle"),fontFamily:d.get("textFontFamily"),fontSize:d.get("textFontSize"),fontWeight:d.get("textFontWeight")},e)},ignore:!0});p.setTextContent(f),tc({el:p,componentModel:t,itemName:u,formatterParamsExtra:{title:h[u]}}),p.__title=h[u],p.on("mouseover",(function(){var e=d.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:d.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:d.get("textBackgroundColor")}),p.setTextConfig({position:d.get("textPosition")||i}),f.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===i.get(["iconStatus",u])?zl:Vl)(p),r.add(p),p.on("click",W(s.onclick,s,e,n,u)),g[u]=p}))}(v,d,p),v.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?zl:Vl)(i[t])},d instanceof xE&&d.render&&d.render(v,e,n,i)):y&&d.dispose&&d.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){z(this._features,(function(t){t instanceof xE&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){z(this._features,(function(n){n instanceof xE&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){z(this._features,(function(n){n instanceof xE&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(Pg),TE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),a=r?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),l=o.browser;if("function"!=typeof MouseEvent||!l.newEdge&&(l.ie||l.edge))if(window.navigator.msSaveOrOpenBlob||r){var u=s.split(","),h=u[0].indexOf("base64")>-1,c=r?decodeURIComponent(u[1]):u[1];h&&(c=window.atob(c));var d=i+"."+a;if(window.navigator.msSaveOrOpenBlob){for(var p=c.length,f=new Uint8Array(p);p--;)f[p]=c.charCodeAt(p);var g=new Blob([f]);window.navigator.msSaveOrOpenBlob(g,d)}else{var v=document.createElement("iframe");document.body.appendChild(v);var m=v.contentWindow,y=m.document;y.open("image/svg+xml","replace"),y.write(c),y.close(),m.focus(),y.execCommand("SaveAs",!0,d),document.body.removeChild(v)}}else{var x=n.get("lang"),_='',b=window.open();b.document.write(_),b.document.title=i}else{var w=document.createElement("a");w.download=i+"."+a,w.target="_blank",w.href=s;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});w.dispatchEvent(S)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(xE),CE="__ec_magicType_stack__",AE=[["line","bar"],["stack"]],DE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return z(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(LE[n]){var o,a={series:[]};z(AE,(function(t){O(t,n)>=0&&z(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=LE[n](e,r,t,i);o&&(k(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Zo).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=A({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(xE),LE={line:function(t,e,n,i){if("bar"===t)return A({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return A({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===CE;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),A({id:e,stack:r?"":CE},i.get(["option","stack"])||{},!0)}};Ry({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var kE=new Array(60).join("-"),PE="\t";function OE(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var RE=new RegExp("[\t]+","g");function NE(t,e){var n=t.split(new RegExp("\n*"+kE+"\n*","g")),i={series:[]};return z(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(PE)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=V(OE(e.shift()).split(RE),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=qE[t.brushType](0,n,e);t.__rangeOffset={offset:$E[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){z(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&z(i.coordSyses,(function(i){var r=qE[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){z(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=qE[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?$E[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=QE(n),o=QE(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return V(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:EL(i),isTargetByCursor:VL(i,t,n.coordSysModel),getLinearBrushOtherExtent:zL(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&O(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=YE(e,t),r=0;rt[1]&&t.reverse(),t}function YE(t,e){return Uo(t,e,{includeMainTypes:HE})}var ZE={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=mt(),a={},s={};(n||i||r)&&(z(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),z(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),z(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];z(r.getCartesians(),(function(t,e){(O(n,t.getAxis("x").model)>=0||O(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:jE.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){z(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:jE.geo})}))}},XE=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],jE={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Wh(t)),e}},qE={lineX:U(KE,0),lineY:U(KE,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[UE([r[0],o[0]]),UE([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:V(n,(function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o})),xyMinMax:r}}};function KE(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=UE(V([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var $E={lineX:U(JE,0),lineY:U(JE,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return V(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function JE(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function QE(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var tz,ez,nz=z,iz=Do+"toolbox-dataZoom_",rz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new oL(n.getZr()),this._brushController.on("brush",W(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new WE(az(t),e,{include:["grid"]}),s=a.makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return FE(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){oz[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new WE(az(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=FE(t);VE(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=RD(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];nz(t,(function(t,n){e.push(C(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(xE),oz={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=FE(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return VE(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function az(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}function sz(t){t.registerComponentModel(SE),t.registerComponentView(IE),bE("saveAsImage",TE),bE("magicType",DE),bE("dataView",EE),bE("dataZoom",rz),bE("restore",GE),W_(yE)}tz="dataZoom",ez=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=Uo(t,az(i));return nz(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),nz(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),r}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:iz+e+o};a[n]=o,r.push(a)}},ut(null==cp.get(tz)&&ez),cp.set(tz,ez);var lz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Hd);function uz(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function hz(t){if(o.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(u+="top:50%",h+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",h+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var c=a*Math.PI/180,d=l+r,p=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c)),f=e+" solid "+r+"px;";return'
'}(n,i,r)),X(t))o.innerHTML=t+a;else if(t){o.innerHTML="",Y(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!o.node&&n.getDom()){var r=Cz(i,n);this._ticket="";var a=i.dataByCoordSys,s=function(t,e,n){var i=Yo(t).queryOptionMap,r=i.keys()[0];if(r&&"series"!==r){var o=jo(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(a){var s,l=n.getViewOfComponentModel(a);return l.group.traverse((function(e){var n=ll(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0})),s?{componentMainType:r,componentIndex:a.componentIndex,el:s}:void 0}}}(i,e,n);if(s){var l=s.el.getBoundingRect().clone();l.applyTransform(s.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:s.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=Mz;u.x=i.x,u.y=i.y,u.update(),ll(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:a,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=kR(i,e),c=h.point[0],d=h.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:h.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Cz(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===Tz([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;if("legend"===ll(n).ssrType)return;this._lastDataByCoordSys=null,Ev(n,(function(t){return null!=ll(t).dataIndex?(r=t,!0):null!=ll(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=W(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=Tz([e.tooltipOption],i),a=this._renderMode,s=[],l=lg("section",{blocks:[],noHeader:!0}),u=[],h=new xg;z(t,(function(t){z(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=pR(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=lg("section",{header:o,noHeader:!ht(o),sortBlocks:!0,blocks:[]});l.blocks.push(c),z(t.seriesDataIndices,(function(l){var d=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=d.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=L_(e.axis,{value:r}),f.axisValueLabel=o,f.marker=h.makeTooltipMarker("item",Ad(f.color),a);var g=Mf(d.formatTooltip(p,!0,null)),v=g.frag;if(v){var m=Tz([d],i).get("valueFormatter");c.blocks.push(m?L({valueFormatter:m},v):v)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,d=o.get("order"),p=fg(l,h,a,d,n.get("useUTC"),o.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"
",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=ll(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,h=s.getData(u),c=this._renderMode,d=t.positionDefault,p=Tz([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),v=new xg;g.marker=v.makeTooltipMarker("item",Ad(g.color),c);var m=Mf(s.formatTooltip(l,!1,u)),y=p.get("order"),x=p.get("valueFormatter"),_=m.frag,b=_?fg(x?L({valueFormatter:x},_):_,v,c,y,i.get("useUTC"),p.get("textStyle")):m.text,w="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,b,g,w,t.offsetX,t.offsetY,t.position,t.target,v)})),n({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i="html"===this._renderMode,r=ll(e),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent;X(o)&&(o={content:o,formatter:o},a=!0),a&&i&&o.content&&((o=C(o)).content=oe(o.content));var s=[o],l=this._ecModel.getComponent(r.componentMainType,r.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=t.positionDefault,h=Tz(s,this._tooltipModel,u?{position:u}:null),c=h.get("content"),d=Math.random()+"",p=new xg;this._showOrMove(h,(function(){var n=C(h.get("formatterParams")||{});this._showTooltipContent(h,c,n,d,t.offsetX,t.offsetY,t.position,e,p)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var c=e,d=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(h)if(X(h)){var p=t.ecModel.get("useUTC"),f=Y(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=nd(f.axisValue,c,p)),c=Id(c,n,!0)}else if(Z(h)){var g=W((function(e,i){e===this._ticket&&(u.setContent(i,l,t,d,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}else c=h;u.setContent(c,l,t,d,a),u.show(t,d),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||Y(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:Y(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),Z(e)&&(e=e([n,i],o,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),Y(e))n=no(e[0],s),i=no(e[1],l);else if(K(e)){var p=e;p.width=u[0],p.height=u[1];var f=Nd(p,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(X(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,d,u,t.get("borderWidth"));n=g[0],i=g[1]}else g=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];return null!=o&&(t+l+o+2>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}(n,i,r,s,l,h?null:20,c?null:20),n=g[0],i=g[1];h&&(n-=Az(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=Az(c)?u[1]/2:"bottom"===c?u[1]:0),uz(t)&&(g=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l),n=g[0],i=g[1]),r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&z(n,(function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&z(a,(function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&z(a,(function(t,e){var n=l[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&z(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!o.node&&e.getDom()&&(Xg(this,"_updatePosition"),this._tooltipContent.dispose(),DR("itemTooltip",e))},e.type="tooltip",e}(Pg);function Tz(t,e,n){var i,r=e.ecModel;n?(i=new kc(n,r,r),i=new kc(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof kc&&(a=a.get("tooltip",!0)),X(a)&&(a={formatter:a}),a&&(i=new kc(a,i,r)))}return i}function Cz(t,e){return t.dispatchAction||W(e.dispatchAction,e)}function Az(t){return"center"===t||"middle"===t}function Dz(t){W_(BR),t.registerComponentModel(lz),t.registerComponentView(Iz),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},wt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},wt)}var Lz=["rect","polygon","keep","clear"];function kz(t,e){var n=Lo(t?t.brush:[]);if(n.length){var i=[];z(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;Y(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};z(t,(function(t){e[t]=1})),t.length=0,z(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,Lz)}}var Pz=z;function Oz(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Rz(t,e,n){var i={};return Pz(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);Pz(t[e],(function(t,i){if(CC.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new CC(r),"opacity"===i&&((r=C(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new CC(r))}}))})),i}function Nz(t,e,n){var i;z(n,(function(t){e.hasOwnProperty(t)&&Oz(e[t])&&(i=!0)})),i&&z(n,(function(n){e.hasOwnProperty(n)&&Oz(e[n])?t[n]=C(e[n]):delete t[n]}))}var Ez={lineX:zz(0),lineY:zz(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Y_(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(Y_(i,r,o)||Y_(i,r+a,o)||Y_(i,r,o+s)||Y_(i,r+a,o+s)||Be.create(t).contain(l[0],l[1])||$h(r,o,r+a,o,i)||$h(r,o,r,o+s,i)||$h(r+a,o,r+a,o+s,i)||$h(r,o+s,r+a,o+s,i))||void 0}}};function zz(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return Vz(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&Xz(e)}};function Xz(t){return new Be(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var jz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new oL(e.getZr())).on("brush",W(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){Hz(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:C(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:C(n),$from:e})},e.type="brush",e}(Pg),qz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return i(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&Nz(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=V(t,(function(t){return Kz(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=Kz(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Hd);function Kz(t,e){return A({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new kc(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var $z=["rect","polygon","lineX","lineY","keep","clear"],Jz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,z(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return z(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:$z.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(xE),Qz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return i(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Hd),tV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=ot(t.get("textBaseline"),t.get("textVerticalAlign")),l=new qs({style:uc(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new qs({style:uc(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!d&&!f,c.silent=!p&&!f,d&&l.on("click",(function(){Dd(d,"_"+t.get("target"))})),p&&c.on("click",(function(){Dd(p,"_"+t.get("subtarget"))})),ll(l).eventData=ll(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),v=t.getBoxLayoutParams();v.width=g.width,v.height=g.height;var m=Nd(v,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.x=m.x,i.y=m.y,i.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),c.setStyle(y),g=i.getBoundingRect();var x=m.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var b=new Zs({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(Pg);function eV(t){t.registerComponentModel(Qz),t.registerComponentView(tV)}var nV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return i(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.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},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],z(n,(function(e,n){var i,o=Vo(Oo(e),"");K(e)?(i=C(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new mx([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Hd),iV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="timeline.slider",e.defaultOption=Rc(nV.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(nV);N(iV,Sf.prototype);var rV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="timeline",e}(Pg),oV=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return i(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(xb),aV=Math.PI,sV=Ho(),lV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return lg("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},z(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Nd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:aV/2},d="vertical"===s?l.height:l.width,p=t.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,v=f?p.get("itemGap"):0,m=g+v,y=t.get(["label","rotate"])||0;y=y*aV/180;var x=p.get("position",!0),_=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=f&&p.get("showNextBtn",!0),S=0,M=d;"left"===x||"bottom"===x?(_&&(i=[0,0],S+=m),b&&(r=[S,0],S+=m),w&&(o=[M-g,0],M-=m)):(_&&(i=[M-g,0],M-=m),b&&(r=[0,0],S+=m),w&&(o=[M-g,0],M-=m));var I=[S,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:c[s],labelRotation:y,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:I,controlSize:g,controlGap:v}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;Me(o,o,[-a,-s]),Ie(o,o,-aV/2),Me(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=v(r),u=v(n.getBoundingRect()),h=v(i.getBoundingRect()),c=[n.x,n.y],d=[i.x,i.y];d[0]=c[0]=l[0][0];var p,f=t.labelPosOpt;function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function v(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function m(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}null==f||X(f)?(m(c,u,l,1,p="+"===f?0:1),m(d,h,l,1,1-p)):(m(c,u,l,1,p=f>=0?0:1),d[1]=c[1]+f),n.setPosition(c),i.setPosition(d),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Gx({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new i_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Wx}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new oV("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new Wr;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new th({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:L({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new th({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:k({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],z(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:W(r._changeTimeline,r,t.value)},d=uV(s,l,e,c);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=h.getItemStyle(),Kl(d);var p=ll(d);s.get("tooltip")?(p.dataIndex=t.value,p.dataModel=i):p.dataIndex=p.dataModel=null,r._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],z(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),d=new qs({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:W(r._changeTimeline,r,a),silent:!1,style:uc(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=uc(u),d.ensureState("progress").style=uc(h),e.add(d),Kl(d),sV(d).dataIndex=a,r._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=kr(ot(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=Kh(t.get(["controlStyle",e]),i||{},new Be(n[0],n[1],n[2],n[3]));return r&&o.setStyle(r),o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),Kl(c)}}h(t.nextBtnPosition,"next",W(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",W(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",W(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=W(s._handlePointerDrag,s),t.ondragend=W(s._handlePointerDragend,s),hV(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){hV(t,s._progressLine,o,n,i)}};this._currentPointer=uV(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=ro(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var bV={min:U(_V,"min"),max:U(_V,"max"),average:U(_V,"average"),median:U(_V,"median")};function wV(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,r=i&&i.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!Y(e.coord)&&Y(r)){var o=SV(e,n,i,t);if((e=C(e)).type&&bV[e.type]&&o.baseAxis&&o.valueAxis){var a=O(r,o.baseAxis.dim),s=O(r,o.valueAxis.dim),l=bV[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&Y(r))for(var u=e.coord,h=0;h<2;h++)bV[u[h]]&&(u[h]=TV(n,n.mapDimension(r[h]),u[h]));else e.coord=[];return e}}function SV(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function MV(t,e){return!(t&&t.containData&&e.coord&&!xV(e))||t.containData(e.coord)}function IV(t,e){return t?function(t,n,i,r){return Af(r<2?t.coord&&t.coord[r]:t.value,e[r])}:function(t,n,i,r){return Af(t.value,e[r])}}function TV(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var CV=Ho(),AV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.init=function(){this.markerGroupMap=mt()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){CV(t).keep=!1})),e.eachSeries((function(t){var r=mV.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!CV(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){CV(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;z(t,(function(t){var i=mV.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?Bl(t):Fl(t))}))}))},e.type="marker",e}(Pg);function DV(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=no(a.get("x"),n.getWidth()),l=no(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}var LV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=mV.getMarkerModelFromSeries(t,"markPoint");e&&(DV(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new gw),u=function(t,e,n){var i;i=t?V(t&&t.dimensions,(function(t){return L(L({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new mx(i,n),o=V(n.get("data"),U(wV,e));t&&(o=F(o,U(MV,t)));var a=IV(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),DV(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(Z(i)||Z(r)||Z(o)||Z(s)){var h=e.getRawValue(t),c=e.getDataParams(t);Z(i)&&(i=i(h,c)),Z(r)&&(r=r(h,c)),Z(o)&&(o=o(h,c)),Z(s)&&(s=s(h,c))}var d=n.getModel("itemStyle").getItemStyle(),p=Pv(a,"color");d.fill||(d.fill=p),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){ll(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(AV);function kV(t){t.registerComponentModel(yV),t.registerComponentView(LV),t.registerPreprocessor((function(t){fV(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})}))}var PV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(mV),OV=Ho(),RV=function(t,e,n,i){var r,o=t.getData();if(Y(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=rt(i.yAxis,i.xAxis);else{var u=SV(i,o,e,t);s=u.valueAxis,l=TV(o,Cx(o,u.valueDataDim),a)}var h="x"===s.dim?0:1,c=1-h,d=C(i),p={coord:[]};d.type=null,d.coord=[],d.coord[c]=-1/0,p.coord[c]=1/0;var f=n.get("precision");f>=0&&q(l)&&(l=+l.toFixed(Math.min(f,20))),d.coord[h]=p.coord[h]=l,r=[d,p,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[wV(t,r[0]),wV(t,r[1]),L({},r[2])];return g[2].type=g[2].type||null,A(g[2],g[0]),A(g[2],g[1]),g};function NV(t){return!isNaN(t)&&!isFinite(t)}function EV(t,e,n,i){var r=1-t,o=i.dimensions[t];return NV(e[r])&&NV(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function zV(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(EV(1,n,i,t)||EV(0,n,i,t)))return!0}return MV(t,e[0])&&MV(t,e[1])}function VV(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=no(s.get("x"),r.getWidth()),u=no(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=a.dataToPoint([c,d])}if(Dw(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions,NV(t.get(h[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):NV(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var BV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=mV.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=OV(e).from,o=OV(e).to;r.each((function(e){VV(r,e,!0,t,n),VV(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new GA);this.group.add(l.group);var u=function(t,e,n){var i;i=t?V(t&&t.dimensions,(function(t){return L(L({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new mx(i,n),o=new mx(i,n),a=new mx([],n),s=V(n.get("data"),U(RV,e,t,n));t&&(s=F(s,U(zV,t)));var l=IV(!!t,i);return r.initData(V(s,(function(t){return t[0]})),null,l),o.initData(V(s,(function(t){return t[1]})),null,l),a.initData(V(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,d=u.line;OV(e).from=h,OV(e).to=c,e.setData(d);var p=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),v=e.get("symbolOffset");function m(e,n,r){var o=e.getItemModel(n);VV(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Pv(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:ot(o.get("symbolOffset",!0),v[r?0:1]),symbolRotate:ot(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:ot(o.get("symbolSize"),f[r?0:1]),symbol:ot(o.get("symbol",!0),p[r?0:1]),style:s})}Y(p)||(p=[p,p]),Y(f)||(f=[f,f]),Y(g)||(g=[g,g]),Y(v)||(v=[v,v]),u.from.each((function(t){m(h,t,!0),m(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),u.line.eachItemGraphicEl((function(t){ll(t).dataModel=e,t.traverse((function(t){ll(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(AV),FV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(mV),GV=Ho(),HV=function(t,e,n,i){var r=i[0],o=i[1];if(r&&o){var a=wV(t,r),s=wV(t,o),l=a.coord,u=s.coord;l[0]=rt(l[0],-1/0),l[1]=rt(l[1],-1/0),u[0]=rt(u[0],1/0),u[1]=rt(u[1],1/0);var h=D([{},a,s]);return h.coord=[a.coord,s.coord],h.x0=a.x,h.y0=a.y,h.x1=s.x,h.y1=s.y,h}};function WV(t){return!isNaN(t)&&!isFinite(t)}function UV(t,e,n,i){var r=1-t;return WV(e[r])&&WV(n[r])}function YV(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return Dw(t,"cartesian2d")?!(!n||!i||!UV(1,n,i)&&!UV(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!xV(e)&&!xV(n))||t.containZone(e.coord,n.coord)}(t,r,o):MV(t,r)||MV(t,o)}function ZV(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=no(s.get(n[0]),r.getWidth()),u=no(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var h=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),d=a.clampData(h),p=a.clampData(c),f=[];"x0"===n[0]?f[0]=d[0]>p[0]?c[0]:h[0]:f[0]=d[0]>p[0]?h[0]:c[0],"y0"===n[1]?f[1]=d[1]>p[1]?c[1]:h[1]:f[1]=d[1]>p[1]?h[1]:c[1],o=i.getMarkerPosition(f,n,!0)}else{var g=[y=t.get(n[0],e),x=t.get(n[1],e)];a.clampData&&a.clampData(g,g),o=a.dataToPoint(g,!0)}if(Dw(a,"cartesian2d")){var v=a.getAxis("x"),m=a.getAxis("y"),y=t.get(n[0],e),x=t.get(n[1],e);WV(y)?o[0]=v.toGlobalCoord(v.getExtent()["x0"===n[0]?0:1]):WV(x)&&(o[1]=m.toGlobalCoord(m.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var XV=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],jV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=mV.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=V(XV,(function(r){return ZV(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Wr});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=V(t&&t.dimensions,(function(t){var n=e.getData();return L(L({},n.getDimensionInfo(n.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));r=V(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new mx(r,n)}else i=new mx(r=[{name:"value",type:"float"}],n);var s=V(n.get("data"),U(HV,e,t,n));t&&(s=F(s,U(YV,t)));var l=t?function(t,e,n,i){return Af(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return Af(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=V(XV,(function(n){return ZV(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];ro(c),ro(d);var p=!!(l[0]>c[1]||l[1]d[1]||h[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Hd),KV=U,$V=z,JV=Wr,QV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return i(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new JV),this.group.add(this._selectorGroup=new JV),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=Nd(l,u,h),d=this.layoutInner(t,r,c,i,a,s),p=Nd(k({width:d.width,height:d.height},l),u,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=ME(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=mt(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),$V(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new JV;return c.newline=!0,void s.add(c)}var d=n.getSeriesByName(a)[0];if(!l.get(a))if(d){var p=d.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),v=p.getVisual("style"),m=this._createItem(d,a,o,r,e,t,f,v,g,u,i);m.on("click",KV(tB,a,null,i,h)).on("mouseover",KV(nB,d.name,null,i,h)).on("mouseout",KV(iB,d.name,null,i,h)),n.ssr&&m.eachChild((function(t){var e=ll(t);e.seriesIndex=d.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var c=s.legendVisualProvider;if(!c.containName(a))return;var d=c.indexOfName(a),p=c.getItemVisual(d,"style"),f=c.getItemVisual(d,"legendIcon"),g=Qn(p.fill);g&&0===g[3]&&(g[3]=.2,p=L(L({},p),{fill:li(g,"rgba")}));var v=this._createItem(s,a,o,r,e,t,{},p,f,u,i);v.on("click",KV(tB,null,a,i,h)).on("mouseover",KV(nB,null,a,i,h)).on("mouseout",KV(iB,null,a,i,h)),n.ssr&&v.eachChild((function(t){var e=ll(t);e.seriesIndex=s.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}}),this)}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();$V(t,(function(t){var i=t.type,r=new qs({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect",legendId:e.id})}});o.add(r),sc(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Kl(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c,d,p,f=t.visualDrawType,g=r.get("itemWidth"),v=r.get("itemHeight"),m=r.isSelected(e),y=i.get("symbolRotate"),x=i.get("symbolKeepAspect"),_=i.get("icon"),b=function(t,e,n,i,r,o,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),$V(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?Im(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]),"inherit"===u.stroke&&(u.stroke=i[h]),"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity),s(u,i);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=_||l||"roundRect",i,a,s,f,m,h),w=new JV,S=i.getModel("textStyle");if(!Z(t.getLegendIcon)||_&&"inherit"!==_){var M="inherit"===_&&t.getData().getVisual("symbol")?"inherit"===y?t.getData().getVisual("symbolRotate"):y:0;w.add((c={itemWidth:g,itemHeight:v,icon:l,iconRotate:M,itemStyle:b.itemStyle,symbolKeepAspect:x},d=c.icon||"roundRect",(p=jv(d,0,0,c.itemWidth,c.itemHeight,c.itemStyle.fill,c.symbolKeepAspect)).setStyle(c.itemStyle),p.rotation=(c.iconRotate||0)*Math.PI/180,p.setOrigin([c.itemWidth/2,c.itemHeight/2]),d.indexOf("empty")>-1&&(p.style.stroke=p.style.fill,p.style.fill="#fff",p.style.lineWidth=2),p))}else w.add(t.getLegendIcon({itemWidth:g,itemHeight:v,icon:l,iconRotate:y,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:x}));var I="left"===o?g+5:-5,T=o,C=r.get("formatter"),A=e;X(C)&&C?A=C.replace("{name}",null!=e?e:""):Z(C)&&(A=C(e));var D=m?S.getTextColor():i.get("inactiveColor");w.add(new qs({style:uc(S,{text:A,x:I,y:v/2,fill:D,align:T,verticalAlign:"middle"},{inheritColor:D})}));var L=new Zs({shape:w.getBoundingRect(),style:{fill:"transparent"}}),k=i.getModel("tooltip");return k.get("show")&&tc({el:L,componentModel:r,itemName:e,itemTooltipOption:k.option}),w.add(L),w.eachChild((function(t){t.silent=!0})),L.silent=!u,this.getContentGroup().add(w),Kl(w),w.__legendDataIndex=n,w},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Rd(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){Rd("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",v=0===p?"y":"x";"end"===o?c[p]+=l[f]+d:u[p]+=h[f]+d,c[1-p]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var m={x:0,y:0};return m[f]=l[f]+d+h[f],m[g]=Math.max(l[g],h[g]),m[v]=Math.min(0,h[v]+c[1-p]),m}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Pg);function tB(t,e,n,i){iB(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),nB(t,e,n,i)}function eB(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],v=[-d.x,-d.y],m=ot(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?v[i]+=n[r]-d[r]:g[i]+=d[r]+m),v[1-i]+=c[o]/2-d[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(v);var y={x:0,y:0};if(y[r]=p?n[r]:c[r],y[o]=Math.max(c[o],d[o]),y[a]=Math.min(0,d[a]+v[1-i]),u.__rectSize=n[r],p){var x={x:0,y:0};x[r]=Math.max(n[r]-d[r]-m,0),x[o]=y[o],u.setClipPath(new Zs({shape:x})),u.__rectSize=x[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(t);return null!=_.pageIndex&&bh(l,{x:_.contentPosition[0],y:_.contentPosition[1]},p?t:null),this._updatePageInfoView(t,_),y},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;z(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",X(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=cB[r],a=dB[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,v=p,m=null;f<=h;++f)(!(m=y(l[f]))&&v.e>g.s+i||m&&!x(m,g.s))&&(g=v.i>g.i?v:m)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),v=m;for(f=s-1,g=p,v=p,m=null;f>=-1;--f)(m=y(l[f]))&&x(v,m.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(QV);function fB(t){W_(sB),t.registerComponentModel(lB),t.registerComponentView(pB),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}function gB(t){W_(sB),W_(fB)}var vB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="dataZoom.inside",e.defaultOption=Rc(sE.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(sE),mB=Ho();function yB(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function xB(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function _B(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function bB(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=mB(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=mt());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){z(oE(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:U(_B,e),dispatchAction:U(xB,t),dataZoomInfoMap:null,controller:null},i=n.controller=new tI(t.getZr());return z(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=mt())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Zg(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else yB(i,t)}))}))}var wB=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return i(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),function(t,e,n){mB(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}(i,e,{pan:W(SB.pan,this),zoom:W(SB.zoom,this),scrollMove:W(SB.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=mB(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return RD(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:MB((function(t,e,n,i,r,o){var a=IB[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:MB((function(t,e,n,i,r,o){return IB[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function MB(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return RD(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var IB={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function TB(t){mE(t),t.registerComponentModel(vB),t.registerComponentView(wB),bB(t)}var CB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Rc(sE.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(sE),AB=Zs,DB="horizontal",LB="vertical",kB=["line","bar","candlestick","scatter"],PB={easing:"cubicOut",duration:100,delay:0},OB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return i(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=W(this._onBrush,this),this._onBrushEnd=W(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),Zg(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Xg(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new Wr;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===DB?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Bd(t.option);z(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Nd(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===LB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==DB||r?n===DB&&r?{scaleY:a?1:-1,scaleX:-1}:n!==LB||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new AB({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new AB({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:W(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim&&i.getShadowDim(),a=o&&r.getDimensionInfo(o)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(r!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=r.getDataExtent(a),h=.3*(u[1]-u[0]);u=[u[0]-h,u[1]+h];var c,d=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],v=p[1]/(r.count()-1),m=0,y=Math.round(r.count()/e[0]);r.each([a],(function(t,e){if(y>0&&e%y)m+=v;else{var n=null==t||isNaN(t)||""===t,i=n?0:eo(t,u,d,!0);n&&!c&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&c&&(f.push([m,0]),g.push([m,0])),f.push([m,i]),g.push([m,i]),m+=v,c=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var e=x.getModel(t?"selectedDataBackground":"dataBackground"),n=new Wr,i=new qu({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new $u({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){z(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&O(kB,t.get("type"))<0)){var a,s=i.getComponent(iE(r),o).axis,l=function(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}(r),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new AB({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new AB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),z([0,1],(function(e){var o=a.get("handleIcon");!Yv[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=jv(o,-1,0,2,2,null,!0);s.attr({cursor:RB(this._orient),draggable:!0,drift:W(this._onDragMove,this,e),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=no(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Kl(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle"),d=(a.get("handleLabel")||{}).show||!1;t.add(i[e]=new qs({silent:!0,invisible:!d,style:uc(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))}),this);var c=h;if(u){var d=no(a.get("moveHandleSize"),o[1]),p=e.moveHandle=new Zs({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),f=.8*d,g=e.moveHandleIcon=jv(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+d/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var v=Math.min(o[1]/2,Math.max(d,10));(c=e.moveZone=new Zs({invisible:!0,shape:{y:o[1]-v,height:d+v}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),r.add(p),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:RB(this._orient),drift:W(this._onDragMove,this,"all"),ondragstart:W(this._showDataInfo,this,!0),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[eo(t[0],[0,100],e,!0),eo(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];RD(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?eo(o.minSpan,a,r,!0):null,null!=o.maxSpan?eo(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=ro([eo(i[0],r,a,!0),eo(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=ro(n.slice()),r=this._size;z([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Le(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=ro([eo(n.x,i,r,!0),eo(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ge(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new AB({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?PB:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=oE(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(hE);function RB(t){return"vertical"===t?"ns-resize":"ew-resize"}function NB(t){t.registerComponentModel(CB),t.registerComponentView(OB),mE(t)}function EB(t){W_(TB),W_(NB)}var zB=function(t,e,n){var i=C((VB[t]||{})[e]);return n&&Y(i)?i[i.length-1]:i},VB={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]}},BB=CC.mapVisual,FB=CC.eachVisual,GB=Y,HB=z,WB=ro,UB=eo,YB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return i(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&Nz(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=W(t,this),this.controllerVisuals=Rz(this.option.controller,e,t),this.targetVisuals=Rz(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=Lo(t),e},e.prototype.eachTargetSeries=function(t,e){z(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],Y(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return X(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):Z(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=WB([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});A(i,n),A(r,n);var o=this.isCategory();function a(n){GB(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},HB(i,(function(t,e){if(CC.isValidType(e)){var n=zB(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";HB(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&C(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&C(n)||(o?s[0]:[s[0],s[0]])),l.symbol=BB(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;FB(u,(function(t){t>h&&(h=t)})),l.symbolSize=BB(u,(function(t){return UB(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Hd),ZB=[20,140],XB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=ZB[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=ZB[1])},e.prototype._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]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),z(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=ro((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=jB(0,0,this.getExtent()),n=jB(0,0,this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new Wr("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent(),l=this._applyTransform("left",n.mainGroup);tF([0,1],(function(u){var h=r[u];h.setStyle("fill",e.handlesColor[u]),h.y=t[u];var c=QB(t[u],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");h.scaleX=h.scaleY=d/a[0],h.x=a[0]-d/2;var p=Uh(n.handleLabelPoints[u],Wh(h,this.group));if("horizontal"===this._orient){var f="left"===l||"top"===l?(a[0]-d)/2:(a[0]-d)/-2;p[1]+=f}o[u].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),d=QB(t,o,s,!0),p=a[0]-c/2,f={x:u.x,y:u.y};u.y=d,u.x=p;var g=Uh(l.indicatorLabelPoint,Wh(u,this.group)),v=l.indicatorLabel;v.attr("invisible",!1);var m=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;v.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:y?m:"middle",align:y?"center":m});var x={x:p,y:d,style:{fill:h}},_={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,b),v.animateTo(_,b)}else u.attr(x),v.attr(_);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||oF(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function hF(t,e,n,i){for(var r=e.targetVisuals[i],o=CC.prepareVisualTypes(r),a={color:Pv(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(sF,lF),z(uF,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(dF))}function vF(t){t.registerComponentModel(XB),t.registerComponentView(iF),gF(t)}var mF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return i(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],yF[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=C(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=V(this._pieceList,(function(t){return t=C(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=CC.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}z(e.pieces,(function(t){z(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),z(n,(function(t,n){var i=!1;z(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&z(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=zB(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,z(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;z(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=C(t)},e.prototype.getValueState=function(t){var e=CC.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){CC.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return z(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=Rc(YB.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(YB),yF={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function xF(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var _F=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=rt(e.get("showLabel",!0),!u),c=!e.get("selectedMode");u&&this._renderEndsText(t,u[0],s,h,a),z(l.viewPieceList,(function(i){var l=i.piece,u=new Wr;u.onclick=W(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var d=e.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]],c),h){var p=this.visualMapModel.getValueState(d);u.add(new qs({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1},silent:c}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Rd(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:JB(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return $B(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new Wr,a=this.visualMapModel.textStyleModel;o.add(new qs({style:uc(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=V(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n,i){var r=jv(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color"));r.silent=i,t.add(r)},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=C(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,z(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(qB);function bF(t){t.registerComponentModel(mF),t.registerComponentView(_F),gF(t)}function wF(t){W_(vF),W_(bF)}var SF={label:{enabled:!0},decal:{show:!1}},MF=Ho(),IF={};function TF(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=C(SF);A(i.label,t.getLocaleModel().get("aria"),!1),A(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=mt();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),MF(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(Z(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=gp(e.ecModel,e.name,IF,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=MF(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=gp(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?L(L({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=e.getZr().dom;if(i){var o=t.getLocaleModel().get("aria"),a=n.getModel("label");if(a.option=k(a.option,o),a.get("enabled"))if(i.setAttribute("role","img"),a.get("description"))i.setAttribute("aria-label",a.get("description"));else{var s,l=t.getSeriesCount(),u=a.get(["data","maxCount"])||10,h=a.get(["series","maxCount"])||10,c=Math.min(l,h);if(!(l<1)){var d=function(){var e=t.get("title");return e&&e.length&&(e=e[0]),e&&e.text}();s=d?r(a.get(["general","withTitle"]),{title:d}):a.get(["general","withoutTitle"]);var p=[];s+=r(l>1?a.get(["series","multiple","prefix"]):a.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries((function(e,n){if(n1?a.get(["series","multiple",o]):a.get(["series","single",o]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,b=t.getLocaleModel().get(["series","typeNames"]),b[_]||b.chart)});var s=e.getData();s.count()>u?i+=r(a.get(["data","partialData"]),{displayCnt:u}):i+=a.get(["data","allData"]);for(var h=a.get(["data","separator","middle"]),d=a.get(["data","separator","end"]),f=a.get(["data","excludeDimensionId"]),g=[],v=0;v":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},DF=function(){function t(t){null==(this._condVal=X(t)?new RegExp(t):nt(t)?t:null)&&To("")}return t.prototype.evaluate=function(t){var e=typeof t;return X(e)?this._condVal.test(t):!!q(e)&&this._condVal.test(t+"")},t}(),LF=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),kF=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){ZF(t,i)&&ZF(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nM:C2&&l.push(e),l}function jF(t,e,n,i,r,o,a,s,l,u){if(ZF(t,n)&&ZF(e,i)&&ZF(r,a)&&ZF(o,s))l.push(a,s);else{var h=2/u,c=h*h,d=a-t,p=s-e,f=Math.sqrt(d*d+p*p);d/=f,p/=f;var g=n-t,v=i-e,m=r-a,y=o-s,x=g*g+v*v,_=m*m+y*y;if(x=0&&_-w*w=0)l.push(a,s);else{var S=[],M=[];Tn(t,n,r,a,.5,S),Tn(e,i,o,s,.5,M),jF(S[0],M[0],S[1],M[1],S[2],M[2],S[3],M[3],l,u),jF(S[4],M[4],S[5],M[5],S[6],M[6],S[7],M[7],l,u)}}}}function qF(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),c=qF([l,u],h?0:1,e),d=(h?s:u)/c.length,p=0;p1?null:new Le(p*l+t,p*u+e)}function QF(t,e,n){var i=new Le;Le.sub(i,n,e),i.normalize();var r=new Le;return Le.sub(r,t,e),r.dot(i)}function tG(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function eG(t){var e=t.points,n=[],i=[];Wa(e,n,i);var r=new Be(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new Le,h=new Le;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=qF([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,d=0;d0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function yG(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=V(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return V(o,(function(o,a){return{cp:o,z:mG(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function xG(t){return rG(t.path,t.count)}function _G(t){return Y(t[0])}function bG(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var wG={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);_G(t)&&(s=t,l=e),_G(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,d=s?bG(l,s):bG(c?e:t,[c?t:e]),p=0,f=0;fIG))for(var r=n.getIndices(),o=0;o0&&i.group.traverse((function(t){t instanceof Rs&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function zG(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function VG(t){return Y(t)?t.sort().join(","):t}function BG(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function FG(t,e){for(var n=0;n=0&&r.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:BG(e.oldData[n]),groupIdDim:t.dimension})})),z(Lo(t.to),(function(t){var i=FG(n.updatedSeries,t);if(i>=0){var r=n.updatedSeries[i].getData();o.push({dataGroupId:e.oldDataGroupIds[i],data:r,divide:BG(r),groupIdDim:t.dimension})}})),r.length>0&&o.length>0&&EG(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=mt(),i=mt(),r=mt();return z(t.oldSeries,(function(e,n){var o=t.oldDataGroupIds[n],a=t.oldData[n],s=zG(e),l=VG(s);i.set(l,{dataGroupId:o,data:a}),Y(s)&&z(s,(function(t){r.set(t,{key:l,dataGroupId:o,data:a})}))})),z(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),o=t.getData(),a=zG(t),s=VG(a),l=i.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:BG(l.data),data:l.data}],newSeries:[{dataGroupId:e,divide:BG(o),data:o}]});else if(Y(a)){var u=[];z(a,(function(t){var e=i.get(t);e.data&&u.push({dataGroupId:e.dataGroupId,divide:BG(e.data),data:e.data})})),u.length&&n.set(s,{oldSeries:u,newSeries:[{dataGroupId:e,data:o,divide:BG(o)}]})}else{var h=r.get(a);if(h){var c=n.get(h.key);c||(c={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:BG(h.data)}],newSeries:[]},n.set(h.key,c)),c.newSeries.push({dataGroupId:e,data:o,divide:BG(o)})}}}})),n}(i,n);z(o.keys(),(function(t){var n=o.get(t);EG(n.oldSeries,n.newSeries,e)}))}z(n.updatedSeries,(function(t){t[Sg]&&(t[Sg]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldDataGroupIds=[],u=i.oldData=[],h=0;h=YG:-l>=YG),d=l>0?l%YG:l%YG+YG,p=!1;p=!!c||!vi(h)&&d>=UG==!!u;var f=t+n*WG(o),g=e+i*HG(o);this._start&&this._add("M",f,g);var v=Math.round(r*ZG);if(c){var m=1/this._p,y=(u?1:-1)*(YG-m);this._add("A",n,i,v,1,+u,t+n*WG(o+y),e+i*HG(o+y)),m>.01&&this._add("A",n,i,v,0,+u,f,g)}else{var x=t+n*WG(a),_=e+i*HG(a);this._add("A",n,i,v,+p,+u,x,_)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,o)+("style"!==r?oe(a):a||"")+(i?""+n+V(i,(function(e){return t(e)})).join(n)+n:"")+function(t){return""}(r)}(t)}function oH(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function aH(t,e,n,i){return iH("svg","root",{width:t,height:e,xmlns:QG,"xmlns:xlink":tH,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var sH=0;function lH(){return sH++}var uH={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},hH="transform-origin";function cH(t,e,n){var i=L({},t.shape);L(i,e),t.buildPath(n,i);var r=new XG;return r.reset(Ti(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function dH(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[hH]=n+"px "+i+"px")}var pH={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function fH(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function gH(t){return X(t)?uH[t]?"cubic-bezier("+uH[t]+")":En(t)?t:"":""}function vH(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof sh){var s=function(t,e,n){var i,r,o=t.shape.paths,a={};if(z(o,(function(t){var e=oH(n.zrId);e.animation=!0,vH(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=H(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var d=h[c];a[c]=a[c]||{d:""},a[c].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=fH(a,n);return i.replace(r,s)}}(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0})).length)return fH(h,n)+" "+r[0]+" both"}for(var v in l)(s=g(l[v]))&&a.push(s);if(a.length){var m=n.zrId+"-cls-"+lH();n.cssNodes["."+m]={animation:a.join(",")},e.class=m}}function mH(t,e,n,i){var r=JSON.stringify(t),o=n.cssStyleCache[r];o||(o=n.zrId+"-cls-"+lH(),n.cssStyleCache[r]=o,n.cssNodes["."+o+":hover"]=t),e.class=e.class?e.class+" "+o:o}var yH=Math.round;function xH(t){return t&&X(t.src)}function _H(t){return t&&Z(t.toDataURL)}function bH(t,e,n,i){JG((function(r,o){var a="fill"===r||"stroke"===r;a&&Mi(o)?PH(e,t,r,i):a&&bi(o)?OH(n,t,r,i):t[r]=o,a&&i.ssr&&"none"===o&&(t["pointer-events"]="visible")}),e,n,!1),function(t,e,n){var i=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(i)){var r=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(t),o=n.shadowCache,a=o[r];if(!a){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var h=i.shadowOffsetX||0,c=i.shadowOffsetY||0,d=i.shadowBlur,p=fi(i.shadowColor),f=p.opacity,g=p.color,v=d/2/l+" "+d/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=iH("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[iH("feDropShadow","",{dx:h/l,dy:c/u,stdDeviation:v,"flood-color":g,"flood-opacity":f})]),o[r]=a}e.filter=Ii(a)}}(n,t,i)}function wH(t,e){var n=Kr(e);n&&(n.each((function(e,n){null!=e&&(t[(eH+n).toLowerCase()]=e+"")})),e.isSilent()&&(t[eH+"silent"]="true"))}function SH(t){return vi(t[0]-1)&&vi(t[1])&&vi(t[2])&&vi(t[3]-1)}function MH(t,e,n){if(e&&(!function(t){return vi(t[4])&&vi(t[5])}(e)||!SH(e))){var i=1e4;t.transform=SH(e)?"translate("+yH(e[4]*i)/i+" "+yH(e[5]*i)/i+")":function(t){return"matrix("+mi(t[0])+","+mi(t[1])+","+mi(t[2])+","+mi(t[3])+","+yi(t[4])+","+yi(t[5])+")"}(e)}}function IH(t,e,n){for(var i=t.points,r=[],o=0;o=0&&a||o;s&&(r=ci(s))}var l=i.lineWidth;l&&(l/=!i.strokeNoScale&&t.transform?t.transform[0]:1);var u={cursor:"pointer"};r&&(u.fill=r),i.stroke&&(u.stroke=i.stroke),l&&(u["stroke-width"]=l),mH(u,e,n)}}(t,o,e),iH(s,t.id+"",o)}function kH(t,e){return t instanceof Rs?LH(t,e):t instanceof Bs?function(t,e){var n=t.style,i=n.image;if(i&&!X(i)&&(xH(i)?i=i.src:_H(i)&&(i=i.toDataURL())),i){var r=n.x||0,o=n.y||0,a={href:i,width:n.width,height:n.height};return r&&(a.x=r),o&&(a.y=o),MH(a,t.transform),bH(a,n,t,e),wH(a,t),e.animation&&vH(t,a,e),iH("image",t.id+"",a)}}(t,e):t instanceof Es?function(t,e){var n=t.style,i=n.text;if(null!=i&&(i+=""),i&&!isNaN(n.x)&&!isNaN(n.y)){var r=n.font||u,o=n.x||0,a=function(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}(n.y||0,Lr(r),n.textBaseline),s={"dominant-baseline":"central","text-anchor":xi[n.textAlign]||n.textAlign};if(el(n)){var h="",c=n.fontStyle,d=Qs(n.fontSize);if(!parseFloat(d))return;var p=n.fontFamily||l,f=n.fontWeight;h+="font-size:"+d+";font-family:"+p+";",c&&"normal"!==c&&(h+="font-style:"+c+";"),f&&"normal"!==f&&(h+="font-weight:"+f+";"),s.style=h}else s.style="font: "+r;return i.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),MH(s,t.transform),bH(s,n,t,e),wH(s,t),e.animation&&vH(t,s,e),iH("text",t.id+"",s,void 0,i)}}(t,e):void 0}function PH(t,e,n,i){var r,o=t[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(wi(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Si(o))return;r="radialGradient",a.cx=ot(o.x,.5),a.cy=ot(o.y,.5),a.r=ot(o.r,.5)}for(var s=o.colorStops,l=[],u=0,h=s.length;ul?jH(t,null==n[c+1]?null:n[c+1].elm,n,s,c):qH(t,e,a,l))}(n,i,r):UH(r)?(UH(t.text)&&GH(n,""),jH(n,null,r,0,r.length-1)):UH(i)?qH(n,i,0,i.length-1):UH(t.text)&&GH(n,""):t.text!==e.text&&(UH(i)&&qH(n,i,0,i.length-1),GH(n,e.text)))}var JH=0,QH=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=e,this._opts=n=L({},n),this.root=t,this._id="zr"+JH++,this._oldVNode=aH(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=nH("svg");KH(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(ZH(t,e))$H(t,e);else{var n=t.elm,i=BH(n);XH(e),null!==i&&(EH(i,e.elm,FH(n)),qH(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return kH(t,oH(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=oH(this._id);r.animation=t.animation,r.willUpdate=t.willUpdate,r.compress=t.compress,r.emphasis=t.emphasis,r.ssr=this._opts.ssr;var o=[],a=this._bgVNode=function(t,e,n,i){var r;if(n&&"none"!==n)if(r=iH("rect","bg",{width:t,height:e,x:"0",y:"0"}),Mi(n))PH({fill:n},r.attrs,"fill",i);else if(bi(n))OH({style:{fill:n},dirty:wt,getBoundingRect:function(){return{width:t,height:e}}},r.attrs,"fill",i);else{var o=fi(n),a=o.color,s=o.opacity;r.attrs.fill=a,s<1&&(r.attrs["fill-opacity"]=s)}return r}(n,i,this._backgroundColor,r);a&&o.push(a);var s=t.compress?null:this._mainVNode=iH("g","main",{},[]);this._paintList(e,r,s?s.children:o),s&&o.push(s);var l=V(H(r.defs),(function(t){return r.defs[t]}));if(l.length&&o.push(iH("defs","defs",{},l)),t.animation){var u=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=V(H(t),(function(e){return e+r+V(H(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=V(H(e),(function(t){return"@keyframes "+t+r+V(H(e[t]),(function(n){return n+r+V(H(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(r.cssNodes,r.cssAnims,{newline:!0});if(u){var h=iH("style","stl",{},[],u);o.push(h)}}return aH(n,i,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},rH(this.renderToVNode({animation:ot(t.cssAnimation,!0),emphasis:ot(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ot(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=p-1;g>f;g--)i=a[--s-1];for(var v=f+1;v=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&u.restore()};if(d)if(0===d.length)s=l.__endIndex;else for(var _=p.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?rW:0),this._needsManuallyCompositing),u.__builtin__||T("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),s.__dirty&nn&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,z(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?A(n[t],e,!0):n[t]=e;for(var i=0;i=11),domSupported:"undefined"!=typeof document}),fW=s}var xW,_W={};function bW(){if(xW)return _W;xW=1;var t={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},e={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},n=Object.prototype.toString,i=Array.prototype,r=i.forEach,o=i.filter,a=i.slice,s=i.map,l=i.reduce,u={};function h(i){if(null==i||"object"!=typeof i)return i;var r=i,o=n.call(i);if("[object Array]"===o){if(!w(i)){r=[];for(var a=0,s=i.length;a3&&(r=t.call(r,1));for(var a=n.length,s=0;s4&&(r=t.call(r,1,r.length-1));for(var a=r[r.length-1],s=n.length,l=0;l>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(r,u),c=function(t,e,i){for(var r=i?"invTrans":"trans",o=e[r],a=e.srcCoords,s=!0,l=[],u=[],h=0;h<4;h++){var c=t[h].getBoundingClientRect(),d=2*h,p=c.left,f=c.top;l.push(p,f),s=s&&a&&p===a[d]&&f===a[d+1],u.push(t[h].offsetLeft,t[h].offsetTop)}return s&&o?o:(e.srcCoords=l,e[r]=i?n(u,l):n(l,u))}(h,u,l);if(c)return c(e,o,s),!0}return!1}function a(t){return"CANVAS"===t.nodeName.toUpperCase()}return VW.transformLocalCoord=function(t,e,n,i,a){return o(r,e,i,a,!0)&&o(t,n,r[0],r[1])},VW.transformCoordWithViewport=o,VW.isCanvasEl=a,VW}function GW(){if(PW)return zW;PW=1;var t=DW();zW.Dispatcher=t;var e=yW(),n=FW(),i=n.isCanvasEl,r=n.transformCoordWithViewport,o="undefined"!=typeof window&&!!window.addEventListener,a=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,s=[];function l(t,n,i,r){return i=i||{},r||!e.canvasSupported?u(t,n,i):e.browser.firefox&&null!=n.layerX&&n.layerX!==n.offsetX?(i.zrX=n.layerX,i.zrY=n.layerY):null!=n.offsetX?(i.zrX=n.offsetX,i.zrY=n.offsetY):u(t,n,i),i}function u(t,n,o){if(e.domSupported&&t.getBoundingClientRect){var a=n.clientX,l=n.clientY;if(i(t)){var u=t.getBoundingClientRect();return o.zrX=a-u.left,void(o.zrY=l-u.top)}if(r(s,t,a,l))return o.zrX=s[0],void(o.zrY=s[1])}o.zrX=o.zrY=0}function h(t){return t||window.event}var c=o?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};return zW.clientToLocal=l,zW.getNativeEvent=h,zW.normalizeEvent=function(t,e,n){if(null!=(e=h(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&l(t,r,e,n)}else l(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&a.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e},zW.addEventListener=function(t,e,n,i){o?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)},zW.removeEventListener=function(t,e,n,i){o?t.removeEventListener(e,n,i):t.detachEvent("on"+e,n)},zW.stop=c,zW.isMiddleOrRightButtonOnMouseUpDown=function(t){return 2===t.which||3===t.which},zW.notLeftMouse=function(t){return t.which>1},zW}function HW(){if(EW)return NW;EW=1;var t=bW(),e=AW(),n=function(){if(MW)return SW;function t(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function e(t,e){return{target:t,topTarget:e&&e.topTarget}}return MW=1,t.prototype={constructor:t,_dragStart:function(t){for(var n=t.target;n&&!n.draggable;)n=n.parent;n&&(this._draggingTarget=n,n.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(e(n,t),"dragstart",t.event))},_drag:function(t){var n=this._draggingTarget;if(n){var i=t.offsetX,r=t.offsetY,o=i-this._x,a=r-this._y;this._x=i,this._y=r,n.drift(o,a,t),this.dispatchToElement(e(n,t),"drag",t.event);var s=this.findHover(i,r,n).target,l=this._dropTarget;this._dropTarget=s,n!==s&&(l&&s!==l&&this.dispatchToElement(e(l,t),"dragleave",t.event),s&&s!==l&&this.dispatchToElement(e(s,t),"dragenter",t.event))}},_dragEnd:function(t){var n=this._draggingTarget;n&&(n.dragging=!1),this.dispatchToElement(e(n,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(e(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},SW=t}(),i=DW(),r=GW(),o=function(){if(RW)return OW;RW=1;var t=GW(),e=function(){this._track=[]};function n(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}e.prototype={constructor:e,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(e,n,i){var r=e.touches;if(r){for(var o={points:[],touches:[],target:n,event:e},a=0,s=r.length;a1&&o&&o.length>1){var s=n(o)/n(a);!isFinite(s)&&(s=1),e.pinchScale=s;var l=[((r=o)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}};return OW=e}(),a="silent";function s(){r.stop(this.event)}function l(){}l.prototype.dispose=function(){};var u=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],h=function(t,e,r,o){i.call(this),this.storage=t,this.painter=e,this.painterRoot=o,r=r||new l,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,n.call(this),this.setHandlerProxy(r)};function c(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||a}return!1}function d(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}return h.prototype={constructor:h,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(t.each(u,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=d(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!n&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:s}}(e,t,n);i&&(i[r]&&(o.cancelBubble=i[r].call(i,o)),i.trigger(e,o),i=i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},o=i.length-1;o>=0;o--){var s;if(i[o]!==n&&!i[o].ignore&&(s=c(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),s!==a)){r.target=i[o];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new o);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},t.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){h.prototype[t]=function(n){var i,r,o=n.zrX,a=n.zrY,s=d(this,o,a);if("mouseup"===t&&s||(r=(i=this.findHover(o,a)).target),"mousedown"===t)this._downEl=r,this._downPoint=[n.zrX,n.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||e.dist(this._downPoint,[n.zrX,n.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,n)}})),t.mixin(h,i),t.mixin(h,n),NW=h}var WW,UW,YW,ZW,XW,jW,qW,KW={};function $W(){if(WW)return KW;WW=1;var t="undefined"==typeof Float32Array?Array:Float32Array;function e(){var e=new t(6);return n(e),e}function n(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}return KW.create=e,KW.identity=n,KW.copy=i,KW.mul=function(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t},KW.translate=function(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t},KW.rotate=function(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t},KW.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t},KW.invert=function(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null},KW.clone=function(t){var n=e();return i(n,t),n},KW}function JW(){if(YW)return UW;YW=1;var t=$W(),e=AW(),n=t.identity,i=5e-5;function r(t){return t>i||t<-5e-5}var o=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},a=o.prototype;a.transform=null,a.needLocalTransform=function(){return r(this.rotation)||r(this.position[0])||r(this.position[1])||r(this.scale[0]-1)||r(this.scale[1]-1)};var s=[];a.updateTransform=function(){var e=this.parent,i=e&&e.transform,r=this.needLocalTransform(),o=this.transform;if(r||i){o=o||t.create(),r?this.getLocalTransform(o):n(o),i&&(r?t.mul(o,e.transform,o):t.copy(o,e.transform)),this.transform=o;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(s);var l=s[0]<0?-1:1,u=s[1]<0?-1:1,h=((s[0]-l)*a+l)/s[0]||0,c=((s[1]-u)*a+u)/s[1]||0;o[0]*=h,o[1]*=h,o[2]*=c,o[3]*=c}this.invTransform=this.invTransform||t.create(),t.invert(this.invTransform,o)}else o&&n(o)},a.getLocalTransform=function(t){return o.getLocalTransform(this,t)},a.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},a.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var l=[],u=t.create();return a.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,o=this.scale;r(e-1)&&(e=Math.sqrt(e)),r(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],o[0]=e,o[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},a.decomposeTransform=function(){if(this.transform){var e=this.parent,n=this.transform;e&&e.transform&&(t.mul(l,e.invTransform,n),n=l);var i=this.origin;i&&(i[0]||i[1])&&(u[4]=i[0],u[5]=i[1],t.mul(l,n,u),l[4]-=i[0],l[5]-=i[1],n=l),this.setLocalTransform(n)}},a.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},a.transformCoordToLocal=function(t,n){var i=[t,n],r=this.invTransform;return r&&e.applyTransform(i,i,r),i},a.transformCoordToGlobal=function(t,n){var i=[t,n],r=this.transform;return r&&e.applyTransform(i,i,r),i},o.getLocalTransform=function(e,i){n(i=i||[]);var r=e.origin,o=e.scale||[1,1],a=e.rotation||0,s=e.position||[0,0];return r&&(i[4]-=r[0],i[5]-=r[1]),t.scale(i,i,o),a&&t.rotate(i,i,a),r&&(i[4]+=r[0],i[5]+=r[1]),i[4]+=s[0],i[5]+=s[1],i},UW=o}function QW(){if(qW)return jW;qW=1;var t=function(){if(XW)return ZW;XW=1;var t={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(e){return 1-t.bounceOut(1-e)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(e){return e<.5?.5*t.bounceIn(2*e):.5*t.bounceOut(2*e-1)+.5}};return ZW=t}();function e(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}return e.prototype={constructor:e,step:function(e,n){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=n;else{var i=(e-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var r=this.easing,o="string"==typeof r?t[r]:r,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}},jW=e}var tU,eU,nU,iU,rU,oU={};function aU(){if(eU)return tU;eU=1;var t=function(){this.head=null,this.tail=null,this._len=0},e=t.prototype;e.insert=function(t){var e=new n(t);return this.insertEntry(e),e},e.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},e.len=function(){return this._len},e.clear=function(){this.head=this.tail=null,this._len=0};var n=function(t){this.value=t,this.next,this.prev},i=function(e){this._list=new t,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},r=i.prototype;return r.put=function(t,e){var i=this._list,r=this._map,o=null;if(null==r[t]){var a=i.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=i.head;i.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new n(e),s.key=t,i.insertEntry(s),r[t]=s}return o},r.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.clear=function(){this._list.clear(),this._map={}},tU=i}function sU(){if(nU)return oU;nU=1;var t=aU(),e={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function r(t){return t.length&&"%"===t.charAt(t.length-1)?n(parseFloat(t)/100*255):n(parseInt(t,10))}function o(t){return t.length&&"%"===t.charAt(t.length-1)?i(parseFloat(t)/100):i(parseFloat(t))}function a(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function s(t,e,n){return t+(e-t)*n}function l(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var h=new t(20),c=null;function d(t,e){c&&u(c,e),c=h.put(t,c||e.slice())}function p(t,n){if(t){n=n||[];var i=h.get(t);if(i)return u(n,i);var a,s=(t+="").replace(/ /g,"").toLowerCase();if(s in e)return u(n,e[s]),d(t,n),n;if("#"===s.charAt(0))return 4===s.length?(a=parseInt(s.substr(1),16))>=0&&a<=4095?(l(n,(3840&a)>>4|(3840&a)>>8,240&a|(240&a)>>4,15&a|(15&a)<<4,1),d(t,n),n):void l(n,0,0,0,1):7===s.length?(a=parseInt(s.substr(1),16))>=0&&a<=16777215?(l(n,(16711680&a)>>16,(65280&a)>>8,255&a,1),d(t,n),n):void l(n,0,0,0,1):void 0;var c=s.indexOf("("),p=s.indexOf(")");if(-1!==c&&p+1===s.length){var g=s.substr(0,c),v=s.substr(c+1,p-(c+1)).split(","),m=1;switch(g){case"rgba":if(4!==v.length)return void l(n,0,0,0,1);m=o(v.pop());case"rgb":return 3!==v.length?void l(n,0,0,0,1):(l(n,r(v[0]),r(v[1]),r(v[2]),m),d(t,n),n);case"hsla":return 4!==v.length?void l(n,0,0,0,1):(v[3]=o(v[3]),f(v,n),d(t,n),n);case"hsl":return 3!==v.length?void l(n,0,0,0,1):(f(v,n),d(t,n),n);default:return}}l(n,0,0,0,1)}}function f(t,e){var i=(parseFloat(t[0])%360+360)%360/360,r=o(t[1]),s=o(t[2]),u=s<=.5?s*(r+1):s+r-s*r,h=2*s-u;return l(e=e||[],n(255*a(h,u,i+1/3)),n(255*a(h,u,i)),n(255*a(h,u,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function g(t,e,r){if(e&&e.length&&t>=0&&t<=1){r=r||[];var o=t*(e.length-1),a=Math.floor(o),l=Math.ceil(o),u=e[a],h=e[l],c=o-a;return r[0]=n(s(u[0],h[0],c)),r[1]=n(s(u[1],h[1],c)),r[2]=n(s(u[2],h[2],c)),r[3]=i(s(u[3],h[3],c)),r}}var v=g;function m(t,e,r){if(e&&e.length&&t>=0&&t<=1){var o=t*(e.length-1),a=Math.floor(o),l=Math.ceil(o),u=p(e[a]),h=p(e[l]),c=o-a,d=x([n(s(u[0],h[0],c)),n(s(u[1],h[1],c)),n(s(u[2],h[2],c)),i(s(u[3],h[3],c))],"rgba");return r?{color:d,leftIndex:a,rightIndex:l,value:o}:d}}var y=m;function x(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}return oU.parse=p,oU.lift=function(t,e){var n=p(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return x(n,4===n.length?"rgba":"rgb")}},oU.toHex=function(t){var e=p(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},oU.fastLerp=g,oU.fastMapToColor=v,oU.lerp=m,oU.mapToColor=y,oU.modifyHSL=function(t,e,n,i){if(t=p(t))return t=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(t[1]=o(n)),null!=i&&(t[2]=o(i)),x(f(t),"rgba")},oU.modifyAlpha=function(t,e){if((t=p(t))&&null!=e)return t[3]=i(e),x(t,"rgba")},oU.stringify=x,oU}function lU(){if(rU)return iU;rU=1;var t=QW(),e=sU(),n=bW().isArrayLike,i=Array.prototype.slice;function r(t,e){return t[e]}function o(t,e,n){t[e]=n}function a(t,e,n){return(e-t)*n+t}function s(t,e,n){return n>.5?e:t}function l(t,e,n,i,r){var o=t.length;if(1===r)for(var s=0;so)t.length=o;else for(var a=r;a=0&&!(C[n]<=e);n--);n=Math.min(n,_-2)}else{for(n=F;n<_&&!(C[n]>e);n++);n=Math.min(n-1,_-2)}F=n,G=e;var i=C[n+1]-C[n];if(0!==i)if(N=(e-C[n])/i,x)if(z=A[n],E=A[0===n?n:n-1],V=A[n>_-2?_-1:n+1],B=A[n>_-3?_-1:n+2],S)c(E,z,V,B,N,N*N,N*N*N,m(t,g),T);else{if(M)r=c(E,z,V,B,N,N*N,N*N*N,H,1),r=f(H);else{if(I)return s(z,V,N);r=d(E,z,V,B,N,N*N,N*N*N)}y(t,g,r)}else if(S)l(A[n],A[n+1],N,m(t,g),T);else{var r;if(M)l(A[n],A[n+1],N,H,1),r=f(H);else{if(I)return s(A[n],A[n+1],N);r=a(A[n],A[n+1],N)}y(t,g,r)}},ondestroy:o});return r&&"spline"!==r&&(W.easing=r),W}}}var v=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||r,this._setter=i||o,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};return v.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:p(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t0&&t.animate(e,!1).when(null==r?500:r,u).delay(s||0)}function c(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}return l.prototype={constructor:l,animate:function(n,i){var r,o=!1,a=this,l=this.__zr;if(n){var u=n.split("."),h=a;o="shape"===u[0];for(var c=0,d=u.length;c=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new o(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},o.create=function(t){return new o(t.x,t.y,t.width,t.height)},vU=o}function PU(){if(xU)return yU;xU=1;var t=bW(),e=LU(),n=kU(),i=function(t){for(var n in t=t||{},e.call(this,t),t)t.hasOwnProperty(n)&&(this[n]=t[n]);this._children=[],this.__storage=null,this.__dirty=!0};return i.prototype={constructor:i,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof i&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(e){var n=this.__zr,r=this.__storage,o=this._children,a=t.indexOf(o,e);return a<0||(o.splice(a,1),e.parent=null,r&&(r.delFromStorage(e),e instanceof i&&e.delChildrenFromStorage(r)),n&&n.refresh()),this},removeAll:function(){var t,e,n=this._children,r=this.__storage;for(e=0;e=0;)r++;return r-e}function e(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function n(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function i(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function r(t,e){var r,o,a=7,s=0;t.length;var l=[];function u(u){var h=r[u],c=o[u],d=r[u+1],p=o[u+1];o[u]=c+p,u===s-3&&(r[u+1]=r[u+2],o[u+1]=o[u+2]),s--;var f=i(t[d],t,h,c,0,e);h+=f,0!=(c-=f)&&0!==(p=n(t[h+c-1],t,d,p,p-1,e))&&(c<=p?function(r,o,s,u){var h=0;for(h=0;h=7||g>=7);if(v)break;m<0&&(m=0),m+=2}if((a=m)<1&&(a=1),1===o){for(h=0;h=0;h--)t[g+h]=t[f+h];if(0===o){x=!0;break}}if(t[p--]=l[d--],1==--u){x=!0;break}if(0!=(y=u-n(t[c],l,0,u,u-1,e))){for(u-=y,g=1+(p-=y),f=1+(d-=y),h=0;h=7||y>=7);if(x)break;v<0&&(v=0),v+=2}if((a=v)<1&&(a=1),1===u){for(g=1+(p-=o),f=1+(c-=o),h=o-1;h>=0;h--)t[g+h]=t[f+h];t[p]=l[d]}else{if(0===u)throw new Error;for(f=p-(u-1),h=0;h=0;h--)t[g+h]=t[f+h];t[p]=l[d]}else for(f=p-(u-1),h=0;h1;){var t=s-2;if(t>=1&&o[t-1]<=o[t]+o[t+1]||t>=2&&o[t-2]<=o[t]+o[t-1])o[t-1]o[t+1])break;u(t)}},this.forceMergeRuns=function(){for(;s>1;){var t=s-2;t>0&&o[t-1]=32;)e|=1&t,t>>=1;return t+e}(s);do{if((l=t(n,o,a,i))h&&(c=h),e(n,o,o+c,o+l,i),l=c}u.pushRun(o,l),u.mergeRuns(),s-=l,o+=l}while(0!==s);u.forceMergeRuns()}}},_U}function RU(){if(IU)return MU;IU=1;var t={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};return MU=function(e,n,i){return t.hasOwnProperty(n)?i*e.dpr:i}}var NU,EU,zU,VU,BU,FU,GU,HU,WU,UU={};function YU(){return NU||(NU=1,UU.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},UU.WILL_BE_RESTORED=9),UU}function ZU(){if(zU)return EU;zU=1;var t=RU(),e=YU().ContextCachedBy,n=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],i=function(t){this.extendFrom(t,!1)};function r(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(i,o,r,a)}function o(t,e,n){var i=n.width,r=n.height,o=Math.min(i,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*i+n.x,s=s*r+n.y,l*=o),t.createRadialGradient(a,s,0,a,s,l)}i.prototype={constructor:i,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(i,r,o){var a=this,s=o&&o.style,l=!s||i.__attrCachedBy!==e.STYLE_BIND;i.__attrCachedBy=e.STYLE_BIND;for(var u=0;u0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?o:r)(t,e,n),a=e.colorStops,s=0;s5e3&&(u=0,l={}),u++,l[n]=r,r}function f(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function g(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function v(t,e,n){var i=e.textPosition,r=e.textDistance,o=n.x,a=n.y;r=r||0;var s=n.height,l=n.width,u=s/2,h="left",c="top";switch(i){case"left":o-=r,a+=u,h="right",c="middle";break;case"right":o+=r+l,a+=u,c="middle";break;case"top":o+=l/2,a-=r,h="center",c="bottom";break;case"bottom":o+=l/2,a+=s+r,h="center";break;case"inside":o+=l/2,a+=u,h="center",c="middle";break;case"insideLeft":o+=r,a+=u,c="middle";break;case"insideRight":o+=l-r,a+=u,h="right",c="middle";break;case"insideTop":o+=l/2,a+=r,h="center";break;case"insideBottom":o+=l/2,a+=s-r,h="center",c="bottom";break;case"insideTopLeft":o+=r,a+=r;break;case"insideTopRight":o+=l-r,a+=r,h="right";break;case"insideBottomLeft":o+=r,a+=s-r,c="bottom";break;case"insideBottomRight":o+=l-r,a+=s-r,h="right",c="bottom"}return(t=t||{}).x=o,t.y=a,t.textAlign=h,t.textVerticalAlign=c,t}function m(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=y(e,n,i,r);for(var a=0,s=o.length;a=s;u++)l-=s;var h=p(n,e);return h>l&&(n="",h=0),l=t-h,i.ellipsis=n,i.ellipsisWidth=h,i.contentWidth=l,i.containerWidth=t,i}function x(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=p(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?_(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=p(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function _(t,e,n,i){for(var r=0,o=0,a=t.length;oc)t="",s=[];else if(null!=d)for(var p=y(d-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,g=s.length;fs&&I(i,t.substring(s,l)),I(i,r[2],r[1]),s=h.lastIndex}sx)return{lines:[],width:0,height:0};z.textWidth=p(z.text,D);var k=C.textWidth,P=null==k||"auto"===k;if("string"==typeof k&&"%"===k.charAt(k.length-1))z.percentWidth=k,f.push(z),k=0;else{if(P){k=z.textWidth;var O=C.textBackgroundColor,R=O&&O.image;R&&(R=e.findExistImage(R),e.isImageReady(R)&&(k=Math.max(k,R.width*L/R.height)))}var N=A?A[1]+A[3]:0;k+=N;var E=null!=y?y-M:null;null!=E&&Eu&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}),mY}function xY(){if(iY)return $U;iY=1;var t=bW(),e=t.retrieve2,n=t.retrieve3,i=t.each,r=t.normalizeCssArray,o=t.isString,a=t.isObject,s=eY(),l=yY(),u=tY(),h=RU(),c=YU(),d=c.ContextCachedBy,p=c.WILL_BE_RESTORED,f=s.DEFAULT_FONT,g={left:1,right:1,center:1},v={top:1,bottom:1,middle:1},m=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],y={},x={};function _(t){if(t){t.font=s.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||g[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||v[n]?n:"top",t.textPadding&&(t.textPadding=r(t.textPadding))}}function b(t,e,n,i,r){if(n&&e.textRotation){var o=e.textOrigin;"center"===o?(i=n.width/2+n.x,r=n.height/2+n.y):o&&(i=o[0]+n.x,r=o[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function w(t,i,r,o,a,s,l,u){var h=o.rich[r.styleName]||{};h.text=r.text;var c=r.textVerticalAlign,d=s+a/2;"top"===c?d=s+r.height/2:"bottom"===c&&(d=s+a-r.height/2),!r.isLineHolder&&S(h)&&M(t,i,h,"right"===u?l-r.width:"center"===u?l-r.width/2:l,d-r.height/2,r.width,r.height);var p=r.textPadding;p&&(l=k(l,u,p),d-=r.height/2-p[2]-r.textHeight/2),C(i,"shadowBlur",n(h.textShadowBlur,o.textShadowBlur,0)),C(i,"shadowColor",h.textShadowColor||o.textShadowColor||"transparent"),C(i,"shadowOffsetX",n(h.textShadowOffsetX,o.textShadowOffsetX,0)),C(i,"shadowOffsetY",n(h.textShadowOffsetY,o.textShadowOffsetY,0)),C(i,"textAlign",u),C(i,"textBaseline","middle"),C(i,"font",r.font||f);var g=A(h.textStroke||o.textStroke,m),v=D(h.textFill||o.textFill),m=e(h.textStrokeWidth,o.textStrokeWidth);g&&(C(i,"lineWidth",m),C(i,"strokeStyle",g),i.strokeText(r.text,l,d)),v&&(C(i,"fillStyle",v),i.fillText(r.text,l,d))}function S(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function M(t,e,n,i,r,s,h){var c=n.textBackgroundColor,d=n.textBorderWidth,p=n.textBorderColor,f=o(c);if(C(e,"shadowBlur",n.textBoxShadowBlur||0),C(e,"shadowColor",n.textBoxShadowColor||"transparent"),C(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),C(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),f||d&&p){e.beginPath();var g=n.textBorderRadius;g?l.buildPath(e,{x:i,y:r,width:s,height:h,r:g}):e.rect(i,r,s,h),e.closePath()}if(f)if(C(e,"fillStyle",c),null!=n.fillOpacity){var v=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=v}else e.fill();else if(a(c)){var m=c.image;(m=u.createOrUpdateImage(m,null,t,I,c))&&u.isImageReady(m)&&e.drawImage(m,i,r,s,h)}d&&p&&(C(e,"lineWidth",d),C(e,"strokeStyle",p),null!=n.strokeOpacity?(v=e.globalAlpha,e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=v):e.stroke())}function I(t,e){e.image=t}function T(t,e,n,i){var r=n.x||0,o=n.y||0,a=n.textAlign,l=n.textVerticalAlign;if(i){var u=n.textPosition;if(u instanceof Array)r=i.x+L(u[0],i.width),o=i.y+L(u[1],i.height);else{var h=e&&e.calculateTextPosition?e.calculateTextPosition(y,n,i):s.calculateTextPosition(y,n,i);r=h.x,o=h.y,a=a||h.textAlign,l=l||h.textVerticalAlign}var c=n.textOffset;c&&(r+=c[0],o+=c[1])}return(t=t||{}).baseX=r,t.baseY=o,t.textAlign=a,t.textVerticalAlign=l,t}function C(t,e,n){return t[e]=h(t,e,n),t[e]}function A(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function D(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function L(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function k(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}return $U.normalizeTextStyle=function(t){return _(t),i(t.rich,_),t},$U.renderText=function(t,e,n,i,r,o){i.rich?function(t,e,n,i,r,o){o!==p&&(e.__attrCachedBy=d.NONE);var a=t.__textCotentBlock;a&&!t.__dirtyText||(a=t.__textCotentBlock=s.parseRichText(n,i)),function(t,e,n,i,r){var o=n.width,a=n.outerWidth,l=n.outerHeight,u=i.textPadding,h=T(x,t,i,r),c=h.baseX,d=h.baseY,p=h.textAlign,f=h.textVerticalAlign;b(e,i,r,c,d);var g=s.adjustTextX(c,a,p),v=s.adjustTextY(d,l,f),m=g,y=v;u&&(m+=u[3],y+=u[0]);var _=m+o;S(i)&&M(t,e,i,g,v,a,l);for(var I=0;I=0&&"right"===(C=D[E]).textAlign;)w(t,e,C,i,k,y,N,"right"),P-=C.width,N-=C.width,E--;for(R+=(o-(R-m)-(_-N)-P)/2;O<=E;)w(t,e,C=D[O],i,k,y,R+C.width/2,"center"),R+=C.width,O++;y+=k}}(t,e,a,i,r)}(t,e,n,i,r,o):function(t,e,n,i,r,o){var a,l=S(i),u=!1,c=e.__attrCachedBy===d.PLAIN_TEXT;o!==p?(o&&(a=o.style,u=!l&&c&&a),e.__attrCachedBy=l?d.NONE:d.PLAIN_TEXT):c&&(e.__attrCachedBy=d.NONE);var g=i.font||f;u&&g===(a.font||f)||(e.font=g);var v=t.__computedFont;t.__styleFont!==g&&(t.__styleFont=g,v=t.__computedFont=e.font);var y=i.textPadding,_=i.textLineHeight,w=t.__textCotentBlock;w&&!t.__dirtyText||(w=t.__textCotentBlock=s.parsePlainText(n,v,y,_,i.truncate));var I=w.outerHeight,C=w.lines,L=w.lineHeight,P=T(x,t,i,r),O=P.baseX,R=P.baseY,N=P.textAlign||"left",E=P.textVerticalAlign;b(e,i,r,O,R);var z=s.adjustTextY(R,I,E),V=O,B=z;if(l||y){var F=s.getWidth(n,v);y&&(F+=y[1]+y[3]);var G=s.adjustTextX(O,F,N);l&&M(t,e,i,G,z,F,I),y&&(V=k(O,N,y),B+=y[0])}e.textAlign=N,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var H=0;H=0&&i.splice(r,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n15)break}u.__drawIndex=m,u.__drawIndex0&&t>r[0]){for(s=0;st);s++);a=i[r[s]]}if(r.splice(s+1,0,t),i[t]=e,!e.virtual)if(a){var u=a.dom;u.nextSibling?l.insertBefore(e.dom,u.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom)}else n("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i0?c:0),this._needsManuallyCompositing),l.__builtin__||n("ZLevel "+u+" has been used by unkown layer "+l.id),l!==o&&(l.__used=!0,l.__startIndex!==i&&(l.__dirty=!0),l.__startIndex=i,l.incremental?l.__drawIndex=-1:l.__drawIndex=i,e(i),o=l),s.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=i))}e(i),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,n){if(n){var i=this._layerConfig;i[t]?e.merge(i[t],n,!0):i[t]=n;for(var r=0;r=0&&(this.delFromStorage(e),this._roots.splice(a,1),e instanceof n&&e.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:r},wU=o}(),o=SY(),a=function(){if(pY)return dY;pY=1;var t=bW(),e=GW().Dispatcher,n=jU(),i=lU(),r=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,e.call(this)};return r.prototype={constructor:r,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n=0&&this._clips.splice(n,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n=o.length&&o.push({option:t})}})),o},CY.makeIdAndName=function(e){var r=t.createHashMap();n(e,(function(t,e){var n=t.exist;n&&r.set(n.id,t)})),n(e,(function(e,n){var i=e.option;t.assert(!i||null==i.id||!r.get(i.id)||r.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,e),!e.keyInfo&&(e.keyInfo={})})),n(e,(function(t,e){var n=t.exist,a=t.option,s=t.keyInfo;if(i(a)){if(s.name=null!=a.name?a.name+"":n?n.name:o+e,n)s.id=n.id;else if(null!=a.id)s.id=a.id+"";else{var l=0;do{s.id="\0"+s.name+"\0"+l++}while(r.get(s.id))}r.set(s.id,t)}}))},CY.isNameSpecified=function(t){var e=t.name;return!(!e||!e.indexOf(o))},CY.isIdInner=s,CY.compressBatches=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i=0||r&&t.indexOf(r,s)<0)){var l=n.getShallow(s);null!=l&&(o[e[a][0]]=l)}}return o}},LY}var BY,FY={},GY={},HY={};function WY(){if(BY)return HY;BY=1;var t=AW(),e=t.create,n=t.distSquare,i=Math.pow,r=Math.sqrt,o=1e-8,a=1e-4,s=r(3),l=1/3,u=e(),h=e(),c=e();function d(t){return t>-1e-8&&to||t<-1e-8}function f(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function g(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}return HY.cubicAt=f,HY.cubicDerivativeAt=function(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)},HY.cubicRootAt=function(t,e,n,o,a,u){var h=o+3*(e-n)-t,c=3*(n-2*e+t),p=3*(e-t),f=t-a,g=c*c-3*h*p,v=c*p-9*h*f,m=p*p-3*c*f,y=0;if(d(g)&&d(v))d(c)?u[0]=0:(D=-p/c)>=0&&D<=1&&(u[y++]=D);else{var x=v*v-4*g*m;if(d(x)){var _=v/g,b=-_/2;(D=-c/h+_)>=0&&D<=1&&(u[y++]=D),b>=0&&b<=1&&(u[y++]=b)}else if(x>0){var w=r(x),S=g*c+1.5*h*(-v+w),M=g*c+1.5*h*(-v-w);(D=(-c-((S=S<0?-i(-S,l):i(S,l))+(M=M<0?-i(-M,l):i(M,l))))/(3*h))>=0&&D<=1&&(u[y++]=D)}else{var I=(2*g*c-3*h*v)/(2*r(g*g*g)),T=Math.acos(I)/3,C=r(g),A=Math.cos(T),D=(-c-2*C*A)/(3*h),L=(b=(-c+C*(A+s*Math.sin(T)))/(3*h),(-c+C*(A-s*Math.sin(T)))/(3*h));D>=0&&D<=1&&(u[y++]=D),b>=0&&b<=1&&(u[y++]=b),L>=0&&L<=1&&(u[y++]=L)}}return y},HY.cubicExtrema=function(t,e,n,i,o){var a=6*n-12*e+6*t,s=9*e+3*i-3*t-9*n,l=3*e-3*t,u=0;if(d(s))p(a)&&(c=-l/a)>=0&&c<=1&&(o[u++]=c);else{var h=a*a-4*s*l;if(d(h))o[0]=-a/(2*s);else if(h>0){var c,f=r(h),g=(-a-f)/(2*s);(c=(-a+f)/(2*s))>=0&&c<=1&&(o[u++]=c),g>=0&&g<=1&&(o[u++]=g)}}return u},HY.cubicSubdivide=function(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i},HY.cubicProjectPoint=function(t,e,i,o,s,l,d,p,g,v,m){var y,x,_,b,w,S=.005,M=1/0;u[0]=g,u[1]=v;for(var I=0;I<1;I+=.05)h[0]=f(t,i,s,d,I),h[1]=f(e,o,l,p,I),(b=n(u,h))=0&&b=0&&c<=1&&(o[u++]=c);else{var h=s*s-4*a*l;if(d(h))(c=-s/(2*a))>=0&&c<=1&&(o[u++]=c);else if(h>0){var c,f=r(h),g=(-s-f)/(2*a);(c=(-s+f)/(2*a))>=0&&c<=1&&(o[u++]=c),g>=0&&g<=1&&(o[u++]=g)}}return u},HY.quadraticExtremum=function(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i},HY.quadraticSubdivide=function(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n},HY.quadraticProjectPoint=function(t,e,i,o,s,l,d,p,f){var v,m=.005,y=1/0;u[0]=d,u[1]=p;for(var x=0;x<1;x+=.05)h[0]=g(t,i,s,x),h[1]=g(e,o,l,x),(S=n(u,h))=0&&S1e-4)return f[0]=e-i,f[1]=n-h,g[0]=e+i,void(g[1]=n+h);if(s[0]=o(c)*i+e,s[1]=r(c)*h+n,l[0]=o(d)*i+e,l[1]=r(d)*h+n,v(f,s,l),m(g,s,l),(c%=a)<0&&(c+=a),(d%=a)<0&&(d+=a),c>d&&!p?d+=a:cc&&(u[0]=o(_)*i+e,u[1]=r(_)*h+n,v(f,u,f),m(g,u,g))},XY}function qY(){if(ZY)return YY;ZY=1;var t=WY(),e=AW(),n=jY(),i=kU(),r=CU().devicePixelRatio,o={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},a=[],s=[],l=[],u=[],h=Math.min,c=Math.max,d=Math.cos,p=Math.sin,f=Math.sqrt,g=Math.abs,v="undefined"!=typeof Float32Array,m=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};return m.prototype={constructor:m,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,n){n=n||0,this._ux=g(n/r/t)||0,this._uy=g(n/r/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(o.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=g(t-this._xi)>this._ux||g(e-this._yi)>this._uy||this._len<5;return this.addData(o.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(o.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(o.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(o.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=d(r)*n+t,this._yi=p(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(o.R,t,e,n,i),this},closePath:function(){this.addData(o.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;n0&&v<=t||d<0&&v>=t||0===d&&(p>0&&m<=e||p<0&&m>=e);)v+=d*(n=a[i=this._dashIdx]),m+=p*n,this._dashIdx=(i+1)%y,d>0&&vl||p>0&&mu||s[i%2?"moveTo":"lineTo"](d>=0?h(v,t):c(v,t),p>=0?h(m,e):c(m,e));d=v-t,p=m-e,this._dashOffset=-f(d*d+p*p)},_dashedBezierTo:function(e,n,i,r,o,a){var s,l,u,h,c,d=this._dashSum,p=this._dashOffset,g=this._lineDash,v=this._ctx,m=this._xi,y=this._yi,x=t.cubicAt,_=0,b=this._dashIdx,w=g.length,S=0;for(p<0&&(p=d+p),p%=d,s=0;s<1;s+=.1)l=x(m,e,i,o,s+.1)-x(m,e,i,o,s),u=x(y,n,r,a,s+.1)-x(y,n,r,a,s),_+=f(l*l+u*u);for(;bp);b++);for(s=(S-p)/_;s<=1;)h=x(m,e,i,o,s),c=x(y,n,r,a,s),b%2?v.moveTo(h,c):v.lineTo(h,c),s+=g[b]/_,b=(b+1)%w;b%2!=0&&v.lineTo(o,a),l=o-h,u=a-c,this._dashOffset=-f(l*l+u*u)},_dashedQuadraticTo:function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,v&&(this.data=new Float32Array(t)))},getBoundingRect:function(){a[0]=a[1]=l[0]=l[1]=Number.MAX_VALUE,s[0]=s[1]=u[0]=u[1]=-Number.MAX_VALUE;for(var t=this.data,r=0,h=0,c=0,f=0,g=0;gu||g(s-r)>h||f===c-1)&&(t.lineTo(a,s),i=a,r=s);break;case o.C:t.bezierCurveTo(l[f++],l[f++],l[f++],l[f++],l[f++],l[f++]),i=l[f-2],r=l[f-1];break;case o.Q:t.quadraticCurveTo(l[f++],l[f++],l[f++],l[f++]),i=l[f-2],r=l[f-1];break;case o.A:var m=l[f++],y=l[f++],x=l[f++],_=l[f++],b=l[f++],w=l[f++],S=l[f++],M=l[f++],I=x>_?x:_,T=x>_?1:x/_,C=x>_?_/x:1,A=b+w;Math.abs(x-_)>.001?(t.translate(m,y),t.rotate(S),t.scale(T,C),t.arc(0,0,I,b,A,1-M),t.scale(1/T,1/C),t.rotate(-S),t.translate(-m,-y)):t.arc(m,y,I,b,A,1-M),1===f&&(e=d(b)*x+m,n=p(b)*_+y),i=d(A)*x+m,r=p(A)*_+y;break;case o.R:e=i=l[f],n=r=l[f+1],t.rect(l[f++],l[f++],l[f++],l[f++]);break;case o.Z:t.closePath(),i=e,r=n}}}},m.CMD=o,YY=m}var KY,$Y={},JY={};function QY(){return KY||(KY=1,JY.containStroke=function(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||on+d&&c>r+d&&c>a+d&&c>l+d||ce+d&&h>i+d&&h>o+d&&h>s+d||hn+h&&u>r+h&&u>a+h||ue+h&&l>i+h&&l>o+h||lr||d+ca&&(a+=e);var f=Math.atan2(h,u);return f<0&&(f+=e),f>=o&&f<=a||f+e>=o&&f+e<=a},TZ}function LZ(){return uZ||(uZ=1,lZ=function(t,e,n,i,r,o){if(o>e&&o>i||or?a:0}),lZ}function kZ(){if(hZ)return $Y;hZ=1;var t=qY(),e=QY(),n=nZ(),i=oZ(),r=DZ(),o=AZ().normalizeRadian,a=WY(),s=LZ(),l=t.CMD,u=2*Math.PI,h=[-1,-1,-1],c=[-1,-1];function d(t,e,n,i,r,o,s,l,u,d){if(d>e&&d>i&&d>o&&d>l||d1&&(p=void 0,p=c[0],c[0]=c[1],c[1]=p),g=a.cubicAt(e,i,o,l,c[0]),y>1&&(v=a.cubicAt(e,i,o,l,c[1]))),2===y?_e&&l>i&&l>o||l=0&&c<=1){for(var d=0,p=a.quadraticAt(e,i,o,c),f=0;fn||l<-n)return 0;var c=Math.sqrt(n*n-l*l);h[0]=-c,h[1]=c;var d=Math.abs(i-r);if(d<1e-4)return 0;if(d%u<1e-4){i=0,r=u;var p=a?1:-1;return s>=h[0]+t&&s<=h[1]+t?p:0}a?(c=i,i=o(r),r=o(c)):(i=o(i),r=o(r)),i>r&&(r+=u);for(var f=0,g=0;g<2;g++){var v=h[g];if(v+t>s){var m=Math.atan2(l,v);p=a?1:-1,m<0&&(m=u+m),(m>=i&&m<=r||m+u>=i&&m+u<=r)&&(m>Math.PI/2&&m<1.5*Math.PI&&(p=-p),f+=p)}}return f}function g(t,o,a,u,h){for(var c,g,v=0,m=0,y=0,x=0,_=0,b=0;b1&&(a||(v+=s(m,y,x,_,u,h))),1===b&&(x=m=t[b],_=y=t[b+1]),w){case l.M:m=x=t[b++],y=_=t[b++];break;case l.L:if(a){if(e.containStroke(m,y,t[b],t[b+1],o,u,h))return!0}else v+=s(m,y,t[b],t[b+1],u,h)||0;m=t[b++],y=t[b++];break;case l.C:if(a){if(n.containStroke(m,y,t[b++],t[b++],t[b++],t[b++],t[b],t[b+1],o,u,h))return!0}else v+=d(m,y,t[b++],t[b++],t[b++],t[b++],t[b],t[b+1],u,h)||0;m=t[b++],y=t[b++];break;case l.Q:if(a){if(i.containStroke(m,y,t[b++],t[b++],t[b],t[b+1],o,u,h))return!0}else v+=p(m,y,t[b++],t[b++],t[b],t[b+1],u,h)||0;m=t[b++],y=t[b++];break;case l.A:var S=t[b++],M=t[b++],I=t[b++],T=t[b++],C=t[b++],A=t[b++];b+=1;var D=1-t[b++],L=Math.cos(C)*I+S,k=Math.sin(C)*T+M;b>1?v+=s(m,y,L,k,u,h):(x=L,_=k);var P=(u-S)*T/I+S;if(a){if(r.containStroke(S,M,T,C,C+A,D,o,P,h))return!0}else v+=f(S,M,T,C,C+A,D,P,h);m=Math.cos(C+A)*I+S,y=Math.sin(C+A)*T+M;break;case l.R:if(x=m=t[b++],_=y=t[b++],L=x+t[b++],k=_+t[b++],a){if(e.containStroke(x,_,L,_,o,u,h)||e.containStroke(L,_,L,k,o,u,h)||e.containStroke(L,k,x,k,o,u,h)||e.containStroke(x,k,x,_,o,u,h))return!0}else v+=s(L,_,L,k,u,h),v+=s(x,k,x,_,u,h);break;case l.Z:if(a){if(e.containStroke(m,y,x,_,o,u,h))return!0}else v+=s(m,y,x,_,u,h);m=x,y=_}}return a||(c=y,g=_,Math.abs(c-g)<1e-4)||(v+=s(m,y,x,_,u,h)||0),0!==v}return $Y.contain=function(t,e,n){return g(t,0,!1,e,n)},$Y.containStroke=function(t,e,n,i){return g(t,e,!0,n,i)},$Y}function PZ(){if(dZ)return cZ;dZ=1;var t=bY(),e=bW(),n=qY(),i=kZ(),r=XU().prototype.getCanvasPattern,o=Math.abs,a=new n(!0);function s(e){t.call(this,e),this.path=null}return s.prototype={constructor:s,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var n,i=this.style,o=this.path||a,s=i.hasStroke(),l=i.hasFill(),u=i.fill,h=i.stroke,c=l&&!!u.colorStops,d=s&&!!h.colorStops,p=l&&!!u.image,f=s&&!!h.image;i.bind(t,this,e),this.setTransform(t),this.__dirty&&(c&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(t,u,n)),d&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,h,n))),c?t.fillStyle=this._fillGradient:p&&(t.fillStyle=r.call(u,t)),d?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=r.call(h,t));var g=i.lineDash,v=i.lineDashOffset,m=!!t.setLineDash,y=this.getGlobalScale();if(o.setScale(y[0],y[1],this.segmentIgnoreThreshold),this.__dirtyPath||g&&!m&&s?(o.beginPath(t),g&&!m&&(o.setLineDash(g),o.setLineDashOffset(v)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),l)if(null!=i.fillOpacity){var x=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,o.fill(t),t.globalAlpha=x}else o.fill(t);g&&m&&(t.setLineDash(g),t.lineDashOffset=v),s&&(null!=i.strokeOpacity?(x=t.globalAlpha,t.globalAlpha=i.strokeOpacity*i.opacity,o.stroke(t),t.globalAlpha=x):o.stroke(t)),g&&m&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new n},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var r=this.path;r||(r=this.path=new n),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),t=r.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,s=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),s>1e-10&&(o.width+=a/s,o.height+=a/s,o.x-=a/s/2,o.y-=a/s/2)}return o}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),o=this.style;if(t=n[0],e=n[1],r.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var s=o.lineWidth,l=o.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(o.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),i.containStroke(a,s/l,t,e)))return!0}if(o.hasFill())return i.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(e,n){"shape"===e?(this.setShape(n),this.__dirtyPath=!0,this._rect=null):t.prototype.attrKV.call(this,e,n)},setShape:function(t,n){var i=this.shape;if(i){if(e.isObject(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);else i[t]=n;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&o(t[0]-1)>1e-10&&o(t[3]-1)>1e-10?Math.sqrt(o(t[0]*t[3]-t[2]*t[1])):1}},s.extend=function(t){var n=function(e){s.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};for(var i in e.inherits(n,s),t)"style"!==i&&"shape"!==i&&(n.prototype[i]=t[i]);return n},e.inherits(s,t),cZ=s}function OZ(){if(fZ)return pZ;fZ=1;var t=qY(),e=AW().applyTransform,n=t.CMD,i=[[],[],[]],r=Math.sqrt,o=Math.atan2;return pZ=function(t,a){var s,l,u,h,c,d=t.data,p=n.M,f=n.C,g=n.L,v=n.R,m=n.A,y=n.Q;for(u=0,h=0;u1&&(d*=i(_),p*=i(_));var b=(h===c?-1:1)*i((d*d*(p*p)-d*d*(x*x)-p*p*(y*y))/(d*d*(x*x)+p*p*(y*y)))||0,w=b*d*x/p,S=b*-p*y/d,M=(t+n)/2+o(m)*w-r(m)*S,I=(e+s)/2+r(m)*w+o(m)*S,T=u([1,0],[(y-w)/d,(x-S)/p]),C=[(y-w)/d,(x-S)/p],A=[(-1*y-w)/d,(-1*x-S)/p],D=u(C,A);l(C,A)<=-1&&(D=a),l(C,A)>=1&&(D=0),0===c&&D>0&&(D-=2*a),1===c&&D<0&&(D+=2*a),v.addData(g,M,I,d,p,T,D,m,c)}var c=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,d=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function p(t,i){var r=function(t){if(!t)return new e;for(var n,i=0,r=0,o=i,a=r,s=new e,l=e.CMD,u=t.match(c),p=0;p=11?function(){var t,i=this.__clipPaths,r=this.style;if(i)for(var o=0;or-2?r-1:p+1],c=n[p>r-3?r-1:p+2]);var v=f*f,m=f*v;o.push([e(u[0],g[0],h[0],c[0],f,v,m),e(u[1],g[1],h[1],c[1],f,v,m)])}return o},FZ}function $Z(){if(WZ)return HZ;WZ=1;var t=AW(),e=t.min,n=t.max,i=t.scale,r=t.distance,o=t.add,a=t.clone,s=t.sub;return HZ=function(t,l,u,h){var c,d,p,f,g=[],v=[],m=[],y=[];if(h){p=[1/0,1/0],f=[-1/0,-1/0];for(var x=0,_=t.length;x<_;x++)e(p,p,t[x]),n(f,f,t[x]);e(p,p,h[0]),n(f,f,h[1])}for(x=0,_=t.length;x<_;x++){var b=t[x];if(u)c=t[x?x-1:_-1],d=t[(x+1)%_];else{if(0===x||x===_-1){g.push(a(t[x]));continue}c=t[x-1],d=t[x+1]}s(v,d,c),i(v,v,l);var w=r(b,c),S=r(b,d),M=w+S;0!==M&&(w/=M,S/=M),i(m,v,-w),i(y,v,S);var I=o([],b,m),T=o([],b,y);h&&(n(I,I,p),e(I,I,f),n(T,T,p),e(T,T,f)),g.push(I),g.push(T)}return u&&g.push(g.shift()),g},HZ}function JZ(){if(UZ)return qZ;UZ=1;var t=KZ(),e=$Z();return qZ.buildPath=function(n,i,r){var o=i.points,a=i.smooth;if(o&&o.length>=2){if(a&&"spline"!==a){var s=e(o,a,r,i.smoothConstraint);n.moveTo(o[0][0],o[0][1]);for(var l=o.length,u=0;u<(r?l:l-1);u++){var h=s[2*u],c=s[2*u+1],d=o[(u+1)%l];n.bezierCurveTo(h[0],h[1],c[0],c[1],d[0],d[1])}}else{"spline"===a&&(o=t(o,r)),n.moveTo(o[0][0],o[0][1]),u=1;for(var p=o.length;u=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function rt(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ot(t,e,n,i,r,o){if("function"==typeof r&&(o=r,r=null),i&&i.isAnimationEnabled()){var a=t?"Update":"",s=i.getShallow("animationDuration"+a),l=i.getShallow("animationEasing"+a),u=i.getShallow("animationDelay"+a);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(n,s,u||0,l,o,!!o):(e.stopAnimation(),e.attr(n),o&&o())}else e.stopAnimation(),e.attr(n),o&&o()}function at(t,e,n,i,r){ot(!0,t,e,n,i,r)}function st(e,n,o){return n&&!t.isArrayLike(n)&&(n=a.getLocalTransform(n)),o&&(n=i.invert([],n)),r.applyTransform([],e,n)}function lt(t,e,n,i,r,o,a,s){var l,u=n-t,h=i-e,c=a-r,d=s-o,p=ut(c,d,u,h);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=t-r,g=e-o,v=ut(f,g,u,h)/p;if(v<0||v>1)return!1;var m=ut(f,g,c,d)/p;return!(m<0||m>1)}function ut(t,e,n,i){return t*i-n*e}return O("circle",h),O("sector",c),O("ring",d),O("polygon",p),O("polyline",f),O("rect",g),O("line",v),O("bezierCurve",m),O("arc",y),FY.Z2_EMPHASIS_LIFT=1,FY.CACHED_LABEL_STYLE_PROPERTIES={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},FY.extendShape=function(t){return o.extend(t)},FY.extendPath=function(t,n){return e.extendFromString(t,n)},FY.registerShape=O,FY.getShapeClass=function(t){if(P.hasOwnProperty(t))return P[t]},FY.makePath=R,FY.makeImage=function(t,e,n){var i=new s({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(N(e,r))}}});return i},FY.mergePath=E,FY.resizePath=z,FY.subPixelOptimizeLine=function(t){return M.subPixelOptimizeLine(t.shape,t.shape,t.style),t},FY.subPixelOptimizeRect=function(t){return M.subPixelOptimizeRect(t.shape,t.shape,t.style),t},FY.subPixelOptimize=V,FY.setElementHoverStyle=Z,FY.setHoverStyle=function(t,e){J(t,!0),Y(t,Z,e)},FY.setAsHighDownDispatcher=J,FY.isHighDownDispatcher=function(t){return!(!t||!t.__highDownDispatcher)},FY.getHighlightDigit=function(t){var e=k[t];return null==e&&L<=32&&(e=k[t]=L++),e},FY.setLabelStyle=function(e,n,i,r,o,a,s){var l,u=(o=o||C).labelFetcher,h=o.labelDataIndex,c=o.labelDimIndex,d=o.labelProp,p=i.getShallow("show"),f=r.getShallow("show");(p||f)&&(u&&(l=u.getFormattedLabel(h,"normal",null,c,d)),null==l&&(l=t.isFunction(o.defaultText)?o.defaultText(h,o):o.defaultText));var g=p?l:null,v=f?t.retrieve2(u?u.getFormattedLabel(h,"emphasis",null,c,d):null,l):null;null==g&&null==v||(Q(e,i,a,o),Q(n,r,s,o,!0)),e.text=g,n.text=v},FY.modifyLabelStyle=function(e,n,i){var r=e.style;n&&(rt(r),e.setStyle(n),it(r)),r=e.__hoverStl,i&&r&&(rt(r),t.extend(r,i),it(r))},FY.setTextStyle=Q,FY.setText=function(t,e,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,tt(t,e,r,i)},FY.getFont=function(e,n){var i=n&&n.getModel("textStyle");return t.trim([e.fontStyle||i&&i.getShallow("fontStyle")||"",e.fontWeight||i&&i.getShallow("fontWeight")||"",(e.fontSize||i&&i.getShallow("fontSize")||12)+"px",e.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))},FY.updateProps=at,FY.initProps=function(t,e,n,i,r){ot(!1,t,e,n,i,r)},FY.getTransform=function(t,e){for(var n=i.identity([]);t&&t!==e;)i.mul(n,t.getLocalTransform(),n),t=t.parent;return n},FY.applyTransform=st,FY.transformDirection=function(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=st(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"},FY.groupTransition=function(e,n,i,o){if(e&&n){var a,s=(a={},e.traverse((function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)})),a);n.traverse((function(t){if(!t.isGroup&&t.anid){var e=s[t.anid];if(e){var n=l(t);t.attr(l(e)),at(t,n,i,t.dataIndex)}}}))}function l(e){var n={position:r.clone(e.position),rotation:e.rotation};return e.shape&&(n.shape=t.extend({},e.shape)),n}},FY.clipPointsByRect=function(e,n){return t.map(e,(function(t){var e=t[0];e=I(e,n.x),e=T(e,n.x+n.width);var i=t[1];return i=I(i,n.y),[e,i=T(i,n.y+n.height)]}))},FY.clipRectByRect=function(t,e){var n=I(t.x,e.x),i=T(t.x+t.width,e.x+e.width),r=I(t.y,e.y),o=T(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}},FY.createIcon=function(e,n,i){var r=(n=t.extend({rectHover:!0},n)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(r.image=e.slice(8),t.defaults(r,i),new s(n)):R(e.replace("path://",""),n,i,"center")},FY.linePolygonIntersect=function(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=0&&i.push(e)})),i}(s.originalDeps=n(a),e);s.entryCount=l.length,0===s.entryCount&&o.push(a),t.each(l,(function(e){t.indexOf(s.predecessor,e)<0&&s.predecessor.push(e);var n=i(r,e);t.indexOf(n.successor,e)<0&&n.successor.push(a)}))})),{graph:r,noEntryList:o}}(r),l=s.graph,u=s.noEntryList,h={};for(t.each(e,(function(t){h[t]=!0}));u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(o.call(a,c,d.originalDeps.slice()),delete h[c]),t.each(d.successor,p?g:f)}t.each(h,(function(){throw new Error("Circle dependency may exists")}))}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){h[t]=!0,f(t)}}},FX}var HX,WX={},UX={};function YX(){if(HX)return UX;HX=1;var t=bW(),e=1e-4,n=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function i(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}return UX.linearMap=function(t,e,n,i){var r=e[1]-e[0],o=n[1]-n[0];if(0===r)return 0===o?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]},UX.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n},UX.round=function(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t},UX.asc=function(t){return t.sort((function(t,e){return t-e})),t},UX.getPrecision=function(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n},UX.getPrecisionSafe=function(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r},UX.getPixelPrecision=function(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20},UX.getPercentWithPrecision=function(e,n,i){if(!e[n])return 0;var r=t.reduce(e,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var o=Math.pow(10,i),a=t.map(e,(function(t){return(isNaN(t)?0:t)/r*o*100})),s=100*o,l=t.map(a,(function(t){return Math.floor(t)})),u=t.reduce(l,(function(t,e){return t+e}),0),h=t.map(a,(function(t,e){return t-l[e]}));uc&&(c=h[p],d=p);++l[d],h[d]=0,++u}return l[n]/o},UX.MAX_SAFE_INTEGER=9007199254740991,UX.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},UX.isRadianAroundZero=function(t){return t>-1e-4&&t=-20?+t.toFixed(n<0?-n:0):t},UX.quantile=function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r},UX.reformIntervals=function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0},UX}var ZX,XX,jX,qX,KX,$X,JX,QX,tj,ej,nj={};function ij(){if(ZX)return nj;ZX=1;var t=bW(),e=eY(),n=YX(),i=t.normalizeCssArray,r=/([&<>"'])/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"};function a(t){return null==t?"":(t+"").replace(r,(function(t,e){return o[e]}))}var s=["a","b","c","d","e","f","g"],l=function(t,e){return"{"+t+(null==e?"":e)+"}"};function u(t,e){return"0000".substr(0,e-(t+="").length)+t}var h=e.truncateText;return nj.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},nj.toCamelCase=function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},nj.normalizeCssArray=i,nj.encodeHTML=a,nj.formatTpl=function(e,n,i){t.isArray(n)||(n=[n]);var r=n.length;if(!r)return"";for(var o=n[0].$vars||[],u=0;u':'':{renderMode:o,content:"{marker"+s+"|} ",style:{color:i}}:""},nj.formatTime=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var r=n.parseDate(e),o=i?"UTC":"",a=r["get"+o+"FullYear"](),s=r["get"+o+"Month"]()+1,l=r["get"+o+"Date"](),h=r["get"+o+"Hours"](),c=r["get"+o+"Minutes"](),d=r["get"+o+"Seconds"](),p=r["get"+o+"Milliseconds"]();return t=t.replace("MM",u(s,2)).replace("M",s).replace("yyyy",a).replace("yy",a%100).replace("dd",u(l,2)).replace("d",l).replace("hh",u(h,2)).replace("h",h).replace("mm",u(c,2)).replace("m",c).replace("ss",u(d,2)).replace("s",d).replace("SSS",u(p,3))},nj.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},nj.truncateText=h,nj.getTextBoundingRect=function(t){return e.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},nj.getTextRect=function(t,n,i,r,o,a,s,l){return e.getBoundingRect(t,n,i,r,o,l,a,s)},nj.windowOpen=function(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location=t}else window.open(t,e)},nj}function rj(){if(XX)return WX;XX=1;var t=bW(),e=kU(),n=YX().parsePercent,i=ij(),r=t.each,o=["left","right","top","bottom","width","height"],a=[["width","left","right"],["height","top","bottom"]];function s(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.position,p=l.getBoundingRect(),f=e.childAt(u+1),g=f&&f.getBoundingRect();if("horizontal"===t){var v=p.width+(g?-g.x+p.x:0);(h=o+v)>i||l.newline?(o=0,h=v,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var m=p.height+(g?-g.y+p.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=p.width):s=Math.max(s,p.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=h+n:a=c+n)}))}var l=s,u=t.curry(s,"vertical"),h=t.curry(s,"horizontal");function c(t,r,o){o=i.normalizeCssArray(o||0);var a=r.width,s=r.height,l=n(t.left,a),u=n(t.top,s),h=n(t.right,a),c=n(t.bottom,s),d=n(t.width,a),p=n(t.height,s),f=o[2]+o[0],g=o[1]+o[3],v=t.aspect;switch(isNaN(d)&&(d=a-h-g-l),isNaN(p)&&(p=s-c-f-u),null!=v&&(isNaN(d)&&isNaN(p)&&(v>a/s?d=.8*a:p=.8*s),isNaN(d)&&(d=v*p),isNaN(p)&&(p=d/v)),isNaN(l)&&(l=a-h-d-g),isNaN(u)&&(u=s-c-p-f),t.left||t.right){case"center":l=a/2-d/2-o[3];break;case"right":l=a-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-p/2-o[0];break;case"bottom":u=s-p-f}l=l||0,u=u||0,isNaN(d)&&(d=a-g-l-(h||0)),isNaN(p)&&(p=s-f-u-(c||0));var m=new e(l+o[3],u+o[0],d,p);return m.margin=o,m}function d(t,e){return e&&t&&r(o,(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}return WX.LOCATION_PARAMS=o,WX.HV_NAMES=a,WX.box=l,WX.vbox=u,WX.hbox=h,WX.getAvailableSize=function(t,e,r){var o=e.width,a=e.height,s=n(t.x,o),l=n(t.y,a),u=n(t.x2,o),h=n(t.y2,a);return(isNaN(s)||isNaN(parseFloat(t.x)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.x2)))&&(u=o),(isNaN(l)||isNaN(parseFloat(t.y)))&&(l=0),(isNaN(h)||isNaN(parseFloat(t.y2)))&&(h=a),r=i.normalizeCssArray(r||0),{width:Math.max(u-s-r[1]-r[3],0),height:Math.max(h-l-r[0]-r[2],0)}},WX.getLayoutRect=c,WX.positionElement=function(n,i,r,o,a){var s=!a||!a.hv||a.hv[0],l=!a||!a.hv||a.hv[1],u=a&&a.boundingMode||"all";if(s||l){var h;if("raw"===u)h="group"===n.type?new e(0,0,+i.width||0,+i.height||0):n.getBoundingRect();else if(h=n.getBoundingRect(),n.needLocalTransform()){var d=n.getLocalTransform();(h=h.clone()).applyTransform(d)}i=c(t.defaults({width:h.width,height:h.height},i),r,o);var p=n.position,f=s?i.x-h.x:0,g=l?i.y-h.y:0;n.attr("position","raw"===u?[f,g]:[p[0]+f,p[1]+g])}},WX.sizeCalculable=function(t,e){return null!=t[a[e][0]]||null!=t[a[e][1]]&&null!=t[a[e][2]]},WX.mergeLayoutParam=function(e,n,i){!t.isObject(i)&&(i={});var o=i.ignoreSize;!t.isArray(o)&&(o=[o,o]);var s=u(a[0],0),l=u(a[1],1);function u(t,i){var a={},s=0,l={},u=0;if(r(t,(function(t){l[t]=e[t]})),r(t,(function(t){h(n,t)&&(a[t]=l[t]=n[t]),c(a,t)&&s++,c(l,t)&&u++})),o[i])return c(n,t[1])?l[t[2]]=null:c(n,t[2])&&(l[t[1]]=null),l;if(2!==u&&s){if(s>=2)return a;for(var d=0;d=0;a--)o=t.merge(o,n[a],!0);e.defaultOption=o}return e.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});return r(h,{registerWhenExtend:!0}),n.enableSubTypeDefaulter(h),n.enableTopologicalTravel(h,(function(e){var n=[];return t.each(h.getClassesByMainType(e),(function(t){n=n.concat(t.prototype.dependencies||[])})),n=t.map(n,(function(t){return o(t).main})),"dataset"!==e&&t.indexOf(n,"dataset")<=0&&n.unshift("dataset"),n})),t.mixin(h,l),KX=h}function aj(){if(QX)return JX;QX=1;var t="";"undefined"!=typeof navigator&&(t=navigator.platform||"");var e={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:t.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};return JX=e}function sj(){if(ej)return tj;ej=1;var t=AY(),e=t.makeInner,n=t.normalizeToArray,i=e(),r={clearColorPalette:function(){i(this).colorIdx=0,i(this).colorNameMap={}},getColorFromPalette:function(t,e,r){var o=i(e=e||this),a=o.colorIdx||0,s=o.colorNameMap=o.colorNameMap||{};if(s.hasOwnProperty(t))return s[t];var l=n(this.get("color",!0)),u=this.get("colorLayer",!0),h=null!=r&&u?function(t,e){for(var n=t.length,i=0;ie)return t[i];return t[n-1]}(u,r):l;if((h=h||l)&&h.length){var c=h[a];return t&&(s[t]=c),o.colorIdx=(a+1)%h.length,c}}};return tj=r}var lj,uj,hj,cj,dj,pj,fj,gj,vj,mj,yj,xj,_j,bj,wj,Sj,Mj,Ij,Tj={},Cj={};function Aj(){return lj||(lj=1,Cj.SOURCE_FORMAT_ORIGINAL="original",Cj.SOURCE_FORMAT_ARRAY_ROWS="arrayRows",Cj.SOURCE_FORMAT_OBJECT_ROWS="objectRows",Cj.SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",Cj.SOURCE_FORMAT_UNKNOWN="unknown",Cj.SOURCE_FORMAT_TYPED_ARRAY="typedArray",Cj.SERIES_LAYOUT_BY_COLUMN="column",Cj.SERIES_LAYOUT_BY_ROW="row"),Cj}function Dj(){if(hj)return uj;hj=1;var t=bW(),e=t.createHashMap,n=t.isTypedArray,i=zY().enableClassCheck,r=Aj(),o=r.SOURCE_FORMAT_ORIGINAL,a=r.SERIES_LAYOUT_BY_COLUMN,s=r.SOURCE_FORMAT_UNKNOWN,l=r.SOURCE_FORMAT_TYPED_ARRAY,u=r.SOURCE_FORMAT_KEYED_COLUMNS;function h(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===u?{}:[]),this.sourceFormat=t.sourceFormat||s,this.seriesLayoutBy=t.seriesLayoutBy||a,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&e(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}return h.seriesDataToSource=function(t){return new h({data:t,sourceFormat:n(t)?l:o,fromDataset:!1})},i(h),uj=h}function Lj(){if(cj)return Tj;cj=1,cW().__DEV__;var t=AY(),e=t.makeInner,n=t.getDataItemValue,i=bW(),r=i.createHashMap,o=i.each,a=i.map,s=i.isArray,l=i.isString,u=i.isObject,h=i.isTypedArray,c=i.isArrayLike,d=i.extend;i.assert;var p=Dj(),f=Aj(),g=f.SOURCE_FORMAT_ORIGINAL,v=f.SOURCE_FORMAT_ARRAY_ROWS,m=f.SOURCE_FORMAT_OBJECT_ROWS,y=f.SOURCE_FORMAT_KEYED_COLUMNS,x=f.SOURCE_FORMAT_UNKNOWN,_=f.SOURCE_FORMAT_TYPED_ARRAY,b=f.SERIES_LAYOUT_BY_ROW,w={Must:1,Might:2,Not:3},S=e();function M(t){if(t){var e=r();return a(t,(function(t,n){if(null==(t=d({},u(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=e.get(t.name);return i?t.name+="-"+i.count++:e.set(t.name,{count:1}),t}))}}function I(t,e,n,i){if(null==i&&(i=1/0),e===b)for(var r=0;r=0;i--)f.isIdInner(e[i])&&e.splice(i,1);t[n]=e}})),delete t[_],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var a,s=t.index,l=t.id,u=t.name,h=this._componentsMap.get(e);if(!h||!h.length)return[];if(null!=s)r(s)||(s=[s]),a=n(i(s,(function(t){return h[t]})),(function(t){return!!t}));else if(null!=l){var c=r(l);a=n(h,(function(t){return c&&o(l,t.id)>=0||!c&&t.id===l}))}else if(null!=u){var d=r(u);a=n(h,(function(t){return d&&o(u,t.name)>=0||!d&&t.name===u}))}else a=h.slice();return M(a,t)},findComponents:function(t){var e,i,r,o,a,s=t.query,l=t.mainType,u=(i=l+"Index",r=l+"Id",o=l+"Name",!(e=s)||null==e[i]&&null==e[r]&&null==e[o]?null:{mainType:l,index:e[i],id:e[r],name:e[o]}),h=u?this.queryComponents(u):this._componentsMap.get(l);return a=M(h,t),t.filter?n(a,t.filter):a},eachComponent:function(t,n,i){var r=this._componentsMap;if("function"==typeof t)i=n,n=t,r.each((function(t,r){e(t,(function(t,e){n.call(i,r,t,e)}))}));else if(s(t))e(r.get(t),n,i);else if(a(t)){var o=this.findComponents(t);e(o,n,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return n(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return n(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,n){e(this._seriesIndices,(function(e){var i=this._componentsMap.get("series")[e];t.call(n,i,e)}),this)},eachRawSeries:function(t,n){e(this._componentsMap.get("series"),t,n)},eachSeriesByType:function(t,n,i){e(this._seriesIndices,(function(e){var r=this._componentsMap.get("series")[e];r.subType===t&&n.call(i,r,e)}),this)},eachRawSeriesByType:function(t,n,i){return e(this.getSeriesByType(t),n,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){S(this,n(this._componentsMap.get("series"),t,e))},restoreData:function(t){var n=this._componentsMap;S(this,n.get("series"));var i=[];n.each((function(t,e){i.push(e)})),v.topologicalTravel(i,v.getAllClassMainTypes(),(function(i,r){e(n.get(i),(function(e){("series"!==i||!function(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}(e,t))&&e.restoreData()}))}))}});function w(t){this.option={},this.option[_]=1,this._componentsMap=l({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(t,n){var i=t.color&&!t.colorLayer;e(n,(function(e,n){"colorLayer"===n&&i||v.hasClass(n)||("object"==typeof e?t[n]=t[n]?c(t[n],e,!1):h(e):null==t[n]&&(t[n]=e))}))}(t,this._theme.option),c(t,m,!1),this.mergeOption(t)}function S(t,e){t._seriesIndicesMap=l(t._seriesIndices=i(e,(function(t){return t.componentIndex}))||[])}function M(t,e){return e.hasOwnProperty("subType")?n(t,(function(t){return t.subType===e.subType})):t}return p(b,y),dj=b}function Pj(){if(gj)return fj;gj=1;var t=bW(),e=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];return fj=function(n){t.each(e,(function(e){this[e]=t.bind(n[e],n)}),this)}}function Oj(){if(mj)return vj;mj=1;var t=bW(),e={};function n(){this._coordinateSystems=[]}return n.prototype={constructor:n,create:function(n,i){var r=[];t.each(e,(function(t,e){var o=t.create(n,i);r=r.concat(o||[])})),this._coordinateSystems=r},update:function(e,n){t.each(this._coordinateSystems,(function(t){t.update&&t.update(e,n)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},n.register=function(t,n){e[t]=n},n.get=function(t){return e[t]},vj=n}function Rj(){if(xj)return yj;xj=1;var t=bW(),e=AY(),n=oj(),i=t.each,r=t.clone,o=t.map,a=t.merge,s=/^(min|max)?(.+)$/;function l(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function u(e,n,r){var o,a,s=[],l=[],u=e.timeline;if(e.baseOption&&(a=e.baseOption),(u||e.options)&&(a=a||{},s=(e.options||[]).slice()),e.media){a=a||{};var h=e.media;i(h,(function(t){t&&t.option&&(t.query?l.push(t):o||(o=t))}))}return a||(a=e),a.timeline||(a.timeline=u),i([a].concat(s).concat(t.map(l,(function(t){return t.option}))),(function(t){i(n,(function(e){e(t,r)}))})),{baseOption:a,timelineOptions:s,mediaDefault:o,mediaList:l}}function h(e,n,i){var r={width:n,height:i,aspectratio:n/i},o=!0;return t.each(e,(function(t,e){var n=e.match(s);if(n&&n[1]&&n[2]){var i=n[1],a=n[2].toLowerCase();(function(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e})(r[a],t,i)||(o=!1)}})),o}return l.prototype={constructor:l,setOption:function(s,l){s&&t.each(e.normalizeToArray(s.series),(function(e){e&&e.data&&t.isTypedArray(e.data)&&t.setAsPrimitive(e.data)})),s=r(s);var h,c,d=this._optionBackup,p=u.call(this,s,l,!d);this._newBaseOption=p.baseOption,d?(h=d.baseOption,c=p.baseOption,i(c=c||{},(function(t,i){if(null!=t){var r=h[i];if(n.hasClass(i)){t=e.normalizeToArray(t),r=e.normalizeToArray(r);var s=e.mappingToExists(r,t);h[i]=o(s,(function(t){return t.option&&t.exist?a(t.exist,t.option,!0):t.exist||t.option}))}else h[i]=a(r,t,!0)}})),p.timelineOptions.length&&(d.timelineOptions=p.timelineOptions),p.mediaList.length&&(d.mediaList=p.mediaList),p.mediaDefault&&(d.mediaDefault=p.mediaDefault)):this._optionBackup=p},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=o(e.timelineOptions,r),this._mediaList=o(e.mediaList,r),this._mediaDefault=r(e.mediaDefault),this._currentMediaIndices=[],r(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=r(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,n,i=this._api.getWidth(),a=this._api.getHeight(),s=this._mediaList,l=this._mediaDefault,u=[],c=[];if(!s.length&&!l)return c;for(var d=0,p=s.length;d=0;f--){var g=t[f];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var v=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&v>0||d<=0&&v<0){d+=v,p=v;break}}}return i[0]=d,i[1]=p,i}));a.hostModel.setData(l),e.data=l}))}return Mj=function(t){var n=e();t.eachSeries((function(t){var e=t.get("stack");if(e){var i=n.get(e)||n.set(e,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),n.each(i)}}var zj,Vj,Bj,Fj={};function Gj(){if(zj)return Fj;zj=1,cW().__DEV__;var t=bW();t.isTypedArray;var e=t.extend;t.assert;var n=t.each,i=t.isObject,r=AY(),o=r.getDataItemValue,a=r.isDataItemOption,s=YX().parseDate,l=Dj(),u=Aj(),h=u.SOURCE_FORMAT_TYPED_ARRAY,c=u.SOURCE_FORMAT_ARRAY_ROWS,d=u.SOURCE_FORMAT_ORIGINAL,p=u.SOURCE_FORMAT_OBJECT_ROWS;function f(t,n){l.isInstance(t)||(t=l.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,r=t.sourceFormat;r===h&&(this._offset=0,this._dimSize=n,this._data=i);var o=v[r===c?r+"_"+t.seriesLayoutBy:r];e(this,o)}var g=f.prototype;g.pure=!1,g.persistent=!0,g.getSource=function(){return this._source};var v={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:x},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i=1)&&(t=1),t}l===h&&u===c||(n="reset"),(this._dirty||"reset"===n)&&(this._dirty=!1,s=function(t,n){var i,r;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!n&&t._reset&&((i=t._reset(t.context))&&i.progress&&(r=i.forceFirstProgress,i=i.progress),e(i)&&!i.length&&(i=null)),t._progress=i,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),r}(this,r)),this._modBy=h,this._modDataCount=c;var p=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,g=Math.min(null!=p?this._dueIndex+p:1/0,this._dueEnd);if(!r&&(s||f1&&i>0?s:a}};return o;function a(){return e=t?null:o":"\n",d="richText"===u,p={},f=0;function g(t){return{renderMode:u,content:r(o(t)),style:p}}var v=this.getData(),m=v.mapDimension("defaultedTooltip",!0),x=m.length,_=this.getRawValue(e),b=t.isArray(_),w=v.getItemVisual(e,"color");t.isObject(w)&&w.colorStops&&(w=(w.colorStops[0]||{}).color),w=w||"transparent";var S=x>1||b&&!x?function(s){var l=t.reduce(s,(function(t,e,n){var i=v.getDimensionInfo(n);return t|(i&&!1!==i.tooltip&&null!=i.displayName)}),0),c=[];function g(t,e){var s=v.getDimensionInfo(e);if(s&&!1!==s.otherDims.tooltip){var g=s.type,m="sub"+h.seriesIndex+"at"+f,y=a({color:w,type:"subItem",renderMode:u,markerId:m}),x="string"==typeof y?y:y.content,_=(l?x+r(s.displayName||"-")+": ":"")+r("ordinal"===g?t+"":"time"===g?n?"":i("yyyy/MM/dd hh:mm:ss",t):o(t));_&&c.push(_),d&&(p[m]=w,++f)}}m.length?t.each(m,(function(t){g(y(v,e,t),t)})):t.each(s,g);var x=l?d?"\n":"
":"",_=x+c.join(x||", ");return{renderMode:u,content:_,style:p}}(_):g(x?y(v,e,m[0]):b?_[0]:_),M=S.content,I=h.seriesIndex+"at"+f,T=a({color:w,type:"item",renderMode:u,markerId:I});p[I]=w,++f;var C=v.getName(e),A=this.name;s.isNameSpecified(this)||(A=""),A=A?r(A)+(n?": ":c):"";var D="string"==typeof T?T:T.content;return{html:n?D+A+M:A+D+(C?r(C)+": "+M:M),markers:p}},isAnimationEnabled:function(){if(e.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=u.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function b(e){var n=e.name;s.isNameSpecified(e)||(e.name=function(e){var n=e.getRawData(),i=n.mapDimension("seriesName",!0),r=[];return t.each(i,(function(t){var e=n.getDimensionInfo(t);e.displayName&&r.push(e.displayName)})),r.join(" ")}(e)||n)}function w(t){return t.model.getRawData().count()}function S(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),M}function M(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function I(e,n){t.each(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,t.curry(T,n))}))}function T(t){var e=C(t);e&&e.setOutputEnd(this.count())}function C(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}return t.mixin(_,h),t.mixin(_,u),Uj=_}function eq(){if(Xj)return Zj;Xj=1;var t=PU(),e=GX(),n=zY(),i=function(){this.group=new t,this.uid=e.getUID("viewComponent")},r=i.prototype={constructor:i,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};return r.updateView=r.updateLayout=r.updateVisual=function(t,e,n,i){},n.enableClassExtend(i),n.enableClassManagement(i,{registerWhenExtend:!0}),Zj=i}function nq(){if(qj)return jj;qj=1;var t=AY().makeInner;return jj=function(){var e=t();return function(t){var n=e(t),i=t.pipelineContext,r=n.large,o=n.progressiveRender,a=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(r^a||o^s)&&"reset"}},jj}function iq(){if($j)return Kj;$j=1;var t=bW().each,e=PU(),n=GX(),i=zY(),r=AY(),o=zX(),a=Qj().createTask,s=nq(),l=r.makeInner(),u=s();function h(){this.group=new e,this.uid=n.getUID("viewChart"),this.renderTask=a({plan:f,reset:g}),this.renderTask.context={view:this}}h.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){p(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){p(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var c=h.prototype;function d(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!o.isHighDownDispatcher(t)))for(var i=0,r=t.childCount();i=0?c():h=setTimeout(c,-r),l=i};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}return xq.throttle=i,xq.createOrUpdate=function(r,o,a,s){var l=r[o];if(l){var u=l[t]||l,h=l[n];if(l[e]!==a||h!==s){if(null==a||!s)return r[o]=u;(l=r[o]=i(u,a,"debounce"===s))[t]=u,l[n]=s,l[e]=a}return l}},xq.clear=function(e,n){var i=e[n];i&&i[t]&&(e[n]=i[t])},xq}function bq(){if(aq)return oq;aq=1;var t=RX(),e=bW().isFunction,n={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,i){var r=n.getData(),o=(n.visualColorAccessPath||"itemStyle.color").split("."),a=n.get(o),s=!e(a)||a instanceof t?null:a;a&&!s||(a=n.getColorFromPalette(n.name,null,i.getSeriesCount())),r.setVisual("color",a);var l=(n.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),u=n.get(l);if(r.setVisual("borderColor",u),!i.isSeriesFiltered(n))return s&&r.each((function(t){r.setItemVisual(t,"color",s(n.getDataParams(t)))})),{dataEach:r.hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.get(o,!0),r=n.get(l,!0);null!=i&&t.setItemVisual(e,"color",i),null!=r&&t.setItemVisual(e,"borderColor",r)}:null}}};return oq=n}function wq(){return lq?sq:(lq=1,sq={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}})}function Sq(){if(hq)return uq;hq=1;var t=bW(),e=wq(),n=Gj().retrieveRawValue;return uq=function(i,r){var o=r.getModel("aria");if(o.get("show"))if(o.get("description"))i.setAttribute("aria-label",o.get("description"));else{var a=0;r.eachSeries((function(t,e){++a}),this);var s,l=o.get("data.maxCount")||10,u=o.get("series.maxCount")||10,h=Math.min(a,u);if(!(a<1)){var c=function(){var t=r.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}();s=c?p(f("general.withTitle"),{title:c}):f("general.withoutTitle");var d=[];s+=p(f(a>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:a}),r.eachSeries((function(t,i){if(i1?"multiple":"single")+".";r=p(r=f(o?s+"withName":s+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(y=t.subType,e.series.typeNames[y]||"自定义图")});var u=t.getData();window.data=u,u.count()>l?r+=p(f("data.partialData"),{displayCnt:l}):r+=f("data.allData");for(var c=[],g=0;gn.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},d.getPipeline=function(t){return this._pipelineMap.get(t)},d.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},d.restorePipelines=function(t){var e=this,n=e._pipelineMap=r();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),M(e,t,t.dataTask)}))},d.prepareStageTasks=function(){var t=this._stageTaskMap,n=this.ecInstance.getModel(),i=this.api;e(this._allHandlers,(function(o){var s=t.get(o.uid)||t.set(o.uid,[]);o.reset&&function(t,e,n,i,o){var s=n.seriesTaskMap||(n.seriesTaskMap=r()),l=e.seriesType,u=e.getTargetSeries;function h(n){var r=n.uid,l=s.get(r)||s.set(r,a({plan:x,reset:_,count:S}));l.context={model:n,ecModel:i,api:o,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},M(t,n,l)}e.createOnAllSeries?i.eachRawSeries(h):l?i.eachRawSeriesByType(l,h):u&&u(i,o).each(h);var c=t._pipelineMap;s.each((function(t,e){c.get(e)||(t.dispose(),s.removeKey(e))}))}(this,o,s,n,i),o.overallReset&&function(t,n,i,o,s){var l=i.overallTask=i.overallTask||a({reset:g});l.context={ecModel:o,api:s,overallReset:n.overallReset,scheduler:t};var u=l.agentStubMap=l.agentStubMap||r(),h=n.seriesType,c=n.getTargetSeries,d=!0,p=n.modifyOutputEnd;function f(e){var n=e.uid,i=u.get(n);i||(i=u.set(n,a({reset:v,onDirty:y})),l.dirty()),i.context={model:e,overallProgress:d,modifyOutputEnd:p},i.agent=l,i.__block=d,M(t,e,i)}h?o.eachRawSeriesByType(h,f):c?c(o,s).each(f):(d=!1,e(o.getSeries(),f));var m=t._pipelineMap;u.each((function(t,e){m.get(e)||(t.dispose(),l.dirty(),u.removeKey(e))}))}(this,o,s,n,i)}),this)},d.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,M(this,e,r)},d.performDataProcessorTasks=function(t,e){p(this,this._dataProcessorHandlers,t,e,{block:!0})},d.performVisualTasks=function(t,e,n){p(this,this._visualHandlers,t,e,n)},d.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},d.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))};var f=d.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function g(t){t.overallReset(t.ecModel,t.api,t.payload)}function v(t,e){return t.overallProgress&&m}function m(){this.agent.dirty(),this.getDownstream().dirty()}function y(){this.agent&&this.agent.dirty()}function x(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function _(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=h(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?n(e,(function(t,e){return w(e)})):b}var b=w(0);function w(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o=4&&(u={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(u&&null!=s&&null!=l&&(h=O(u,s,l),!n.ignoreViewBox)){var p=o;(o=new t).add(p),p.scale=h.scale.slice(),p.position=h.position.slice()}return n.ignoreRootClip||null==s||null==l||o.setClipPath(new r({shape:{x:0,y:0,width:s,height:l}})),{root:o,width:s,height:l,viewBoxRect:u,viewBoxTransform:h}},w.prototype._parseNode=function(t,e){var n,i,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(i=M[r]){var o=i.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else(i=S[r])&&(n=i.call(this,t,e),e.add(n));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},w.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,r=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(r)}var o=new n({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});I(e,o),A(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var s=o.getBoundingRect();return this._textX+=s.width,e.add(o),o};var S={g:function(e,n){var i=new t;return I(n,i),A(e,i,this._defs),i},rect:function(t,e){var n=new r;return I(e,n),A(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new i;return I(e,n),A(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new a;return I(e,n),A(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new o;return I(e,n),A(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=T(n));var i=new l({shape:{points:n||[]}});return I(e,i),A(t,i,this._defs),i},polyline:function(t,e){var n=new s;I(e,n),A(t,n,this._defs);var i=t.getAttribute("points");return i&&(i=T(i)),new u({shape:{points:i||[]}})},image:function(t,n){var i=new e;return I(n,i),A(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(e,n){var i=e.getAttribute("x")||0,r=e.getAttribute("y")||0,o=e.getAttribute("dx")||0,a=e.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(r)+parseFloat(a);var s=new t;return I(n,s),A(e,s,this._defs),s},tspan:function(e,n){var i=e.getAttribute("x"),r=e.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=r&&(this._textY=parseFloat(r));var o=e.getAttribute("dx")||0,a=e.getAttribute("dy")||0,s=new t;return I(n,s),A(e,s,this._defs),this._textX+=o,this._textY+=a,s},path:function(t,e){var n=t.getAttribute("d")||"",i=p(n);return I(e,i),A(t,i,this._defs),i}},M={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),o=new h(e,n,i,r);return function(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}(t,o),o},radialgradient:function(t){}};function I(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),m(e.__inheritedStyle,t.__inheritedStyle))}function T(t){for(var e=y(t).split(_),n=[],i=0;i0;o-=2){var a=r[o],s=r[o-1];switch(i=i||d.create(),s){case"translate":a=y(a).split(_),d.translate(i,i,[parseFloat(a[0]),parseFloat(a[1]||0)]);break;case"scale":a=y(a).split(_),d.scale(i,i,[parseFloat(a[0]),parseFloat(a[1]||a[0])]);break;case"rotate":a=y(a).split(_),d.rotate(i,i,parseFloat(a[0]));break;case"skew":a=y(a).split(_),console.warn("Skew transform is not supported yet");break;case"matrix":a=y(a).split(_),i[0]=parseFloat(a[0]),i[1]=parseFloat(a[1]),i[2]=parseFloat(a[2]),i[3]=parseFloat(a[3]),i[4]=parseFloat(a[4]),i[5]=parseFloat(a[5])}}e.setLocalTransform(i)}}(t,e),v(r,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};for(P.lastIndex=0;null!=(i=P.exec(e));)r[i[1]]=i[2];for(var o in C)C.hasOwnProperty(o)&&null!=r[o]&&(n[C[o]]=r[o]);return n}(t)),!i))for(var a in C)if(C.hasOwnProperty(a)){var s=t.getAttribute(a);null!=s&&(r[C[a]]=s)}var l=o?"textFill":"fill",u=o?"textStroke":"stroke";e.style=e.style||new c;var h=e.style;null!=r.fill&&h.set(l,L(r.fill,n)),null!=r.stroke&&h.set(u,L(r.stroke,n)),x(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){var e="lineWidth"===t&&o?"textStrokeWidth":t;null!=r[t]&&h.set(e,parseFloat(r[t]))})),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),x(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=r[t]&&h.set(t,r[t])})),r.lineDash&&(e.style.lineDash=y(r.lineDash).split(_)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=r}var D=/url\(\s*#(.*?)\)/;function L(t,e){var n=e&&t&&t.match(D);return n?e[y(n[1])]:t}var k=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,P=/([^\s:;]+)\s*:\s*([^:;]+)/g;function O(t,e,n){var i=e/t.width,r=n/t.height,o=Math.min(i,r);return{scale:[o,o],position:[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+n/2]}}return Oq.parseXML=b,Oq.makeViewBoxTransform=O,Oq.parseSVG=function(t,e){return(new w).parse(t,e)},Oq}function Eq(){if(Pq)return kq;Pq=1,cW().__DEV__;var t=bW(),e=t.createHashMap,n=t.isString,i=t.isArray,r=t.each;t.assert;var o=Nq().parseXML,a=e(),s={registerMap:function(t,e,n){var o;return i(e)?o=e:e.svg?o=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),o=[{type:"geoJSON",source:e,specialAreas:n}]),r(o,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,l[e])(t)})),a.set(t,o)},retrieveMap:function(t){return a.get(t)}},l={geoJSON:function(t){var e=t.source;t.geoJSON=n(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=o(t.source)}};return kq=s}var zq,Vq,Bq={},Fq={};function Gq(){if(Vq)return zq;function t(t){return t}function e(e,n,i,r,o){this._old=e,this._new=n,this._oldKeyGetter=i||t,this._newKeyGetter=r||t,this.context=o}function n(t,e,n,i,r){for(var o=0;o65535?d:f}var v=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],m=["_extent","_approximateExtent","_rawExtent"];function y(e,n){t.each(v.concat(n.__wrappedMethods||[]),(function(t){n.hasOwnProperty(t)&&(e[t]=n[t])})),e.__wrappedMethods=n.__wrappedMethods,t.each(m,(function(i){e[i]=t.clone(n[i])})),e._calculationInfo=t.extend(n._calculationInfo)}var x=function(e,n){e=e||["x","y"];for(var i={},r=[],o={},a=0;a=0?this._indices[t]:-1}function T(t,e){var n=t._idList[e];return null==n&&(n=S(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n}function C(e){return t.isArray(e)||(e=[e]),e}function A(e,n){var i=e.dimensions,r=new x(t.map(i,e.getDimensionInfo,e),e.hostModel);y(r,e);for(var o=r._storage={},a=e._storage,s=0;s=0?(o[l]=D(a[l]),r._rawExtent[l]=[1/0,-1/0],r._extent[l]=null):o[l]=a[l])}return r}function D(t){for(var e,n,i=new Array(t.length),r=0;rx[1]&&(x[1]=y)}e&&(this._nameList[d]=e[p])}this._rawCount=this._count=l,this._extent={},w(this)},_._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,i=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=a.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,f=0;fT[1]&&(T[1]=I)}if(!r.pure){var C=u[m];if(v&&null==C)if(null!=v.name)u[m]=C=v.name;else if(null!=n){var A=a[n],D=o[A][y];if(D){C=D[x];var L=l[A].ordinalMeta;L&&L.categories.length&&(C=L.categories[C])}}var k=null==v?null:v.id;null==k&&null!=C&&(d[C]=d[C]||0,k=C,d[C]>0&&(k+="__ec__"+d[C]),d[C]++),null!=k&&(h[m]=k)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},w(this)}},_.count=function(){return this._count},_.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){r=new e(n);for(var i=0;i=0&&e=0&&ea&&(a=l)}return i=[o,a],this._extent[t]=i,i},_.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},_.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},_.getCalculationInfo=function(t){return this._calculationInfo[t]},_.setCalculationInfo=function(e,n){u(e)?t.extend(this._calculationInfo,e):this._calculationInfo[e]=n},_.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},_.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var r=1/0,o=-1,a=0,s=0,l=this.count();s=0&&o<0)&&(r=h,o=u,a=0),u===o&&(i[a++]=s))}return i.length=a,i},_.getRawIndex=M,_.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=l&&w<=u||isNaN(w))&&(o[a++]=c),c++;h=!0}else if(2===i){d=this._storage[s];var y=this._storage[e[1]],x=t[e[1]][0],_=t[e[1]][1];for(p=0;p=l&&w<=u||isNaN(w))&&(S>=x&&S<=_||isNaN(S))&&(o[a++]=c),c++}}h=!0}}if(!h)if(1===i)for(m=0;m=l&&w<=u||isNaN(w))&&(o[a++]=T)}else for(m=0;mt[A][1])&&(C=!1)}C&&(o[a++]=this.getRawIndex(m))}return aw[1]&&(w[1]=b)}}}return o},_.downSample=function(t,e,n,i){for(var r=A(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(g(this))(u),p=0,f=0;fu-f&&(s=u-f,a.length=s);for(var v=0;vc[1]&&(c[1]=_),d[p++]=b}return r._count=p,r._indices=d,r.getRawIndex=I,r},_.getItemModel=function(t){var n=this.hostModel;return new e(this.getRawDataItem(t),n,n&&n.ecModel)},_.diff=function(t){var e=this;return new n(t?t.getIndices():[],this.getIndices(),(function(e){return T(t,e)}),(function(t){return T(e,t)}))},_.getVisual=function(t){var e=this._visual;return e&&e[t]},_.setVisual=function(t,e){if(u(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},_.setLayout=function(t,e){if(u(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},_.getLayout=function(t){return this._layout[t]},_.getItemLayout=function(t){return this._itemLayouts[t]},_.setItemLayout=function(e,n,i){this._itemLayouts[e]=i?t.extend(this._itemLayouts[e]||{},n):n},_.clearItemLayouts=function(){this._itemLayouts.length=0},_.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},_.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,u(e))for(var o in e)e.hasOwnProperty(o)&&(i[o]=e[o],r[o]=!0);else i[e]=n,r[e]=!0},_.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var L=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};return _.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(L,e)),this._graphicEls[t]=e},_.getItemGraphicEl=function(t){return this._graphicEls[t]},_.eachItemGraphicEl=function(e,n){t.each(this._graphicEls,(function(t,i){t&&e&&e.call(n,t,i)}))},_.cloneShallow=function(e){if(!e){var n=t.map(this.dimensions,this.getDimensionInfo,this);e=new x(n,this.hostModel)}if(e._storage=this._storage,y(e,this),this._indices){var i=this._indices.constructor;e._indices=new i(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?I:M,e},_.wrapMethod=function(e,n){var i=this[e];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=i.apply(this,arguments);return n.apply(this,[e].concat(t.slice(arguments)))})},_.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],_.CHANGABLE_METHODS=["filterSelf","selectRange"],Yq=x}function eK(){if(jq)return Xq;jq=1;var t=bW(),e=t.createHashMap,n=t.each,i=t.isString,r=t.defaults,o=t.extend,a=t.isObject,s=t.clone,l=AY().normalizeToArray,u=Lj(),h=u.guessOrdinal,c=u.BE_ORDINAL,d=Dj(),p=Jq().OTHER_DIMENSIONS,f=Qq();function g(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}var v=function(t,u,v){d.isInstance(u)||(u=d.seriesDataToSource(u)),v=v||{},t=(t||[]).slice();for(var m=(v.dimsDef||[]).slice(),y=e(),x=e(),_=[],b=function(t,e,i,r){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,r||0);return n(e,(function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))})),o}(u,t,m,v.dimCount),w=0;w=e[0]&&t<=e[1]},e.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},e.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e.prototype.getLabel=null,t.enableClassExtend(e),t.enableClassManagement(e,{registerWhenExtend:!0}),cK=e}function xK(){if(fK)return pK;fK=1;var t=bW(),e=t.createHashMap,n=t.isObject,i=t.map;function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}r.createByAxisModel=function(t){var e=t.option,n=e.data,o=n&&i(n,s);return new r({categories:o,needCollect:!o,deduplication:!1!==e.dedplication})};var o=r.prototype;function a(t){return t._map||(t._map=e(t.categories))}function s(t){return n(t)&&null!=t.value?t.value:t+""}return o.getOrdinal=function(t){return a(this).get(t)},o.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=a(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},pK=r}var _K,bK,wK,SK={};function MK(){if(_K)return SK;_K=1;var t=YX(),e=t.round;function n(e){return t.getPrecisionSafe(e)+2}function i(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function r(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),i(t,0,e),i(t,1,e),t[0]>t[1]&&(t[0]=t[1])}return SK.intervalScaleNiceTicks=function(i,o,a,s){var l={},u=i[1]-i[0],h=l.interval=t.nice(u/o,!0);null!=a&&hs&&(h=l.interval=s);var c=l.intervalPrecision=n(h);return r(l.niceTickExtent=[e(Math.ceil(i[0]/h)*h,c),e(Math.floor(i[1]/h)*h,c)],i),l},SK.getIntervalPrecision=n,SK.fixExtent=r,SK}function IK(){if(wK)return bK;wK=1;var t=YX(),e=ij(),n=yK(),i=MK(),r=t.round,o=n.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),o.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=i.getIntervalPrecision(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;n[0]1e4)return[];var l=a.length?a[a.length-1]:i[1];return n[1]>l&&(t?a.push(r(l+e,o)):a.push(n[1])),a},getMinorTicks:function(e){for(var n=this.getTicks(!0),i=[],r=this.getExtent(),o=1;or[0]&&c0&&(a=null===a?l:Math.min(a,l))}i[r]=a}}return i}(n),r=[];return t.each(n,(function(t){var n,o=t.coordinateSystem.getBaseAxis(),l=o.getExtent();if("category"===o.type)n=o.getBandWidth();else if("value"===o.type||"time"===o.type){var u=o.dim+"_"+o.index,h=i[u],c=Math.abs(l[1]-l[0]),d=o.scale.getExtent(),p=Math.abs(d[1]-d[0]);n=h?c/p*h:c}else{var f=t.getData();n=Math.abs(l[1]-l[0])/f.count()}var g=e(t.get("barWidth"),n),v=e(t.get("barMaxWidth"),n),m=e(t.get("barMinWidth")||1,n),y=t.get("barGap"),x=t.get("barCategoryGap");r.push({bandWidth:n,barWidth:g,barMaxWidth:v,barMinWidth:m,barGap:y,barCategoryGap:x,axisKey:s(o),stackId:a(t)})})),h(r)}function h(n){var i={};t.each(n,(function(t,e){var n=t.axisKey,r=t.bandWidth,o=i[n]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;i[n]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var r={};return t.each(i,(function(n,i){r[i]={};var o=n.stacks,a=n.bandWidth,s=e(n.categoryGap,a),l=e(n.gap,1),u=n.remainedWidth,h=n.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),t.each(o,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width)i=t.width,e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--;else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var d,p=0;t.each(o,(function(t,e){t.width||(t.width=c),d=t,p+=t.width*(1+l)})),d&&(p-=d.width*l);var f=-p/2;t.each(o,(function(t,e){r[i][e]=r[i][e]||{bandWidth:a,offset:f,width:t.width},f+=t.width*(1+l)}))})),r}function c(t,e,n){if(t&&e){var i=t[s(e)];return null!=i&&null!=n&&(i=i[a(n)]),i}}var d={seriesType:"bar",plan:i(),reset:function(t){if(p(t)&&f(t)){var e=t.getData(),n=t.coordinateSystem,i=n.grid.getRect(),r=n.getBaseAxis(),a=n.getOtherAxis(r),s=e.mapDimension(a.dim),l=e.mapDimension(r.dim),h=a.isHorizontal(),d=h?0:1,v=c(u([t]),r,t).width;return v>.5||(v=.5),{progress:function(t,e){for(var r,u=t.count,c=new o(2*u),p=new o(2*u),f=new o(u),m=[],y=[],x=0,_=0;null!=(r=t.next());)y[d]=e.get(s,r),y[1-d]=e.get(l,r),m=n.dataToPoint(y,null,m),p[x]=h?i.x+i.width:m[0],c[x++]=m[0],p[x]=h?m[1]:i.y+i.height,c[x++]=m[1],f[_++]=r;e.setLayout({largePoints:c,largeDataIndices:f,largeBackgroundPoints:p,barWidth:v,valueAxisStart:g(0,a),backgroundStart:h?i.x:i.y,valueAxisHorizontal:h})}}}}};function p(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function f(t){return t.pipelineContext&&t.pipelineContext.large}function g(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}return RK.getLayoutOnAxis=function(e){var n=[],i=e.axis,o="axis0";if("category"===i.type){for(var a=i.getBandWidth(),s=0;s=0?"p":"n",k=_;y&&(h[l][D]||(h[l][D]={p:_,n:_}),k=h[l][D][L]),x?(S=k,M=(C=i.dataToPoint([A,D]))[1]+c,I=C[0]-_,T=d,Math.abs(I)0;)r*=10;var o=[n.round(u(e[0]/r)*r),n.round(l(e[1]/r)*r)];this._interval=r,this._niceExtent=o}},niceExtent:function(t){o.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function p(t,e){return s(t,a(e))}return t.each(["contain","normalize"],(function(t){d.prototype[t]=function(e){return e=c(e)/c(this.base),r[t].call(this,e)}})),d.create=function(){return new d},DK=d}function zK(){if(kK)return mK;kK=1,cW().__DEV__;var t=bW(),e=function(){if(vK)return gK;vK=1;var t=bW(),e=yK(),n=xK(),i=e.prototype,r=e.extend({type:"ordinal",init:function(e,i){e&&!t.isArray(e)||(e=new n({categories:e})),this._ordinalMeta=e,this._extent=i||[0,e.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),i.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return i.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(i.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:t.noop,niceExtent:t.noop});return r.create=function(){return new r},gK=r}(),n=IK(),i=yK(),r=YX(),o=NK(),a=o.prepareLayoutBarSeries,s=o.makeColumnLayout,l=o.retrieveColumnLayout,u=kU();function h(e,n){var i,o,u,h=e.type,c=n.getMin(),d=n.getMax(),p=e.getExtent();"ordinal"===h?i=n.getCategories().length:(o=n.get("boundaryGap"),t.isArray(o)||(o=[o||0,o||0]),"boolean"==typeof o[0]&&(o=[0,0]),o[0]=r.parsePercent(o[0],1),o[1]=r.parsePercent(o[1],1),u=p[1]-p[0]||Math.abs(p[0])),"dataMin"===c?c=p[0]:"function"==typeof c&&(c=c({min:p[0],max:p[1]})),"dataMax"===d?d=p[1]:"function"==typeof d&&(d=d({min:p[0],max:p[1]}));var f=null!=c,g=null!=d;null==c&&(c="ordinal"===h?i?0:NaN:p[0]-o[0]*u),null==d&&(d="ordinal"===h?i?i-1:NaN:p[1]+o[1]*u),(null==c||!isFinite(c))&&(c=NaN),(null==d||!isFinite(d))&&(d=NaN),e.setBlank(t.eqNaN(c)||t.eqNaN(d)||"ordinal"===h&&!e.getOrdinalMeta().categories.length),n.getNeedCrossZero()&&(c>0&&d>0&&!f&&(c=0),c<0&&d<0&&!g&&(d=0));var v=n.ecModel;if(v&&"time"===h){var m,y=a("bar",v);if(t.each(y,(function(t){m|=t.getBaseAxis()===n.axis})),m){var x=s(y),_=function(e,n,i,r){var o=i.axis.getExtent(),a=o[1]-o[0],s=l(r,i.axis);if(void 0===s)return{min:e,max:n};var u=1/0;t.each(s,(function(t){u=Math.min(t.offset,u)}));var h=-1/0;t.each(s,(function(t){h=Math.max(t.offset+t.width,h)})),u=Math.abs(u),h=Math.abs(h);var c=u+h,d=n-e,p=d/(1-(u+h)/a)-d;return{min:e-=p*(u/c),max:n+=p*(h/c)}}(c,d,n,x);c=_.min,d=_.max}}return{extent:[c,d],fixMin:f,fixMax:g}}function c(t){var e,n=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof n?(e=n,n=function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}):"function"==typeof n?function(e,r){return null!=i&&(r=e-i),n(d(t,e),r)}:function(e){return t.scale.getLabel(e)}}function d(t,e){return"category"===t.type?t.scale.getLabel(e):e}function p(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,o=i.height,a=r*Math.abs(Math.cos(n))+Math.abs(o*Math.sin(n)),s=r*Math.abs(Math.sin(n))+Math.abs(o*Math.cos(n));return new u(i.x,i.y,a,s)}function f(t){var e=t.get("interval");return null==e?"auto":e}return function(){if(AK)return CK;AK=1;var t=bW(),e=YX(),n=ij(),i=MK(),r=IK(),o=r.prototype,a=Math.ceil,s=Math.floor,l=1e3,u=6e4,h=36e5,c=864e5,d=r.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return n.formatTime(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var n=this._extent;if(n[0]===n[1]&&(n[0]-=c,n[1]+=c),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-c}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(n[0]=e.round(s(n[0]/r)*r)),t.fixMax||(n[1]=e.round(a(n[1]/r)*r))},niceTicks:function(t,n,r){t=t||10;var o=this._extent,l=o[1]-o[0],u=l/t;null!=n&&ur&&(u=r);var h=p.length,c=function(t,e,n,i){for(;n>>1;t[r][1]0&&i>0||n<0&&i<0)},mK.makeLabelFormatter=c,mK.getAxisRawValue=d,mK.estimateLabelUnionRect=function(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,o="category"===t.type,a=n.getExtent();r=o?n.count():(i=n.getTicks()).length;var s,l=t.getLabelModel(),u=c(t),h=1;r>40&&(h=Math.ceil(r/40));for(var d=0;d>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}return ZK=function(i,r){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,r=0;r0})),(function(n){var i=n.properties,o=n.geometry,a=o.coordinates,s=[];"Polygon"===o.type&&s.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===o.type&&t.each(a,(function(t){t[0]&&s.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var l=new e(i[r||"name"],s,i.cp);return l.properties=i,l}))},ZK}var JK,QK,t$,e$,n$,i$={};function r$(){if(JK)return i$;JK=1;var t=bW(),e=eY(),n=AY().makeInner,i=zK(),r=i.makeLabelFormatter,o=i.getOptionCategoryInterval,a=i.shouldShowAllLabels,s=n();function l(e,n){var i,r,a=u(e,"labels"),l=o(n),f=h(a,l);return f||(t.isFunction(l)?i=p(e,l):(r="auto"===l?function(t){var e=s(t).autoInterval;return null!=e?e:s(t).autoInterval=t.calculateCategoryInterval()}(e):l,i=d(e,r)),c(a,l,{labels:i,labelCategoryInterval:r}))}function u(t,e){return s(t)[e]||(s(t)[e]=[])}function h(t,e){for(var n=0;n1&&d/h>2&&(c=Math.round(Math.ceil(c/h)*h));var p=a(t),f=l.get("showMinLabel")||p,g=l.get("showMaxLabel")||p;f&&c!==s[0]&&m(s[0]);for(var v=c;v<=s[1];v+=h)m(v);function m(t){u.push(n?t:{formattedLabel:i(t),rawLabel:o.getLabel(t),tickValue:t})}return g&&v-h!==s[1]&&m(s[1]),u}function p(e,n,i){var o=e.scale,a=r(e),s=[];return t.each(o.getTicks(),(function(t){var e=o.getLabel(t);n(t,e)&&s.push(i?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})})),s}return i$.createAxisLabels=function(e){return"category"===e.type?function(t){var e=t.getLabelModel(),n=l(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var n=e.scale.getTicks(),i=r(e);return{labels:t.map(n,(function(t,n){return{formattedLabel:i(t,n),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},i$.createAxisTicks=function(e,n){return"category"===e.type?function(e,n){var i,r,a=u(e,"ticks"),s=o(n),f=h(a,s);if(f)return f;if(n.get("show")&&!e.scale.isBlank()||(i=[]),t.isFunction(s))i=p(e,s,!0);else if("auto"===s){var g=l(e,e.getLabelModel());r=g.labelCategoryInterval,i=t.map(g.labels,(function(t){return t.tickValue}))}else i=d(e,r=s,!0);return c(a,s,{ticks:i,tickCategoryInterval:r})}(e,n):{ticks:e.scale.getTicks()}},i$.calculateCategoryInterval=function(t){var n=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),i=r(t),o=(n.axisRotate-n.labelRotate)/180*Math.PI,a=t.scale,l=a.getExtent(),u=a.count();if(l[1]-l[0]<1)return 0;var h=1;u>40&&(h=Math.max(1,Math.floor(u/40)));for(var c=l[0],d=t.dataToCoord(c+1)-t.dataToCoord(c),p=Math.abs(d*Math.cos(o)),f=Math.abs(d*Math.sin(o)),g=0,v=0;c<=l[1];c+=h){var m,y,x=e.getBoundingRect(i(c),n.font,"center","top");m=1.3*x.width,y=1.3*x.height,g=Math.max(g,m,7),v=Math.max(v,y,7)}var _=g/p,b=v/f;isNaN(_)&&(_=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(_,b))),S=s(t.model),M=t.getExtent(),I=S.lastAutoInterval,T=S.lastTickCount;return null!=I&&null!=T&&Math.abs(I-w)<=1&&Math.abs(T-u)<=1&&I>w&&S.axisExtend0===M[0]&&S.axisExtend1===M[1]?w=I:(S.lastTickCount=u,S.lastAutoInterval=w,S.axisExtend0=M[0],S.axisExtend1=M[1]),w},i$}function o$(){if(t$)return QK;t$=1;var t=bW(),e=t.each,n=t.map,i=YX(),r=i.linearMap,o=i.getPixelPrecision,a=i.round,s=r$(),l=s.createAxisTicks,u=s.createAxisLabels,h=s.calculateCategoryInterval,c=[0,1],d=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function p(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}return d.prototype={constructor:d,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return o(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&p(n=n.slice(),i.count()),r(t,c,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&p(n=n.slice(),i.count());var o=r(t,n,c,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var i=(t=t||{}).tickModel||this.getTickModel(),r=l(this,i).ticks,o=n(r,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this);return function(t,n,i,r){var o=n.length;if(t.onBand&&!i&&o){var s,l,u=t.getExtent();if(1===o)n[0].coord=u[0],s=n[1]={coord:u[0]};else{var h=n[o-1].tickValue-n[0].tickValue,c=(n[o-1].coord-n[0].coord)/h;e(n,(function(t){t.coord-=c/2})),l=1+t.scale.getExtent()[1]-n[o-1].tickValue,s={coord:n[o-1].coord+c*l},n.push(s)}var d=u[0]>u[1];p(n[0].coord,u[0])&&(r?n[0].coord=u[0]:n.shift()),r&&p(u[0],n[0].coord)&&n.unshift({coord:u[0]}),p(u[1],s.coord)&&(r?s.coord=u[1]:n.pop()),r&&p(s.coord,u[1])&&n.push({coord:u[1]})}function p(t,e){return t=a(t),e=a(e),d?t>e:t0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return n(e,(function(t){return n(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},getViewLabels:function(){return u(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return h(this)}},QK=d}function a$(){if(e$)return Bq;e$=1;var t=IY();Bq.zrender=t;var e=$W();Bq.matrix=e;var n=AW();Bq.vector=n;var i=bW(),r=sU();Bq.color=r;var o=zX(),a=YX();Bq.number=a;var s=ij();Bq.format=s;var l=_q();l.throttle,Bq.throttle=l.throttle;var u=function(){if(FK)return Fq;FK=1;var t=bW(),e=hK(),n=zK(),i=VK(),r=VX(),o=rj();o.getLayoutRect,Fq.getLayoutRect=o.getLayoutRect;var a=uK(),s=a.enableDataStack,l=a.isDimensionStacked,u=a.getStackedDimension,h=eK();Fq.completeDimensions=h;var c=nK();Fq.createDimensions=c;var d=HK();Fq.createSymbol=d.createSymbol;var p={isDimensionStacked:l,enableDataStack:s,getStackedDimension:u};return Fq.createList=function(t){return e(t.getSource(),t)},Fq.dataStack=p,Fq.createScale=function(e,o){var a=o;r.isInstance(o)||(a=new r(o),t.mixin(a,i));var s=n.createScaleByModel(a);return s.setExtent(e[0],e[1]),n.niceScaleExtent(s,a),s},Fq.mixinAxisModelCommonMethods=function(e){t.mixin(e,i)},Fq}();Bq.helper=u;var h=$K();Bq.parseGeoJSON=h;var c=tK();Bq.List=c;var d=VX();Bq.Model=d;var p=o$();Bq.Axis=p;var f=yW();Bq.env=f;var g=h,v={};i.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){v[t]=i[t]}));var m={};return i.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(t){m[t]=o[t]})),Bq.parseGeoJson=g,Bq.util=v,Bq.graphic=m,Bq}function s$(){return n$||(n$=1,function(t){cW().__DEV__;var e=IY(),n=bW(),i=sU(),r=yW(),o=OU(),a=DW(),s=kj(),l=Pj(),u=Oj(),h=Rj(),c=function(){if(Sj)return wj;Sj=1;var t=bW(),e=t.each,n=t.isArray,i=t.isObject,r=Nj(),o=AY().normalizeToArray;function a(t){e(s,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var s=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],l=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];return wj=function(t,s){r(t,s),t.series=o(t.series),e(t.series,(function(t){if(i(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var n=function(t,e){e=e.split(",");for(var n=t,i=0;i0&&t.unfinished);t.unfinished||this._zr.flush()}}},B.getDom=function(){return this._dom},B.getZr=function(){return this._zr},B.setOption=function(t,e,n){if(this._disposed)this.id;else{var i;if(L(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[O]=!0,!this._model||e){var r=new h(this._api),o=this._theme,a=this._model=new s;a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setOption(t,ot),n?(this[R]={silent:i},this[O]=!1):(H(this),G.update.call(this),this._zr.flush(),this[R]=!1,this[O]=!1,Z.call(this,i),X.call(this,i))}},B.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},B.getModel=function(){return this._model},B.getOption=function(){return this._model&&this._model.getOption()},B.getWidth=function(){return this._zr.getWidth()},B.getHeight=function(){return this._zr.getHeight()},B.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},B.getRenderedCanvas=function(t){if(r.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},B.getSvgDataURL=function(){if(r.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return n.each(e,(function(t){t.stopAnimation(!0)})),t.painter.toDataURL()}},B.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;A(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return A(i,(function(t){t.group.ignore=!1})),o}this.id},B.getConnectedDataURL=function(t){if(this._disposed)this.id;else if(r.canvasSupported){var i="svg"===t.type,o=this.group,a=Math.min,s=Math.max,l=1/0;if(ct[o]){var u=l,h=l,c=-1/0,d=-1/0,p=[],f=t&&t.pixelRatio||1;n.each(ht,(function(e,r){if(e.group===o){var l=i?e.getZr().painter.getSvgDom().innerHTML:e.getRenderedCanvas(n.clone(t)),f=e.getDom().getBoundingClientRect();u=a(f.left,u),h=a(f.top,h),c=s(f.right,c),d=s(f.bottom,d),p.push({dom:l,left:f.left,top:f.top})}}));var g=(c*=f)-(u*=f),v=(d*=f)-(h*=f),y=n.createCanvas(),x=e.init(y,{renderer:i?"svg":"canvas"});if(x.resize({width:g,height:v}),i){var _="";return A(p,(function(t){var e=t.left-u,n=t.top-h;_+=''+t.dom+""})),x.painter.getSvgRoot().innerHTML=_,t.connectedBackgroundColor&&x.painter.setBackgroundColor(t.connectedBackgroundColor),x.refreshImmediately(),x.painter.toDataURL()}return t.connectedBackgroundColor&&x.add(new m.Rect({shape:{x:0,y:0,width:g,height:v},style:{fill:t.connectedBackgroundColor}})),A(p,(function(t){var e=new m.Image({style:{x:t.left*f-u,y:t.top*f-h,image:t.dom}});x.add(e)})),x.refreshImmediately(),y.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},B.convertToPixel=n.curry(F,"convertToPixel"),B.convertFromPixel=n.curry(F,"convertFromPixel"),B.containPixel=function(t,e){if(!this._disposed){var i,r=this._model;return t=y.parseFinder(r,t),n.each(t,(function(t,r){r.indexOf("Models")>=0&&n.each(t,(function(t){var n=t.coordinateSystem;if(n&&n.containPoint)i|=!!n.containPoint(e);else if("seriesModels"===r){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i|=o.containPoint(e,t))}}),this)}),this),!!i}this.id},B.getVisual=function(t,e){var n=this._model,i=(t=y.parseFinder(n,t,{defaultMainType:"series"})).seriesModel.getData(),r=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=r?i.getItemVisual(r,e):i.getVisual(e)},B.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},B.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var G={prepareAndUpdate:function(t){H(this),G.update.call(this,t)},update:function(t){var e=this._model,n=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(e){s.restoreData(e,t),s.performSeriesTasks(e),a.create(e,n),s.performDataProcessorTasks(e,t),U(this,e),a.update(e,n),q(e),s.performVisualTasks(e,t),K(this,e,n,t);var l=e.get("backgroundColor")||"transparent";if(r.canvasSupported)o.setBackgroundColor(l);else{var u=i.parse(l);l=i.stringify(u,"rgb"),0===u[3]&&(l="transparent")}J(e,n)}},updateTransform:function(t){var e=this._model,i=this,r=this._api;if(e){var o=[];e.eachComponent((function(n,a){var s=i.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,e,r,t);l&&l.update&&o.push(s)}else o.push(s)}));var a=n.createHashMap();e.eachSeries((function(n){var o=i._chartsMap[n.__viewId];if(o.updateTransform){var s=o.updateTransform(n,e,r,t);s&&s.update&&a.set(n.uid,1)}else a.set(n.uid,1)})),q(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),$(i,e,0,t,a),J(e,this._api)}},updateView:function(t){var e=this._model;e&&(v.markUpdateMethod(t,"updateView"),q(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),K(this,this._model,this._api,t),J(e,this._api))},updateVisual:function(t){G.update.call(this,t)},updateLayout:function(t){G.update.call(this,t)}};function H(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),j(t,"component",e,n),j(t,"chart",e,n),n.plan()}function W(t,e,i,r,o){var a=t._model;if(r){var s={};s[r+"Id"]=i[r+"Id"],s[r+"Index"]=i[r+"Index"],s[r+"Name"]=i[r+"Name"];var l={mainType:r,query:s};o&&(l.subType=o);var u=i.excludeSeriesId;null!=u&&(u=n.createHashMap(y.normalizeToArray(u))),a&&a.eachComponent(l,(function(e){u&&null!=u.get(e.id)||h(t["series"===r?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else A(t._componentsViews.concat(t._chartsViews),h);function h(n){n&&n.__alive&&n[e]&&n[e](n.__model,a,t._api,i)}}function U(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries((function(t){i.updateStreamModes(t,n[t.__viewId])}))}function Y(t,e){var i=t.type,r=t.escapeConnect,o=nt[i],a=o.actionInfo,s=(a.update||"update").split(":"),l=s.pop();s=null!=s[0]&&k(s[0]),this[O]=!0;var u=[t],h=!1;t.batch&&(h=!0,u=n.map(t.batch,(function(e){return(e=n.defaults(n.extend({},e),t)).batch=null,e})));var c,d=[],p="highlight"===i||"downplay"===i;A(u,(function(t){(c=(c=o.action(t,this._model,this._api))||n.extend({},t)).type=a.event||c.type,d.push(c),p?W(this,l,t,"series"):s&&W(this,l,t,s.main,s.sub)}),this),"none"===l||p||s||(this[R]?(H(this),G.update.call(this,t),this[R]=!1):G[l].call(this,t)),c=h?{type:a.event||i,escapeConnect:r,batch:d}:d[0],this[O]=!1,!e&&this._messageCenter.trigger(c.type,c)}function Z(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Y.call(this,n,t)}}function X(t){!t&&this.trigger("updated")}function j(t,e,n,i){for(var r="component"===e,o=r?t._componentsViews:t._chartsViews,a=r?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;ue.get("hoverLayerThreshold")&&!r.node&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.useHoverLayer=!0}))}}))}(t,e),b(t._zr.dom,e)}function J(t,e){A(at,(function(n){n(t,e)}))}B.resize=function(t){if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[O]=!0,n&&H(this),G.update.call(this),this[O]=!1,Z.call(this,i),X.call(this,i)}}},B.showLoading=function(t,e){if(this._disposed)this.id;else if(L(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),ut[t]){var n=ut[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},B.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},B.makeActionFromEvent=function(t){var e=n.extend({},t);return e.type=it[t.type],e},B.dispatchAction=function(t,e){this._disposed?this.id:(L(e)||(e={silent:!!e}),nt[t.type]&&this._model&&(this[O]?this._pendingActions.push(t):(Y.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&r.browser.weChat&&this._throttledZrFlush(),Z.call(this,e.silent),X.call(this,e.silent))))},B.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},B.on=E("on",!1),B.off=E("off",!1),B.one=E("one",!1);var Q=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function tt(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))}))}function et(){this.eventInfo}B._initEvents=function(){A(Q,(function(t){var e=function(e){var i,r=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var a=o.dataModel||r.getSeriesByIndex(o.seriesIndex);i=a&&a.getDataParams(o.dataIndex,o.dataType,o)||{}}else o&&o.eventData&&(i=n.extend({},o.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:h},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)}),this),A(it,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},B.isDisposed=function(){return this._disposed},B.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},B.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,y.setAttribute(this.getDom(),ft,"");var t=this._api,e=this._model;A(this._componentsViews,(function(n){n.dispose(e,t)})),A(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete ht[this.id]}},n.mixin(V,a),et.prototype={constructor:et,normalizeQuery:function(t){var e={},i={},r={};if(n.isString(t)){var o=k(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};n.each(t,(function(t,n){for(var o=!1,l=0;l0&&h===n.length-u.length){var c=n.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,o=!0)}}s.hasOwnProperty(n)&&(i[n]=t,o=!0),o||(r[n]=t)}))}return{cptQuery:e,dataQuery:i,otherQuery:r}},filter:function(t,e,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,o=i.packedEvent,a=i.model,s=i.view;if(!a||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,a,"mainType")&&h(l,a,"subType")&&h(l,a,"index","componentIndex")&&h(l,a,"name")&&h(l,a,"id")&&h(u,o,"name")&&h(u,o,"dataIndex")&&h(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,o));function h(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},afterTrigger:function(){this.eventInfo=null}};var nt={},it={},rt=[],ot=[],at=[],st=[],lt={},ut={},ht={},ct={},dt=new Date-0,pt=new Date-0,ft="_echarts_instance_";function gt(t){ct[t]=!1}var vt=gt;function mt(t){return ht[y.getAttribute(t,ft)]}function yt(t,e){lt[t]=e}function xt(t){ot.push(t)}function _t(t,e){St(rt,t,e,1e3)}function bt(t,e,n){"function"==typeof e&&(n=e,e="");var i=L(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,C(N.test(i)&&N.test(e)),nt[i]||(nt[i]={action:n,actionInfo:t}),it[e]=i}function wt(t,e){St(st,t,e,3e3,"visual")}function St(t,e,n,i,r){(D(e)||L(e))&&(n=e,e=i);var o=S.wrapStageHandler(n,r);return o.__prio=e,o.__raw=n,t.push(o),o}function Mt(t,e){ut[t]=e}wt(2e3,_),xt(c),_t(900,d),Mt("default",w),bt({type:"highlight",event:"highlight",update:"highlight"},n.noop),bt({type:"downplay",event:"downplay",update:"downplay"},n.noop),yt("light",M),yt("dark",I),t.version="4.9.0",t.dependencies={zrender:"4.3.2"},t.PRIORITY=P,t.init=function(t,e,n){var i=mt(t);if(i)return i;var r=new V(t,e,n);return r.id="ec_"+dt++,ht[r.id]=r,y.setAttribute(t,ft,r.id),function(t){var e="__connectUpdateStatus";function n(t,n){for(var i=0;i0?n=i[0]:i[1]<0&&(n=i[1]),n}(s,r),u=a.dim,h=s.dim,c=i.mapDimension(h),d=i.mapDimension(u),p="x"===h||"radius"===h?1:0,f=e(n.dimensions,(function(t){return i.mapDimension(t)})),g=i.getCalculationInfo("stackResultDimension");return(o|=t(i,f[0]))&&(f[0]=g),(o|=t(i,f[1]))&&(f[1]=g),{dataDimsForPoint:f,valueStart:l,valueAxisDim:h,baseAxisDim:u,stacked:!!o,valueDim:c,baseDim:d,baseDataOffset:p,stackedOverDimension:i.getCalculationInfo("stackedOverDimension")}},S$.getStackedOnPoint=function(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)},S$}function I$(){if(w$)return b$;w$=1;var t=M$(),e=t.prepareDataCoordInfo,n=t.getStackedOnPoint;return b$=function(t,i,r,o,a,s,l,u){for(var h=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,i),c=[],d=[],p=[],f=[],g=[],v=[],m=[],y=e(a,i,l),x=e(s,t,u),_=0;_=r||v<0)break;if(h(y)){if(f){v+=o;continue}break}if(v===n)t[o>0?"moveTo":"lineTo"](y[0],y[1]);else if(d>0){var x=e[g],_="y"===p?1:0,b=(y[_]-x[_])*d;a(l,x),l[_]=x[_]+b,a(u,y),u[_]=y[_]-b,t.bezierCurveTo(l[0],l[1],u[0],u[1],y[0],y[1])}else t.lineTo(y[0],y[1]);g=v,v+=o}return m}function p(t,n,c,d,p,f,g,v,m,y,x){for(var _=0,b=c,w=0;w=p||b<0)break;if(h(S)){if(x){b+=f;continue}break}if(b===c)t[f>0?"moveTo":"lineTo"](S[0],S[1]),a(l,S);else if(m>0){var M=b+f,I=n[M];if(x)for(;I&&h(n[M]);)I=n[M+=f];var T=.5,C=n[_];if(!(I=n[M])||h(I))a(u,S);else{var A,D;if(h(I)&&!x&&(I=S),e.sub(s,I,C),"x"===y||"y"===y){var L="x"===y?0:1;A=Math.abs(S[L]-C[L]),D=Math.abs(S[L]-I[L])}else A=e.dist(S,C),D=e.dist(S,I);o(u,S,s,-m*(1-(T=D/(D+A))))}i(l,l,v),r(l,l,g),i(u,u,v),r(u,u,g),t.bezierCurveTo(l[0],l[1],u[0],u[1],S[0],S[1]),o(l,S,s,m*T)}else t.lineTo(S[0],S[1]);_=b,b+=f}return w}function f(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;ri[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1])}return{min:e?n:i,max:e?i:n}}var g=t.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:n(t.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,o=f(n,e.smoothConstraint);if(e.connectNulls){for(;r>0&&h(n[r-1]);r--);for(;i0&&h(n[o-1]);o--);for(;re&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n1&&("string"==typeof a?l=t[a]:"function"==typeof a&&(l=a),l&&n.setData(o.downSample(o.mapDimension(h.dim),1/p,l,e)))}}}},E$}var W$,U$,Y$,Z$,X$,j$,q$,K$,$$,J$,Q$,tJ,eJ,nJ,iJ,rJ,oJ={};function aJ(){if(Z$)return Y$;Z$=1;var t=bW(),e=kU(),n=function(){if(U$)return W$;U$=1;var t=bW();function e(t){return this._axes[t]}var n=function(t){this._axes={},this._dimList=[],this.name=t||""};return n.prototype={constructor:n,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return t.map(this._dimList,e,this)},getAxesByScale:function(e){return e=e.toLowerCase(),t.filter(this.getAxes(),(function(t){return t.scale.type===e}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;re[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},t.inherits(n,e),X$=n}(),p=Oj(),f=uK().getStackedDimension;function g(t,e,n){return t.getCoordSysModel()===e}function v(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}!function(){if(nJ)return eJ;nJ=1,uJ();var t=oj().extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});eJ=t}();var m=v.prototype;function y(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=n.model,s=a.get("axisLine.onZero"),l=a.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)x(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&x(o[u])&&!i[h(o[u])]){r=o[u];break}r&&(i[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function x(t){return t&&"category"!==t.type&&"time"!==t.type&&l(t)}m.type="grid",m.axisPointerEnabled=!0,m.getRect=function(){return this._rect},m.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),n(i.x,(function(t){u(t.scale,t.model)})),n(i.y,(function(t){u(t.scale,t.model)}));var r={};n(i.x,(function(t){y(i,"y",t,r)})),n(i.y,(function(t){y(i,"x",t,r)})),this.resize(this.model,e)},m.resize=function(t,e,i){var r=o(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;function s(){n(a,(function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?r.x:r.y)}))}s(),!i&&t.get("containLabel")&&(n(a,(function(t){if(!t.model.get("axisLabel.inside")){var e=h(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}})),s())},m.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},m.getAxes=function(){return this._axesList.slice()},m.getCartesian=function(t,n){if(null!=t&&null!=n){var i="x"+t+"y"+n;return this._coordsMap[i]}e(t)&&(n=t.yAxisIndex,t=t.xAxisIndex);for(var r=0,o=this._coordsList;rv[1]?-1:1,b=["start"===c?v[0]-m*f:"end"===c?v[1]+m*f:(v[0]+v[1])/2,S(c)?t.labelOffset+d*f:0],w=n.get("nameRotate");null!=w&&(w=w*g/180),S(c)?s=x(t.rotation,null!=w?w:t.rotation,d):(s=function(t,e,n,i){var r,o,a=h(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return u(a-g/2)?(o=l?"bottom":"top",r="center"):u(a-1.5*g)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*g&&a>g/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}(t,c,w||0,v),null!=(l=t.axisNameAvailableWidth)&&(l=Math.abs(l/Math.sin(s.rotation)),!isFinite(l)&&(l=null)));var M=p.getFont(),I=n.get("nameTruncate",!0)||{},T=I.ellipsis,C=e(t.nameTruncateMaxWidth,I.maxWidth,l),A=null!=T&&null!=C?o.truncateText(r,C,M,T,{minChar:2,placeholder:I.placeholder}):r,D=n.get("tooltip",!0),L=n.mainType,k={componentType:L,name:r,$vars:["name"]};k[L+"Index"]=n.componentIndex;var P=new a.Text({anid:"name",__fullText:r,__truncatedText:A,position:b,rotation:s.rotation,silent:_(n),z2:1,tooltip:D&&D.show?i({content:r,formatter:function(){return r},formatterParams:k},D):null});a.setTextStyle(P.style,p,{text:A,textFont:M,textFill:p.getTextColor()||n.get("axisLine.lineStyle.color"),textAlign:p.get("align")||s.textAlign,textVerticalAlign:p.get("verticalAlign")||s.textVerticalAlign}),n.get("triggerEvent")&&(P.eventData=y(n),P.eventData.targetType="axisName",P.eventData.name=r),this._dumbGroup.add(P),P.updateTransform(),this.group.add(P),P.decomposeTransform()}}},y=v.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},x=v.innerTextLayout=function(t,e,n){var i,r,o=h(e-t);return u(o)?(r=n>0?"top":"bottom",i="center"):u(o-g)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},_=v.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function b(t){t&&(t.ignore=!0)}function w(t,e,n){var i=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(i&&r){var o=d.identity([]);return d.rotate(o,o,-t.rotation),i.applyTransform(d.mul([],o,t.getLocalTransform())),r.applyTransform(d.mul([],o,e.getLocalTransform())),i.intersect(r)}}function S(t){return"middle"===t||"center"===t}function M(t,e,n,i,r){for(var o=[],s=[],l=[],u=0;u=0||e===n}function o(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[s(t)]}function a(t){return!!t.get("handle.show")}function s(t){return t.type+"||"+t.id}return xJ.collect=function(o,l){var u={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(o,l,u){var h=l.getComponent("tooltip"),c=l.getComponent("axisPointer"),d=c.get("link",!0)||[],p=[];n(u.getCoordinateSystems(),(function(u){if(u.axisPointerEnabled){var f=s(u.model),g=o.coordSysAxesInfo[f]={};o.coordSysMap[f]=u;var v=u.model.getModel("tooltip",h);if(n(u.getAxes(),i(_,!1,null)),u.getTooltipAxes&&h&&v.get("show")){var m="axis"===v.get("trigger"),y="cross"===v.get("axisPointer.type"),x=u.getTooltipAxes(v.get("axisPointer.axis"));(m||y)&&n(x.baseAxes,i(_,!y||"cross",m)),y&&n(x.otherAxes,i(_,"cross",!1))}}function _(i,h,f){var m=f.model.getModel("axisPointer",c),y=m.get("show");if(y&&("auto"!==y||i||a(m))){null==h&&(h=m.get("triggerTooltip")),m=i?function(i,r,o,a,s,l){var u=r.getModel("axisPointer"),h={};n(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){h[e]=t.clone(u.get(e))})),h.snap="category"!==i.type&&!!l,"cross"===u.get("type")&&(h.type="line");var c=h.label||(h.label={});if(null==c.show&&(c.show=!1),"cross"===s){var d=u.get("label.show");if(c.show=null==d||d,!l){var p=h.lineStyle=u.get("crossStyle");p&&t.defaults(c,p.textStyle)}}return i.model.getModel("axisPointer",new e(h,o,a))}(f,v,c,l,i,h):m;var x=m.get("snap"),_=s(f.model),b=h||x||"category"===f.type,w=o.axesInfo[_]={key:_,axis:f,coordSys:u,axisPointerModel:m,triggerTooltip:h,involveSeries:b,snap:x,useHandle:a(m),seriesModels:[]};g[_]=w,o.seriesInvolved|=b;var S=function(t,e){for(var n=e.model,i=e.dim,o=0;oh[1]&&h.reverse(),(null==l||l>h[1])&&(l=h[1]),l=0},this.indexOfName=function(e){return t().indexOfName(e)},this.getItemVisual=function(e,n){return t().getItemVisual(e,n)}};return eQ=t}function wQ(){if(lQ)return sQ;lQ=1;var t=s$(),e=bW();return sQ=function(n,i){e.each(i,(function(e){e.update="updateView",t.registerAction(e,(function(t,i){var r={};return i.eachComponent({mainType:"series",subType:n,query:t},(function(n){n[e.method]&&n[e.method](t.name,t.dataIndex);var i=n.getData();i.each((function(t){var e=i.getName(t);r[e]=n.isSelected(e)||!1}))})),{name:t.name,selected:r,seriesId:t.seriesId}}))}))},sQ}function SQ(){if(hQ)return uQ;hQ=1;var t=bW().createHashMap;return uQ=function(e){return{getTargetSeries:function(n){var i={},r=t();return n.eachSeriesByType(e,(function(t){t.__paletteScope=i,r.set(t.uid,t)})),r},reset:function(t,e){var n=t.getRawData(),i={},r=t.getData();r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(e){var o,a=i[e],s=null!=a&&r.getItemVisual(a,"color",!0),l=null!=a&&r.getItemVisual(a,"borderColor",!0);if(s&&l||(o=n.getItemModel(e)),!s){var u=o.get("itemStyle.color")||t.getColorFromPalette(n.getName(e)||e+"",t.__paletteScope,n.count());null!=a&&r.setItemVisual(a,"color",u)}if(!l){var h=o.get("itemStyle.borderColor");null!=a&&r.setItemVisual(a,"borderColor",h)}}))}}},uQ}function MQ(){if(dQ)return cQ;dQ=1;var t=eY(),e=YX().parsePercent,n=Math.PI/180;function i(t,e,n,i,r,o,a,s,l,u){function h(e,n,i,r){for(var o=e;ol+a);o++)if(t[o].y+=i,o>e&&o+1t[o].y+t[o].height)return void c(o,i/2);c(n-1,i/2)}function c(e,n){for(var i=e;i>=0&&!(t[i].y-n0&&t[i].y>t[i-1].y+t[i-1].height));i--);}function d(t,e,n,i,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s=a&&(d=a-10),!e&&d<=a&&(d=a+10),t[s].x=n+d*o,a=d}}t.sort((function(t,e){return t.y-e.y}));for(var p,f=0,g=t.length,v=[],m=[],y=0;y=n?m.push(t[y]):v.push(t[y]);d(v,!1,e,n,i,r),d(m,!0,e,n,i,r)}function r(t){return"center"===t.position}return cQ=function(o,a,s,l,u,h){var c,d,p=o.getData(),f=[],g=!1,v=(o.get("minShowLabelAngle")||0)*n;p.each((function(n){var i=p.getItemLayout(n),r=p.getItemModel(n),l=r.getModel("label"),h=l.get("position")||r.get("emphasis.label.position"),m=l.get("distanceToLabelLine"),y=l.get("alignTo"),x=e(l.get("margin"),s),_=l.get("bleedMargin"),b=l.getFont(),w=r.getModel("labelLine"),S=w.get("length");S=e(S,s);var M=w.get("length2");if(M=e(M,s),!(i.angle0?"right":"left":L>0?"left":"right"}var G=l.get("rotate");P="number"==typeof G?G*(Math.PI/180):G?L<0?-D+Math.PI:-D:0,g=!!P,i.label={x:I,y:T,position:h,height:R.height,len:S,len2:M,linePoints:C,textAlign:A,verticalAlign:"middle",rotation:P,inside:N,labelDistance:m,labelAlignTo:y,labelMargin:x,bleedMargin:_,textRect:R,text:O,font:b},N||f.push(i.label)}})),!g&&o.get("avoidLabelOverlap")&&function(e,n,o,a,s,l,u,h){for(var c=[],d=[],p=Number.MAX_VALUE,f=-Number.MAX_VALUE,g=0;g3?1.4:r>1?1.2:1.1;h(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a})}if(n){var l=Math.abs(i);h(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a})}}}function u(t){i.isTaken(this._zr,"globalPan")||h(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function h(t,e,i,r,o){t.pointerChecker&&t.pointerChecker(r,o.originX,o.originY)&&(n.stop(r.event),c(t,e,i,r,o))}function c(e,n,i,r,o){o.isAvailableBehavior=t.bind(d,null,i,r),e.trigger(n,o)}function d(e,n,i){var r=i[e];return!e||r&&(!t.isString(r)||n.event[r+"Key"])}return t.mixin(r,e),w0=r}var C0,A0={};function D0(){return C0||(C0=1,A0.updateViewOnPan=function(t,e,n){var i=t.target,r=i.position;r[0]+=e,r[1]+=n,i.dirty()},A0.updateViewOnZoom=function(t,e,n,i){var r=t.target,o=t.zoomLimit,a=r.position,s=r.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var u=o.min||0,h=o.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,a[0]-=(n-a[0])*(c-1),a[1]-=(i-a[1])*(c-1),s[0]*=c,s[1]*=c,r.dirty()}),A0}var L0,k0,P0,O0,R0,N0={};function E0(){if(L0)return N0;L0=1;var t={axisPointer:1,tooltip:1,brush:1};return N0.onIrrelevantElement=function(e,n,i){var r=n.getComponentByElement(e.topTarget),o=r&&r.coordinateSystem;return r&&r!==i&&!t[r.mainType]&&o&&o.model!==i},N0}function z0(){if(P0)return k0;P0=1;var t=bW(),e=T0(),n=D0(),i=E0().onIrrelevantElement,r=zX(),o=_0(),a=GX().getUID,s=JW();function l(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function u(e,n){n.eachChild((function(n){t.each(n.__regions,(function(t){n.trigger(e.isSelected(t.name)?"emphasis":"normal")}))}))}function h(t,n){var i=new r.Group;this.uid=a("ec_map_draw"),this._controller=new e(t.getZr()),this._controllerHost={target:n?i:null},this.group=i,this._updateGroup=n,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new r.Group),i.add(this._backgroundGroup=new r.Group)}return h.prototype={constructor:h,draw:function(e,n,i,o,a){var h="geo"===e.mainType,c=e.getData&&e.getData();h&&n.eachComponent({mainType:"series",subType:"map"},(function(t){c||t.getHostGeoModel()!==e||(c=t.getData())}));var d=e.coordinateSystem;this._updateBackground(d);var p,f=this._regionsGroup,g=this.group,v=d.getTransformInfo(),m=!f.childAt(0)||a;if(m)g.transform=v.roamTransform,g.decomposeTransform(),g.dirty();else{var y=new s;y.transform=v.roamTransform,y.decomposeTransform();var x={scale:y.scale,position:y.position};p=y.scale,r.updateProps(g,x,e)}var _=v.rawScale,b=v.rawPosition;f.removeAll();var w=["itemStyle"],S=["emphasis","itemStyle"],M=["label"],I=["emphasis","label"],T=t.createHashMap();t.each(d.regions,(function(n){var i=T.get(n.name)||T.set(n.name,new r.Group),o=new r.CompoundPath({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(o);var a,s=(z=e.getRegionModel(n.name)||e).getModel(w),u=z.getModel(S),d=l(s),v=l(u),y=z.getModel(M),x=z.getModel(I);if(c){a=c.indexOfName(n.name);var C=c.getItemVisual(a,"color",!0);C&&(d.fill=C)}var A=function(t){return[t[0]*_[0]+b[0],t[1]*_[1]+b[1]]};t.each(n.geometries,(function(t){if("polygon"===t.type){for(var e=[],n=0;n=0)&&(O=e);var N=new r.Text({position:A(n.center.slice()),scale:[1/g.scale[0],1/g.scale[1]],z2:10,silent:!0});if(r.setLabelStyle(N.style,N.hoverStyle={},y,x,{labelFetcher:O,labelDataIndex:R,defaultText:n.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!m){var E=[1/p[0],1/p[1]];r.updateProps(N,{scale:E},e)}i.add(N)}if(c)c.setItemGraphicEl(a,i);else{var z=e.getRegionModel(n.name);o.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:n.name,region:z&&z.option||{}}}(i.__regions||(i.__regions=[])).push(n),i.highDownSilentOnTouch=!!e.get("selectedMode"),r.setHoverStyle(i,v),f.add(i)})),this._updateController(e,n,i),function(e,n,i,r,o){i.off("click"),i.off("mousedown"),n.get("selectedMode")&&(i.on("mousedown",(function(){e._mouseDownFlag=!0})),i.on("click",(function(a){if(e._mouseDownFlag){e._mouseDownFlag=!1;for(var s=a.target;!s.__regions;)s=s.parent;if(s){var l={type:("geo"===n.mainType?"geo":"map")+"ToggleSelect",batch:t.map(s.__regions,(function(t){return{name:t.name,from:o.uid}}))};l[n.mainType+"Id"]=n.id,r.dispatchAction(l),u(n,i)}}})))}(this,e,f,i,o),u(e,f)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&o.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var n=e.map;this._mapName!==n&&t.each(o.makeGraphic(n,this.uid),(function(t){this._backgroundGroup.add(t)}),this),this._mapName=n},_updateController:function(e,r,o){var a=e.coordinateSystem,s=this._controller,l=this._controllerHost;l.zoomLimit=e.get("scaleLimit"),l.zoom=a.getZoom(),s.enable(e.get("roam")||!1);var u=e.mainType;function h(){var t={type:"geoRoam",componentType:u};return t[u+"Id"]=e.id,t}s.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,n.updateViewOnPan(l,e.dx,e.dy),o.dispatchAction(t.extend(h(),{dx:e.dx,dy:e.dy}))}),this),s.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,n.updateViewOnZoom(l,e.scale,e.originX,e.originY),o.dispatchAction(t.extend(h(),{zoom:e.scale,originX:e.originX,originY:e.originY})),this._updateGroup){var i=this.group.scale;this._regionsGroup.traverse((function(t){"text"===t.type&&t.attr("scale",[1/i[0],1/i[1]])}))}}),this),s.setPointerChecker((function(t,n,r){return a.getViewRectAfterRoam().contain(n,r)&&!i(t,o,e)}))}},k0=h}var V0,B0,F0,G0,H0,W0,U0,Y0,Z0,X0,j0,q0,K0,$0,J0,Q0,t1,e1={},n1={};function i1(){return V0||(V0=1,n1.updateCenterAndZoom=function(t,e,n){var i=t.getZoom(),r=t.getCenter(),o=e.zoom,a=t.dataToPoint(r);if(null!=e.dx&&null!=e.dy&&(a[0]-=e.dx,a[1]-=e.dy,r=t.pointToData(a),t.setCenter(r)),null!=o){if(n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(i*o,l),s)/i}t.scale[0]*=o,t.scale[1]*=o;var u=t.position,h=(e.originX-u[0])*(o-1),c=(e.originY-u[1])*(o-1);u[0]-=h,u[1]-=c,t.updateTransform(),r=t.pointToData(a),t.setCenter(r),t.setZoom(o*i)}return{center:t.getCenter(),zoom:t.getZoom()}}),n1}function r1(){if(B0)return e1;B0=1;var t=s$(),e=bW(),n=i1().updateCenterAndZoom;return t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(t,i){var r=t.componentType||"series";i.eachComponent({mainType:r,query:t},(function(i){var o=i.coordinateSystem;if("geo"===o.type){var a=n(o,t,i.get("scaleLimit"));i.setCenter&&i.setCenter(a.center),i.setZoom&&i.setZoom(a.zoom),"series"===r&&e.each(i.seriesGroup,(function(t){t.setCenter(a.center),t.setZoom(a.zoom)}))}}))})),e1}function o1(){if(G0)return F0;G0=1;var t=bW(),e=AW(),n=$W(),i=kU(),r=JW(),o=e.applyTransform;function a(){r.call(this)}function s(t){this.name=t,this.zoomLimit,r.call(this),this._roamTransformable=new a,this._rawTransformable=new a,this._center,this._zoom}function l(t,e,n,i){var r=n.seriesModel,o=r?r.coordinateSystem:null;return o===this?o[t](i):null}return t.mixin(a,r),s.prototype={constructor:s,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,r){return this._rect=new i(t,e,n,r),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,r){this.transformTo(t,e,n,r),this._viewRect=new i(t,e,n,r)},transformTo:function(t,e,n,r){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new i(t,e,n,r)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,i=this.getDefaultCenter(),r=this.getCenter(),o=this.getZoom();r=e.applyTransform([],r,t),i=e.applyTransform([],i,t),n.origin=r,n.position=[i[0]-r[0],i[1]-r[1]],n.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),n.copy(this.transform||(this.transform=[]),e.transform||n.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],n.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,i=this._rawTransformable;return{roamTransform:e?t.slice(e):n.create(),rawScale:t.slice(i.scale),rawPosition:t.slice(i.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,n,i){var r=n?this._rawTransform:this.transform;return i=i||[],r?o(i,t,r):e.copy(i,t)},pointToData:function(t){var e=this.invTransform;return e?o([],t,e):[t[0],t[1]]},convertToPixel:t.curry(l,"dataToPoint"),convertFromPixel:t.curry(l,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},t.mixin(s,r),F0=s}function a1(){if(Y0)return U0;Y0=1,cW().__DEV__;var t=s$(),e=bW(),n=function(){if(W0)return H0;W0=1;var t=bW(),e=kU(),n=o1(),i=_0();function r(t,e,r,o){n.call(this,t),this.map=e;var a=i.load(e,r);this._nameCoordMap=a.nameCoordMap,this._regionsMap=a.regionsMap,this._invertLongitute=null==o||o,this.regions=a.regions,this._rect=a.boundingRect}function o(t,e,n,i){var r=n.geoModel,o=n.seriesModel,a=r?r.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return a===this?a[t](i):null}return r.prototype={constructor:r,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,n=0;n1?(g.width=h,g.height=h/p):(g.height=h,g.width=h*p),g.y=u[1]-g.height/2,g.x=u[0]-g.width/2}else(s=t.getBoxLayoutParams()).aspect=p,g=i.getLayoutRect(s,{width:c,height:d});this.setViewRect(g.x,g.y,g.width,g.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function l(t,n){e.each(n.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}var u={dimensions:n.prototype.dimensions,create:function(t,i){var r=[];t.eachComponent("geo",(function(t,e){var o=t.get("map"),u=t.get("aspectScale"),h=!0,c=a.retrieveMap(o);c&&c[0]&&"svg"===c[0].type?(null==u&&(u=1),h=!1):null==u&&(u=.75);var d=new n(o+e,o,t.get("nameMap"),h);d.aspectScale=u,d.zoomLimit=t.get("scaleLimit"),r.push(d),l(d,t),t.coordinateSystem=d,d.model=t,d.resize=s,d.resize(t,i)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=r[e]}}));var o={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();o[e]=o[e]||[],o[e].push(t)}})),e.each(o,(function(t,o){var a=e.map(t,(function(t){return t.get("nameMap")})),u=new n(o,o,e.mergeAll(a));u.zoomLimit=e.retrieve.apply(null,e.map(t,(function(t){return t.get("scaleLimit")}))),r.push(u),u.resize=s,u.aspectScale=t[0].get("aspectScale"),u.resize(t[0],i),e.each(t,(function(t){t.coordinateSystem=u,l(u,t)}))})),r},getFilledRegions:function(t,n,i){for(var r=(t||[]).slice(),a=e.createHashMap(),s=0;se&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},o.prototype={constructor:o,type:"tree",eachNode:function(t,e,n){this.root.eachNode(t,e,n)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n=0;r--){var o=n[r];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},i.push(o)}},S1.firstWalk=function(t,o){var a=t.isExpand?t.children:[],s=t.parentNode.children,l=t.hierNode.i?s[t.hierNode.i-1]:null;if(a.length){!function(t){for(var e=t.children,n=e.length,i=0,r=0;--n>=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var u=(a[0].hierNode.prelim+a[a.length-1].hierNode.prelim)/2;l?(t.hierNode.prelim=l.hierNode.prelim+o(t,l),t.hierNode.modifier=t.hierNode.prelim-u):t.hierNode.prelim=u}else l&&(t.hierNode.prelim=l.hierNode.prelim+o(t,l));t.parentNode.hierNode.defaultAncestor=function(t,o,a,s){if(o){for(var l=t,u=t,h=u.parentNode.children[0],c=o,d=l.hierNode.modifier,p=u.hierNode.modifier,f=h.hierNode.modifier,g=c.hierNode.modifier;c=e(c),u=n(u),c&&u;){l=e(l),h=n(h),l.hierNode.ancestor=t;var v=c.hierNode.prelim+g-u.hierNode.prelim-p+s(c,u);v>0&&(r(i(c,t,a),t,v),p+=v,d+=v),g+=c.hierNode.modifier,p+=u.hierNode.modifier,d+=l.hierNode.modifier,f+=h.hierNode.modifier}c&&!e(l)&&(l.hierNode.thread=c,l.hierNode.modifier+=g-d),u&&!n(h)&&(h.hierNode.thread=u,h.hierNode.modifier+=p-f,a=t)}return a}(t,l,t.parentNode.hierNode.defaultAncestor||s[0],o)},S1.secondWalk=function(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier},S1.separation=function(t){return arguments.length?t:o},S1.radialCoordinate=function(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n},S1.getViewRect=function(e,n){return t.getLayoutRect(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},S1}var I1,T1,C1,A1,D1,L1={},k1={};function P1(){if(A1)return C1;A1=1;var t=(T1||(T1=1,k1.eachAfter=function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s=0;o--)i.push(r[o])}}),k1),e=t.eachAfter,n=t.eachBefore,i=M1(),r=i.init,o=i.firstWalk,a=i.secondWalk,s=i.separation,l=i.radialCoordinate,u=i.getViewRect;return C1=function(t,i){t.eachSeriesByType("tree",(function(t){!function(t,i){var h=u(t,i);t.layoutInfo=h;var c=t.get("layout"),d=0,p=0,f=null;"radial"===c?(d=2*Math.PI,p=Math.min(h.height,h.width)/2,f=s((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(d=h.width,p=h.height,f=s());var g=t.getData().tree.root,v=g.children[0];if(v){r(g),e(v,o,f),g.hierNode.modifier=-v.hierNode.prelim,n(v,a);var m=v,y=v,x=v;n(v,(function(t){var e=t.getLayout().x;ey.getLayout().x&&(y=t),t.depth>x.depth&&(x=t)}));var _=m===y?1:f(m,y)/2,b=_-m.getLayout().x,w=0,S=0,M=0,I=0;if("radial"===c)w=d/(y.getLayout().x+_+b),S=p/(x.depth-1||1),n(v,(function(t){M=(t.getLayout().x+b)*w,I=(t.depth-1)*S;var e=l(M,I);t.setLayout({x:e.x,y:e.y,rawX:M,rawY:I},!0)}));else{var T=t.getOrient();"RL"===T||"LR"===T?(S=p/(y.getLayout().x+_+b),w=d/(x.depth-1||1),n(v,(function(t){I=(t.getLayout().x+b)*S,M="LR"===T?(t.depth-1)*w:d-(t.depth-1)*w,t.setLayout({x:M,y:I},!0)}))):"TB"!==T&&"BT"!==T||(w=d/(y.getLayout().x+_+b),S=p/(x.depth-1||1),n(v,(function(t){M=(t.getLayout().x+b)*w,I="TB"===T?(t.depth-1)*S:p-(t.depth-1)*S,t.setLayout({x:M,y:I},!0)})))}}}(t,i)}))},C1}var O1,R1,N1,E1,z1,V1={},B1={};function F1(){if(O1)return B1;O1=1;var t=bW();function e(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}return B1.retrieveTargetInfo=function(e,n,i){if(e&&t.indexOf(n,e.type)>=0){var r=i.getData().tree.root,o=e.targetNode;if("string"==typeof o&&(o=r.getNodeById(o)),o&&r.contains(o))return{node:o};var a=e.targetNodeId;if(null!=a&&(o=r.getNodeById(a)))return{node:o}}},B1.getPathToRoot=e,B1.aboveViewRoot=function(n,i){var r=e(n);return t.indexOf(r,i)>=0},B1.wrapTreePathInfo=function(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n},B1}var G1,H1,W1,U1,Y1,Z1,X1,j1,q1,K1,$1,J1={},Q1={};function t2(){if(Z1)return Y1;Z1=1;var t=bW(),e=sU(),n=YX().linearMap,i=t.each,r=t.isObject,o=-1,a=function(e){var n=e.mappingMethod,r=e.type,a=this.option=t.clone(e);this.type=r,this.mappingMethod=n,this._normalizeData=m[n];var u=s[r];this.applyVisual=u.applyVisual,this.getColorMapper=u.getColorMapper,this._doMap=u._doMap[n],"piecewise"===n?(l(a),function(e){var n=e.pieceList;e.hasSpecialVisual=!1,t.each(n,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(a)):"category"===n?a.categories?function(e){var n=e.categories,r=e.visual,a=e.categoryMap={};if(i(n,(function(t,e){a[t]=e})),!t.isArray(r)){var s=[];t.isObject(r)?i(r,(function(t,e){var n=a[e];s[null!=n?n:o]=t})):s[-1]=r,r=v(e,s)}for(var l=n.length-1;l>=0;l--)null==r[l]&&(delete a[n[l]],n.pop())}(a):l(a,!0):(t.assert("linear"!==n||a.dataExtent),l(a))};a.prototype={constructor:a,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return t.bind(this._normalizeData,this)}};var s=a.visualHandlers={color:{applyVisual:c("color"),getColorMapper:function(){var n=this.option;return t.bind("category"===n.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),d.call(this,t)}:function(t,i,r){var o=!!r;return!i&&(t=this._normalizeData(t)),r=e.fastLerp(t,n.parsedVisual,r),o?r:e.stringify(r,"rgba")},this)},_doMap:{linear:function(t){return e.stringify(e.fastLerp(t,this.option.parsedVisual),"rgba")},category:d,piecewise:function(t,n){var i=g.call(this,n);return null==i&&(i=e.stringify(e.fastLerp(t,this.option.parsedVisual),"rgba")),i},fixed:p}},colorHue:u((function(t,n){return e.modifyHSL(t,n)})),colorSaturation:u((function(t,n){return e.modifyHSL(t,null,n)})),colorLightness:u((function(t,n){return e.modifyHSL(t,null,null,n)})),colorAlpha:u((function(t,n){return e.modifyAlpha(t,n)})),opacity:{applyVisual:c("opacity"),_doMap:f([0,1])},liftZ:{applyVisual:c("liftZ"),_doMap:{linear:p,category:p,piecewise:p,fixed:p}},symbol:{applyVisual:function(e,n,i){var o=this.mapValueToVisual(e);if(t.isString(o))i("symbol",o);else if(r(o))for(var a in o)o.hasOwnProperty(a)&&i(a,o[a])},_doMap:{linear:h,category:d,piecewise:function(t,e){var n=g.call(this,e);return null==n&&(n=h.call(this,t)),n},fixed:p}},symbolSize:{applyVisual:c("symbolSize"),_doMap:f([0,1])}};function l(e,n){var r=e.visual,o=[];t.isObject(r)?i(r,(function(t){o.push(t)})):null!=r&&o.push(r),n||1!==o.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(o[1]=o[0]),v(e,o)}function u(t){return{applyVisual:function(e,n,i){e=this.mapValueToVisual(e),i("color",t(n("color"),e))},_doMap:f([0,1])}}function h(t){var e=this.option.visual;return e[Math.round(n(t,[0,1],[0,e.length-1],!0))]||{}}function c(t){return function(e,n,i){i(t,this.mapValueToVisual(e))}}function d(t){var e=this.option.visual;return e[this.option.loop&&t!==o?t%e.length:t]}function p(){return this.option.visual[0]}function f(t){return{linear:function(e){return n(e,t,this.option.visual,!0)},category:d,piecewise:function(e,i){var r=g.call(this,i);return null==r&&(r=n(e,t,this.option.visual,!0)),r},fixed:p}}function g(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=n[a.findPieceIndex(t,n)];if(i&&i.visual)return i.visual[this.type]}}function v(n,i){return n.visual=i,"color"===n.type&&(n.parsedVisual=t.map(i,(function(t){return e.parse(t)}))),i}var m={linear:function(t){return n(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=a.findPieceIndex(t,e,!0);if(null!=i)return n(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?o:e},fixed:t.noop};function y(t,e,n){return t?e<=n:ec[1]&&(c[1]=h);var d=n.get("colorMappingBy"),p={type:l.name,dataExtent:c,visual:l.range};"color"!==p.type||"index"!==d&&"id"!==d?p.mappingMethod="linear":(p.mappingMethod="category",p.loop=!0);var f=new t(p);return f.__drColorMappingBy=d,f}}}(0,h,c,0,f,m);n.each(m,(function(t,e){if(t.depth>=l.length||t===l[t.depth]){var i=function(t,e,i,r,o,a){var s=n.extend({},e);if(o){var l=o.type,u="color"===l&&o.__drColorMappingBy,h="index"===u?r:"id"===u?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=o.mapValueToVisual(h)}return s}(h,f,t,e,y,u);r(t,i,l,u)}}))}else d=o(f),i.setVisual("color",d)}}function o(t){var n=a(t,"color");if(n){var i=a(t,"colorAlpha"),r=a(t,"colorSaturation");return r&&(n=e.modifyHSL(n,null,null,r)),i&&(n=e.modifyAlpha(n,i)),n}}function a(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function s(t,e){var n=t.get(e);return i(n)&&n.length?{name:e,range:n}:null}return X1={seriesType:"treemap",reset:function(t,e,n,i){var o=t.getData().tree.root;o.isRemoved()||r(o,{},t.getViewRoot().getAncestors(),t)}}}function n2(){if(K1)return q1;K1=1;var t=bW(),e=kU(),n=YX(),i=n.parsePercent,r=n.MAX_SAFE_INTEGER,o=rj(),a=F1(),s=Math.max,l=Math.min,u=t.retrieve,h=t.each,c=["itemStyle","borderWidth"],d=["itemStyle","gapWidth"],p=["upperLabel","show"],f=["upperLabel","height"],g={seriesType:"treemap",reset:function(n,s,l,d){var p=l.getWidth(),f=l.getHeight(),g=n.option,m=o.getLayoutRect(n.getBoxLayoutParams(),{width:l.getWidth(),height:l.getHeight()}),y=g.size||[],b=i(u(m.width,y[0]),p),w=i(u(m.height,y[1]),f),S=d&&d.type,M=a.retrieveTargetInfo(d,["treemapZoomToNode","treemapRootToNode"],n),I="treemapRender"===S||"treemapMove"===S?d.rootRect:null,T=n.getViewRoot(),C=a.getPathToRoot(T);if("treemapMove"!==S){var A="treemapZoomToNode"===S?function(t,e,n,i,o){var a,s=(e||{}).node,l=[i,o];if(!s||s===n)return l;for(var u=i*o,h=u*t.option.zoomToNodeRatio;a=s.parentNode;){for(var d=0,p=a.children,f=0,g=p.length;fr&&(h=r),s=a}hs[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:i,dataExtent:s}}(n,s,l);if(0===c.sum)return e.viewChildren=[];if(c.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*er&&(r=i));var u=t.area*t.area,h=e*e*n;return u?s(h*r/u,u/(h*o)):1/0}function y(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,u=["x","y"],h=["width","height"],c=n[u[o]],d=e?t.area/e:0;(r||d>n[h[a]])&&(d=n[h[a]]);for(var p=0,f=t.length;p=0&&t.call(e,n[r],r)},r.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},r.breadthFirstTraverse=function(t,e,i,r){if(o.isInstance(e)||(e=this._nodesMap[n(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",s=0;s=0&&n.node2.dataIndex>=0})),r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n,i){return this[t][e].getItemVisual(this.dataIndex,n,i)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};return t.mixin(o,s("hostGraph","data")),t.mixin(a,s("hostGraph","edgeData")),i.Node=o,i.Edge=a,e(o),e(a),i2=i}(),i=y1(),r=nK(),o=Oj(),a=hK();return o2=function(s,l,u,h,c){for(var d=new n(h),p=0;p "+x)),v++)}var _,b=u.get("coordinateSystem");if("cartesian2d"===b||"polar"===b)_=a(s,u);else{var w=o.get(b),S=w&&"view"!==w.type&&w.dimensions||[];t.indexOf(S,"value")<0&&S.concat(["value"]);var M=r(s,{coordDimensions:S});(_=new e(M,u)).initData(s)}var I=new e(["value"],u);return I.initData(g,f),c&&c(_,I),i({mainData:_,struct:d,structAttr:"graph",datas:{node:_,edge:I},datasAttr:{node:"data",edge:"edgeData"}}),d.update(),d},o2}var u2,h2,c2,d2,p2,f2,g2,v2,m2,y2={};function x2(){if(u2)return y2;u2=1;var t=bW(),e="--\x3e",n=function(t){return t.get("autoCurveness")||null},i=function(e,i){var r=n(e),o=20,a=[];if("number"==typeof r)o=r;else if(t.isArray(r))return void(e.__curvenessList=r);i>o&&(o=i);var s=o%2?o+2:o+3;a=[];for(var l=0;l0&&(w[0]=-w[0],w[1]=-w[1]);var M,I=p[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var T=-Math.atan2(p[1],p[0]);c[0].8?"left":d[0]<-.8?"right":"center",v=d[1]>.8?"top":d[1]<-.8?"bottom":"middle";break;case"start":f=[-d[0]*x+h[0],-d[1]*_+h[1]],g=d[0]>.8?"right":d[0]<-.8?"left":"center",v=d[1]>.8?"bottom":d[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":f=[x*I+h[0],h[1]+M],g=p[0]<0?"right":"left",m=[-x*I,-M];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":f=[S[0],S[1]+M],g="center",m=[0,-M];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":f=[-x*I+c[0],c[1]+M],g=p[0]>=0?"right":"left",m=[x*I,-M]}r.attr({style:{textVerticalAlign:r.__verticalAlign||v,textAlign:r.__textAlign||g},position:f,scale:[o,o],origin:m})}}}},c._createLine=function(e,n,o){var h=e.hostModel,c=function(t){var e=new i({name:"line",subPixelOptimize:!0});return u(e.shape,t),e}(e.getItemLayout(n));c.shape.percent=0,r.initProps(c,{shape:{percent:1}},h,n),this.add(c);var d=new r.Text({name:"label",lineLabelOriginalOpacity:1});this.add(d),t.each(a,(function(t){var i=l(t,e,n);this.add(i),this[s(t)]=e.getItemVisual(n,t)}),this),this._updateCommonStl(e,n,o)},c.updateData=function(e,n,i){var o=e.hostModel,h=this.childOfName("line"),c=e.getItemLayout(n),d={shape:{}};u(d.shape,c),r.updateProps(h,d,o,n),t.each(a,(function(t){var i=e.getItemVisual(n,t),r=s(t);if(this[r]!==i){this.remove(this.childOfName(t));var o=l(t,e,n);this.add(o)}this[r]=i}),this),this._updateCommonStl(e,n,i)},c._updateCommonStl=function(e,n,i){var s=e.hostModel,l=this.childOfName("line"),u=i&&i.lineStyle,h=i&&i.hoverLineStyle,c=i&&i.labelModel,d=i&&i.hoverLabelModel;if(!i||e.hasItemOption){var p=e.getItemModel(n);u=p.getModel("lineStyle").getLineStyle(),h=p.getModel("emphasis.lineStyle").getLineStyle(),c=p.getModel("label"),d=p.getModel("emphasis.label")}var f=e.getItemVisual(n,"color"),g=t.retrieve3(e.getItemVisual(n,"opacity"),u.opacity,1);l.useStyle(t.defaults({strokeNoScale:!0,fill:"none",stroke:f,opacity:g},u)),l.hoverStyle=h,t.each(a,(function(t){var e=this.childOfName(t);e&&(e.setColor(f),e.setStyle({opacity:g}))}),this);var v,m,y=c.getShallow("show"),x=d.getShallow("show"),_=this.childOfName("label");if((y||x)&&(v=f||"#000",null==(m=s.getFormattedLabel(n,"normal",e.dataType)))){var b=s.getRawValue(n);m=null==b?e.getName(n):isFinite(b)?o(b):b}var w=y?m:null,S=x?t.retrieve2(s.getFormattedLabel(n,"emphasis",e.dataType),m):null,M=_.style;if(null!=w||null!=S){r.setTextStyle(_.style,c,{text:w},{autoColor:v}),_.__textAlign=M.textAlign,_.__verticalAlign=M.textVerticalAlign,_.__position=c.get("position")||"middle";var I=c.get("distance");t.isArray(I)||(I=[I,I]),_.__labelDistance=I}_.hoverStyle=null!=S?{text:S,textFill:d.getTextColor(!0),fontStyle:d.getShallow("fontStyle"),fontWeight:d.getShallow("fontWeight"),fontSize:d.getShallow("fontSize"),fontFamily:d.getShallow("fontFamily")}:{text:null},_.ignore=!y&&!x,r.setHoverStyle(this)},c.highlight=function(){this.trigger("emphasis")},c.downplay=function(){this.trigger("normal")},c.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},c.setLinePoints=function(t){var e=this.childOfName("line");u(e.shape,t),e.dirty()},t.inherits(h,r.Group),f2=h}function w2(){if(m2)return v2;m2=1;var t=zX(),e=b2();function n(n){this._ctor=n||e,this.group=new t.Group}var i=n.prototype;function r(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function o(t){return isNaN(t[0])||isNaN(t[1])}function a(t){return!o(t[0])&&!o(t[1])}return i.isPersistent=function(){return!0},i.updateData=function(t){var e=this,n=e.group,i=e._lineData;e._lineData=t,i||n.removeAll();var o=r(t);t.diff(i).add((function(n){!function(t,e,n,i){var r=e.getItemLayout(n);if(a(r)){var o=new t._ctor(e,n,i);e.setItemGraphicEl(n,o),t.group.add(o)}}(e,t,n,o)})).update((function(n,r){!function(t,e,n,i,r,o){var s=e.getItemGraphicEl(i);a(n.getItemLayout(r))?(s?s.updateData(n,r,o):s=new t._ctor(n,r,o),n.setItemGraphicEl(r,s),t.group.add(s)):t.group.remove(s)}(e,i,t,r,n,o)})).remove((function(t){n.remove(i.getItemGraphicEl(t))})).execute()},i.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},i.incrementalPrepareUpdate=function(t){this._seriesScope=r(t),this._lineData=null,this.group.removeAll()},i.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=t.useHoverLayer=!0)}for(var i=t.start;i=0?u+=g:u-=g:_>=0?u-=g:u+=g}return u}return M2=function(i,r){var o=[],a=t.quadraticSubdivide,s=[[],[],[]],l=[[],[]],h=[];r/=2,i.eachEdge((function(t,i){var c=t.getLayout(),d=t.getVisual("fromSymbol"),p=t.getVisual("toSymbol");c.__original||(c.__original=[e.clone(c[0]),e.clone(c[1])],c[2]&&c.__original.push(e.clone(c[2])));var f=c.__original;if(null!=c[2]){if(e.copy(s[0],f[0]),e.copy(s[1],f[2]),e.copy(s[2],f[1]),d&&"none"!==d){var g=n(t.node1),v=u(s,f[0],g*r);a(s[0][0],s[1][0],s[2][0],v,o),s[0][0]=o[3],s[1][0]=o[4],a(s[0][1],s[1][1],s[2][1],v,o),s[0][1]=o[3],s[1][1]=o[4]}p&&"none"!==p&&(g=n(t.node2),v=u(s,f[1],g*r),a(s[0][0],s[1][0],s[2][0],v,o),s[1][0]=o[1],s[2][0]=o[2],a(s[0][1],s[1][1],s[2][1],v,o),s[1][1]=o[1],s[2][1]=o[2]),e.copy(c[0],s[0]),e.copy(c[1],s[2]),e.copy(c[2],s[1])}else e.copy(l[0],f[0]),e.copy(l[1],f[1]),e.sub(h,l[1],l[0]),e.normalize(h,h),d&&"none"!==d&&(g=n(t.node1),e.scaleAndAdd(l[0],l[0],h,g*r)),p&&"none"!==p&&(g=n(t.node2),e.scaleAndAdd(l[1],l[1],h,-g*r)),e.copy(c[0],l[0]),e.copy(c[1],l[1])}))},M2}var k2,P2,O2,R2,N2,E2,z2,V2,B2={},F2={};function G2(){if(k2)return F2;k2=1;var t=s$();return t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){})),F2}function H2(){return R2||(R2=1,O2=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),i=t.getGraph().data,r=n.mapArray(n.getName);i.filterSelf((function(t){var n=i.getItemModel(t).getShallow("category");if(null!=n){"number"==typeof n&&(n=r[n]);for(var o=0;o=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)}});return u5=t}var m5,y5,x5,_5,b5,w5,S5,M5={};function I5(){if(w5)return b5;w5=1,cW().__DEV__;var t=rj(),e=YX(),n=e.parsePercent,i=e.linearMap;return b5=function(e,r,o){e.eachSeriesByType("funnel",(function(e){var o=e.getData(),a=o.mapDimension("value"),s=e.get("sort"),l=function(e,n){return t.getLayoutRect(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})}(e,r),u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a0?-1:n<0?1:e?-1:1}}function e(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}return R5=1,O5=function(n,i,r,o,a,s){n=n||0;var l=r[1]-r[0];if(null!=a&&(a=e(a,[0,l])),null!=s&&(s=Math.max(s,null!=a?a:0)),"all"===o){var u=Math.abs(i[1]-i[0]);u=e(u,[0,l]),a=s=e(u,[a,s]),o=0}i[0]=e(i[0],r),i[1]=e(i[1],r);var h=t(i,o);i[o]+=n;var c=a||0,d=r.slice();h.sign<0?d[0]+=c:d[1]-=c,i[o]=e(i[o],d);var p=t(i,o);return null!=a&&(p.sign!==h.sign||p.spans&&(i[1-o]=i[o]+p.sign*s),i},O5}function U5(){if(E5)return N5;E5=1;var t=bW(),e=$W(),n=rj(),i=zK(),r=function(){if(P5)return k5;P5=1;var t=bW(),e=o$(),n=function(t,n,i,r,o){e.call(this,t,n,i),this.type=r||"value",this.axisIndex=o};return n.prototype={constructor:n,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},t.inherits(n,e),k5=n}(),o=zX(),a=YX(),s=W5(),l=t.each,u=Math.min,h=Math.max,c=Math.floor,d=Math.ceil,p=a.round,f=Math.PI;function g(e,n,i){this._axesMap=t.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,n,i)}function v(t,e){return u(h(t,e[0]),e[1])}function m(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function y(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var r=n.getData();l(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(r,r.mapDimension(t)),i.niceScaleExtent(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=n.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=v(e.get("axisExpandWidth"),l),f=v(e.get("axisExpandCount")||0,[0,u]),g=e.get("axisExpandable")&&u>3&&u>f&&f>1&&h>0&&s>0,m=e.get("axisExpandWindow");m?(t=v(m[1]-m[0],l),m[1]=m[0]+t):(t=v(h*(f-1),l),(m=[h*(e.get("axisExpandCenter")||c(u/2))-t/2])[1]=m[0]+t);var y=(s-t)/(u-f);y<3&&(y=0);var x=[c(p(m[0]/h,1))+1,d(p(m[1]/h,1))-1],_=y/h*m[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:g,axisExpandWidth:h,axisCollapseWidth:y,axisExpandWindow:m,axisCount:u,winInnerIndices:x,axisExpandWindow0Pos:_}},_layoutAxes:function(){var t=this._rect,n=this._axesMap,i=this.dimensions,r=this._makeLayoutInfo(),o=r.layout;n.each((function(t){var e=[0,r.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),l(i,(function(n,i){var a=(r.axisExpandable?y:m)(i,r),s={horizontal:{x:a.position,y:r.axisLength},vertical:{x:0,y:a.position}},l={horizontal:f/2,vertical:0},u=[s[o].x+t.x,s[o].y+t.y],h=l[o],c=e.create();e.rotate(c,c,h),e.translate(c,c,u),this._axesLayout[n]={position:u,rotation:h,transform:c,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(e,n,i,r){null==i&&(i=0),null==r&&(r=e.count());var o=this._axesMap,a=this.dimensions,s=[],l=[];t.each(a,(function(t){s.push(e.mapDimension(t)),l.push(o.get(t).model)}));for(var u=this.hasAxisBrushed(),h=i;hr*(1-p[0])?(c="jump",a=l-r*(1-p[2])):(a=l-r*p[1])>=0&&(a=l-r*(1-p[1]))<=0&&(a=0),(a*=e.axisExpandWidth/d)?s(a,i,o,"all"):c="none"):(r=i[1]-i[0],(i=[h(0,o[1]*l/r-r/2)])[1]=u(o[1],i[0]+r),i[0]=i[1]-r),{axisExpandWindow:i,behavior:c}}},N5=g}function Y5(){if(z5)return H5;z5=1;var t=U5();return Oj().register("parallel",{create:function(e,n){var i=[];return e.eachComponent("parallel",(function(r,o){var a=new t(r,e,n);a.name="parallel_"+o,a.resize(r,n),r.coordinateSystem=a,a.model=r,i.push(a)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=n.coordinateSystem}})),i}}),H5}function Z5(){if(G5)return F5;G5=1;var t=bW(),e=oj();!function(){if(B5)return V5;B5=1;var t=bW(),e=oj(),n=VY(),i=lJ(),r=YX(),o=VK(),a=e.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return n([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var n=this.activeIntervals=t.clone(e);if(n)for(var i=n.length-1;i>=0;i--)r.asc(n[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i1)return("e"===(i=[R(t,(e=e.split(""))[0]),R(t,e[1])])[0]||"w"===i[0])&&i.reverse(),i.join("");var i=n.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return n.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[i]}function N(t,e,n,i,r,o,s,l){var u=i.__brushOption,h=t(u.range),c=z(n,o,s);a(r.split(""),(function(t){var e=d[t];h[e[0]][e[1]]+=c[e[0]]})),u.range=e(O(h[0][0],h[1][0],h[0][1],h[1][1])),b(n,i),T(n,{isEnd:!1})}function E(t,e,n,i,r){var o=e.__brushOption.range,s=z(t,n,i);a(o,(function(t){t[0]+=s[0],t[1]+=s[1]})),b(t,e),T(t,{isEnd:!1})}function z(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function V(e,n,i){var r=M(e,n);return r&&!0!==r?r.clipPath(i,e._transform):t.clone(i)}function B(t){var e=t.event;e.preventDefault&&e.preventDefault()}function F(t,e,n){return t.childOfName("main").contain(e,n)}function G(e,n,i,r){var o,a=e._creatingCover,s=e._creatingPanel,l=e._brushOption;if(e._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1];return h(r*r+o*o,.5)>6}(e)||a){if(s&&!a){"single"===l.brushMode&&I(e);var u=t.clone(l);u.brushType=H(u.brushType,s),u.panelId=!0===s?null:s.panelId,a=e._creatingCover=m(e,u),e._covers.push(a)}if(a){var c=Y[H(e._brushType,s)];a.__brushOption.range=c.getCreatingRange(V(e,a,e._track)),r&&(y(e,a),c.updateCommon(e,a)),x(e,a),o={isEnd:r}}}else r&&"single"===l.brushMode&&l.removeOnClick&&S(e,n,i)&&I(e)&&(o={isEnd:r,removeOnClick:!0});return o}function H(t,e){return"auto"===t?e.defaultBrushType:t}v.prototype={constructor:v,enableBrush:function(e){var n,r;return this._brushType&&(r=(n=this)._zr,i.release(r,c,n._uid),function(t,e){a(e,(function(e,n){t.off(n,e)}))}(r,n._handlers),n._brushType=n._brushOption=null),e.brushType&&function(e,n){var r=e._zr;e._enableGlobalPan||i.take(r,c,e._uid),function(t,e){a(e,(function(e,n){t.on(n,e)}))}(r,e._handlers),e._brushType=n.brushType,e._brushOption=t.merge(t.clone(f),n,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var n=this._panels={};t.each(e,(function(e){n[e.panelId]=t.clone(e)}))}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){a(this._covers,t,e)},updateCovers:function(e){e=t.map(e,(function(e){return t.merge(t.clone(f),e,!0)}));var n=this._covers,i=this._covers=[],o=this,a=this._creatingCover;return new r(n,e,(function(t,e){return s(t.__brushOption,e)}),s).add(l).update(l).remove((function(t){n[t]!==a&&o.group.remove(n[t])})).execute(),this;function s(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function l(t,r){var s=e[t];if(null!=r&&n[r]===a)i[t]=n[r];else{var l=i[t]=null!=r?(n[r].__brushOption=s,n[r]):y(o,m(o,s));b(o,l)}}},unmount:function(){return this.enableBrush(!1),I(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},t.mixin(v,e);var W={mousedown:function(t){if(this._dragging)U(this,t);else if(!t.target||!t.target.draggable){B(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=S(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e)){var i=t._zr,r=t._covers,o=S(t,e,n);if(!t._dragging)for(var a=0;a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&o(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null})}}};function o(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}return t.registerPreprocessor(i),D5}function v3(){if(u3)return l3;u3=1;var t=["lineStyle","normal","opacity"],e={seriesType:"parallel",reset:function(e,n,i){var r=e.getModel("itemStyle"),o=e.getModel("lineStyle"),a=n.get("color"),s=o.get("color")||r.get("color")||a[e.seriesIndex%a.length],l=e.get("inactiveOpacity"),u=e.get("activeOpacity"),h=e.getModel("lineStyle").getLineStyle(),c=e.coordinateSystem,d=e.getData(),p={normal:h.opacity,active:u,inactive:l};return d.setVisual("color",s),{progress:function(e,n){c.eachActiveState(n,(function(e,i){var r=p[e];if("normal"===e&&n.hasItemOption){var o=n.getItemModel(i).get(t,!0);null!=o&&(r=o)}n.setItemVisual(i,"opacity",r)}),e.start,e.end)}}}};return l3=e}var m3,y3,x3,_3,b3,w3,S3,M3,I3,T3,C3={},A3={};function D3(){if(S3)return w3;S3=1;var t=rj(),e=bW(),n=AY().groupData;function i(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function r(t,n,i,r,o){var a="vertical"===o?"x":"y";e.each(t,(function(t){var e,s,l;t.sort((function(t,e){return t.getLayout()[a]-e.getLayout()[a]}));for(var u=0,h=t.length,c="vertical"===o?"dx":"dy",d=0;d0&&(e=s.getLayout()[a]+l,"vertical"===o?s.setLayout({x:e},!0):s.setLayout({y:e},!0)),u=s.getLayout()[a]+s.getLayout()[c]+n;if((l=u-n-("vertical"===o?r:i))>0)for(e=s.getLayout()[a]-l,"vertical"===o?s.setLayout({x:e},!0):s.setLayout({y:e},!0),u=e,d=h-2;d>=0;--d)(l=(s=t[d]).getLayout()[a]+s.getLayout()[c]+n-u)>0&&(e=s.getLayout()[a]-l,"vertical"===o?s.setLayout({x:e},!0):s.setLayout({y:e},!0)),u=s.getLayout()[a]}))}function o(t,n,i){e.each(t.slice().reverse(),(function(t){e.each(t,(function(t){if(t.outEdges.length){var e=d(t.outEdges,a,i)/d(t.outEdges,c,i);if(isNaN(e)){var r=t.outEdges.length;e=r?d(t.outEdges,s,i)/r:0}if("vertical"===i){var o=t.getLayout().x+(e-h(t,i))*n;t.setLayout({x:o},!0)}else{var l=t.getLayout().y+(e-h(t,i))*n;t.setLayout({y:l},!0)}}}))}))}function a(t,e){return h(t.node2,e)*t.getValue()}function s(t,e){return h(t.node2,e)}function l(t,e){return h(t.node1,e)*t.getValue()}function u(t,e){return h(t.node1,e)}function h(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function c(t){return t.getValue()}function d(t,e,n){for(var i=0,r=t.length,o=-1;++o=0;x&&y.depth>g&&(g=y.depth),m.setLayout({depth:x?y.depth:p},!0),"vertical"===s?m.setLayout({dy:r},!0):m.setLayout({dx:r},!0);for(var _=0;_p-1?g:p-1;l&&"left"!==l&&function(t,n,r,o){if("right"===n){for(var a=[],s=t,l=0;s.length;){for(var u=0;u0;u--)o(c,d*=.99,h),r(c,l,a,s,h),p(c,d,h),r(c,l,a,s,h)}(t,a,h,u,l,c,d),function(t,n){var i="vertical"===n?"x":"y";e.each(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]}))})),e.each(t,(function(t){var n=0,i=0;e.each(t.outEdges,(function(t){t.setLayout({sy:n},!0),n+=t.getLayout().dy})),e.each(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t,d)}(m,y,l,u,f,g,0!==e.filter(m,(function(t){return 0===t.getLayout().value})).length?0:a.get("layoutIterations"),a.get("orient"),a.get("nodeAlign"))}))},w3}function L3(){if(I3)return M3;I3=1;var t=t2(),e=bW();return M3=function(n,i){n.eachSeriesByType("sankey",(function(n){var i=n.getGraph().nodes;if(i.length){var r=1/0,o=-1/0;e.each(i,(function(t){var e=t.getLayout().value;eo&&(o=e)})),e.each(i,(function(e){var i=new t({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:n.get("color")}).mapValueToVisual(e.getLayout().value),a=e.getModel().get("itemStyle.color");null!=a?e.setVisual("color",a):e.setVisual("color",i)}))}}))}}var k3,P3,O3,R3,N3,E3,z3,V3,B3,F3,G3={},H3={};function W3(){if(k3)return H3;k3=1;var t=xQ(),e=bW(),n=Jq().getDimensionTypeByAxis,i=Lj().makeSeriesEncodeForAxisCoordSys,r={_baseAxisDim:null,getInitialData:function(r,o){var a,s,l=o.getComponent("xAxis",this.get("xAxisIndex")),u=o.getComponent("yAxis",this.get("yAxisIndex")),h=l.get("type"),c=u.get("type");"category"===h?(r.layout="horizontal",a=l.getOrdinalMeta(),s=!0):"category"===c?(r.layout="vertical",a=u.getOrdinalMeta(),s=!0):r.layout=r.layout||"horizontal";var d=["x","y"],p="horizontal"===r.layout?0:1,f=this._baseAxisDim=d[p],g=d[1-p],v=[l,u],m=v[p].get("type"),y=v[1-p].get("type"),x=r.data;if(x&&s){var _=[];e.each(x,(function(t,n){var i;t.value&&e.isArray(t.value)?(i=t.value.slice(),t.value.unshift(n)):e.isArray(t)?(i=t.slice(),t.unshift(n)):i=t,_.push(i)})),r.data=_}var b=this.defaultValueDimensions,w=[{name:f,type:n(m),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:g,type:n(y),dimsDef:b.slice()}];return t(this,{coordDimensions:w,dimensionsCount:b.length+1,encodeDefaulter:e.curry(i,w,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};return H3.seriesModelMixin=r,H3}function U3(){if(z3)return E3;z3=1;var t=["itemStyle","borderColor"];return E3=function(e,n){var i=e.get("color");e.eachRawSeriesByType("boxplot",(function(n){var r=i[n.seriesIndex%i.length],o=n.getData();o.setVisual({legendSymbol:"roundRect",color:n.get(t)||r}),e.isSeriesFiltered(n)||o.each((function(e){var n=o.getItemModel(e);o.setItemVisual(e,{color:n.get(t,!0)})}))}))}}function Y3(){if(B3)return V3;B3=1;var t=bW(),e=YX().parsePercent,n=t.each;return V3=function(i){var r=function(e){var n=[],i=[];return e.eachSeriesByType("boxplot",(function(e){var r=e.getBaseAxis(),o=t.indexOf(i,r);o<0&&(o=i.length,i[o]=r,n[o]={axis:r,seriesModels:[]}),n[o].seriesModels.push(e)})),n}(i);n(r,(function(i){var r=i.seriesModels;r.length&&(function(i){var r,o,a=i.axis,s=i.seriesModels,l=s.length,u=i.boxWidthList=[],h=i.boxOffsetList=[],c=[];if("category"===a.type)o=a.getBandWidth();else{var d=0;n(s,(function(t){d=Math.max(d,t.getData().count())})),r=a.getExtent(),Math.abs(r[1]-r[0])}n(s,(function(n){var i=n.get("boxWidth");t.isArray(i)||(i=[i,i]),c.push([e(i[0],o)||0,e(i[1],o)||0])}));var p=.8*o-2,f=p/l*.3,g=(p-f*(l-1))/l,v=g/2-p/2;n(s,(function(t,e){h.push(v),v+=f+g,u.push(Math.min(Math.max(g,c[e][0]),c[e][1]))}))}(i),n(r,(function(t,e){!function(t,e,n){var i=t.coordinateSystem,r=t.getData(),o=n/2,a="horizontal"===t.get("layout")?0:1,s=1-a,l=["x","y"],u=r.mapDimension(l[a]),h=r.mapDimension(l[s],!0);if(!(null==u||h.length<5))for(var c=0;c0?i:r)}function s(t,i){return i.get(t>0?e:n)}}};return J3=o}function o4(){if(e4)return t4;e4=1;var t=zX().subPixelOptimize,e=nq(),n=YX().parsePercent,i=bW().retrieve2,r="undefined"!=typeof Float32Array?Float32Array:Array,o={seriesType:"candlestick",plan:e(),reset:function(e){var o=e.coordinateSystem,s=e.getData(),l=function(t,e){var r,o=t.getBaseAxis(),a="category"===o.type?o.getBandWidth():(r=o.getExtent(),Math.abs(r[1]-r[0])/e.count()),s=n(i(t.get("barMaxWidth"),a),a),l=n(i(t.get("barMinWidth"),1),a),u=t.get("barWidth");return null!=u?n(u,a):Math.max(Math.min(a/2,s),l)}(e,s),u=["x","y"],h=s.mapDimension(u[0]),c=s.mapDimension(u[1],!0),d=c[0],p=c[1],f=c[2],g=c[3];if(s.setLayout({candleWidth:l,isSimpleBox:l<=1.3}),!(null==h||c.length<4))return{progress:e.pipelineContext.large?function(t,e){for(var n,i,s=new r(4*t.count),l=0,u=[],c=[];null!=(i=t.next());){var v=e.get(h,i),m=e.get(d,i),y=e.get(p,i),x=e.get(f,i),_=e.get(g,i);isNaN(v)||isNaN(x)||isNaN(_)?(s[l++]=NaN,l+=3):(s[l++]=a(e,i,m,y,p),u[0]=v,u[1]=x,n=o.dataToPoint(u,null,c),s[l++]=n?n[0]:NaN,s[l++]=n?n[1]:NaN,u[1]=_,n=o.dataToPoint(u,null,c),s[l++]=n?n[1]:NaN)}e.setLayout("largePoints",s)}:function(e,n){for(var i;null!=(i=e.next());){var r=n.get(h,i),s=n.get(d,i),u=n.get(p,i),c=n.get(f,i),v=n.get(g,i),m=Math.min(s,u),y=Math.max(s,u),x=M(m,r),_=M(y,r),b=M(c,r),w=M(v,r),S=[];I(S,_,0),I(S,x,1),S.push(C(w),C(_),C(b),C(x)),n.setItemLayout(i,{sign:a(n,i,s,u,p),initBaseline:s>u?_[1]:x[1],ends:S,brushRect:T(c,v,r)})}function M(t,e){var n=[];return n[0]=e,n[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:o.dataToPoint(n)}function I(e,n,i){var r=n.slice(),o=n.slice();r[0]=t(r[0]+l/2,1,!1),o[0]=t(o[0]-l/2,1,!0),i?e.push(r,o):e.push(o,r)}function T(t,e,n){var i=M(t,n),r=M(e,n);return i[0]-=l/2,r[0]-=l/2,{x:i[0],y:i[1],width:l,height:r[1]-i[1]}}function C(e){return e[0]=t(e[0],1),e}}}}};function a(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}return t4=o}var a4,s4,l4,u4,h4,c4,d4,p4,f4,g4,v4,m4,y4,x4,_4,b4,w4,S4,M4,I4,T4,C4,A4,D4,L4,k4,P4,O4,R4,N4,E4,z4={},V4={};function B4(){if(v4)return g4;v4=1;var t=zX(),e=b2(),n=bW(),i=HK().createSymbol,r=AW(),o=WY();function a(e,n,i){t.Group.call(this),this.add(this.createLine(e,n,i)),this._updateEffectSymbol(e,n)}var s=a.prototype;return s.createLine=function(t,n,i){return new e(t,n,i)},s._updateEffectSymbol=function(t,e){var r=t.getItemModel(e).getModel("effect"),o=r.get("symbolSize"),a=r.get("symbol");n.isArray(o)||(o=[o,o]);var s=r.get("color")||t.getItemVisual(e,"color"),l=this.childAt(1);this._symbolType!==a&&(this.remove(l),(l=i(a,-.5,-.5,1,1,s)).z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",s),l.setStyle(r.getItemStyle(["color"])),l.attr("scale",o),l.setColor(s),l.attr("scale",o),this._symbolType=a,this._symbolScale=o,this._updateEffectAnimation(t,r,e))},s._updateEffectAnimation=function(t,e,i){var r=this.childAt(1);if(r){var o=this,a=t.getItemLayout(i),s=1e3*e.get("period"),l=e.get("loop"),u=e.get("constantSpeed"),h=n.retrieve(e.get("delay"),(function(e){return e/t.count()*s/3})),c="function"==typeof h;if(r.ignore=!0,this.updateAnimationPoints(r,a),u>0&&(s=this.getLineLength(r)/u*1e3),s!==this._period||l!==this._loop){r.stopAnimation();var d=h;c&&(d=h(i)),r.__t>0&&(d=-s*r.__t),r.__t=0;var p=r.animate("",l).when(s,{__t:1}).delay(d).during((function(){o.updateSymbolPosition(r)}));l||p.done((function(){o.remove(r)})),p.start()}this._period=s,this._loop=l}},s.getLineLength=function(t){return r.dist(t.__p1,t.__cp1)+r.dist(t.__cp1,t.__p2)},s.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]},s.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},s.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,a=t.__t,s=t.position,l=[s[0],s[1]],u=o.quadraticAt,h=o.quadraticDerivativeAt;s[0]=u(e[0],i[0],n[0],a),s[1]=u(e[1],i[1],n[1],a);var c=h(e[0],i[0],n[0],a),d=h(e[1],i[1],n[1],a);if(t.rotation=-Math.atan2(d,c)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastT0){var I=o(m)?s:l;m>0&&(m=m*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*m*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=t.createCanvas()),n=this.pointSize+this.blurSize,i=2*n;e.width=i,e.height=i;var r=e.getContext("2d");return r.clearRect(0,0,i,i),r.shadowOffsetX=i,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-n,n,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},_getGradient:function(t,e,n){for(var i=this._gradientPixels,r=i[n]||(i[n]=new Uint8ClampedArray(1024)),o=[0,0,0,0],a=0,s=0;s<256;s++)e[n](s/255,!0,o),r[a++]=o[0],r[a++]=o[1],r[a++]=o[2],r[a++]=o[3];return r}},P4=e}var U4,Y4,Z4,X4,j4,q4,K4,$4,J4,Q4,t6={},e6={},n6={},i6={};function r6(){if(J4)return $4;J4=1;var t=function(){if(K4)return q4;K4=1;var t=bW(),e=o$(),n=function(t,n,i,r,o){e.call(this,t,n,i),this.type=r||"value",this.position=o||"bottom",this.orient=null};return n.prototype={constructor:n,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},t.inherits(n,e),q4=n}(),e=zK(),n=rj().getLayoutRect,i=bW().each;function r(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}return r.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:r,_init:function(n,i,r){var o=this.dimension,a=new t(o,e.createScaleByModel(n),[0,0],n.get("type"),n.get("position")),s="category"===a.type;a.onBand=s&&n.get("boundaryGap"),a.inverse=n.get("inverse"),a.orient=n.get("orient"),n.axis=a,a.model=n,a.coordinateSystem=this,this._axis=a},update:function(t,n){t.eachSeries((function(t){if(t.coordinateSystem===this){var n=t.getData();i(n.mapDimension(this.dimension,!0),(function(t){this._axis.scale.unionExtentFromData(n,t)}),this),e.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=n({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,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],r=e.reverse?1:0;e.setExtent(i[r],i[1-r]),this._updateAxisTransform(e,n?t.x:t.y)},_updateAxisTransform:function(t,e){var n=t.getExtent(),i=n[0]+n[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=r?function(t){return t-e}:function(t){return i-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(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.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(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i}},$4=r}var o6,a6,s6,l6,u6,h6={};function c6(){if(o6)return h6;o6=1;var t=bW();return h6.layout=function(e,n){n=n||{};var i=e.coordinateSystem,r=e.axis,o={},a=r.position,s=r.orient,l=i.getRect(),u=[l.x,l.x+l.width,l.y,l.y+l.height],h={horizontal:{top:u[2],bottom:u[3]},vertical:{left:u[0],right:u[1]}};o.position=["vertical"===s?h.vertical[a]:u[0],"horizontal"===s?h.horizontal[a]:u[3]],o.rotation=Math.PI/2*{horizontal:0,vertical:1}[s],o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),t.retrieve(n.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var c=n.rotate;return null==c&&(c=e.get("axisLabel.rotate")),o.labelRotation="top"===a?-c:c,o.z2=1,o},h6}var d6,p6,f6,g6,v6,m6,y6={};function x6(){if(p6)return d6;p6=1;var t=bW(),e=AY();return d6=function(n,i){var r,o=[],a=n.seriesIndex;if(null==a||!(r=i.getSeriesByIndex(a)))return{point:[]};var s=r.getData(),l=e.queryDataIndex(s,n);if(null==l||l<0||t.isArray(l))return{point:[]};var u=s.getItemGraphicEl(l),h=r.coordinateSystem;if(r.getTooltipPosition)o=r.getTooltipPosition(l)||[];else if(h&&h.dataToPoint)o=h.dataToPoint(s.getValues(t.map(h.dimensions,(function(t){return s.mapDimension(t)})),l,!0))||[];else if(u){var c=u.getBoundingRect().clone();c.applyTransform(u.transform),o=[c.x+c.width/2,c.y+c.height/2]}return{point:o,el:u}}}function _6(){if(g6)return f6;g6=1;var t=bW(),e=AY().makeInner,n=_J(),i=x6(),r=t.each,o=t.curry,a=e();function s(e,n,i,o,a){var s=e.axis;if(!s.scale.isBlank()&&s.containData(n))if(e.involveSeries){var l=function(t,e){var n=e.axis,i=n.dim,o=t,a=[],s=Number.MAX_VALUE,l=-1;return r(e.seriesModels,(function(e,u){var h,c,d=e.getData().mapDimension(i,!0);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(d,t,n);c=p.dataIndices,h=p.nestestValue}else{if(!(c=e.getData().indicesOfNearest(d[0],t,"category"===n.type?.5:null)).length)return;h=e.getData().get(d[0],c[0])}if(null!=h&&isFinite(h)){var f=t-h,g=Math.abs(f);g<=s&&((g=0&&l<0)&&(s=g,l=f,o=h,a.length=0),r(c,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:o}}(n,e),u=l.payloadBatch,h=l.snapToValue;u[0]&&null==a.seriesIndex&&t.extend(a,u[0]),!o&&e.snap&&s.containData(h)&&null!=h&&(n=h),i.showPointer(e,n,u,a),i.showTooltip(e,l,h)}else i.showPointer(e,n)}function l(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function u(t,e,i,r){var o=i.payloadBatch,a=e.axis,s=a.model,l=e.axisPointerModel;if(e.triggerTooltip&&o.length){var u=e.coordSys.model,h=n.makeKey(u),c=t.map[h];c||(c=t.map[h]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:r,valueLabelOpt:{precision:l.get("label.precision"),formatter:l.get("label.formatter")},seriesDataIndices:o.slice()})}}function h(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function c(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}return f6=function(e,n,d){var p=e.currTrigger,f=[e.x,e.y],g=e,v=e.dispatchAction||t.bind(d.dispatchAction,d),m=n.getComponent("axisPointer").coordSysAxesInfo;if(m){c(f)&&(f=i({seriesIndex:g.seriesIndex,dataIndex:g.dataIndex},n).point);var y=c(f),x=g.axesInfo,_=m.axesInfo,b="leave"===p||c(f),w={},S={},M={list:[],map:{}},I={showPointer:o(l,S),showTooltip:o(u,M)};r(m.coordSysMap,(function(t,e){var n=y||t.containPoint(f);r(m.coordSysAxesInfo[e],(function(t,e){var i=t.axis,r=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(x,t);if(!b&&n&&(!x||r)){var o=r&&r.value;null!=o||y||(o=i.pointToData(f)),null!=o&&s(t,o,I,!1,w)}}))}));var T={};return r(_,(function(t,e){var n=t.linkGroup;n&&!S[e]&&r(n.axesInfo,(function(e,i){var r=S[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,h(e),h(t)))),T[t.key]=o}}))})),r(T,(function(t,e){s(_[e],t,I,!0,w)})),function(t,e,n){var i=n.axesInfo=[];r(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(S,_,w),function(t,e,n,i){if(!c(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}(M,f,e,v),function(e,n,i){var o=i.getZr(),s="axisPointerLastHighlights",l=a(o)[s]||{},u=a(o)[s]={};r(e,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&r(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;u[e]=t}))}));var h=[],c=[];t.each(l,(function(t,e){!u[e]&&c.push(t)})),t.each(u,(function(t,e){!l[e]&&h.push(t)})),c.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:c}),h.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:h})}(_,0,d),w}},f6}var b6,w6,S6,M6,I6,T6={};function C6(){if(b6)return T6;b6=1;var t=bW(),e=yW(),n=(0,AY().makeInner)(),i=t.each;function r(t,e,n){t.handler("leave",null,n)}function o(t,e,n,i){e.handler(t,n,i)}return T6.register=function(a,s,l){if(!e.node){var u=s.getZr();n(u).records||(n(u).records={}),function(e,a){function s(t,r){e.on(t,(function(t){var o=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(a);i(n(e).records,(function(e){e&&r(e,t,o.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}(o.pendings,a)}))}n(e).initialized||(n(e).initialized=!0,s("click",t.curry(o,"click")),s("mousemove",t.curry(o,"mousemove")),s("globalout",r))}(u,s),(n(u).records[a]||(n(u).records[a]={})).handler=l}},T6.unregister=function(t,i){if(!e.node){var r=i.getZr();(n(r).records||{})[t]&&(n(r).records[t]=null)}},T6}function A6(){if(I6)return M6;I6=1;var t=bW(),e=zY(),n=zX(),i=_J(),r=GW(),o=_q(),a=(0,AY().makeInner)(),s=t.clone,l=t.bind;function u(){}function h(t,e,i,r){c(a(i).lastProp,r)||(a(i).lastProp=r,e?n.updateProps(i,r,t):(i.stopAnimation(),i.attr(r)))}function c(e,n){if(t.isObject(e)&&t.isObject(n)){var i=!0;return t.each(n,(function(t,n){i=i&&c(e[n],t)})),!!i}return e===n}function d(t,e){t[e.get("label.show")?"show":"hide"]()}function p(t){return{position:t.position.slice(),rotation:t.rotation||0}}function f(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}return u.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,i,r,o){var a=i.get("value"),s=i.get("status");if(this._axisModel=e,this._axisPointerModel=i,this._api=r,o||this._lastValue!==a||this._lastStatus!==s){this._lastValue=a,this._lastStatus=s;var l=this._group,u=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(u&&u.hide());l&&l.show(),u&&u.show();var c={};this.makeElOption(c,a,e,i,r);var d=c.graphicKey;d!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=d;var p=this._moveAnimation=this.determineAnimation(e,i);if(l){var g=t.curry(h,i,p);this.updatePointerEl(l,c,g,i),this.updateLabelEl(l,c,g,i)}else l=this._group=new n.Group,this.createPointerEl(l,c,e,i),this.createLabelEl(l,c,e,i),r.getZr().add(l);f(l,i,!0),this._renderHandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),r=t.axis,o="category"===r.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===n||null==n){var s=this.animationThreshold;if(o&&r.getBandWidth()>s)return!0;if(a){var l=i.getAxisInfo(t).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return!0===n},makeElOption:function(t,e,n,i,r){},createPointerEl:function(t,e,i,r){var o=e.pointer;if(o){var l=a(t).pointerEl=new n[o.type](s(e.pointer));t.add(l)}},createLabelEl:function(t,e,i,r){if(e.label){var o=a(t).labelEl=new n.Rect(s(e.label));t.add(o),d(o,r)}},updatePointerEl:function(t,e,n){var i=a(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=a(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),d(r,i))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var i,a=this._axisPointerModel,s=this._api.getZr(),u=this._handle,h=a.getModel("handle"),c=a.get("status");if(!h.get("show")||!c||"hide"===c)return u&&s.remove(u),void(this._handle=null);this._handle||(i=!0,u=this._handle=n.createIcon(h.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){r.stop(t.event)},onmousedown:l(this._onHandleDragMove,this,0,0),drift:l(this._onHandleDragMove,this),ondragend:l(this._onHandleDragEnd,this)}),s.add(u)),f(u,a,!1),u.setStyle(h.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var d=h.get("size");t.isArray(d)||(d=[d,d]),u.attr("scale",[d[0]/2,d[1]/2]),o.createOrUpdate(this,"_doDispatchAxisPointer",h.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,i)}},_moveHandleToValue:function(t,e){h(this._axisPointerModel,!e&&this._moveAnimation,this._handle,p(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(p(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(p(i)),a(n).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(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}},u.prototype.constructor=u,e.enableClassExtend(u),M6=u}var D6,L6,k6,P6,O6,R6,N6,E6,z6,V6,B6,F6,G6,H6,W6,U6,Y6={};function Z6(){if(D6)return Y6;D6=1;var t=bW(),e=zX(),n=eY(),i=ij(),r=$W(),o=zK(),a=gJ();function s(t,e,r,o,a){var s=l(r.get("value"),e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get("label.precision"),formatter:r.get("label.formatter")}),u=r.getModel("label"),h=i.normalizeCssArray(u.get("padding")||0),c=u.getFont(),d=n.getBoundingRect(s,c),p=a.position,f=d.width+h[1]+h[3],g=d.height+h[0]+h[2],v=a.align;"right"===v&&(p[0]-=f),"center"===v&&(p[0]-=f/2);var m=a.verticalAlign;"bottom"===m&&(p[1]-=g),"middle"===m&&(p[1]-=g/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(p,f,g,o);var y=u.get("backgroundColor");y&&"auto"!==y||(y=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:f,height:g,r:u.get("borderRadius")},position:p.slice(),style:{text:s,textFont:c,textFill:u.getTextColor(),textPosition:"inside",textPadding:h,fill:y,stroke:u.get("borderColor")||"transparent",lineWidth:u.get("borderWidth")||0,shadowBlur:u.get("shadowBlur"),shadowColor:u.get("shadowColor"),shadowOffsetX:u.get("shadowOffsetX"),shadowOffsetY:u.get("shadowOffsetY")},z2:10}}function l(e,n,i,r,a){e=n.scale.parse(e);var s=n.scale.getLabel(e,{precision:a.precision}),l=a.formatter;if(l){var u={value:o.getAxisRawValue(n,e),axisDimension:n.dim,axisIndex:n.index,seriesData:[]};t.each(r,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&u.seriesData.push(r)})),t.isString(l)?s=l.replace("{value}",s):t.isFunction(l)&&(s=l(u))}return s}function u(t,n,i){var o=r.create();return r.rotate(o,o,i.rotation),r.translate(o,o,i.position),e.applyTransform([t.dataToCoord(n),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],o)}return Y6.buildElStyle=function(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e},Y6.buildLabelElOption=s,Y6.getValueLabel=l,Y6.getTransformedPosition=u,Y6.buildCartesianSingleLabelElOption=function(t,e,n,i,r,o){var l=a.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),s(e,i,r,o,{position:u(i.axis,t,n),align:l.textAlign,verticalAlign:l.textVerticalAlign})},Y6.makeLineShape=function(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}},Y6.makeRectShape=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},Y6.makeSectorShape=function(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}},Y6}function X6(){if(k6)return L6;k6=1;var t=A6(),e=Z6(),n=MJ(),i=bJ(),r=t.extend({makeElOption:function(t,i,r,s,l){var u=r.axis,h=u.grid,c=s.get("type"),d=o(h,u).getOtherAxis(u).getGlobalExtent(),p=u.toGlobalCoord(u.dataToCoord(i,!0));if(c&&"none"!==c){var f=e.buildElStyle(s),g=a[c](u,p,d);g.style=f,t.graphicKey=g.type,t.pointer=g}var v=n.layout(h.model,r);e.buildCartesianSingleLabelElOption(i,t,v,r,s,l)},getHandleTransform:function(t,i,r){var o=n.layout(i.axis.grid.model,i,{labelInside:!1});return o.labelMargin=r.get("handle.margin"),{position:e.getTransformedPosition(i.axis,t,o),rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var r=n.axis,a=r.grid,s=r.getGlobalExtent(!0),l=o(a,r).getOtherAxis(r).getGlobalExtent(),u="x"===r.dim?0:1,h=t.position;h[u]+=e[u],h[u]=Math.min(s[1],h[u]),h[u]=Math.max(s[0],h[u]);var c=(l[1]+l[0])/2,d=[c,c];return d[u]=h[u],{position:h,rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][u]}}});function o(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var a={line:function(t,n,i){return{type:"Line",subPixelOptimize:!0,shape:e.makeLineShape([n,i[0]],[n,i[1]],s(t))}},shadow:function(t,n,i){var r=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:e.makeRectShape([n-r/2,i[0]],[r,o],s(t))}}};function s(t){return"x"===t.dim?0:1}return i.registerAxisPointerClass("CartesianAxisPointer",r),L6=r}function j6(){if(P6)return y6;P6=1;var t=s$(),e=bW(),n=_J(),i=_6();return function(){if(m6)return v6;m6=1;var t=s$().extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});v6=t}(),function(){if(S6)return w6;S6=1;var t=s$(),e=C6(),n=t.extendComponentView({type:"axisPointer",render:function(t,n,i){var r=n.getComponent("tooltip"),o=t.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";e.register("axisPointer",i,(function(t,e,n){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,i){e.unregister(i.getZr(),"axisPointer"),n.superApply(this._model,"remove",arguments)},dispose:function(t,i){e.unregister("axisPointer",i),n.superApply(this._model,"dispose",arguments)}});w6=n}(),X6(),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var n=t.axisPointer.link;n&&!e.isArray(n)&&(t.axisPointer.link=[n])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=n.collect(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},i),y6}function q6(){if(N6)return n6;N6=1;var t=s$();return function(){if(Q4)return i6;Q4=1;var t=r6();Oj().register("single",{create:function(e,n){var i=[];return e.eachComponent("singleAxis",(function(r,o){var a=new t(r,e,n);a.name="single_"+o,a.resize(r,n),r.coordinateSystem=a,i.push(a)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=n&&n.coordinateSystem}})),i},dimensions:t.prototype.dimensions})}(),function(){if(s6)return a6;s6=1;var t=bW(),e=gJ(),n=zX(),i=c6(),r=bJ(),o=kJ(),a=o.rectCoordAxisBuildSplitArea,s=o.rectCoordAxisHandleRemove,l=["axisLine","axisTickLabel","axisName"],u=["splitArea","splitLine"],h=r.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(r,o,a,s){var c=this.group;c.removeAll();var d=this._axisGroup;this._axisGroup=new n.Group;var p=i.layout(r),f=new e(r,p);t.each(l,f.add,f),c.add(this._axisGroup),c.add(f.getGroup()),t.each(u,(function(t){r.get(t+".show")&&this["_"+t](r)}),this),n.groupTransition(d,this._axisGroup,r),h.superCall(this,"render",r,o,a,s)},remove:function(){s(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),o=r.get("width"),a=r.get("color");a=a instanceof Array?a:[a];for(var s=t.coordinateSystem.getRect(),l=e.isHorizontal(),u=[],h=0,c=e.getTicksCoords({tickModel:i}),d=[],p=[],f=0;f0,I=y.height-(M?-1:1),T=(f-p)/(I||1),C=r.get("clockwise"),A=r.get("stillShowZeroSum"),D=C?1:-1,L=function(n,i){if(n){var r=i;if(n!==m){var o=n.getValue(),a=0===w&&A?S:o*S;a=0?"p":"n",O=S;if(b&&(l[h][k]||(l[h][k]={p:S,n:S}),O=l[h][k][P]),"radius"===f.dim){var R=f.dataToRadius(L)-S,N=a.dataToAngle(k);Math.abs(R)d?d=f:(p.lastTickCount=a,p.lastAutoInterval=d),d}},t.inherits(r,n),D8=r}(),n=function(n){this.name=n||"",this.cx=0,this.cy=0,this._radiusAxis=new t,this._angleAxis=new e,this._radiusAxis.polar=this._angleAxis.polar=this};return n.prototype={type:"polar",axisPointerEnabled:!0,constructor:n,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=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),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 n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}}},k8=n}var N8,E8,z8,V8,B8,F8,G8,H8,W8,U8,Y8,Z8,X8,j8={};function q8(){if(z8)return E8;z8=1;var t=s$();!function(){if(N8)return j8;N8=1;var t=bW(),e=oj(),n=lJ(),i=VK(),r=e.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});t.merge(r.prototype,i);var o={splitNumber:5};function a(t,e){return e.type||(e.data?"category":"value")}n("angle",r,a,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),n("radius",r,a,o)}();var e=t.extendComponentModel({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%"}});return E8=e}function K8(){if(V8)return O8;V8=1,cW().__DEV__;var t=bW(),e=R8(),n=YX().parsePercent,i=zK(),r=i.createScaleByModel,o=i.niceScaleExtent,a=Oj(),s=uK().getStackedDimension;function l(e,n){var i=this,r=i.getAngleAxis(),a=i.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===i){var n=e.getData();t.each(n.mapDimension("radius",!0),(function(t){a.scale.unionExtentFromData(n,s(n,t))})),t.each(n.mapDimension("angle",!0),(function(t){r.scale.unionExtentFromData(n,s(n,t))}))}})),o(r.scale,r.model),o(a.scale,a.model),"category"===r.type&&!r.onBand){var l=r.getExtent(),u=360/r.scale.count();r.inverse?l[1]+=u:l[1]-=u,r.setExtent(l[0],l[1])}}function u(t,e){if(t.type=e.get("type"),t.scale=r(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}q8();var h={dimensions:e.prototype.dimensions,create:function(i,r){var o=[];return i.eachComponent("polar",(function(i,a){var s=new e(a);s.update=l;var h=s.getRadiusAxis(),c=s.getAngleAxis(),d=i.findAxisModel("radiusAxis"),p=i.findAxisModel("angleAxis");u(h,d),u(c,p),function(e,i,r){var o=i.get("center"),a=r.getWidth(),s=r.getHeight();e.cx=n(o[0],a),e.cy=n(o[1],s);var l=e.getRadiusAxis(),u=Math.min(a,s)/2,h=i.get("radius");null==h?h=[0,"100%"]:t.isArray(h)||(h=[0,h]),h=[n(h[0],u),n(h[1],u)],l.inverse?l.setExtent(h[1],h[0]):l.setExtent(h[0],h[1])}(s,i,r),o.push(s),i.coordinateSystem=s,s.model=i})),i.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=e.coordinateSystem}})),o}};return a.register("polar",h),O8}var $8,J8,Q8,t7,e7,n7,i7,r7,o7,a7,s7,l7,u7,h7,c7,d7,p7={},f7={},g7={};function v7(){if(h7)return g7;h7=1;var t={};return g7.register=function(e,n){t[e]=n},g7.get=function(e){return t[e]},g7}var m7,y7,x7,_7,b7,w7,S7,M7,I7,T7,C7,A7={};function D7(){if(m7)return A7;m7=1;var t=rj(),e=t.getLayoutRect,n=t.box,i=t.positionElement,r=ij(),o=zX();return A7.layout=function(t,r,o){var a=r.getBoxLayoutParams(),s=r.get("padding"),l={width:o.getWidth(),height:o.getHeight()},u=e(a,l,s);n(r.get("orient"),t,r.get("itemGap"),u.width,u.height),i(t,a,l,s)},A7.makeBackground=function(t,e){var n=r.normalizeCssArray(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new o.Rect({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})},A7}function L7(){if(C7)return T7;C7=1,cW().__DEV__;var t=bW(),e=zX(),n=AY(),i=d3(),r=t.each,o=t.indexOf,a=t.curry,s=["dataToPoint","pointToData"],l=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function u(t,e,n){var i=this._targetInfoList=[],a={},s=d(e,t);r(p,(function(t,e){(!n||!n.include||o(n.include,e)>=0)&&t(s,i,a)}))}var h=u.prototype;function c(t){return t[0]>t[1]&&t.reverse(),t}function d(t,e){return n.parseFinder(t,e,{includeMainTypes:l})}h.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=v[t.brushType](0,n,e);t.__rangeOffset={offset:y[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}}))},h.matchOutputRanges=function(e,n,i){r(e,(function(e){var r=this.findTargetInfo(e,n);r&&!0!==r&&t.each(r.coordSyses,(function(t){var r=v[e.brushType](1,t,e.range);i(e,r.values,t,n)}))}),this)},h.setInputRanges=function(t,e){r(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=v[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?y[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=_(n),o=_(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},h.makePanelOpts=function(e,n){return t.map(this._targetInfoList,(function(t){var r=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:i.makeRectPanelClipPath(r),isTargetByCursor:i.makeRectIsTargetByCursor(r,e,t.coordSysModel),getLinearBrushOtherExtent:i.makeLinearBrushOtherExtent(r)}}))},h.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&o(i.coordSyses,e.coordinateSystem)>=0},h.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=d(e,t),r=0;r=0||o(a,t.getAxis("y").model)>=0)&&s.push(t)})),n.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:s[0],coordSyses:s,getPanelRect:g.grid,xAxisDeclared:u[t.id],yAxisDeclared:h[t.id]})})))},geo:function(t,e){r(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:g.geo})}))}},f=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],g={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,n=t.getBoundingRect().clone();return n.applyTransform(e.getTransform(t)),n}},v={lineX:a(m,0),lineY:a(m,1),rect:function(t,e,n){var i=e[s[t]]([n[0][0],n[1][0]]),r=e[s[t]]([n[0][1],n[1][1]]),o=[c([i[0],r[0]]),c([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:t.map(i,(function(t){var i=n[s[e]](t);return r[0][0]=Math.min(r[0][0],i[0]),r[1][0]=Math.min(r[1][0],i[1]),r[0][1]=Math.max(r[0][1],i[0]),r[1][1]=Math.max(r[1][1],i[1]),i})),xyMinMax:r}}};function m(e,n,i,r){var o=i.getAxis(["x","y"][e]),a=c(t.map([0,1],(function(t){return n?o.coordToData(o.toLocalCoord(r[t])):o.toGlobalCoord(o.dataToCoord(r[t]))}))),s=[];return s[e]=a,s[1-e]=[NaN,NaN],{values:a,xyMinMax:s}}var y={lineX:a(x,0),lineY:a(x,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(e,n,i){return t.map(e,(function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]}))}};function x(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function _(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}return T7=u}var k7,P7={};function O7(){if(k7)return P7;k7=1;var t=bW().each,e="\0_ec_hist_store";function n(t){var n=t[e];return n||(n=t[e]=[{}]),n}return P7.push=function(e,i){var r=n(e);t(i,(function(t,n){for(var i=r.length-1;i>=0&&!r[i][n];i--);if(i<0){var o=e.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var a=o.getPercentRange();r[0][n]={dataZoomId:n,start:a[0],end:a[1]}}}})),r.push(i)},P7.pop=function(e){var i=n(e),r=i[i.length-1];i.length>1&&i.pop();var o={};return t(r,(function(t,e){for(var n=i.length-1;n>=0;n--)if(t=i[n][e]){o[e]=t;break}})),o},P7.clear=function(t){t[e]=null},P7.count=function(t){return n(t).length},P7}var R7,N7={};function E7(){return R7||(R7=1,oj().registerSubTypeDefaulter("dataZoom",(function(){return"slider"}))),N7}var z7,V7,B7,F7,G7,H7,W7,U7,Y7,Z7,X7,j7={};function q7(){if(z7)return j7;z7=1;var t=bW(),e=ij(),n=["cartesian2d","polar","singleAxis"];function i(n,i){n=n.slice();var r=t.map(n,e.capitalFirst);i=(i||[]).slice();var o=t.map(i,e.capitalFirst);return function(e,a){t.each(n,(function(t,n){for(var s={name:t,capital:r[n]},l=0;l=0},j7.createNameEach=i,j7.eachAxisDim=r,j7.createLinkedNodesFinder=function(e,n,i){return function(o){var a,s={nodes:[],records:{}};if(n((function(t){s.records[t.name]={}})),!o)return s;r(o,s);do{a=!1,e(l)}while(a);function l(e){!function(e,n){return t.indexOf(n.nodes,e)>=0}(e,s)&&function(e,r){var o=!1;return n((function(n){t.each(i(e,n)||[],(function(t){r.records[n.name][t]&&(o=!0)}))})),o}(e,s)&&(r(e,s),a=!0)}return s};function r(e,r){r.nodes.push(e),n((function(n){t.each(i(e,n)||[],(function(t){r.records[n.name][t]=!0}))}))}},j7}function K7(){if(B7)return V7;B7=1;var t=bW(),e=YX(),n=q7(),i=W5(),r=t.each,o=e.asc,a=function(t,e,n,i){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n};function s(t,n){var i=t.getAxisModel(),r=t._percentWindow,o=t._valueWindow;if(r){var a=e.getPixelPrecision(o,[0,500]);a=Math.min(a,20);var s=n||0===r[0]&&100===r[1];i.setRange(s?null:+o[0].toFixed(a),s?null:+o[1].toFixed(a))}}return a.prototype={constructor:a,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(i){if(n.isCoordSupported(i.get("coordinateSystem"))){var r=this._dimName,o=e.queryComponents({mainType:r+"Axis",index:i.get(r+"AxisIndex"),id:i.get(r+"AxisId")})[0];this._axisIndex===(o&&o.componentIndex)&&t.push(i)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,n,i=this._dimName,r=this.ecModel,o=this.getAxisModel();return"x"===i||"y"===i?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle"),r.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(o.get(e)||0)&&(n=t)})),n},getMinMaxSpan:function(){return t.clone(this._minMaxSpan)},calculateDataWindow:function(t){var n,a=this._dataExtent,s=this.getAxisModel().axis.scale,l=this._dataZoomModel.getRangePropMode(),u=[0,100],h=[],c=[];r(["start","end"],(function(i,r){var o=t[i],d=t[i+"Value"];"percent"===l[r]?(null==o&&(o=u[r]),d=s.parse(e.linearMap(o,u,a))):(n=!0,d=null==d?a[r]:s.parse(d),o=e.linearMap(d,a,u)),c[r]=d,h[r]=o})),o(c),o(h);var d=this._minMaxSpan;function p(t,n,r,o,a){var l=a?"Span":"ValueSpan";i(0,t,r,"all",d["min"+l],d["max"+l]);for(var u=0;u<2;u++)n[u]=e.linearMap(t[u],r,o,!0),a&&(n[u]=s.parse(n[u]))}return n?p(c,h,a,u,!1):p(h,c,u,a,!0),{valueWindow:c,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var n=this.getTargetSeriesModels();this._dataExtent=(o=this,a=this._dimName,l=[1/0,-1/0],r(n,(function(t){var e=t.getData();e&&r(e.mapDimension(a,!0),(function(t){var n=e.getApproximateExtent(t);n[0]l[1]&&(l[1]=n[1])}))})),l[1]0?0:NaN);var a=n.getMax(!0);null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:NaN),n.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(o,l),l),function(t){var n=t._minMaxSpan={},i=t._dataZoomModel,o=t._dataExtent;r(["min","max"],(function(r){var a=i.get(r+"Span"),s=i.get(r+"ValueSpan");null!=s&&(s=t.getAxisModel().axis.scale.parse(s)),null!=s?a=e.linearMap(o[0]+s,o,[0,100],!0):null!=a&&(s=e.linearMap(a,[0,100],o,!0)-o[0]),n[r+"Span"]=a,n[r+"ValueSpan"]=s}))}(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,s(this)}var o,a,l},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,s(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&r(i,(function(t){var e=t.getData(),i=e.mapDimension(n,!0);i.length&&("weakFilter"===o?e.filterSelf((function(t){for(var n,r,o,s=0;sa[1];if(u&&!h&&!c)return!0;u&&(o=!0),h&&(n=!0),c&&(r=!0)}return o&&n&&r})):r(i,(function(n){if("empty"===o)t.setData(e=e.map(n,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var i={};i[n]=a,e.selectRange(i)}})),r(i,(function(t){e.setApproximateExtent(a,t)})))}))}}},V7=a}function $7(){if(G7)return F7;G7=1,cW().__DEV__;var t=s$(),e=bW(),n=yW(),i=AY(),r=q7(),o=K7(),a=e.each,s=r.eachAxisDim,l=t.extendComponentModel({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,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=u(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var n=u(t);e.merge(this.option,t,!0),e.merge(this.settledOption,n,!0),this.doInit(n)},doInit:function(t){var e=this.option;n.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),h(this,t);var i=this.settledOption;a([["start","startValue"],["end","endValue"]],(function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[t[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis((function(e,n,i,r){var a=this.dependentModels[e.axis][n],s=a.__dzAxisProxy||(a.__dzAxisProxy=new o(e.name,n,this,r));t[e.name+"_"+n]=s}),this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();s((function(e){var n=e.axisIndex;t[n]=i.normalizeToArray(t[n])}),this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;s((function(n){null!=t[n.axisIndex]&&(e=!0)}),this);var n=t.orient;return null==n&&e?"orient":e?void 0:(null==n&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,n=this.get("orient",!0),i=this.option,r=this.dependentModels;if(t){var o="vertical"===n?"y":"x";r[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):a(r.singleAxis,(function(e){t&&e.get("orient",!0)===n&&(i.singleAxisIndex=[e.componentIndex],t=!1)}))}t&&s((function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;o0?100:20}},getFirstTargetAxisModel:function(){var t;return s((function(e){if(null==t){var n=this.get(e.axisIndex);n.length&&(t=this.dependentModels[e.axis][n[0]])}}),this),t},eachTargetAxis:function(t,e){var n=this.ecModel;s((function(i){a(this.get(i.axisIndex),(function(r){t.call(e,i,r,this,n)}),this)}),this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(t){var e=this.option,n=this.settledOption;a([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),h(this,t)},setCalculatedRange:function(t){var e=this.option;a(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},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 n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}});function u(t){var e={};return a(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}function h(t,e){var n=t._rangePropMode,i=t.get("rangeMode");a([["start","startValue"],["end","endValue"]],(function(t,r){var o=null!=e[t[0]],a=null!=e[t[1]];o&&!a?n[r]="percent":!o&&a?n[r]="value":i?n[r]=i[r]:o&&(n[r]="percent")}))}return F7=l}function J7(){if(W7)return H7;W7=1;var t=eq().extend({type:"dataZoom",render:function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,n={};return t.eachTargetAxis((function(t,i){var r=e.getComponent(t.axis,i);if(r){var o=r.getCoordSysModel();o&&function(t,e,n,i){for(var r,o=0;oe[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&v(e)}};function v(t){return new n(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}return P9.layoutCovers=c,P9}var E9,z9,V9,B9,F9,G9,H9,W9,U9,Y9,Z9,X9,j9,q9,K9,$9,J9,Q9,ttt,ett,ntt={},itt={},rtt={},ott={},att={};function stt(){if(K9)return q9;K9=1;var t=eq().extend({type:"timeline"});return q9=t}var ltt,utt,htt,ctt,dtt={};function ptt(){if(utt)return ltt;utt=1,cW().__DEV__;var t=s$(),e=bW(),n=yW(),i=AY(),r=ij(),o=Hj(),a=r.addCommas,s=r.encodeHTML;function l(t){i.defaultEmphasis(t,"label",["show"])}var u=t.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},isAnimationEnabled:function(){if(n.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,n,i,r){var o=this.constructor,a=this.mainType+"Model";i||n.eachSeries((function(t){var i=t.get(this.mainType,!0),s=t[a];i&&i.data?(s?s._mergeOption(i,n,!0):(r&&l(i),e.each(i.data,(function(t){t instanceof Array?(l(t[0]),l(t[1])):l(t)})),s=new o(i,this,n),e.extend(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[a]=s):t[a]=null}),this)},formatTooltip:function(t,n,i,r){var o=this.getData(),l=this.getRawValue(t),u=e.isArray(l)?e.map(l,a).join(", "):a(l),h=o.getName(t),c=s(this.name);return(null!=l||h)&&(c+="html"===r?"
":"\n"),h&&(c+=s(h),null!=l&&(c+=" : ")),null!=l&&(c+=s(u)),c},getData:function(){return this._data},setData:function(t){this._data=t}});return e.mixin(u,o),ltt=u}var ftt,gtt,vtt,mtt,ytt,xtt,_tt={};function btt(){if(ftt)return _tt;ftt=1;var t=bW(),e=YX(),n=uK().isDimensionStacked,i=t.indexOf;function r(t,i,r,o,a,s){var u=[],h=n(i,o)?i.getCalculationInfo("stackResultDimension"):o,c=l(i,h,t),d=i.indicesOfNearest(h,c)[0];u[a]=i.get(r,d),u[s]=i.get(h,d);var p=i.get(o,d),f=e.getPrecision(i.get(o,d));return(f=Math.min(f,20))>=0&&(u[s]=+u[s].toFixed(f)),[u,p]}var o=t.curry,a={min:o(r,"min"),max:o(r,"max"),average:o(r,"average")};function s(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},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",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});return Ptt=a}var Btt,Ftt,Gtt,Htt,Wtt,Utt,Ytt,Ztt,Xtt,jtt,qtt={};function Ktt(){if(Gtt)return Ftt;Gtt=1,cW().__DEV__;var t=s$(),e=bW(),n=HK().createSymbol,i=zX(),r=D7().makeBackground,o=rj(),a=e.curry,s=e.each,l=i.Group,u=t.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new l),this._backgroundEl,this.group.add(this._selectorGroup=new l),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var s=t.get("align"),l=t.get("orient");s&&"auto"!==s||(s="right"===t.get("left")&&"vertical"===l?"right":"left");var u=t.get("selector",!0),h=t.get("selectorPosition",!0);!u||h&&"auto"!==h||(h="horizontal"===l?"end":"start"),this.renderInner(s,t,n,i,u,l,h);var c=t.getBoxLayoutParams(),d={width:i.getWidth(),height:i.getHeight()},p=t.get("padding"),f=o.getLayoutRect(c,d,p),g=this.layoutInner(t,s,f,a,u,h),v=o.getLayoutRect(e.defaults({width:g.width,height:g.height},c),d,p);this.group.attr("position",[v.x-g.x,v.y-g.y]),this.group.add(this._backgroundEl=r(g,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,n,i,r,o,u,h){var f=this.getContentGroup(),g=e.createHashMap(),v=n.get("selectedMode"),m=[];i.eachRawSeries((function(t){!t.get("legendHoverLink")&&m.push(t.id)})),s(n.getData(),(function(e,o){var s=e.get("name");if(this.newlineDisabled||""!==s&&"\n"!==s){var u=i.getSeriesByName(s)[0];if(!g.get(s))if(u){var h=u.getData(),y=h.getVisual("color"),x=h.getVisual("borderColor");"function"==typeof y&&(y=y(u.getDataParams(0))),"function"==typeof x&&(x=x(u.getDataParams(0)));var _=h.getVisual("legendSymbol")||"roundRect",b=h.getVisual("symbol");this._createItem(s,o,e,n,_,b,t,y,x,v).on("click",a(c,s,null,r,m)).on("mouseover",a(d,u.name,null,r,m)).on("mouseout",a(p,u.name,null,r,m)),g.set(s,!0)}else i.eachRawSeries((function(i){if(!g.get(s)&&i.legendVisualProvider){var l=i.legendVisualProvider;if(!l.containName(s))return;var u=l.indexOfName(s),h=l.getItemVisual(u,"color"),f=l.getItemVisual(u,"borderColor");this._createItem(s,o,e,n,"roundRect",null,t,h,f,v).on("click",a(c,null,s,r,m)).on("mouseover",a(d,null,s,r,m)).on("mouseout",a(p,null,s,r,m)),g.set(s,!0)}}),this)}else f.add(new l({newline:!0}))}),this),o&&this._createSelector(o,n,r,u,h)},_createSelector:function(t,e,n,r,o){var a=this.getSelectorGroup();s(t,(function(t){!function(t){var r=t.type,o=new i.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});a.add(o);var s=e.getModel("selectorLabel"),l=e.getModel("emphasis.selectorLabel");i.setLabelStyle(o.style,o.hoverStyle={},s,l,{defaultText:t.title,isRectText:!1}),i.setHoverStyle(o)}(t)}))},_createItem:function(t,r,o,a,s,u,c,d,p,f){var g=a.get("itemWidth"),v=a.get("itemHeight"),m=a.get("inactiveColor"),y=a.get("inactiveBorderColor"),x=a.get("symbolKeepAspect"),_=a.getModel("itemStyle"),b=a.isSelected(t),w=new l,S=o.getModel("textStyle"),M=o.get("icon"),I=o.getModel("tooltip"),T=I.parentModel,C=n(s=M||s,0,0,g,v,b?d:m,null==x||x);if(w.add(h(C,s,_,p,y,b)),!M&&u&&(u!==s||"none"===u)){var A=.8*v;"none"===u&&(u="circle");var D=n(u,(g-A)/2,(v-A)/2,A,A,b?d:m,null==x||x);w.add(h(D,u,_,p,y,b))}var L="left"===c?g+5:-5,k=c,P=a.get("formatter"),O=t;"string"==typeof P&&P?O=P.replace("{name}",null!=t?t:""):"function"==typeof P&&(O=P(t)),w.add(new i.Text({style:i.setTextStyle({},S,{text:O,x:L,y:v/2,textFill:b?S.getTextColor():m,textAlign:k,textVerticalAlign:"middle"})}));var R=new i.Rect({shape:w.getBoundingRect(),invisible:!0,tooltip:I.get("show")?e.extend({content:t,formatter:T.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:a.componentIndex,name:t,$vars:["name"]}},I.option):null});return w.add(R),w.eachChild((function(t){t.silent=!0})),R.silent=!f,this.getContentGroup().add(w),i.setHoverStyle(w),w.__legendDataIndex=r,w},layoutInner:function(t,e,n,i,r,a){var s=this.getContentGroup(),l=this.getSelectorGroup();o.box(t.get("orient"),s,t.get("itemGap"),n.width,n.height);var u=s.getBoundingRect(),h=[-u.x,-u.y];if(r){o.box("horizontal",l,t.get("selectorItemGap",!0));var c=l.getBoundingRect(),d=[-c.x,-c.y],p=t.get("selectorButtonGap",!0),f=t.getOrient().index,g=0===f?"width":"height",v=0===f?"height":"width",m=0===f?"y":"x";"end"===a?d[f]+=u[g]+p:h[f]+=c[g]+p,d[1-f]+=u[v]/2-c[v]/2,l.attr("position",d),s.attr("position",h);var y={x:0,y:0};return y[g]=u[g]+p+c[g],y[v]=Math.max(u[v],c[v]),y[m]=Math.min(0,c[m]+d[1-f]),y}return s.attr("position",h),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function h(t,e,n,i,r,o){var a;return"line"!==e&&e.indexOf("empty")<0?(a=n.getItemStyle(),t.style.stroke=i,o||(a.stroke=r)):a=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(a)}function c(t,e,n,i){p(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),d(t,e,n,i)}function d(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function p(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}return Ftt=u}function $tt(){return Wtt||(Wtt=1,Htt=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;n0&&e%m)v+=g;else{var n=null==t||isNaN(t)||""===t,i=n?0:u(t,s,c,!0);n&&!h&&e?(p.push([p[p.length-1][0],0]),f.push([f[f.length-1][0],0])):!n&&h&&(p.push([v,0]),f.push([v,0])),p.push([v,i]),f.push([v,i]),v+=g,h=n}}));var y=this.dataZoomModel;this._displayables.barGroup.add(new n.Polygon({shape:{points:p},style:t.defaults({fill:y.get("dataBackgroundColor")},y.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new n.Polyline({shape:{points:f},style:y.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(!1!==n){var i,r=this.ecModel;return e.eachTargetAxis((function(o,a){var s=e.getAxisProxy(o.name,a).getTargetSeriesModels();t.each(s,(function(e){if(!(i||!0!==n&&t.indexOf(g,e.get("type"))<0)){var s,l=r.getComponent(o.axis,a).axis,u={x:"y",y:"x",radius:"angle",angle:"radius"}[o.name],h=e.coordinateSystem;null!=u&&h.getOtherAxis&&(s=h.getOtherAxis(l).inverse),u=e.getData().mapDimension(u),i={thisAxis:l,series:e,thisDim:o.name,otherDim:u,otherAxisInverse:s}}}),this)}),this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],r=this._displayables.barGroup,a=this._size,s=this.dataZoomModel;r.add(t.filler=new l({draggable:!0,cursor:m(this._orient),drift:c(this._onDragMove,this,"all"),ondragstart:c(this._showDataInfo,this,!0),ondragend:c(this._onDragEnd,this),onmouseover:c(this._showDataInfo,this,!0),onmouseout:c(this._showDataInfo,this,!1),style:{fill:s.get("fillerColor"),textPosition:"inside"}})),r.add(new l({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:s.get("dataBackgroundColor")||s.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),d([0,1],(function(t){var a=n.createIcon(s.get("handleIcon"),{cursor:m(this._orient),draggable:!0,drift:c(this._onDragMove,this,t),ondragend:c(this._onDragEnd,this),onmouseover:c(this._showDataInfo,this,!0),onmouseout:c(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),l=a.getBoundingRect();this._handleHeight=o.parsePercent(s.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,a.setStyle(s.getModel("handleStyle").getItemStyle());var u=s.get("handleColor");null!=u&&(a.style.fill=u),r.add(e[t]=a);var h=s.textStyleModel;this.group.add(i[t]=new n.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:h.getTextColor(),textFont:h.getFont()},z2:10}))}),this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[u(t[0],[0,100],e,!0),u(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];s(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?u(o.minSpan,a,r,!0):null,null!=o.maxSpan?u(o.maxSpan,a,r,!0):null);var l=this._range,c=this._range=h([u(i[0],r,a,!0),u(i[1],r,a,!0)]);return!l||l[0]!==c[0]||l[1]!==c[1]},_updateView:function(t){var e=this._displayables,n=this._handleEnds,i=h(n.slice()),r=this._size;d([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scale:[o/2,o/2],position:[n[t],r[1]/2-o/2]})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,r=i.handleLabels,o=this._orient,a=["",""];if(e.get("showDetail")){var s=e.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,c=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();a=[this._formatLabel(c[0],l),this._formatLabel(c[1],l)]}}var d=h(this._handleEnds.slice());function f(t){var e=n.getTransform(i.handles[t].parent,this.group),s=n.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+5,u=n.applyTransform([d[t]+(0===t?-l:l),this._size[1]/2],e);r[t].setStyle({x:u[0],y:u[1],textVerticalAlign:o===p?"middle":s,textAlign:o===p?s:"center",text:a[t]})}f.call(this,0),f.call(this,1)},_formatLabel:function(e,n){var i=this.dataZoomModel,r=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=n.getPixelPrecision());var a=null==e||isNaN(e)?"":"category"===n.type||"time"===n.type?n.scale.getLabel(Math.round(e)):e.toFixed(Math.min(o,20));return t.isFunction(r)?r(e,a):t.isString(r)?r.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,i,r,o){this._dragging=!0,e.stop(o.event);var a=this._displayables.barGroup.getLocalTransform(),s=n.applyTransform([i,r],a,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,n=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>e[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&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(d(this.getTargetCoordInfo(),(function(e){if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}})),!t){var e=this.api.getWidth(),n=this.api.getHeight();t={x:.2*e,y:.2*n,width:.6*e,height:.6*n}}return t}});function m(t){return"vertical"===t?"ns-resize":"ew-resize"}iet=v}(),e9(),h9()),set}var het,cet,det,pet,fet,get,vet,met={},yet={};function xet(){if(det)return yet;det=1;var t=bW(),e=T0(),n=_q(),i="\0_ec_dataZoom_roams";function r(t){var e=t.getZr();return e[i]||(e[i]={})}function o(e){t.each(e,(function(t,n){t.count||(t.controller.dispose(),delete e[n])}))}function a(t,e){t.dispatchAction({type:"dataZoom",batch:e})}return yet.register=function(i,s){var l=r(i),u=s.dataZoomId,h=s.coordId;t.each(l,(function(e,n){var i=e.dataZoomInfos;i[u]&&t.indexOf(s.allCoordIds,h)<0&&(delete i[u],e.count--)})),o(l);var c=l[h];c||((c=l[h]={coordId:h,dataZoomInfos:{},count:0}).controller=function(n,i){var r=new e(n.getZr());return t.each(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(n){var r=[];t.each(i.dataZoomInfos,(function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var o=(t.getRange||{})[e],a=o&&o(i.controller,n);!t.dataZoomModel.get("disabled",!0)&&a&&r.push({dataZoomId:t.dataZoomId,start:a[0],end:a[1]})}})),r.length&&i.dispatchAction(r)}))})),r}(i,c),c.dispatchAction=t.curry(a,i)),!c.dataZoomInfos[u]&&c.count++,c.dataZoomInfos[u]=s;var d,p,f,g,v,m=(d=c.dataZoomInfos,f="type_",g={type_true:2,type_move:1,type_false:0,type_undefined:-1},v=!0,t.each(d,(function(t){var e=t.dataZoomModel,n=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");g[f+n]>g[f+p]&&(p=n),v&=e.get("preventDefaultMouseMove",!0)})),{controlType:p,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!v}});c.controller.enable(m.controlType,m.opt),c.controller.setPointerChecker(s.containsPoint),n.createOrUpdate(c,"dispatchAction",s.dataZoomModel.get("throttle",!0),"fixRate")},yet.unregister=function(e,n){var i=r(e);t.each(i,(function(t){t.controller.dispose();var e=t.dataZoomInfos;e[n]&&(delete e[n],t.count--)})),o(i)},yet.generateCoordId=function(t){return t.type+"\0_"+t.id},yet}function _et(){return get||(get=1,E7(),$7(),J7(),function(){if(cet)return het;cet=1;var t=$7().extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});het=t}(),function(){if(fet)return pet;fet=1;var t=bW(),e=J7(),n=W5(),i=xet(),r=t.bind,o=e.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(e,n,s,l){o.superApply(this,"render",arguments),this._range=e.getPercentRange(),t.each(this.getTargetCoordInfo(),(function(n,o){var l=t.map(n,(function(t){return i.generateCoordId(t.model)}));t.each(n,(function(n){var u=n.model,h={};t.each(["pan","zoom","scrollMove"],(function(t){h[t]=r(a[t],this,n,o)}),this),i.register(s,{coordId:i.generateCoordId(u),allCoordIds:l,containsPoint:function(t,e,n){return u.coordinateSystem.containPoint([e,n])},dataZoomId:e.id,dataZoomModel:e,getRange:h})}),this)}),this)},dispose:function(){i.unregister(this.api,this.dataZoomModel.id),o.superApply(this,"dispose",arguments),this._range=null}}),a={zoom:function(t,e,i,r){var o=this._range,a=o.slice(),s=t.axisModels[0];if(s){var u=l[e](null,[r.originX,r.originY],s,i,t),h=(u.signal>0?u.pixelStart+u.pixelLength-u.pixel:u.pixel-u.pixelStart)/u.pixelLength*(a[1]-a[0])+a[0],c=Math.max(1/r.scale,0);a[0]=(a[0]-h)*c+h,a[1]=(a[1]-h)*c+h;var d=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return n(0,a,[0,100],0,d.minSpan,d.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:s((function(t,e,n,i,r,o){var a=l[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:s((function(t,e,n,i,r,o){return l[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function s(t){return function(e,i,r,o){var a=this._range,s=a.slice(),l=e.axisModels[0];if(l){var u=t(s,l,e,i,r,o);return n(u,s,[0,100],"all"),this._range=s,a[0]!==s[0]||a[1]!==s[1]?s:void 0}}}var l={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};pet=o}(),e9(),h9()),met}var bet,wet,Set={};function Met(){if(wet)return bet;wet=1;var t=bW(),e=t.each;function n(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}return bet=function(i){var r=i&&i.visualMap;t.isArray(r)||(r=r?[r]:[]),e(r,(function(i){if(i){n(i,"splitList")&&!n(i,"pieces")&&(i.pieces=i.splitList,delete i.splitList);var r=i.pieces;r&&t.isArray(r)&&e(r,(function(e){t.isObject(e)&&(n(e,"start")&&!n(e,"min")&&(e.min=e.start),n(e,"end")&&!n(e,"max")&&(e.max=e.end))}))}}))},bet}var Iet,Tet={};function Cet(){return Iet||(Iet=1,oj().registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}))),Tet}var Aet,Det,Let,ket,Pet,Oet,Ret,Net,Eet,zet={};function Vet(){if(Aet)return zet;Aet=1;var t=s$(),e=bW(),n=R9(),i=t2(),r=t.PRIORITY.VISUAL.COMPONENT;function o(t,e,n,r){for(var o=e.targetVisuals[r],a=i.prepareVisualTypes(o),s={color:t.getData().getVisual("color")},l=0,u=a.length;l"],e.isArray(t)&&(t=t.slice(),r=!0),o=n?t:r?[h(t[0]),h(t[1])]:h(t),e.isString(u)?u.replace("{value}",r?o[0]:o).replace("{value2}",r?o[1]:o):e.isFunction(u)?r?u(t[0],t[1]):u(t):r?t[0]===l[0]?i[0]+" "+o[1]:t[1]===l[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function h(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}},resetExtent:function(){var t=this.option,e=d([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var o=i[r];if(!t.getDimensionInfo(o).isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,n=this.option,o={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),s=n.controller||(n.controller={});e.merge(a,o),e.merge(s,o);var d=this.isCategory();function f(r){h(n.color)&&!r.inRange&&(r.inRange={color:n.color.slice().reverse()}),r.inRange=r.inRange||{color:t.get("gradientColor")},c(this.stateList,(function(t){var n=r[t];if(e.isString(n)){var o=i.get(n,"active",d);o?(r[t]={},r[t][n]=o):delete r[t]}}),this)}f.call(this,a),f.call(this,s),function(t,e,n){var o=t[e],a=t[n];o&&!a&&(a=t[n]={},c(o,(function(t,e){if(r.isValidType(e)){var n=i.get(e,"inactive",d);null!=n&&(a[e]=n,"color"!==e||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}})))}.call(this,a,"inRange","outOfRange"),function(t){var n=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor");c(this.stateList,(function(o){var a=this.itemSize,s=t[o];s||(s=t[o]={color:d?r:[r]}),null==s.symbol&&(s.symbol=n&&e.clone(n)||(d?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&e.clone(i)||(d?a[0]:[a[0],a[0]])),s.symbol=l(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var h=s.symbolSize;if(null!=h){var c=-1/0;u(h,(function(t){t>c&&(c=t)})),s.symbolSize=l(h,(function(t){return p(t,[0,c],[0,a[0]],!0)}))}}),this)}.call(this,s)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:f,getValueState:f,getVisualMeta:f});return ket=g}function Get(){if(Eet)return Net;Eet=1;var t=s$(),e=bW(),n=zX(),i=ij(),r=rj(),o=t2(),a=t.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,n,i){this.visualMapModel=t,!1!==t.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,r=i.normalizeCssArray(e.get("padding")||0),o=t.getBoundingRect();t.add(new n.Rect({z2:-1,silent:!0,shape:{x:o.x-r[3],y:o.y-r[0],width:o.width+r[3]+r[1],height:o.height+r[0]+r[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,n,i){var r=(i=i||{}).forceState,a=this.visualMapModel,s={};if("symbol"===n&&(s.symbol=a.get("itemSymbol")),"color"===n){var l=a.get("contentColor");s.color=l}function u(t){return s[t]}function h(t,e){s[t]=e}var c=a.controllerVisuals[r||a.getValueState(t)],d=o.prepareVisualTypes(c);return e.each(d,(function(e){var r=c[e];i.convertOpacityToAlpha&&"opacity"===e&&(e="colorAlpha",r=c.__alphaForOpacity),o.dependsOn(e,n)&&r&&r.applyVisual(t,u,h)})),s[n]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;r.positionElement(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:e.noop});return Net=a}var Het,Wet,Uet,Yet={};function Zet(){if(Het)return Yet;Het=1;var t=bW(),e=rj().getLayoutRect;return Yet.getItemAlign=function(t,n,i){var r=t.option,o=r.align;if(null!=o&&"auto"!==o)return o;for(var a={width:n.getWidth(),height:n.getHeight()},s="horizontal"===r.orient?1:0,l=[["left","right","width"],["top","bottom","height"]],u=l[s],h=[0,null,10],c={},d=0;d<3;d++)c[l[1-s][d]]=h[d],c[u[d]]=2===d?i[0]:r[u[d]];var p=[["x","width",3],["y","height",0]][s],f=e(c,a,r.padding);return u[(f.margin[p[2]]||0)+f[p[0]]+.5*f[p[1]]<.5*a[p[1]]?0:1]},Yet.makeHighDownBatch=function(e,n){return t.each(e||[],(function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(n?n.componentIndex:"")})),e},Yet}function Xet(){if(Uet)return Wet;Uet=1;var t=bW(),e=NX(),n=GW(),i=Get(),r=zX(),o=YX(),a=W5(),s=Zet(),l=AY(),u=o.linearMap,h=t.each,c=Math.min,d=Math.max,p=i.extend({type:"visualMap.continuous",init:function(){p.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,n){if(e){var i=e[1-n];i=null!=i?i+"":"";var o=this.visualMapModel,a=o.get("textGap"),s=o.itemSize,l=this._shapes.barGroup,u=this._applyTransform([s[0]/2,0===n?-a:s[1]+a],l),h=this._applyTransform(0===n?"bottom":"top",l),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new r.Text({style:{x:u[0],y:u[1],textVerticalAlign:"horizontal"===c?"middle":h,textAlign:"horizontal"===c?h:"center",text:i,textFont:d.getFont(),textFill:d.getTextColor()}}))}},_renderBar:function(e){var n=this.visualMapModel,i=this._shapes,r=n.itemSize,o=this._orient,a=this._useHandle,l=s.getItemAlign(n,this.api,r),u=i.barGroup=this._createBarGroup(l);u.add(i.outOfRange=f()),u.add(i.inRange=f(null,a?v(this._orient):null,t.bind(this._dragHandle,this,"all",!1),t.bind(this._dragHandle,this,"all",!0)));var h=n.textStyleModel.getTextRect("国"),c=d(h.width,h.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(u,0,r,c,o,l),this._createHandle(u,1,r,c,o,l)),this._createIndicator(u,r,c,o),e.add(u)},_createHandle:function(e,i,o,a,s){var l=t.bind(this._dragHandle,this,i,!1),u=t.bind(this._dragHandle,this,i,!0),h=f(function(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}(i,a),v(this._orient),l,u);h.position[0]=o[0],e.add(h);var c=this.visualMapModel.textStyleModel,d=new r.Text({draggable:!0,drift:l,onmousemove:function(t){n.stop(t.event)},ondragend:u,style:{x:0,y:0,text:"",textFont:c.getFont(),textFill:c.getTextColor()}});this.group.add(d);var p=["horizontal"===s?a/2:1.5*a,"horizontal"===s?0===i?-1.5*a:1.5*a:0===i?-a/2:a/2],g=this._shapes;g.handleThumbs[i]=h,g.handleLabelPoints[i]=p,g.handleLabels[i]=d},_createIndicator:function(t,e,n,i){var o=f([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,s=new r.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(s);var l=["horizontal"===i?n/2:9,0],u=this._shapes;u.indicator=o,u.indicatorLabel=s,u.indicatorLabelPoint=l},_dragHandle:function(t,e,n,i){if(this._useHandle){if(this._dragging=!e,!e){var r=this._applyTransform([n,i],this._shapes.barGroup,!0);this._updateInterval(t,r[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():g(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[u(e[0],n,i,!0),u(e[1],n,i,!0)]},_updateInterval:function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,r=[0,n.itemSize[1]];a(e,i,r,t,0);var o=n.getExtent();this._dataInterval=[u(i[0],r,o,!0),u(i[1],r,o,!0)]},_updateView:function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,r=[0,e.itemSize[1]],o=t?r:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,o,"inRange"),s=this._createBarVisual(n,n,r,"outOfRange");i.inRange.setStyle({fill:a.barColor,opacity:a.opacity}).setShape("points",a.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(o,a)},_createBarVisual:function(t,n,i,r){var o={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),s=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],l=this._createBarPoints(i,s);return{barColor:new e(0,0,0,1,a),barPoints:l,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var r=1;r<100;r++){var o=t[0]+i*r;if(o>t[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new r.Group("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{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 n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,a=n.handleLabels;h([0,1],(function(s){var l=o[s];l.setStyle("fill",e.handlesColor[s]),l.position[1]=t[s];var u=r.applyTransform(n.handleLabelPoints[s],r.getTransform(l,this.group));a[s].setStyle({x:u[0],y:u[1],text:i.formatValueText(this._dataInterval[s]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===s?"bottom":"top":"left",n.barGroup)})}),this)}},_showIndicator:function(t,e,n,i){var o=this.visualMapModel,a=o.getExtent(),s=o.itemSize,l=[0,s[1]],h=u(t,a,l,!0),p=this._shapes,f=p.indicator;if(f){f.position[1]=h,f.attr("invisible",!1),f.setShape("points",function(t,e,n,i){return t?[[0,-c(e,d(n,0))],[6,0],[0,c(e,d(i-n,0))]]:[[0,0],[5,-5],[5,5]]}(!!n,i,h,s[1]));var g=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});f.setStyle("fill",g);var v=r.applyTransform(p.indicatorLabelPoint,r.getTransform(f,this.group)),m=p.indicatorLabel;m.attr("invisible",!1);var y=this._applyTransform("left",p.barGroup),x=this._orient;m.setStyle({text:(n||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===x?y:"middle",textAlign:"horizontal"===x?"center":y,x:v[0],y:v[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);i[1]=c(d(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[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 n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var r=[0,i[1]],o=n.getExtent();t=c(d(r[0],t),r[1]);var a=function(t,e,n){var i=6,r=t.get("hoverLinkDataSize");return r&&(i=u(r,e,n,!0)/2),i}(n,o,r),h=[t-a,t+a],p=u(t,r,o,!0),f=[u(h[0],r,o,!0),u(h[1],r,o,!0)];h[0]r[1]&&(f[1]=1/0),e&&(f[0]===-1/0?this._showIndicator(p,f[1],"< ",a):f[1]===1/0?this._showIndicator(p,f[0],"> ",a):this._showIndicator(p,p,"≈ ",a));var v=this._hoverLinkDataIndices,m=[];(e||g(n))&&(m=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var y=l.compressBatches(v,m);this._dispatchHighDown("downplay",s.makeHighDownBatch(y[0],n)),this._dispatchHighDown("highlight",s.makeHighDownBatch(y[1],n))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=e.dataIndex){var i=this.ecModel.getSeriesByIndex(e.seriesIndex);if(n.isTargetSeries(i)){var r=i.getData(e.dataType),o=r.get(n.getDataDimension(r),e.dataIndex,!0);isNaN(o)||this._showIndicator(o,o)}}},_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",s.makeHighDownBatch(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(e,n,i,o){var a=r.getTransform(n,o?null:this.group);return r[t.isArray(e)?"applyTransform":"transformDirection"](e,a,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()}});function f(t,e,i,o){return new r.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){n.stop(t.event)},ondragend:o})}function g(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function v(t){return"vertical"===t?"ns-resize":"ew-resize"}return Wet=p}var jet,qet,Ket={};function $et(){return jet||(jet=1,s$().registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))}))),Ket}function Jet(){if(qet)return Set;qet=1;var t=s$(),e=Met();return Cet(),Vet(),function(){if(Ret)return Oet;Ret=1;var t=bW(),e=Fet(),n=YX(),i=[20,140],r=e.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){r.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){r.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=i[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=i[1])},_resetRange:function(){var e=this.getExtent(),n=this.option.range;!n||n.auto?(e.auto=1,this.option.range=e):t.isArray(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],e[0]),n[1]=Math.min(n[1],e[1]))},completeVisualOption:function(){e.prototype.completeVisualOption.apply(this,arguments),t.each(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=n.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},getVisualMeta:function(t){var e=o(this,"outOfRange",this.getExtent()),n=o(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var a=0,s=0,l=n.length,u=e.length;s0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(e){this.option.selected=t.clone(e)},getValueState:function(t){var e=n.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 r=[],o=i.getData();o.each(this.getDataDimension(o),(function(e,i){n.findPieceIndex(e,this._pieceList)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},getVisualMeta:function(e){if(!this.isCategory()){var n=[],i=[],r=this,o=this._pieceList.slice();if(o.length){var a=o[0].interval[0];a!==-1/0&&o.unshift({interval:[-1/0,a]}),(a=o[o.length-1].interval[1])!==1/0&&o.push({interval:[a,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return t.each(o,(function(t){var e=t.interval;e&&(e[0]>s&&l([s,e[0]],"outOfRange"),l(e.slice()),s=e[1])}),this),{stops:n,outerColors:i}}function l(t,o){var a=r.getRepresentValue({interval:t});o||(o=r.getValueState(a));var s=e(a,o);t[0]===-1/0?i[0]=s:t[1]===1/0?i[1]=s:n.push({value:t[0],color:s},{value:t[1],color:s})}}}),a={splitNumber:function(){var e=this.option,n=this._pieceList,i=Math.min(e.precision,20),o=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var s=(o[1]-o[0])/a;+s.toFixed(i)!==s&&i<5;)i++;e.precision=i,s=+s.toFixed(i),e.minOpen&&n.push({interval:[-1/0,o[0]],close:[0,0]});for(var l=0,u=o[0];l","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function s(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}Qet=o}(),function(){if(nnt)return ent;nnt=1;var t=bW(),e=Get(),n=zX(),i=HK().createSymbol,r=rj(),o=Zet(),a=e.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var i=this.visualMapModel,o=i.get("textGap"),a=i.textStyleModel,s=a.getFont(),l=a.getTextColor(),u=this._getItemAlign(),h=i.itemSize,c=this._getViewData(),d=c.endsText,p=t.retrieve(i.get("showLabel",!0),!d);d&&this._renderEndsText(e,d[0],h,p,u),t.each(c.viewPieceList,(function(r){var a=r.piece,c=new n.Group;c.onclick=t.bind(this._onItemClick,this,a),this._enableHoverLink(c,r.indexInModelPieceList);var d=i.getRepresentValue(a);if(this._createItemSymbol(c,d,[0,0,h[0],h[1]]),p){var f=this.visualMapModel.getValueState(d);c.add(new n.Text({style:{x:"right"===u?-o:h[0]+o,y:h[1]/2,text:a.text,textVerticalAlign:"middle",textAlign:u,textFont:s,textFill:l,opacity:"outOfRange"===f?.5:1}}))}e.add(c)}),this),d&&this._renderEndsText(e,d[1],h,p,u),r.box(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,n){function i(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:o.makeHighDownBatch(e.findTargetDataIndices(n),e)})}e.on("mouseover",t.bind(i,this,"highlight")).on("mouseout",t.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return o.getItemAlign(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(t,e,i,r,o){if(e){var a=new n.Group,s=this.visualMapModel.textStyleModel;a.add(new n.Text({style:{x:r?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:r?o:"center",text:e,textFont:s.getFont(),textFill:s.getTextColor()}})),t.add(a)}},_getViewData:function(){var e=this.visualMapModel,n=t.map(e.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=e.get("text"),r=e.get("orient"),o=e.get("inverse");return("horizontal"===r?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},_createItemSymbol:function(t,e,n){t.add(i(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(e){var n=this.visualMapModel,i=n.option,r=t.clone(i.selected),o=n.getSelectedMapKey(e);"single"===i.selectedMode?(r[o]=!0,t.each(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}});ent=a}(),$et(),t.registerPreprocessor(e),ont}var snt,lnt,unt,hnt,cnt,dnt={},pnt={},fnt={};function gnt(){if(snt)return fnt;snt=1;var t,e=yW(),n="urn:schemas-microsoft-com:vml",i="undefined"==typeof window?null:window,r=!1,o=i&&i.document;if(o&&!e.canvasSupported)try{!o.namespaces.zrvml&&o.namespaces.add("zrvml",n),t=function(t){return o.createElement("')}}catch(Fu){t=function(t){return o.createElement("<"+t+' xmlns="'+n+'" class="zrvml">')}}return fnt.doc=o,fnt.createNode=function(e){return t(e)},fnt.initVML=function(){if(!r&&o){r=!0;var t=o.styleSheets;t.length<31?o.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}},fnt}var vnt,mnt,ynt,xnt,_nt,bnt,wnt,Snt,Mnt,Int,Tnt,Cnt,Ant,Dnt,Lnt,knt,Pnt={},Ont={},Rnt={};function Nnt(){return vnt||(vnt=1,Rnt.createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}),Rnt}function Ent(){if(mnt)return Ont;mnt=1;var t=Nnt().createElement,e=qY(),n=kU(),i=$W(),r=eY(),o=xY(),a=NZ(),s=e.CMD,l=Array.prototype.join,u="none",h=Math.round,c=Math.sin,d=Math.cos,p=Math.PI,f=2*Math.PI,g=180/p,v=1e-4;function m(t){return h(1e4*t)/1e4}function y(t){return t-1e-4}function x(t,e){e&&_(t,"transform","matrix("+l.call(e,",")+")")}function _(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function b(t,e,n,i){if(function(t,e){var n=e?t.textFill:t.fill;return null!=n&&n!==u}(e,n)){var r=n?e.textFill:e.fill;_(t,"fill",r="transparent"===r?u:r),_(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else _(t,"fill",u);if(function(t,e){var n=e?t.textStroke:t.stroke;return null!=n&&n!==u}(e,n)){var o=n?e.textStroke:e.stroke;_(t,"stroke",o="transparent"===o?u:o),_(t,"stroke-width",(n?e.textStrokeWidth:e.lineWidth)/(!n&&e.strokeNoScale?i.getLineScale():1)),_(t,"paint-order",n?"stroke":"fill"),_(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(_(t,"stroke-dasharray",e.lineDash.join(",")),_(t,"stroke-dashoffset",h(e.lineDashOffset||0))):_(t,"stroke-dasharray",""),e.lineCap&&_(t,"stroke-linecap",e.lineCap),e.lineJoin&&_(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&_(t,"stroke-miterlimit",e.miterLimit)}else _(t,"stroke",u)}var w={brush:function(e){var n=e.style,i=e.__svgEl;i||(i=t("path"),e.__svgEl=i),e.path||e.createPathProxy();var r=e.path;if(e.__dirtyPath){r.beginPath(),r.subPixelOptimize=!1,e.buildPath(r,e.shape),e.__dirtyPath=!1;var o=function(t){for(var e=[],n=t.data,i=t.len(),r=0;r=f:-b>=f),T=b>0?b%f:b%f+f,C=!1;C=!!I||!y(M)&&T>=p==!!S;var A=m(l+v*d(_)),D=m(u+x*c(_));I&&(b=S?f-1e-4:1e-4-f,C=!0,9===r&&e.push("M",A,D));var L=m(l+v*d(_+b)),k=m(u+x*c(_+b));e.push("A",m(v),m(x),h(w*g),+C,+S,L,k);break;case s.Z:o="Z";break;case s.R:L=m(n[r++]),k=m(n[r++]);var P=m(n[r++]),O=m(n[r++]);e.push("M",L,k,"L",L+P,k,"L",L+P,k+O,"L",L,k+O,"L",L,k)}o&&e.push(o);for(var R=0;Rz){for(;N=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},u.prototype.update=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},u.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},u.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},u.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var n=[];return e.each(this._tagNames,(function(e){var i=t.getElementsByTagName(e);n=n.concat([].slice.call(i))})),n},u.prototype.markAllUnused=function(){var t=this.getDoms(),n=this;e.each(t,(function(t){t[n._markLabel]="0"}))},u.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},u.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var n=this.getDoms(),i=this;e.each(n,(function(e){"1"!==e[i._markLabel]&&t.removeChild(e)}))}},u.prototype.getSvgProxy=function(t){return t instanceof n?a:t instanceof i?s:t instanceof r?l:a},u.prototype.getTextSvgElement=function(t){return t.__textSvgEl},u.prototype.getSvgElement=function(t){return t.__svgEl},_nt=u}function Vnt(){if(Dnt)return Ant;Dnt=1;var t=Nnt().createElement,e=bW(),n=AU(),i=PZ(),r=wY(),o=NZ(),a=function(){if(xnt)return ynt;function t(){}function e(t,e,n,i){for(var r=0,o=e.length,a=0,s=0;r=a&&c+1>=s){for(var d=[],p=0;p=a&&p+1>=s)return e(o,u.components);h[r]=u}else h[r]=void 0}l++}for(;l<=u;){var g=f();if(g)return g}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var r=e.length,o=n.length,a=t.newPos,s=a-i,l=0;a+1-1){var u=i.parse(l)[3],h=i.toHex(l);s.setAttribute("stop-color","#"+h),s.setAttribute("stop-opacity",u)}else s.setAttribute("stop-color",r[o].color);e.appendChild(s)}t._dom=e},r.prototype.markUsed=function(e){if(e.style){var n=e.style.fill;n&&n._dom&&t.prototype.markUsed.call(this,n._dom),(n=e.style.stroke)&&n._dom&&t.prototype.markUsed.call(this,n._dom)}},wnt=r}(),l=function(){if(Int)return Mnt;Int=1;var t=znt(),e=bW(),n=$W();function i(e,n){t.call(this,e,n,"clipPath","__clippath_in_use__")}return e.inherits(i,t),i.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var n=this.getTextSvgElement(t);n&&this.updateDom(n,t.__clipPaths,!0),this.markUsed(t)},i.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var r,o,a=this.getDefs(!0),s=e[0],l=i?"_textDom":"_dom";s[l]?(o=s[l].getAttribute("id"),r=s[l],a.contains(r)||a.appendChild(r)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(r),s[l]=r);var u=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!i){var h=Array.prototype.slice.call(s.transform);n.mul(s.transform,s.parent.invTransform,s.transform),u.brush(s),s.transform=h}else u.brush(s);var c=this.getSvgElement(s);r.innerHTML="",r.appendChild(c.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(r,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},i.prototype.markUsed=function(n){var i=this;n.__clipPaths&&e.each(n.__clipPaths,(function(e){e._dom&&t.prototype.markUsed.call(i,e._dom),e._textDom&&t.prototype.markUsed.call(i,e._textDom)}))},Mnt=i}(),u=function(){if(Cnt)return Tnt;Cnt=1;var t=znt();function e(e,n){t.call(this,e,n,["filter"],"__filter_in_use__","_shadowDom")}function n(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}return bW().inherits(e,t),e.prototype.addWithoutUpdate=function(t,e){if(e&&n(e.style)){var i;e._shadowDom?(i=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var r=i.getAttribute("id");t.style.filter="url(#"+r+")"}},e.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},e.prototype.update=function(e,i){if(n(i.style)){var r=this;t.prototype.update.call(this,i,(function(){r.updateDom(i,i._shadowDom)}))}else this.remove(e,i)},e.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},e.prototype.updateDom=function(t,e){var n=e.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,r,o,a,s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,r=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);i=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",r/u),n.setAttribute("flood-color",a);var h=o/2/l+" "+o/2/u;n.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(n),t._shadowDom=e},e.prototype.markUsed=function(e){e._shadowDom&&t.prototype.markUsed.call(this,e._shadowDom)},Tnt=e}(),h=Ent(),c=h.path,d=h.image,p=h.text;function f(t){return parseInt(t,10)}function g(t,e){return e&&t&&e.parentNode!==t}function v(t,e,n){if(g(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function m(t,e){if(g(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function y(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function x(t){return t.__textSvgEl}function _(t){return t.__svgEl}var b=function(n,i,r,o){this.root=n,this.storage=i,this._opts=r=e.extend({},r||{});var a=t("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("version","1.1"),a.setAttribute("baseProfile","full"),a.style.cssText="user-select:none;position:absolute;left:0;top:0;";var h=t("g");a.appendChild(h);var c=t("g");a.appendChild(c),this.gradientManager=new s(o,c),this.clipPathManager=new l(o,c),this.shadowManager=new u(o,c);var d=document.createElement("div");d.style.cssText="overflow:hidden;position:relative",this._svgDom=a,this._svgRoot=c,this._backgroundRoot=h,this._viewport=d,n.appendChild(d),d.appendChild(a),this.resize(r.width,r.height),this._visibleList=[]};return b.prototype={constructor:b,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},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)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var n=t("rect");n.setAttribute("width",this.getWidth()),n.setAttribute("height",this.getHeight()),n.setAttribute("x",0),n.setAttribute("y",0),n.setAttribute("id",0),n.style.fill=e,this._backgroundRoot.appendChild(n),this._backgroundNode=n},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,n,s=this._svgRoot,l=this._visibleList,u=t.length,h=[];for(e=0;e=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},resize:function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.height=e+"px";var o=this._svgDom;o.setAttribute("width",t),o.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||f(s[n])||f(a.style[n]))-(f(s[r])||0)-(f(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/>\n\r<"))}},e.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(t){var e;b.prototype[t]=(e=t,function(){n('In SVG mode painter not support method "'+e+'"')})})),Ant=b}W_([aW]),W_([function(t){t.registerPainter("svg",QH)}]),W_([Yw,mS,ES,function(t){W_(EM),t.registerSeriesModel(zS),t.registerChartView(GS),t.registerLayout(Gw("scatter"))},function(t){W_(KM),t.registerChartView(GM),t.registerSeriesModel(HM),t.registerLayout(zM),t.registerProcessor(MS("radar")),t.registerPreprocessor(FM)},MT,function(t){t.registerChartView(ET),t.registerSeriesModel(rC),t.registerLayout(aC),t.registerVisual(sC),function(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var n=t.dataIndex,i=e.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand}))})),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(t,e,n){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=_T(e.coordinateSystem,t,void 0,n);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)}))}))}(t)},function(t){t.registerSeriesModel(hC),t.registerChartView(SC),t.registerVisual(FC),t.registerLayout(QC),function(t){for(var e=0;e=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Bnt(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}()),Hnt={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Hnt.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Hnt.bounceIn(2*t):.5*Hnt.bounceOut(2*t-1)+.5}};Knt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),Knt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{});var Wnt=Array.prototype,Unt=Wnt.slice,Ynt=Wnt.map,Znt=function(){}.constructor,Xnt=Znt?Znt.prototype:null;function jnt(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function qnt(t,e,n){if(!t)return[];if(!e)return function(t){for(var e=[],n=1;n-1e-8&&t<1e-8}var sit=/cubic-bezier\(([0-9,\.e ]+)\)/;function lit(t){var e=t&&sit.exec(t);if(e){var n=e[1].split(","),i=+tit(n[0]),r=+tit(n[1]),o=+tit(n[2]),a=+tit(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:function(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,d=l*l-3*s*u,p=0;if(ait(h)&&ait(c))ait(s)?o[0]=0:(M=-l/s)>=0&&M<=1&&(o[p++]=M);else{var f=c*c-4*h*d;if(ait(f)){var g=c/h,v=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[p++]=M),v>=0&&v<=1&&(o[p++]=v)}else if(f>0){var m=iit(f),y=h*s+1.5*a*(-c+m),x=h*s+1.5*a*(-c-m);(M=(-s-((y=y<0?-nit(-y,oit):nit(y,oit))+(x=x<0?-nit(-x,oit):nit(x,oit))))/(3*a))>=0&&M<=1&&(o[p++]=M)}else{var _=(2*h*s-3*a*c)/(2*iit(h*h*h)),b=Math.acos(_)/3,w=iit(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(v=(-s+w*(S+rit*Math.sin(b)))/(3*a),(-s+w*(S-rit*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[p++]=M),v>=0&&v<=1&&(o[p++]=v),I>=0&&I<=1&&(o[p++]=I)}}return p}(0,i,o,1,t,s)&&(n=1-(e=s[0]))*n*(0*n+3*e*r)+e*e*(1*e+3*n*a);var e,n}}}var uit=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||eit,this.ondestroy=t.ondestroy||eit,this.onrestart=t.onrestart||eit,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Jnt(t)?t:Hnt[t]||lit(t)},t}(),hit={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function cit(t){return(t=Math.round(t))<0?0:t>255?255:t}function dit(t){return t<0?0:t>1?1:t}function pit(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?cit(parseFloat(e)/100*255):cit(parseInt(e,10))}function fit(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?dit(parseFloat(e)/100):dit(parseFloat(e))}function git(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function vit(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function mit(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var yit=new Gnt(20),xit=null;function _it(t,e){xit&&mit(xit,e),xit=yit.put(t,xit||e.slice())}function bit(t,e){if(t){e=e||[];var n=yit.get(t);if(n)return mit(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in hit)return mit(e,hit[i]),_it(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(vit(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),_it(t,e),e):void vit(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(vit(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),_it(t,e),e):void vit(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?vit(e,+u[0],+u[1],+u[2],1):vit(e,0,0,0,1);h=fit(u.pop());case"rgb":return u.length>=3?(vit(e,pit(u[0]),pit(u[1]),pit(u[2]),3===u.length?h:fit(u[3])),_it(t,e),e):void vit(e,0,0,0,1);case"hsla":return 4!==u.length?void vit(e,0,0,0,1):(u[3]=fit(u[3]),wit(u,e),_it(t,e),e);case"hsl":return 3!==u.length?void vit(e,0,0,0,1):(wit(u,e),_it(t,e),e);default:return}}vit(e,0,0,0,1)}}function wit(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=fit(t[1]),r=fit(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return vit(e=e||[],cit(255*git(a,o,n+1/3)),cit(255*git(a,o,n)),cit(255*git(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}var Sit=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Mit=new function(){this.browser=new Sit,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(Mit.wxa=!0,Mit.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Mit.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js?v=1773287522785")?(Mit.node=!0,Mit.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18),a&&(n.weChat=!0),e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Mit),Mit.hasGlobalWindow&&Jnt(window.btoa);var Iit=Array.prototype.slice;function Tit(t,e,n){return(e-t)*n+t}function Cit(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(jnt(e)){var l=function(t){return jnt(t&&t[0])?2:1}(e);a=l,(1===l&&!Qnt(e[0])||2===l&&!Qnt(e[0][0]))&&(o=!0)}else if(Qnt(e)&&!function(t){return t!=t}(e))a=0;else if(function(t){return"string"==typeof t}(e))if(isNaN(+e)){var u=bit(e);u&&(s=u,a=3)}else a=0;else if(function(t){return null!=t.colorStops}(e)){var h=function(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&"__proto__"!==n&&(t[n]=e[n]);return t}({},s);h.colorStops=qnt(e.colorStops,(function(t){return{offset:t.offset,color:bit(t.color)}})),"linear"===e.type?a=4:function(t){return"radial"===t.type}(e)&&(a=5),s=h}0===r?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=Jnt(n)?n:Hnt[n]||lit(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=Nit(i),l=Rit(i),u=0;u=0&&!(l[n].percent<=e);n--);n=p(n,u-2)}else{for(n=d;ne);n++);n=p(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:p((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var v=o?this._additiveValue:c?zit:t[h];if(!Nit(s)&&!c||v||(v=this._additiveValue=[]),this.discrete)t[h]=g<1?i.rawValue:r.rawValue;else if(Nit(s))1===s?Cit(v,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,Pit(l),i),this._trackKeys.push(a)}s.addKeyframe(t,Pit(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}()),t("B",Eit),t("B",Eit=Mit.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)});var Bit={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]}}}}));