i&&(this._approxInterval=i);var s=Cu.length,l=Math.min(KR(Cu,this._approxInterval,0,s),s-1);this._interval=Cu[l][1],this._minLevelUnit=Cu[Math.max(l-1,0)][0]},t.prototype.parse=function(r){return typeof r=="number"?r:+Ir(r)},t.prototype.contain=function(r){return bu(this.parse(r),this._extent)},t.prototype.normalize=function(r){return wu(this.parse(r),this._extent)},t.prototype.scale=function(r){return xu(r,this._extent)},t.type="time",t}(Tu),Cu=[["second",Ph],["minute",Ih],["hour",mo],["quarter-day",mo*6],["half-day",mo*12],["day",Ne*1.2],["half-week",Ne*3.5],["week",Ne*7],["month",Ne*31],["quarter",Ne*95],["half-year",D0/2],["year",D0]];function jR(e,t,r,n){var i=Ir(t),a=Ir(r),o=function(d){return L0(i,d,n)===L0(a,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},v=function(){return h()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return v()}}function QR(e,t){return e/=Ne,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function JR(e){var t=30*Ne;return e/=t,e>6?6:e>3?3:e>2?2:1}function tO(e){return e/=mo,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function kS(e,t){return e/=t?Ih:Ph,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function eO(e){return Ty(e,!0)}function rO(e,t,r){var n=new Date(e);switch(ta(t)){case"year":case"month":n[E0(r)](0);case"day":n[R0(r)](1);case"hour":n[O0(r)](0);case"minute":n[k0(r)](0);case"second":n[B0(r)](0),n[F0(r)](0)}return n.getTime()}function nO(e,t,r,n){var i=1e4,a=P0,o=0;function s(L,I,P,E,B,k,Y){for(var q=new Date(I),U=I,Q=q[E]();U1&&k===0&&P.unshift({value:P[0].value-U})}}for(var k=0;k=n[0]&&m<=n[1]&&c++)}var _=(n[1]-n[0])/t;if(c>_*1.5&&h>_/1.5||(u.push(p),c>_||e===a[v]))break}f=[]}}}for(var S=xe(ut(u,function(L){return xe(L,function(I){return I.value>=n[0]&&I.value<=n[1]&&!I.notAdd})}),function(L){return L.length>0}),w=[],b=S.length-1,v=0;v0;)a*=10;var s=[ae(sO(n[0]/a)*a),ae(oO(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.niceExtent=function(r){Xo.niceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return r=We(r)/We(this.base),bu(r,this._extent)},t.prototype.normalize=function(r){return r=We(r)/We(this.base),wu(r,this._extent)},t.prototype.scale=function(r){return r=xu(r,this._extent),Mu(this.base,r)},t.type="log",t}(zr),FS=Pv.prototype;FS.getMinorTicks=Xo.getMinorTicks;FS.getLabel=Xo.getLabel;function Du(e,t){return aO(e,Pr(t))}zr.registerClass(Pv);var lO=Pv,uO=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},e.prototype.modifyDataMinMax=function(t,r){this[cO[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=fO[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),fO={min:"_determinedMin",max:"_determinedMax"},cO={min:"_dataMin",max:"_dataMax"};function hO(e,t,r){var n=e.rawExtentInfo;return n||(n=new uO(e,t,r),e.rawExtentInfo=n,n)}function Au(e,t){return t==null?null:Xf(t)?NaN:e.parse(t)}function vO(e,t){var r=e.type,n=hO(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=YR("bar",o),l=!1;if(D(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=IS(s),f=dO(i,a,t,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function dO(e,t,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=LS(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;D(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;D(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-e,c=1-(s+l)/a,h=f/c-f;return t+=h*(l/u),e-=h*(s/u),{min:e,max:t}}function NS(e,t){var r=t,n=vO(e,r),i=n.extent,a=r.get("splitNumber");e instanceof lO&&(e.base=r.get("logBase"));var o=e.type;e.setExtent(i[0],i[1]),e.niceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:o==="interval"||o==="time"?r.get("minInterval"):null,maxInterval:o==="interval"||o==="time"?r.get("maxInterval"):null});var s=r.get("interval");s!=null&&e.setInterval&&e.setInterval(s)}function pO(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new CS({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new iO({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(zr.getClass(t)||Tu)}}function gO(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function qo(e){var t=e.getLabelModel().get("formatter"),r=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?function(n){return function(i,a){return e.scale.getFormattedLabel(i,a,n)}}(t):typeof t=="string"?function(n){return function(i){var a=e.scale.getLabel(i),o=n.replace("{value}",a!=null?a:"");return o}}(t):typeof t=="function"?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(Iv(e,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return e.scale.getLabel(n)}}function Iv(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function yO(e){var t=e.model,r=e.scale;if(!(!t.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof CS?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=qo(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;f=0||(HS.push(e),Xt(e)&&(e={install:e}),e.install(bO))}var Zo=Kt();function wO(e){return e.type==="category"?TO(e):MO(e)}function xO(e,t){return e.type==="category"?CO(e,t):{ticks:ut(e.scale.getTicks(),function(r){return r.value})}}function TO(e){var t=e.getLabelModel(),r=VS(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function VS(e,t){var r=GS(e,"labels"),n=Lv(t),i=$S(r,n);if(i)return i;var a,o;return Xt(n)?a=YS(e,n):(o=n==="auto"?DO(e):n,a=WS(e,o)),US(r,n,{labels:a,labelCategoryInterval:o})}function CO(e,t){var r=GS(e,"ticks"),n=Lv(t),i=$S(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),Xt(n))a=YS(e,n,!0);else if(n==="auto"){var s=VS(e,e.getLabelModel());o=s.labelCategoryInterval,a=ut(s.labels,function(l){return l.tickValue})}else o=n,a=WS(e,o,!0);return US(r,n,{ticks:a,tickCategoryInterval:o})}function MO(e){var t=e.scale.getTicks(),r=qo(e);return{labels:ut(t,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value}})}}function GS(e,t){return Zo(e)[t]||(Zo(e)[t]=[])}function $S(e,t){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),f=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),h=0,v=0;l<=a[1];l+=s){var d=0,y=0,p=Pc(r({value:l}),t.font,"center","top");d=p.width*1.3,y=p.height*1.3,h=Math.max(h,d,7),v=Math.max(v,y,7)}var g=h/f,m=v/c;isNaN(g)&&(g=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(g,m))),S=Zo(e.model),w=e.getExtent(),b=S.lastAutoInterval,x=S.lastTickCount;return b!=null&&x!=null&&Math.abs(b-_)<=1&&Math.abs(x-o)<=1&&b>_&&S.axisExtent0===w[0]&&S.axisExtent1===w[1]?_=b:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=w[0],S.axisExtent1=w[1]),_}function PO(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function WS(e,t,r){var n=qo(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=zS(e),h=o.get("showMinLabel")||c,v=o.get("showMaxLabel")||c;h&&u!==a[0]&&y(a[0]);for(var d=u;d<=a[1];d+=l)y(d);v&&d-l!==a[1]&&y(a[1]);function y(p){var g={value:p};s.push(r?p:{formattedLabel:n(g),rawLabel:i.getLabel(g),tickValue:p})}return s}function YS(e,t,r){var n=e.scale,i=qo(e),a=[];return D(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var XS=[0,1],IO=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return TD(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),qS(n,i.count())),by(t,XS,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),qS(n,i.count()));var a=by(t,n,XS,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=xO(this,r),i=n.ticks,a=ut(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return LO(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=ut(n,function(a){return ut(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(){return wO(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return AO(this)},e}();function qS(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function LO(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[0]};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;D(t,function(v){v.coord-=u/2});var f=e.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s},t.push(o)}var c=a[0]>a[1];h(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&h(a[0],t[0].coord)&&t.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&h(o.coord,a[1])&&t.push({coord:a[1]});function h(v,d){return v=ae(v),d=ae(d),c?v>d:vn[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(EO),XO=YO;function kv(e,t,r){r=r||{};var n=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=u==="x"?[c[2]-v,c[3]+v]:[c[0]-v,c[1]+v];if(o){var y=o.toGlobalCoord(o.dataToCoord(0));d[h.onZero]=Math.max(Math.min(y,d[1]),d[0])}a.position=[u==="y"?d[h[l]]:c[0],u==="x"?d[h[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=p[s],a.labelOffset=o?d[h[s]]-d[h.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Fa(r.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var g=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-g:g,a.z2=1,a}function JS(e){return e.get("coordinateSystem")==="cartesian2d"}function tb(e){var t={xAxisModel:null,yAxisModel:null};return D(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,Je).models[0];t[n]=a}),t}var qO=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Ov,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model),D(n.x,function(a){NS(a.scale,a.model)}),D(n.y,function(a){NS(a.scale,a.model)});var i={};D(n.x,function(a){eb(n,"y",a,i)}),D(n.y,function(a){eb(n,"x",a,i)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=wo(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=yO(u);if(f){var c=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,u.position==="top"?o.y+=f.height+h:u.position==="left"&&(o.x+=f.width+h)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(c[h],c[1-h]),ZO(u,f?o.x:o.y)})}},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}st(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):nl(i-vn)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),nb={axisLine:function(e,t,r,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0];o&&(ie(s,s,o),ie(l,l,o));var u=K({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new nn({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});f.anid="line",r.add(f);var c=t.get(["axisLine","symbol"]);if(c!=null){var h=t.get(["axisLine","symbolSize"]);typeof c=="string"&&(c=[c,c]),(typeof h=="string"||typeof h=="number")&&(h=[h,h]);var v=i1(t.get(["axisLine","symbolOffset"])||0,h),d=h[0],y=h[1];D([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(p,g){if(c[g]!=="none"&&c[g]!=null){var m=ua(c[g],-d/2,-y/2,d,y,u.stroke,!0),_=p.r+p.offset;m.attr({rotation:p.rotate,x:s[0]+_*Math.cos(e.rotation),y:s[1]-_*Math.sin(e.rotation),silent:!0,z2:11}),r.add(m)}})}}},axisTickLabel:function(e,t,r,n){var i=JO(r,n,t,e),a=ek(r,n,t,e);if(QO(t,a,i),tk(r,n,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=RO(ut(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));OO(o)}},axisName:function(e,t,r,n){var i=Fa(e.axisName,t.get("name"));if(!!i){var a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,ab(a)?e.labelOffset+o*l:0],h,v=t.get("nameRotate");v!=null&&(v=v*vn/180);var d;ab(a)?h=vi.innerTextLayout(e.rotation,v!=null?v:e.rotation,o):(h=jO(e.rotation,a,v||0,u),d=e.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var y=s.getFont(),p=t.get("nameTruncate",!0)||{},g=p.ellipsis,m=Fa(e.nameTruncateMaxWidth,p.maxWidth,d),_=new le({x:c[0],y:c[1],rotation:h.rotation,silent:vi.isLabelSilent(t),style:on(s,{text:i,font:y,overflow:"truncate",width:m,ellipsis:g,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(xh({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var S=vi.makeAxisEventDataBase(t);S.targetType="axisName",S.name=i,kt(_).eventData=S}n.add(_),_.updateTransform(),r.add(_),_.decomposeTransform()}}};function jO(e,t,r,n){var i=wy(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return nl(i-vn/2)?(o=l?"bottom":"top",a="center"):nl(i-vn*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",ivn/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function QO(e,t,r){if(!zS(e.axis)){var n=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=r[0],f=r[1],c=r[r.length-1],h=r[r.length-2];n===!1?(Ye(a),Ye(u)):ib(a,o)&&(n?(Ye(o),Ye(f)):(Ye(a),Ye(u))),i===!1?(Ye(s),Ye(c)):ib(l,s)&&(i?(Ye(l),Ye(h)):(Ye(s),Ye(c)))}}function Ye(e){e&&(e.ignore=!0)}function ib(e,t){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!r||!n)){var i=Ks([]);return Qs(i,i,-e.rotation),r.applyTransform(Ar([],i,e.getLocalTransform())),n.applyTransform(Ar([],i,t.getLocalTransform())),r.intersect(n)}}function ab(e){return e==="middle"||e==="center"}function ob(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l=0||e===t}function sk(e){var t=Nv(e);if(!!t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=zv(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),os)return!0;if(o){var l=Nv(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=di(t).pointerEl=new vI[a.type](vb(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=di(t).labelEl=new le(vb(r.label));t.add(a),gb(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=di(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=di(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),gb(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=bh(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Bg(u.event)},onmousedown:Vv(this._onHandleDragMove,this,0,0),drift:Vv(this._onHandleDragMove,this),ondragend:Vv(this._onHandleDragEnd,this)}),n.add(i)),yb(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");et(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,cE(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){db(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Gv(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(!!n){this._dragging=!0;var i=this.updateHandleTransform(Gv(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Gv(i)),di(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(!!t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(!!t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function db(e,t,r,n){pb(di(r).lastProp,n)||(di(r).lastProp=n,t?an(r,n,e):(r.stopAnimation(),r.attr(n)))}function pb(e,t){if(st(e)&&st(t)){var r=!0;return D(t,function(n,i){r=r&&pb(e[i],n)}),!!r}else return e===t}function gb(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Gv(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function yb(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}var _k=mk;function Sk(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function bk(e,t,r,n,i){var a=r.get("value"),o=mb(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Xl(s.get("padding")||0),u=s.getFont(),f=Pc(o,u),c=i.position,h=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=i.align;d==="right"&&(c[0]-=h),d==="center"&&(c[0]-=h/2);var y=i.verticalAlign;y==="bottom"&&(c[1]-=v),y==="middle"&&(c[1]-=v/2),wk(c,h,v,n);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:on(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:p}),z2:10}}function wk(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function mb(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Iv(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};D(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),wt(o)?a=o.replace("{value}",a):Xt(o)&&(a=o(s))}return a}function _b(e,t,r){var n=$i();return Qs(n,n,r.rotation),js(n,n,r.position),Sh([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function xk(e,t,r,n,i,a){var o=sb.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),bk(t,n,i,a,{position:_b(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Tk(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function Ck(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}var Mk=function(e){Z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),f=Sb(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=Sk(a),v=Dk[u](s,c,f);v.style=h,r.graphicKey=v.type,r.pointer=v}var d=kv(l.model,i);xk(n,r,d,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=kv(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=_b(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Sb(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[r.x,r.y];c[f]+=n[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var h=(u[1]+u[0])/2,v=[h,h];v[f]=c[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(_k);function Sb(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var Dk={line:function(e,t,r){var n=Tk([t,r[0]],[t,r[1]],bb(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:Ck([t-n/2,r[0]],[n,i],bb(e))}}};function bb(e){return e.dim==="x"?0:1}var Ak=Mk,Pk=function(e){Z(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!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}},t}(zt),Ik=Pk,Hr=Kt(),Lk=D;function wb(e,t,r){if(!ht.node){var n=t.getZr();Hr(n).records||(Hr(n).records={}),Ek(n,t);var i=Hr(n).records[e]||(Hr(n).records[e]={});i.handler=r}}function Ek(e,t){if(Hr(e).initialized)return;Hr(e).initialized=!0,r("click",Zt(xb,"click")),r("mousemove",Zt(xb,"mousemove")),r("globalout",Ok);function r(n,i){e.on(n,function(a){var o=kk(t);Lk(Hr(e).records,function(s){s&&i(s,a,o.dispatchAction)}),Rk(o.pendings,t)})}}function Rk(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function Ok(e,t,r){e.handler("leave",null,r)}function xb(e,t,r,n){t.handler(e,r,n)}function kk(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function $v(e,t){if(!ht.node){var r=t.getZr(),n=(Hr(r).records||{})[e];n&&(Hr(r).records[e]=null)}}var Bk=function(e){Z(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";wb("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){$v("axisPointer",n)},t.prototype.dispose=function(r,n){$v("axisPointer",n)},t.type="axisPointer",t}(Nr),Fk=Bk;function Tb(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Vn(a,e);if(o==null||o<0||et(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,h=u.dim,v=c==="x"||c==="radius"?1:0,d=a.mapDimension(h),y=[];y[v]=a.get(d,o),y[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(y)||[]}else r=l.dataToPoint(a.getValues(ut(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var p=s.getBoundingRect().clone();p.applyTransform(s.transform),r=[p.x+p.width/2,p.y+p.height/2]}return{point:r,el:s}}var Cb=Kt();function Nk(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||Gt(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(!!s){Pu(i)&&(i=Tb({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Pu(i),u=a.axesInfo,f=s.axesInfo,c=n==="leave"||Pu(i),h={},v={},d={list:[],map:{}},y={showPointer:Zt(Hk,v),showTooltip:Zt(Vk,d)};D(s.coordSysMap,function(g,m){var _=l||g.containPoint(i);D(s.coordSysAxesInfo[m],function(S,w){var b=S.axis,x=Wk(u,S);if(!c&&_&&(!u||x)){var C=x&&x.value;C==null&&!l&&(C=b.pointToData(i)),C!=null&&Mb(S,C,y,!1,h)}})});var p={};return D(f,function(g,m){var _=g.linkGroup;_&&!v[m]&&D(_.axesInfo,function(S,w){var b=v[w];if(S!==g&&b){var x=b.value;_.mapper&&(x=g.axis.scale.parse(_.mapper(x,Db(S),Db(g)))),p[g.key]=x}})}),D(p,function(g,m){Mb(f[m],g,y,!0,h)}),Gk(v,f,h),$k(d,i,e,o),Uk(f,o,r),h}}function Mb(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=zk(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&K(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function zk(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return D(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),c,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,e,r);h=v.dataIndices,c=v.nestestValue}else{if(h=l.getData().indicesOfNearest(f[0],e,r.type==="category"?.5:null),!h.length)return;c=l.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var d=e-c,y=Math.abs(d);y<=o&&((y=0&&s<0)&&(o=y,s=d,i=c,a.length=0),D(h,function(p){a.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:a,snapToValue:i}}function Hk(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function Vk(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Ko(l),f=e.map[u];f||(f=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function Gk(e,t,r){var n=r.axesInfo=[];D(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function $k(e,t,r,n){if(Pu(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function Uk(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=Cb(n)[i]||{},o=Cb(n)[i]={};D(e,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&D(c.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];D(a,function(u,f){!o[f]&&l.push(u)}),D(o,function(u,f){!a[f]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Wk(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function Db(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function Pu(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function Ab(e){ub.registerAxisPointerClass("CartesianAxisPointer",Ak),e.registerComponentModel(Ik),e.registerComponentView(Fk),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!et(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=rk(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Nk)}function OF(e){hi(yk),hi(Ab)}function Yk(e,t){var r=Xl(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new Yt({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),e}var Xk=function(e){Z(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={zlevel:0,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}},t}(zt),qk=Xk;function Pb(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function Ib(e){if(!!ht.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,c=o+i,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),v=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-c)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+i+"px;",y=["position:absolute;width:"+o+"px;height:"+o+"px;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return''}function eB(e,t){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+e/2+"s "+r,i="opacity"+n+",visibility"+n;return t||(n=" "+e+"s "+r,i+=ht.transformSupported?","+Uv+n:",left"+n+",top"+n),jk+":"+i}function Rb(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!ht.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=ht.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+Uv+":"+o+";":[["top",0],["left",0],[Lb,o]]}function rB(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont()),r&&t.push("line-height:"+Math.round(r*3/2)+"px");var i=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,o=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&a&&t.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),D(["decoration","align"],function(l){var u=e.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function nB(e,t,r){var n=[],i=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),f=e.getModel("textStyle"),c=F_(e,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),t&&i&&n.push(eB(i,r)),a&&(ht.canvasSupported?n.push("background-color:"+a):(n.push("background-color:#"+GM(a)),n.push("filter:alpha(opacity=70)"))),D(["width","color","radius"],function(v){var d="border-"+v,y=z0(d),p=e.get(y);p!=null&&n.push(d+":"+p+(v==="color"?"":"px"))}),n.push(rB(f)),c!=null&&n.push("padding:"+Xl(c).join("px ")+"px"),n.join(";")+";"}function Ob(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&gM(e,o,document.body,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var iB=function(){function e(t,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,ht.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;Ob(this._styleCoord,a,o,r.getWidth()/2,r.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,f=a.painter.getViewportRoot();Oe(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){var r=this._container,n=Kk(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Qk+nB(t,!this._firstShow,this._longHide)+Rb(a[0],a[1],!0)+("border-color:"+ii(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(wt(a)&&n.get("trigger")==="item"&&!Pb(n)&&(s=tB(n,i,a)),wt(t))o.innerHTML=t+s;else if(t){o.innerHTML="",et(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api;if(this._lastX!=null&&this._lastY!=null&&r.get("triggerOn")!=="none"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&a.manuallyShowTip(r,n,i,{x:a._lastX,y:a._lastY,dataByCoordSys:a._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||ht.node)){var o=Nb(a,i);this._ticket="";var s=a.dataByCoordSys,l=vB(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=lB;f.x=a.x,f.y=a.y,f.update(),kt(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var c=Tb(a,n),h=c.point[0],v=c.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Nb(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(!!u){var f=u.getData(),c=Iu([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(!!a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){this._lastDataByCoordSys=null;var s,l;Oo(i,function(u){if(kt(u).dataIndex!=null)return s=u,!0;if(kt(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(r,s,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=Gt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Iu([n.tooltipOption],a),l=this._renderMode,u=[],f=Io("section",{blocks:[],noHeader:!0}),c=[],h=new Kh;jo(r,function(m){jo(m.dataByAxis,function(_){var S=i.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var b=mb(w,S.axis,i,_.seriesDataIndices,_.valueLabelOpt),x=Io("section",{header:b,noHeader:!En(b),sortBlocks:!0,blocks:[]});f.blocks.push(x),D(_.seriesDataIndices,function(C){var M=i.getSeriesByIndex(C.seriesIndex),L=C.dataIndexInside,I=M.getDataParams(L);if(!(I.dataIndex<0)){I.axisDim=_.axisDim,I.axisIndex=_.axisIndex,I.axisType=_.axisType,I.axisId=_.axisId,I.axisValue=Iv(S.axis,{value:w}),I.axisValueLabel=b,I.marker=h.makeTooltipMarker("item",ii(I.color),l);var P=x_(M.formatTooltip(L,!0,null));P.markupFragment&&x.blocks.push(P.markupFragment),P.markupText&&c.push(P.markupText),u.push(I)}})}})}),f.blocks.reverse(),c.reverse();var v=n.position,d=s.get("order"),y=O_(f,h,l,d,i.get("useUTC"),s.get("textStyle"));y&&c.unshift(y);var p=l==="richText"?`
+
+`:"
",g=c.join(p);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],v,null,h)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=kt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,h=u.getData(c),v=this._renderMode,d=r.positionDefault,y=Iu([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=y.get("trigger");if(!(p!=null&&p!=="item")){var g=u.getDataParams(f,c),m=new Kh;g.marker=m.makeTooltipMarker("item",ii(g.color),v);var _=x_(u.formatTooltip(f,!1,c)),S=y.get("order"),w=_.markupFragment?O_(_.markupFragment,m,v,S,a.get("useUTC"),y.get("textStyle")):_.markupText,b="item_"+u.name+"_"+f;this._showOrMove(y,function(){this._showTooltipContent(y,w,g,b,r.offsetX,r.offsetY,r.position,r.target,m)}),i({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=kt(n),o=a.tooltipConfig,s=o.option||{};if(wt(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(a.componentMainType,a.componentIndex);f&&u.push(f),u.push({formatter:s.content});var c=r.positionDefault,h=Iu(u,this._tooltipModel,c?{position:c}:null),v=h.get("content"),d=Math.random()+"",y=new Kh;this._showOrMove(h,function(){var p=yt(h.get("formatterParams")||{});this._showTooltipContent(h,v,p,d,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent,h=r.get("formatter");l=l||r.get("position");var v=n,d=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),y=d.color;if(h)if(wt(h)){var p=r.ecModel.get("useUTC"),g=et(i)?i[0]:i,m=g&&g.axisType&&g.axisType.indexOf("time")>=0;v=h,m&&(v=Gl(g.axisValue,v,p)),v=V0(v,i,!0)}else if(Xt(h)){var _=Wv(function(S,w){S===this._ticket&&(c.setContent(w,f,r,y,l),this._updatePosition(r,l,o,s,c,i,u))},this);this._ticket=a,v=h(i,a,_)}else v=h;c.setContent(v,f,r,y,l),c.show(r,y),this._updatePosition(r,l,o,s,c,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||et(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!et(n))return{color:a||n.color||n.borderColor}},t.prototype._doUpdatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),h=r.get("align"),v=r.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Xt(n)&&(n=n([i,a],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),et(n))i=Fb(n[0],u),a=Fb(n[1],f);else if(st(n)){var y=n;y.width=c[0],y.height=c[1];var p=wo(y,{width:u,height:f});i=p.x,a=p.y,h=null,v=null}else if(wt(n)&&l){var g=hB(n,d,c,r.get("borderWidth"));i=g[0],a=g[1]}else{var g=fB(i,a,o,u,f,h?null:20,v?null:20);i=g[0],a=g[1]}if(h&&(i-=zb(h)?c[0]/2:h==="right"?c[0]:0),v&&(a-=zb(v)?c[1]/2:v==="bottom"?c[1]:0),Pb(r)){var g=cB(i,a,o,u,f);i=g[0],a=g[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&jo(i,function(s,l){var u=s.dataByAxis||[],f=r[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&jo(u,function(h,v){var d=c[v]||{},y=h.seriesDataIndices||[],p=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&y.length===p.length,o&&jo(y,function(g,m){var _=p[m];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),a&&D(h.seriesDataIndices,function(g){var m=g.seriesIndex,_=n[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){ht.node||(this._tooltipContent.dispose(),$v("itemTooltip",n))},t.type="tooltip",t}(Nr);function Iu(e,t,r){var n=t.ecModel,i;r?(i=new ee(r,n,n),i=new ee(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ee&&(o=o.get("tooltip",!0)),wt(o)&&(o={formatter:o}),o&&(i=new ee(o,i,n)))}return i}function Nb(e,t){return e.dispatchAction||Gt(t.dispatchAction,t)}function fB(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function cB(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function hB(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function zb(e){return e==="center"||e==="middle"}function vB(e,t,r){var n=Nc(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ro(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(!!o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=kt(u).tooltipConfig;if(f&&f.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var dB=uB;function kF(e){hi(Ab),e.registerComponentModel(qk),e.registerComponentView(dB),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){})}var pB=function(e){Z(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={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:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(zt),gB=function(e){Z(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=Dt(r.get("textBaseline"),r.get("textVerticalAlign")),f=new le({style:on(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=r.get("subtext"),v=new le({style:on(s,{text:h,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=r.get("link"),y=r.get("sublink"),p=r.get("triggerEvent",!0);f.silent=!d&&!p,v.silent=!y&&!p,d&&f.on("click",function(){G0(d,"_"+r.get("target"))}),y&&v.on("click",function(){G0(y,"_"+r.get("subtarget"))}),kt(f).eventData=kt(v).eventData=p?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),h&&a.add(v);var g=a.getBoundingRect(),m=r.getBoxLayoutParams();m.width=g.width,m.height=g.height;var _=wo(m,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),v.setStyle(S),g=a.getBoundingRect();var w=_.margin,b=r.getItemStyle(["color","opacity"]);b.fill=r.get("backgroundColor");var x=new Yt({shape:{x:g.x-w[3],y:g.y-w[0],width:g.width+w[1]+w[3],height:g.height+w[0]+w[2],r:r.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});a.add(x)}},t.type="title",t}(Nr);function BF(e){e.registerComponentModel(pB),e.registerComponentView(gB)}function Hb(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=oa(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(t[a])}return n.join(" ")}var mB=function(e){Z(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=ua(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=_B,this._symbolType=r,this.add(s)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Tl(this.childAt(0))},t.prototype.downplay=function(){Cl(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r){var n=this.childAt(0);n.draggable=r,n.cursor=r?"move":n.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,c)}else{var h=this.childAt(0);h.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(v):an(h,v,s,n),jP(h)}if(this._updateCommon(r,n,l,i,a),u){var h=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,po(h,v,s,n)}}f&&this.childAt(0).stopAnimation("remove"),this._seriesModel=s},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,f,c,h,v,d,y,p;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,h=a.focus,v=a.blurScope,d=a.labelStatesModels,y=a.hoverScale,p=a.cursorStyle),!a||r.hasItemOption){var g=a&&a.itemModel?a.itemModel:r.getItemModel(n),m=g.getModel("emphasis");u=m.getModel("itemStyle").getItemStyle(),c=g.getModel(["select","itemStyle"]).getItemStyle(),f=g.getModel(["blur","itemStyle"]).getItemStyle(),h=m.get("focus"),v=m.get("blurScope"),d=Ch(g),y=m.getShallow("scale"),p=g.getShallow("cursor")}var _=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var S=i1(r.getItemVisual(n,"symbolOffset"),i);S&&(s.x=S[0],s.y=S[1]),p&&s.attr("cursor",p);var w=r.getItemVisual(n,"style"),b=w.fill;if(s instanceof Rr){var x=s.style;s.useStyle(K({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},w))}else s.__isEmptyBrush?s.useStyle(K({},w)):s.useStyle(w),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=r.getItemVisual(n,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var L=o&&o.useNameLabel;Th(s,d,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:b,defaultOpacity:w.opacity});function I(B){return L?r.getName(B):Hb(r,B)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var P=s.ensureState("emphasis");if(P.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f,y){var E=Math.max(1.1,3/this._sizeY);P.scaleX=this._sizeX*E,P.scaleY=this._sizeY*E}this.setSymbolScale(1),co(this,h,v)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n){var i=this.childAt(0),a=this._seriesModel,o=kt(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Ol(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Ol(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return XE(r.getItemVisual(n,"symbolSize"))},t}($t);function _B(e,t){this.parent.drift(e,t)}var Yv=mB;function Xv(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function Vb(e){return e!=null&&!st(e)&&(e={isIgnore:e}),e||{}}function Gb(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),hoverScale:r.get("scale"),labelStatesModels:Ch(t),cursorStyle:t.get("cursor")}}var SB=function(){function e(t){this.group=new $t,this._SymbolCtor=t||Yv}return e.prototype.updateData=function(t,r){r=Vb(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=Gb(t),u={disableAnimation:s},f=r.getSymbolPoint||function(c){return t.getItemLayout(c)};a||n.removeAll(),t.diff(a).add(function(c){var h=f(c);if(Xv(t,h,c,r)){var v=new o(t,c,l,u);v.setPosition(h),t.setItemGraphicEl(c,v),n.add(v)}}).update(function(c,h){var v=a.getItemGraphicEl(h),d=f(c);if(!Xv(t,d,c,r)){n.remove(v);return}var y=t.getItemVisual(c,"symbol")||"circle",p=v&&v.getSymbolType&&v.getSymbolType();if(!v||p&&p!==y)n.remove(v),v=new o(t,c,l,u),v.setPosition(d);else{v.updateData(t,c,l,u);var g={x:d[0],y:d[1]};s?v.attr(g):an(v,g,i)}n.add(v),t.setItemGraphicEl(c,v)}).remove(function(c){var h=a.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)})}).execute(),this._getSymbolPoint=f,this._data=t},e.prototype.isPersistent=function(){return!0},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Gb(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){n=Vb(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={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,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(zt),qv=TB,da=Zt,Zv=D,Lu=$t,CB=function(e){Z(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new Lu),this.group.add(this._selectorGroup=new Lu),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},h=r.get("padding"),v=wo(f,c,h),d=this.layoutInner(r,o,v,a,l,u),y=wo(Ct({width:d.width,height:d.height},f),c,h);this.group.x=y.x-d.x,this.group.y=y.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Yk(d,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),f=ft(),c=n.get("selectedMode"),h=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),Zv(n.getData(),function(v,d){var y=v.get("name");if(!this.newlineDisabled&&(y===""||y===`
+`)){var p=new Lu;p.newline=!0,u.add(p);return}var g=i.getSeriesByName(y)[0];if(!f.get(y))if(g){var m=g.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),b=this._createItem(g,y,d,v,n,r,_,w,S,c);b.on("click",da($b,y,null,a,h)).on("mouseover",da(Kv,g.name,null,a,h)).on("mouseout",da(jv,g.name,null,a,h)),f.set(y,!0)}else i.eachRawSeries(function(x){if(!f.get(y)&&x.legendVisualProvider){var C=x.legendVisualProvider;if(!C.containName(y))return;var M=C.indexOfName(y),L=C.getItemVisual(M,"style"),I=C.getItemVisual(M,"legendIcon"),P=hr(L.fill);P&&P[3]===0&&(P[3]=.2,L.fill=Ua(P,"rgba"));var E=this._createItem(x,y,d,v,n,r,{},L,I,c);E.on("click",da($b,null,y,a,h)).on("mouseover",da(Kv,null,y,a,h)).on("mouseout",da(jv,null,y,a,h)),f.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();Zv(r,function(u){var f=u.type,c=new le({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Th(c,{normal:h,emphasis:v},{defaultText:u.title}),co(c)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,f,c){var h=r.visualDrawType,v=o.get("itemWidth"),d=o.get("itemHeight"),y=o.isSelected(n),p=a.get("symbolRotate"),g=a.get("symbolKeepAspect"),m=a.get("icon");f=m||f||"roundRect";var _=MB(f,a,l,u,h,y),S=new Lu,w=a.getModel("textStyle");if(typeof r.getLegendIcon=="function"&&(!m||m==="inherit"))S.add(r.getLegendIcon({itemWidth:v,itemHeight:d,icon:f,iconRotate:p,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:g}));else{var b=m==="inherit"&&r.getData().getVisual("symbol")?p==="inherit"?r.getData().getVisual("symbolRotate"):p:0;S.add(DB({itemWidth:v,itemHeight:d,icon:f,iconRotate:b,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:g}))}var x=s==="left"?v+5:-5,C=s,M=o.get("formatter"),L=n;typeof M=="string"&&M?L=M.replace("{name}",n!=null?n:""):typeof M=="function"&&(L=M(n));var I=a.get("inactiveColor");S.add(new le({style:on(w,{text:L,x,y:d/2,fill:y?w.getTextColor():I,align:C,verticalAlign:"middle"})}));var P=new Yt({shape:S.getBoundingRect(),invisible:!0}),E=a.getModel("tooltip");return E.get("show")&&xh({el:P,componentModel:o,itemName:n,itemTooltipOption:E.option}),S.add(P),S.eachChild(function(B){B.silent=!0}),P.silent=!c,this.getContentGroup().add(S),co(S),S.__legendDataIndex=i,S},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();bo(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){bo("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=r.get("selectorButtonGap",!0),y=r.getOrient().index,p=y===0?"width":"height",g=y===0?"height":"width",m=y===0?"y":"x";s==="end"?v[y]+=f[p]+d:c[y]+=h[p]+d,v[1-y]+=f[g]/2-h[g]/2,u.x=v[0],u.y=v[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[p]=f[p]+d+h[p],_[g]=Math.max(f[g],h[g]),_[m]=Math.min(0,h[m]+v[1-y]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Nr);function MB(e,t,r,n,i,a){function o(d,y){d.lineWidth==="auto"&&(d.lineWidth=y.lineWidth>0?2:0),Zv(d,function(p,g){d[g]==="inherit"&&(d[g]=y[g])})}var s=t.getModel("itemStyle"),l=s.getItemStyle(),u=e.lastIndexOf("empty",0)===0?"fill":"stroke";l.decal=n.decal,l.fill==="inherit"&&(l.fill=n[i]),l.stroke==="inherit"&&(l.stroke=n[u]),l.opacity==="inherit"&&(l.opacity=(i==="fill"?n:r).opacity),o(l,n);var f=t.getModel("lineStyle"),c=f.getLineStyle();if(o(c,r),l.fill==="auto"&&(l.fill=n.fill),l.stroke==="auto"&&(l.stroke=n.fill),c.stroke==="auto"&&(c.stroke=n.fill),!a){var h=t.get("inactiveBorderWidth"),v=l[u];l.lineWidth=h==="auto"?n.lineWidth>0&&v?2:0:l.lineWidth,l.fill=t.get("inactiveColor"),l.stroke=t.get("inactiveBorderColor"),c.stroke=f.get("inactiveColor"),c.lineWidth=f.get("inactiveWidth")}return{itemStyle:l,lineStyle:c}}function DB(e){var t=e.icon||"roundRect",r=ua(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function $b(e,t,r,n){jv(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e!=null?e:t}),Kv(e,t,r,n)}function Ub(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;ni[o],p=[-v.x,-v.y];n||(p[a]=f[u]);var g=[0,0],m=[-d.x,-d.y],_=Dt(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(y){var S=r.get("pageButtonPosition",!0);S==="end"?m[a]+=i[o]-d[o]:g[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,f.setPosition(p),c.setPosition(g),h.setPosition(m);var w={x:0,y:0};if(w[o]=y?i[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-a]),c.__rectSize=i[o],y){var b={x:0,y:0};b[o]=Math.max(i[o]-d[o]-_,0),b[s]=w[s],c.setClipPath(new Yt({shape:b})),c.__rectSize=b[o]}else h.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(r);return x.pageIndex!=null&&an(f,{x:x.contentPosition[0],y:x.contentPosition[1]},y?r:null),this._updatePageInfoView(r,x),w},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,v=i.childOfName(f);v&&(v.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",wt(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=Qv[o],l=Jv[o],u=this._findTargetItemIndex(n),f=i.children(),c=f[u],h=f.length,v=h?1:0,d={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var y=S(c);d.contentPosition[o]=-y.s;for(var p=u+1,g=y,m=y,_=null;p<=h;++p)_=S(f[p]),(!_&&m.e>g.s+a||_&&!w(_,g.s))&&(m.i>g.i?g=m:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),m=_;for(var p=u-1,g=y,m=y,_=null;p>=-1;--p)_=S(f[p]),(!_||!w(m,_.s))&&g.i=x&&b.s<=x+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n!=null?n:a},t.type="legend.scroll",t}(Wb),RB=EB;function OB(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function kB(e){hi(Yb),e.registerComponentModel(LB),e.registerComponentView(RB),OB(e)}function FF(e){hi(Yb),hi(kB)}var BB=function(e){Z(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r){return FR(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new $t,i=ua("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=ua(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={zlevel:0,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,lineStyle:{width:"bolder"}},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},t}(Lo),FB=BB;function Zb(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=NB(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,c=ut(e.dimensions,function(d){return t.mapDimension(d)}),h=!1,v=t.getCalculationInfo("stackResultDimension");return Yo(t,c[0])&&(h=!0,c[0]=v),Yo(t,c[1])&&(h=!0,c[1]=v),{dataDimsForPoint:c,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function NB(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function Kb(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}var jb=typeof Float32Array!="undefined",zB=jb?Float32Array:Array;function pa(e){return et(e)?jb?new Float32Array(e):e:new zB(e)}function HB(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function VB(e,t,r,n,i,a,o,s){for(var l=HB(e,t),u=[],f=[],c=[],h=[],v=[],d=[],y=[],p=Zb(i,t,o),g=e.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=i||y<0)break;if(pi(g,m)){if(l){y+=a;continue}break}if(y===r)e[a>0?"moveTo":"lineTo"](g,m),c=g,h=m;else{var _=g-u,S=m-f;if(_*_+S*S<.5){y+=a;continue}if(o>0){for(var w=y+a,b=t[w*2],x=t[w*2+1];b===g&&x===m&&p=n||pi(b,x))v=g,d=m;else{L=b-u,I=x-f;var B=g-u,k=b-g,Y=m-f,q=x-m,U=void 0,Q=void 0;s==="x"?(U=Math.abs(B),Q=Math.abs(k),v=g-U*o,d=m,P=g+U*o,E=m):s==="y"?(U=Math.abs(Y),Q=Math.abs(q),v=g,d=m-U*o,P=g,E=m+U*o):(U=Math.sqrt(B*B+Y*Y),Q=Math.sqrt(k*k+q*q),M=Q/(Q+U),v=g-L*o*(1-M),d=m-I*o*(1-M),P=g+L*o*M,E=m+I*o*M,P=pn(P,gn(b,g)),E=pn(E,gn(x,m)),P=gn(P,pn(b,g)),E=gn(E,pn(x,m)),L=P-g,I=E-m,v=g-L*U/Q,d=m-I*U/Q,v=pn(v,gn(u,g)),d=pn(d,gn(f,m)),v=gn(v,pn(u,g)),d=gn(d,pn(f,m)),L=g-v,I=m-d,P=g+L*Q/U,E=m+I*Q/U)}e.bezierCurveTo(c,h,v,d,g,m),c=P,h=E}else e.lineTo(g,m)}u=g,f=m,y+=a}return p}var Qb=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),GB=function(e){Z(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Qb},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&pi(i[o*2-2],i[o*2-1]);o--);for(;a=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[r,S]:[S,r]}s=v,l=d;break;case o.C:v=a[c++],d=a[c++],y=a[c++],p=a[c++],g=a[c++],m=a[c++];var w=u?Yc(s,v,y,g,r,f):Yc(l,d,p,m,r,f);if(w>0)for(var b=0;b=0){var S=u?Nt(l,d,p,m,x):Nt(s,v,y,g,x);return u?[r,S]:[S,r]}}s=g,l=m;break}}},t}(Rt),$B=function(e){Z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Qb),UB=function(e){Z(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new $B},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&pi(i[s*2-2],i[s*2-1]);s--);for(;ot){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function ZB(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!!a){var l=t.getAxis(i),u=ut(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,c=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var h=qB(u,i==="x"?r.getWidth():r.getHeight()),v=h.length;if(!v&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var d=10,y=h[0].coord-d,p=h[v-1].coord+d,g=p-y;if(g<.001)return"transparent";D(h,function(_){_.offset=(_.coord-y)/g}),h.push({offset:v?h[v-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:c[0]||"transparent"});var m=new gh(0,0,0,0,h,!0);return m[i]=y,m[i+"2"]=p,m}}}function KB(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(!!a&&!(i&&jB(a,t))){var o=t.mapDimension(a.dim),s={};return D(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function jB(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function QB(e,t){return isNaN(e)||isNaN(t)}function JB(e){for(var t=e.length/2;t>0&&QB(e[t*2-2],e[t*2-1]);t--);return t-1}function nw(e,t){return[e[t*2],e[t*2+1]]}function tF(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function iw(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<_r.length;t++)if(e.get([_r[t],"endLabel","show"]))return!0;return!1}function ed(e,t,r,n){if(wB(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=iw(n)?function(v,d){e._endLabelOnDuring(v,d,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),f=WB(t,r,n,function(){var v=e._endLabel;v&&r&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var c=f.shape,h=Math.max(c.width,c.height);u?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return l&&l(1,f),f}else return YB(t,r,n)}function eF(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var rF=function(e){Z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new $t,n=new bB;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=this.group,l=r.getData(),u=r.getModel("lineStyle"),f=r.getModel("areaStyle"),c=l.getLayout("points")||[],h=o.type==="polar",v=this._coordSys,d=this._symbolDraw,y=this._polyline,p=this._polygon,g=this._lineGroup,m=r.get("animation"),_=!f.isEmpty(),S=f.get("origin"),w=Zb(o,l,S),b=_&&XB(o,l,w),x=r.get("showSymbol"),C=x&&!h&&KB(r,l,o),M=this._data;M&&M.eachItemGraphicEl(function(dt,O){dt.__temp&&(s.remove(dt),M.setItemGraphicEl(O,null))}),x||d.remove(),s.add(g);var L=h?!1:r.get("step"),I;o&&o.getArea&&r.get("clip",!0)&&(I=o.getArea(),I.width!=null?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r+=.5)),this._clipShapeForSymbol=I;var P=ZB(l,o,i)||l.getVisual("style")[l.getVisual("drawType")];if(!(y&&v.type===o.type&&L===this._step))x&&d.updateData(l,{isIgnore:C,clipShape:I,disableAnimation:!0,getSymbolPoint:function(dt){return[c[dt*2],c[dt*2+1]]}}),m&&this._initSymbolLabelAnimation(l,o,I),L&&(c=yn(c,o,L),b&&(b=yn(b,o,L))),y=this._newPolyline(c),_&&(p=this._newPolygon(c,b)),h||this._initOrUpdateEndLabel(r,o,ii(P)),g.setClipPath(ed(this,o,!0,r));else{_&&!p?p=this._newPolygon(c,b):p&&!_&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,ii(P));var E=g.getClipPath();if(E){var B=ed(this,o,!1,r);po(E,{shape:B.shape},r)}else g.setClipPath(ed(this,o,!0,r));x&&d.updateData(l,{isIgnore:C,clipShape:I,disableAnimation:!0,getSymbolPoint:function(dt){return[c[dt*2],c[dt*2+1]]}}),(!Jb(this._stackedOnPoints,b)||!Jb(this._points,c))&&(m?this._doUpdateAnimation(l,b,o,i,L,S):(L&&(c=yn(c,o,L),b&&(b=yn(b,o,L))),y.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:b})))}var k=r.get(["emphasis","focus"]),Y=r.get(["emphasis","blurScope"]);if(y.useStyle(Ct(u.getLineStyle(),{fill:"none",stroke:P,lineJoin:"bevel"})),Om(y,r,"lineStyle"),y.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var q=y.getState("emphasis").style;q.lineWidth=+y.style.lineWidth+1}kt(y).seriesIndex=r.seriesIndex,co(y,k,Y);var U=rw(r.get("smooth")),Q=r.get("smoothMonotone"),V=r.get("connectNulls");if(y.setShape({smooth:U,smoothMonotone:Q,connectNulls:V}),p){var it=l.getCalculationInfo("stackedOnSeries"),Ot=0;p.useStyle(Ct(f.getAreaStyle(),{fill:P,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),it&&(Ot=rw(it.get("smooth"))),p.setShape({smooth:U,stackedOnSmooth:Ot,smoothMonotone:Q,connectNulls:V}),Om(p,r,"areaStyle"),kt(p).seriesIndex=r.seriesIndex,co(p,k,Y)}var pt=function(dt){a._changePolyState(dt)};l.eachItemGraphicEl(function(dt){dt&&(dt.onHoverStateChange=pt)}),this._polyline.onHoverStateChange=pt,this._data=l,this._coordSys=o,this._stackedOnPoints=b,this._points=c,this._step=L,this._valueOrigin=S,r.get("triggerLineEvent")&&(this.packEventData(r,y),p&&this.packEventData(r,p))},t.prototype.packEventData=function(r,n){kt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Vn(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=r.get("zlevel"),v=r.get("z");u=new Yv(o,s),u.x=f,u.y=c,u.setZ(h,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else un.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Vn(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else un.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;Tm(this._polyline,r),n&&Tm(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new GB({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new UB({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,f=u.get("animationDuration");typeof f=="function"&&(f=f(null));var c=u.get("animationDelay")||0,h=typeof c=="function"?c(null):c;r.eachItemGraphicEl(function(v,d){var y=v;if(y){var p=[v.x,v.y],g=void 0,m=void 0,_=void 0;if(i)if(o){var S=i,w=n.pointToCoord(p);a?(g=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(g=S.r0,m=S.r,_=w[0])}else{var b=i;a?(g=b.x,m=b.x+b.width,_=v.x):(g=b.y+b.height,m=b.y,_=v.y)}var x=m===g?0:(_-g)/(m-g);l&&(x=1-x);var C=typeof c=="function"?c(d):f*x+h,M=y.getSymbolPath(),L=M.getTextContent();y.attr({scaleX:0,scaleY:0}),y.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),L&&L.animateFrom({style:{opacity:0}},{duration:300,delay:C}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(iw(r)){var o=r.getData(),s=this._polyline,l=this._endLabel;l||(l=this._endLabel=new le({z2:200}),l.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var u=JB(o.getLayout("points"));u>=0&&(Th(s,Ch(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:u,defaultText:function(f,c,h){return h!=null?yB(o,h):Hb(o,f)},enableTextSetter:!0},eF(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=i.getLayout("points"),h=i.hostModel,v=h.get("connectNulls"),d=s.get("precision"),y=s.get("distance")||0,p=l.getBaseAxis(),g=p.isHorizontal(),m=p.inverse,_=n.shape,S=m?g?_.x:_.y+_.height:g?_.x+_.width:_.y,w=(g?y:0)*(m?-1:1),b=(g?0:-y)*(m?-1:1),x=g?"x":"y",C=tF(c,S,x),M=C.range,L=M[1]-M[0],I=void 0;if(L>=1){if(L>1&&!v){var P=nw(c,M[0]);u.attr({x:P[0]+w,y:P[1]+b}),o&&(I=h.getRawValue(M[0]))}else{var P=f.getPointOn(S,x);P&&u.attr({x:P[0]+w,y:P[1]+b});var E=h.getRawValue(M[0]),B=h.getRawValue(M[1]);o&&(I=$D(i,d,E,B,C.t))}a.lastFrameIndex=M[0]}else{var k=r===1||a.lastFrameIndex>0?M[0]:0,P=nw(c,k);o&&(I=h.getRawValue(k)),u.attr({x:P[0]+w,y:P[1]+b})}o&&w0(u).setLabelText(I)}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s){var l=this._polyline,u=this._polygon,f=r.hostModel,c=VB(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),h=c.current,v=c.stackedOnCurrent,d=c.next,y=c.stackedOnNext;if(o&&(h=yn(c.current,i,o),v=yn(c.stackedOnCurrent,i,o),d=yn(c.next,i,o),y=yn(c.stackedOnNext,i,o)),ew(h,d)>3e3||u&&ew(v,y)>3e3){l.stopAnimation(),l.setShape({points:d}),u&&(u.stopAnimation(),u.setShape({points:d,stackedOnPoints:y}));return}l.shape.__points=c.current,l.shape.points=h;var p={shape:{points:d}};c.current!==h&&(p.shape.__points=c.next),l.stopAnimation(),an(l,p,f),u&&(u.setShape({points:h,stackedOnPoints:v}),u.stopAnimation(),an(u,{shape:{stackedOnPoints:y}},f),l.shape.points!==u.shape.points&&(u.shape.points=l.shape.points));for(var g=[],m=c.status,_=0;_t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),v=Math.round(s/h);if(v>1){a==="lttb"&&t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v));var d=void 0;typeof a=="string"?d=aF[a]:typeof a=="function"&&(d=a),d&&t.setData(i.downSample(i.mapDimension(u.dim),1/v,d,oF))}}}}}function NF(e){e.registerChartView(nF),e.registerSeriesModel(FB),e.registerLayout(iF("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,sF("line"))}function lF(){return!1}function aw(e,t,r){var n=Fs(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}var uF=function(e){Z(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Zs,typeof r=="string"?o=aw(r,n,i):st(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(o.onselectstart=lF,s.webkitUserSelect="none",s.userSelect="none",s.webkitTapHighlightColor="rgba(0,0,0,0)",s["-webkit-touch-callout"]="none",s.padding="0",s.margin="0",s.borderWidth="0"),a.domBack=null,a.ctxBack=null,a.painter=n,a.config=null,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=aw("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new xt(0,0,0,0);function f(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new xt(0,0,0,0);_.copy(m),o.push(_)}else{for(var S=!1,w=1/0,b=0,x=0;x=s)}}for(var c=this.__startIndex;c15)break}}B.prevElClipPaths&&g.restore()};if(m)if(m.length===0)C=p.__endIndex;else for(var L=v.dpr,I=0;I0&&t>i[0]){for(l=0;lt);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i0?Eu:0),this._needsManuallyCompositing),f.__builtin__||Fi("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,r(l),a=f),i.__dirty&Ce&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(c,h){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?Tt(n[t],r,!0):n[t]=r;for(var i=0;i