i&&(this._approxInterval=i);var s=_o.length,u=Math.min(SI(_o,this._approxInterval,0,s),s-1);this._interval=_o[u][1],this._minLevelUnit=_o[Math.max(u-1,0)][0]},t.prototype.parse=function(r){return vt(r)?r:+dr(r)},t.prototype.contain=function(r){return tu(this.parse(r),this._extent)},t.prototype.normalize=function(r){return eu(this.parse(r),this._extent)},t.prototype.scale=function(r){return ru(r,this._extent)},t.type="time",t}(pi),_o=[["second",Mh],["minute",Dh],["hour",na],["quarter-day",na*6],["half-day",na*12],["day",ge*1.2],["half-week",ge*3.5],["week",ge*7],["month",ge*31],["quarter",ge*95],["half-year",Kc/2],["year",Kc]];function xI(e,t,r,n){var i=dr(t),a=dr(r),o=function(d){return Jc(i,d,n)===Jc(a,d,n)},s=function(){return o("year")},u=function(){return s()&&o("month")},l=function(){return u()&&o("day")},f=function(){return l()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(e){case"year":return s();case"month":return u();case"day":return l();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function bI(e,t){return e/=ge,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function TI(e){var t=30*ge;return e/=t,e>6?6:e>3?3:e>2?2:1}function CI(e){return e/=na,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function fp(e,t){return e/=t?Dh:Mh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function MI(e){return Py(e)}function DI(e,t,r){var n=new Date(e);switch(ri(t)){case"year":case"month":n[Om(r)](0);case"day":n[km(r)](1);case"hour":n[Bm(r)](0);case"minute":n[Nm(r)](0);case"second":n[Fm(r)](0),n[zm(r)](0)}return n.getTime()}function AI(e,t,r,n){var i=1e4,a=Em,o=0;function s(D,A,P,L,I,E,O){for(var N=new Date(A),R=A,k=N[L]();R1&&E===0&&P.unshift({value:P[0].value-R})}}for(var E=0;E=n[0]&&m<=n[1]&&h++)}var _=(n[1]-n[0])/t;if(h>_*1.5&&c>_/1.5||(l.push(p),h>_||e===a[v]))break}f=[]}}}for(var w=Tt($(l,function(D){return Tt(D,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(D){return D.length>0}),x=[],S=w.length-1,v=0;v0;)a*=10;var s=[Lt(PI(n[0]/a)*a),Lt(II(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){sa.calcNiceExtent.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=Te(r)/Te(this.base),tu(r,this._extent)},t.prototype.normalize=function(r){return r=Te(r)/Te(this.base),eu(r,this._extent)},t.prototype.scale=function(r){return r=ru(r,this._extent),wo(this.base,r)},t.type="log",t}(er),g_=Yh.prototype;g_.getMinorTicks=sa.getMinorTicks;g_.getLabel=sa.getLabel;function So(e,t){return LI(e,sr(t))}er.registerClass(Yh);var EI=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]0&&u>0&&!l&&(s=0),s<0&&u<0&&!f&&(u=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,l=!0),v!=null&&(u=v,f=!0),{min:s,max:u,minFixed:l,maxFixed:f,isBlank:h}},e.prototype.modifyDataMinMax=function(t,r){this[OI[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=RI[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),RI={min:"_determinedMin",max:"_determinedMax"},OI={min:"_dataMin",max:"_dataMax"};function kI(e,t,r){var n=e.rawExtentInfo;return n||(n=new EI(e,t,r),e.rawExtentInfo=n,n)}function xo(e,t){return t==null?null:Ko(t)?NaN:e.parse(t)}function y_(e,t){var r=e.type,n=kI(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=h_("bar",o),u=!1;if(M(s,function(h){u=u||h.getBaseAxis()===t.axis}),u){var l=v_(s),f=BI(i,a,t,l);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function BI(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=yI(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var u=-1/0;M(o,function(v){u=Math.max(v.offset+v.width,u)}),s=Math.abs(s),u=Math.abs(u);var l=s+u,f=t-e,h=1-(s+u)/a,c=f/h-f;return t+=c*(u/l),e-=c*(s/l),{min:e,max:t}}function vp(e,t){var r=t,n=y_(e,r),i=n.extent,a=r.get("splitNumber");e instanceof Yh&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),u=o==="interval"||o==="time";e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:u?r.get("minInterval"):null,maxInterval:u?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function NI(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Wh({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new p_({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(er.getClass(t)||pi)}}function FI(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function gi(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):W(t)?function(n){return function(i){var a=e.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(t):J(t)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(Xh(e,i),a,i.level!=null?{level:i.level}:null)}}(t):function(n){return e.scale.getLabel(n)}}function Xh(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function zI(e){var t=e.model,r=e.scale;if(!(!t.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof Wh?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=gi(e),u,l=1;i>40&&(l=Math.ceil(i/40));for(var f=0;f=0||(cp.push(e),J(e)&&(e={install:e}),e.install($I))}var Da=mt();function __(e,t){var r=$(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function WI(e){var t=e.getLabelModel().get("customValues");if(t){var r=gi(e),n=e.scale.getExtent(),i=__(e,t),a=Tt(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:$(a,function(o){var s={value:o};return{formattedLabel:r(s),rawLabel:e.scale.getLabel(s),tickValue:o}})}}return e.type==="category"?YI(e):qI(e)}function UI(e,t){var r=e.getTickModel().get("customValues");if(r){var n=e.scale.getExtent(),i=__(e,r);return{ticks:Tt(i,function(a){return a>=n[0]&&a<=n[1]})}}return e.type==="category"?XI(e,t):{ticks:$(e.scale.getTicks(),function(a){return a.value})}}function YI(e){var t=e.getLabelModel(),r=w_(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function w_(e,t){var r=S_(e,"labels"),n=qh(t),i=x_(r,n);if(i)return i;var a,o;return J(n)?a=C_(e,n):(o=n==="auto"?ZI(e):n,a=T_(e,o)),b_(r,n,{labels:a,labelCategoryInterval:o})}function XI(e,t){var r=S_(e,"ticks"),n=qh(t),i=x_(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),J(n))a=C_(e,n,!0);else if(n==="auto"){var s=w_(e,e.getLabelModel());o=s.labelCategoryInterval,a=$(s.labels,function(u){return u.tickValue})}else o=n,a=T_(e,o,!0);return b_(r,n,{ticks:a,tickCategoryInterval:o})}function qI(e){var t=e.scale.getTicks(),r=gi(e);return{labels:$(t,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value}})}}function S_(e,t){return Da(e)[t]||(Da(e)[t]=[])}function x_(e,t){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var u=a[0],l=e.dataToCoord(u+1)-e.dataToCoord(u),f=Math.abs(l*Math.cos(n)),h=Math.abs(l*Math.sin(n)),c=0,v=0;u<=a[1];u+=s){var d=0,g=0,p=ah(r({value:u}),t.font,"center","top");d=p.width*1.3,g=p.height*1.3,c=Math.max(c,d,7),v=Math.max(v,g,7)}var y=c/f,m=v/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),w=Da(e.model),x=e.getExtent(),S=w.lastAutoInterval,b=w.lastTickCount;return S!=null&&b!=null&&Math.abs(S-_)<=1&&Math.abs(b-o)<=1&&S>_&&w.axisExtent0===x[0]&&w.axisExtent1===x[1]?_=S:(w.lastTickCount=o,w.lastAutoInterval=_,w.axisExtent0=x[0],w.axisExtent1=x[1]),_}function KI(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 T_(e,t,r){var n=gi(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],u=Math.max((t||0)+1,1),l=a[0],f=i.count();l!==0&&u>1&&f/u>2&&(l=Math.round(Math.ceil(l/u)*u));var h=m_(e),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&l!==a[0]&&g(a[0]);for(var d=l;d<=a[1];d+=u)g(d);v&&d-u!==a[1]&&g(a[1]);function g(p){var y={value:p};s.push(r?p:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:p})}return s}function C_(e,t,r){var n=e.scale,i=gi(e),a=[];return M(n.getTicks(),function(o){var s=n.getLabel(o),u=o.value;t(o.value,s)&&a.push(r?u:{formattedLabel:i(o),rawLabel:s,tickValue:u})}),a}var dp=[0,1],QI=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 YT(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(),pp(n,i.count())),Jl(t,dp,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),pp(n,i.count()));var a=Jl(t,n,dp,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=UI(this,r),i=n.ticks,a=$(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return JI(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=$(n,function(a){return $(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(){return WI(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 jI(this)},e}();function pp(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function JI(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[1],tickValue:t[0].tickValue};else{var u=t[i-1].tickValue-t[0].tickValue,l=(t[i-1].coord-t[0].coord)/u;M(t,function(v){v.coord-=l/2});var f=e.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+l*s,tickValue:f[1]+1},t.push(o)}var h=a[0]>a[1];c(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&c(a[0],t[0].coord)&&t.unshift({coord:a[0]}),c(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&c(o.coord,a[1])&&t.push({coord:a[1]});function c(v,d){return v=Lt(v),d=Lt(d),h?v>d:vi&&(i+=Ni);var v=Math.atan2(s,o);if(v<0&&(v+=Ni),v>=n&&v<=i||v+Ni>=n&&v+Ni<=i)return u[0]=f,u[1]=h,l-r;var d=r*Math.cos(n)+e,g=r*Math.sin(n)+t,p=r*Math.cos(i)+e,y=r*Math.sin(i)+t,m=(d-o)*(d-o)+(g-s)*(g-s),_=(p-o)*(p-o)+(y-s)*(y-s);return m<_?(u[0]=d,u[1]=g,Math.sqrt(m)):(u[0]=p,u[1]=y,Math.sqrt(_))}function _s(e,t,r,n,i,a,o,s){var u=i-e,l=a-t,f=r-e,h=n-t,c=Math.sqrt(f*f+h*h);f/=c,h/=c;var v=u*f+l*h,d=v/c;s&&(d=Math.min(Math.max(d,0),1)),d*=c;var g=o[0]=e+d*f,p=o[1]=t+d*h;return Math.sqrt((g-i)*(g-i)+(p-a)*(p-a))}function M_(e,t,r,n,i,a,o){r<0&&(e=e+r,r=-r),n<0&&(t=t+n,n=-n);var s=e+r,u=t+n,l=o[0]=Math.min(Math.max(i,e),s),f=o[1]=Math.min(Math.max(a,t),u);return Math.sqrt((l-i)*(l-i)+(f-a)*(f-a))}var Le=[];function nP(e,t,r){var n=M_(t.x,t.y,t.width,t.height,e.x,e.y,Le);return r.set(Le[0],Le[1]),n}function iP(e,t,r){for(var n=0,i=0,a=0,o=0,s,u,l=1/0,f=t.data,h=e.x,c=e.y,v=0;v0){t=t/180*Math.PI,Pe.fromArray(e[0]),ot.fromArray(e[1]),xt.fromArray(e[2]),U.sub(Ue,Pe,ot),U.sub(Ve,xt,ot);var r=Ue.len(),n=Ve.len();if(!(r<.001||n<.001)){Ue.scale(1/r),Ve.scale(1/n);var i=Ue.dot(Ve),a=Math.cos(t);if(a1&&U.copy(Ut,xt),Ut.toArray(e[1])}}}}function aP(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Pe.fromArray(e[0]),ot.fromArray(e[1]),xt.fromArray(e[2]),U.sub(Ue,ot,Pe),U.sub(Ve,xt,ot);var n=Ue.len(),i=Ve.len();if(!(n<.001||i<.001)){Ue.scale(1/n),Ve.scale(1/i);var a=Ue.dot(t),o=Math.cos(r);if(a=u)U.copy(Ut,xt);else{Ut.scaleAndAdd(Ve,s/Math.tan(Math.PI/2-f));var h=xt.x!==ot.x?(Ut.x-ot.x)/(xt.x-ot.x):(Ut.y-ot.y)/(xt.y-ot.y);if(isNaN(h))return;h<0?U.copy(Ut,ot):h>1&&U.copy(Ut,xt)}Ut.toArray(e[1])}}}}function gl(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function oP(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=zl(n[0],n[1]),a=zl(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Po([],n[1],n[0],o/i),u=Po([],n[1],n[2],o/a),l=Po([],s,u,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(u[0],u[1],u[0],u[1],n[2][0],n[2][1])}else for(var f=1;f0){_(C*T,0,o);var D=C+S;D<0&&w(-D*T,1)}else w(-S*T,1)}}function _(S,b,T){S!==0&&(l=!0);for(var C=b;C0)for(var D=0;D0;D--){var I=T[D-1]*L;_(-I,D,o)}}}function x(S){var b=S<0?-1:1;S=Math.abs(S);for(var T=Math.ceil(S/(o-1)),C=0;C0?_(T,0,C+1):_(-T,o-C-1,o),S-=T,S<=0)return}return l}function sP(e,t,r,n){return P_(e,"x","width",t,r)}function E_(e,t,r,n){return P_(e,"y","height",t,r)}function R_(e){var t=[];e.sort(function(g,p){return p.priority-g.priority});var r=new it(0,0,0,0);function n(g){if(!g.ignore){var p=g.ensureState("emphasis");p.ignore==null&&(p.ignore=!1)}g.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),lt(c,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),se(n,l,r,u)}else if(n.attr(l),!Ga(n).valueAnimation){var h=K(n.style.opacity,1);n.style.opacity=0,me(n,{style:{opacity:h}},r,u)}if(a.oldLayout=l,n.states.select){var v=a.oldLayoutSelect={};bo(v,l,To),bo(v,n.states.select,To)}if(n.states.emphasis){var d=a.oldLayoutEmphasis={};bo(d,l,To),bo(d,n.states.emphasis,To)}MD(n,u,f,r,r)}if(i&&!i.ignore&&!i.invisible){var a=fP(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),se(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,me(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},e}(),ml=mt();function vP(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=ml(r).labelManager;i||(i=ml(r).labelManager=new hP),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=ml(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}function cP(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=oi(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(" ")}function pP(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,u=a.width,l=a.height,f=r.get(["lineStyle","width"])||0;o-=f/2,s-=f/2,u+=f,l+=f,u=Math.ceil(u),o!==Math.floor(o)&&(o=Math.floor(o),u++);var h=new Et({shape:{x:o,y:s,width:u,height:l}});return h}function gP(e,t,r){var n=e.getArea(),i=Lt(n.r0,1),a=Lt(n.r,1),o=new Ze({shape:{cx:Lt(e.cx,1),cy:Lt(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return o}function yP(e,t,r,n,i){if(e){if(e.type==="polar")return gP(e);if(e.type==="cartesian2d")return pP(e,t,r)}else return null;return null}function O_(e,t){return e.type===t}var mP={average:function(e){for(var t=0,r=0,n=0;nt&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var u=o.getBaseAxis(),l=o.getOtherAxis(u),f=u.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/v)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(l.dim),1/v));var d=void 0;W(a)?d=mP[a]:J(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/v,d,_P))}}}}}var Pf=function(e){H(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return s_(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)M(a.getAxes(),function(c,v){if(c.type==="category"&&n!=null){var d=c.getTicksCoords(),g=c.getTickModel().get("alignWithLabel"),p=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!g&&(p+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,w=1,x=0;xp){_=(S+m)/2;break}x===1&&(w=b-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=c.toGlobalCoord(_)}});else{var u=this.getData(),l=u.getLayout("offset"),f=u.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=l+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(je);je.registerClass(Pf);var SP=function(e){H(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return s_(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=BD(Pf.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}),t}(Pf),xP=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),mp=function(e){H(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new xP},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),u=(s-o)*.5,l=o+u,f=n.startAngle,h=n.endAngle,c=n.clockwise,v=Math.PI*2,d=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){ls(a,r,ut(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(hr),_p={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=_l(t.x,e.x),s=wl(t.x+t.width,i),u=_l(t.y,e.y),l=wl(t.y+t.height,a),f=si?s:o,t.y=h&&u>a?l:u,t.width=f?0:s-o,t.height=h?0:l-u,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=wl(t.r,e.r),a=_l(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},wp={cartesian2d:function(e,t,r,n,i,a,o,s,u){var l=new Et({shape:B({},n),z2:1});if(l.__dataIndex=r,l.name="item",a){var f=l.shape,h=i?"height":"width";f[h]=0}return l},polar:function(e,t,r,n,i,a,o,s,u){var l=!i&&u?mp:Ze,f=new l({shape:n,z2:1});f.name="item";var h=k_(i);if(f.calculateTextPosition=bP(h,{isRoundCap:l===mp}),a){var c=f.shape,v=i?"r":"endAngle",d={};c[v]=i?n.r0:n.startAngle,d[v]=n[v],(s?se:me)(f,{shape:d},a)}return f}};function DP(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function Sp(e,t,r,n,i,a,o,s){var u,l;a?(l={x:n.x,width:n.width},u={y:n.y,height:n.height}):(l={y:n.y,height:n.height},u={x:n.x,width:n.width}),s||(o?se:me)(r,{shape:u},t,i,null);var f=t?e.baseAxis.model:null;(o?se:me)(r,{shape:l},f,i)}function xp(e,t){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function IP(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function k_(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function Tp(e,t,r,n,i,a,o,s){var u=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=e.shape,h=Yi(n.getModel("itemStyle"),f,!0);B(f,h),e.setShape(f)}}else{var l=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",l)}e.useStyle(u);var c=n.getShallow("cursor");c&&e.attr("cursor",c);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=Dm(n);Mm(e,d,{labelFetcher:a,labelDataIndex:r,defaultText:cP(a.getData(),r),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:v});var g=e.getTextContent();if(s&&g){var p=n.get(["label","position"]);e.textConfig.inside=p==="middle"?!0:null,TP(e,p==="outside"?v:p,k_(o),n.get(["label","rotate"]))}CD(g,d,a.getRawValue(r),function(m){return dP(t,m)});var y=n.getModel(["emphasis"]);om(e,y.get("focus"),y.get("blurScope"),y.get("disabled")),sm(e,n),IP(i)&&(e.style.fill="none",e.style.stroke="none",M(e.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function PP(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var EP=function(){function e(){}return e}(),Cp=function(e){H(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new EP},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],u=[],l=this.barWidth,f=0;f=0?r:null},30,!1);function RP(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],u=[],l=e.barWidth,f=0,h=a.length/3;f=s[0]&&t<=s[0]+u[0]&&r>=s[1]&&r<=s[1]+u[1])return o[f]}return-1}function B_(e,t,r){if(O_(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function OP(e,t,r){var n=e.type==="polar"?Ze:Et;return new n({shape:B_(t,r,e),silent:!0,z2:0})}function kP(e){e.registerChartView(MP),e.registerSeriesModel(SP),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Yt(mI,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,_I("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,wP("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var Ap=Math.PI*2,Ao=Math.PI/180;function N_(e,t){return js(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function F_(e,t){var r=N_(e,t),n=e.get("center"),i=e.get("radius");z(i)||(i=[0,i]);var a=pt(r.width,t.getWidth()),o=pt(r.height,t.getHeight()),s=Math.min(a,o),u=pt(i[0],s/2),l=pt(i[1],s/2),f,h,c=e.coordinateSystem;if(c){var v=c.dataToPoint(n);f=v[0]||0,h=v[1]||0}else z(n)||(n=[n,n]),f=pt(n[0],a)+r.x,h=pt(n[1],o)+r.y;return{cx:f,cy:h,r0:u,r:l}}function BP(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=N_(n,r),s=F_(n,r),u=s.cx,l=s.cy,f=s.r,h=s.r0,c=-n.get("startAngle")*Ao,v=n.get("endAngle"),d=n.get("padAngle")*Ao;v=v==="auto"?c-Ap:-v*Ao;var g=n.get("minAngle")*Ao,p=g+d,y=0;i.each(a,function(N){!isNaN(N)&&y++});var m=i.getSum(a),_=Math.PI/(m||y)*2,w=n.get("clockwise"),x=n.get("roseType"),S=n.get("stillShowZeroSum"),b=i.getDataExtent(a);b[0]=0;var T=w?1:-1,C=[c,v],D=T*d/2;Uy(C,!w),c=C[0],v=C[1];var A=z_(n);A.startAngle=c,A.endAngle=v,A.clockwise=w;var P=Math.abs(v-c),L=P,I=0,E=c;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(N,R){var k;if(isNaN(N)){i.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:u,cy:l,r0:h,r:x?NaN:f});return}x!=="area"?k=m===0&&S?_:N*_:k=P/y,kk?(G=E+T*k/2,V=G):(G=E+D,V=F-D),i.setItemLayout(R,{angle:k,startAngle:G,endAngle:V,clockwise:w,cx:u,cy:l,r0:h,r:x?Jl(N,b,[h,f]):f}),E=F}),Lr?y:p,x=Math.abs(_.label.y-r);if(x>=w.maxY){var S=_.label.x-t-_.len2*i,b=n+_.len,T=Math.abs(S)e.unconstrainedWidth?null:v:null;n.setStyle("width",d)}var g=n.getBoundingRect();a.width=g.width;var p=(n.style.margin||0)+2.1;a.height=g.height+p,a.y-=(a.height-h)/2}}}function Sl(e){return e.position==="center"}function GP(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*FP,s=t.getLayout("viewRect"),u=t.getLayout("r"),l=s.width,f=s.x,h=s.y,c=s.height;function v(S){S.ignore=!0}function d(S){if(!S.ignore)return!0;for(var b in S.states)if(S.states[b].ignore===!1)return!0;return!1}t.each(function(S){var b=t.getItemGraphicEl(S),T=b.shape,C=b.getTextContent(),D=b.getTextGuideLine(),A=t.getItemModel(S),P=A.getModel("label"),L=P.get("position")||A.get(["emphasis","label","position"]),I=P.get("distanceToLabelLine"),E=P.get("alignTo"),O=pt(P.get("edgeDistance"),l),N=P.get("bleedMargin"),R=A.getModel("labelLine"),k=R.get("length");k=pt(k,l);var F=R.get("length2");if(F=pt(F,l),Math.abs(T.endAngle-T.startAngle)0?"right":"left":V>0?"left":"right"}var ke=Math.PI,Se=0,yr=P.get("rotate");if(vt(yr))Se=yr*(ke/180);else if(L==="center")Se=0;else if(yr==="radial"||yr===!0){var Ha=V<0?-G+ke:-G;Se=Ha}else if(yr==="tangential"&&L!=="outside"&&L!=="outer"){var rr=Math.atan2(V,j);rr<0&&(rr=ke*2+rr);var nu=j>0;nu&&(rr=ke+rr),Se=rr-ke}if(a=!!Se,C.x=ct,C.y=St,C.rotation=Se,C.setStyle({verticalAlign:"middle"}),Pt){C.setStyle({align:kt});var yi=C.states.select;yi&&(yi.x+=C.x,yi.y+=C.y)}else{var mr=C.getBoundingRect().clone();mr.applyTransform(C.getComputedTransform());var Va=(C.style.margin||0)+2.1;mr.y-=Va/2,mr.height+=Va,r.push({label:C,labelLine:D,position:L,len:k,len2:F,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new U(V,j),linePoints:It,textAlign:kt,labelDistance:I,labelAlignTo:E,edgeDistance:O,bleedMargin:N,rect:mr,unconstrainedWidth:mr.width,labelStyleWidth:C.style.width})}b.setTextConfig({inside:Pt})}}),!a&&e.get("avoidLabelOverlap")&&zP(r,n,i,u,l,c,f,h);for(var g=0;g0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=a.r0}},t.type="pie",t}(hr);function $P(e,t,r){t=z(t)&&{coordDimensions:t}||B({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=a_(n,t).dimensions,a=new i_(i,e);return a.initData(n,r),a}var WP=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),UP=mt(),YP=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new WP(_t(this.getData,this),_t(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return $P(this,{coordDimensions:["value"],encodeDefaulter:Yt(tA,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=UP(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(u){o.push(u)}),a=i.seats=XT(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){tf(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.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"},t}(je);function XP(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(vt(o)&&!isNaN(o)&&o<0)})}}}function qP(e){e.registerChartView(VP),e.registerSeriesModel(YP),FL("pie",e.registerAction),e.registerLayout(Yt(BP,"pie")),e.registerProcessor(NP("pie")),e.registerProcessor(XP("pie"))}var ZP=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.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"},t}(st),Ef=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ie).models[0]},t.type="cartesian2dAxis",t}(st);Qe(Ef,VI);var H_={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)"]}}},jP=ft({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},H_),Zh=ft({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}}},H_),KP=ft({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Zh),QP=et({logBase:10},Zh);const JP={category:jP,value:Zh,time:KP,log:QP};var tE={value:1,category:1,time:1,log:1};function Ip(e,t,r,n){M(tE,function(i,a){var o=ft(ft({},JP[a],!0),n,!0),s=function(u){H(l,u);function l(){var f=u!==null&&u.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return l.prototype.mergeDefaultAndTheme=function(f,h){var c=wa(this),v=c?Ih(f):{},d=h.getTheme();ft(f,d.get(a+"Axis")),ft(f,this.getDefaultOption()),f.type=Pp(f),c&&Sa(f,v,c)},l.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Lf.createByAxisModel(this))},l.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.type=t+"Axis."+a,l.defaultOption=o,l}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",Pp)}function Pp(e){return e.type||(e.data?"category":"value")}var eE=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return $(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Tt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),Rf=["x","y"];function Ep(e){return e.type==="interval"||e.type==="time"}var rE=function(e){H(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=Rf,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Ep(r)||!Ep(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),u=i[1]-i[0],l=a[1]-a[0];if(!(!u||!l)){var f=(s[0]-o[0])/u,h=(s[1]-o[1])/l,c=o[0]-i[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=Rs([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new it(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ye(i,r,this._transform);var s=this.getAxis("x"),u=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=u.toGlobalCoord(u.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),u=i.parse(r[0]),l=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return ye(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,u=Math.max(i[0],i[1])-o+r;return new it(a,o,s,u)},t}(eE),nE=function(e){H(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[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}(QI);function Of(e,t,r){r=r||{};var n=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,u=o?"onZero":s,l=i.dim,f=n.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=l==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(g,d[1]),d[0])}a.position=[l==="y"?d[c[u]]:h[0],l==="x"?d[c[u]]:h[3]],a.rotation=Math.PI/2*(l==="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[c[s]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),ca(r.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=t.get(["axisLabel","rotate"]);return a.labelRotate=u==="top"?-y:y,a.z2=1,a}function Rp(e){return e.get("coordinateSystem")==="cartesian2d"}function Op(e){var t={xAxisModel:null,yAxisModel:null};return M(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,Ie).models[0];t[n]=a}),t}var xl=Math.log;function iE(e,t,r){var n=pi.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),u=y_(e,t),l=u.extent,f=u.fixMin,h=u.fixMax;if(e.type==="log"){var c=xl(e.base);l=[xl(l[0])/c,xl(l[1])/c]}e.setExtent(l[0],l[1]),e.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=n.getExtent.call(e);f&&(l[0]=v[0]),h&&(l[1]=v[1]);var d=n.getInterval.call(e),g=l[0],p=l[1];if(f&&h)d=(p-g)/o;else if(f)for(p=l[0]+d*o;pl[0]&&isFinite(g)&&isFinite(l[0]);)d=dl(d),g=l[1]-d*o;else{var y=e.getTicks().length-1;y>o&&(d=dl(d));var m=d*o;p=Math.ceil(l[1]/d)*d,g=Lt(p-m),g<0&&l[0]>=0?(g=0,p=Lt(m)):p>0&&l[1]<=0&&(p=0,g=-Lt(m))}var _=(i[0].value-a[0].value)/s,w=(i[o].value-a[o].value)/s;n.setExtent.call(e,g+d*_,p+d*w),n.setInterval.call(e,d),(_||w)&&n.setNiceExtent.call(e,g+d,p-d)}var aE=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Rf,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);function i(o){var s,u=gt(o),l=u.length;if(l){for(var f=[],h=l-1;h>=0;h--){var c=+u[h],v=o[c],d=v.model,g=v.scale;If(g)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(vp(g,d),If(g)&&(s=v))}f.length&&(s||(s=f.pop(),vp(s.scale,s.model)),M(f,function(p){iE(p.scale,p.model,s.scale)}))}}i(n.x),i(n.y);var a={};M(n.x,function(o){kp(n,"y",o,a)}),M(n.y,function(o){kp(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=js(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;u(),a&&(M(s,function(l){if(!l.model.get(["axisLabel","inside"])){var f=zI(l);if(f){var h=l.isHorizontal()?"height":"width",c=l.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,l.position==="top"?o.y+=f.height+c:l.position==="left"&&(o.x+=f.width+c)}}}),u()),M(this._coordsList,function(l){l.calcAffineTransform()});function u(){M(s,function(l){var f=l.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=l.inverse?1:0;l.setExtent(h[c],h[1-c]),oE(l,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]}X(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):as(i-Lr)?(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}(),Np={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],u=[a[1],0],l=s[0]>u[0];o&&(ye(s,s,o),ye(u,u,o));var f=B({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Fr({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:f,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});ya(h.shape,h.style.lineWidth),h.anid="line",r.add(h);var c=t.get(["axisLine","symbol"]);if(c!=null){var v=t.get(["axisLine","symbolSize"]);W(c)&&(c=[c,c]),(W(v)||vt(v))&&(v=[v,v]);var d=KL(t.get(["axisLine","symbolOffset"])||0,v),g=v[0],p=v[1];M([{rotate:e.rotation+Math.PI/2,offset:d[0],r:0},{rotate:e.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(y,m){if(c[m]!=="none"&&c[m]!=null){var _=L0(c[m],-g/2,-p/2,g,p,f.stroke,!0),w=y.r+y.offset,x=l?u:s;_.attr({rotation:y.rotate,x:x[0]+w*Math.cos(e.rotation),y:x[1]-w*Math.sin(e.rotation),silent:!0,z2:11}),r.add(_)}})}}},axisTickLabel:function(e,t,r,n){var i=lE(r,n,t,e),a=hE(r,n,t,e);if(uE(t,a,i),fE(r,n,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=I_($(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));R_(o)}},axisName:function(e,t,r,n){var i=ca(e.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),u=t.get("nameGap")||0,l=t.axis.getExtent(),f=l[0]>l[1]?-1:1,h=[a==="start"?l[0]-f*u:a==="end"?l[1]+f*u:(l[0]+l[1])/2,zp(a)?e.labelOffset+o*u:0],c,v=t.get("nameRotate");v!=null&&(v=v*Lr/180);var d;zp(a)?c=Er.innerTextLayout(e.rotation,v??e.rotation,o):(c=sE(e.rotation,a,v||0,l),d=e.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var g=s.getFont(),p=t.get("nameTruncate",!0)||{},y=p.ellipsis,m=ca(e.nameTruncateMaxWidth,p.maxWidth,d),_=new oe({x:h[0],y:h[1],rotation:c.rotation,silent:Er.isLabelSilent(t),style:wn(s,{text:i,font:g,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(xh({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var w=Er.makeAxisEventDataBase(t);w.targetType="axisName",w.name=i,ut(_).eventData=w}n.add(_),_.updateTransform(),r.add(_),_.decomposeTransform()}}};function sE(e,t,r,n){var i=Iy(r-e),a,o,s=n[0]>n[1],u=t==="start"&&!s||t!=="start"&&s;return as(i-Lr/2)?(o=u?"bottom":"top",a="center"):as(i-Lr*1.5)?(o=u?"top":"bottom",a="center"):(o="middle",iLr/2?a=u?"left":"right":a=u?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function uE(e,t,r){if(!m_(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],u=t[t.length-2],l=r[0],f=r[1],h=r[r.length-1],c=r[r.length-2];n===!1?(fe(a),fe(l)):Fp(a,o)&&(n?(fe(o),fe(f)):(fe(a),fe(l))),i===!1?(fe(s),fe(h)):Fp(u,s)&&(i?(fe(u),fe(c)):(fe(s),fe(h)))}}function fe(e){e&&(e.ignore=!0)}function Fp(e,t){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!r||!n)){var i=rh([]);return nh(i,i,-e.rotation),r.applyTransform(Kn([],i,e.getLocalTransform())),n.applyTransform(Kn([],i,t.getLocalTransform())),r.intersect(n)}}function zp(e){return e==="middle"||e==="center"}function V_(e,t,r,n,i){for(var a=[],o=[],s=[],u=0;u=0||e===t}function yE(e){var t=jh(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=kf(r);a==null&&(i.status=s?"show":"hide");var u=n.getExtent().slice();u[0]>u[1]&&u.reverse(),(o==null||o>u[1])&&(o=u[1]),os)return!0;if(o){var u=jh(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/u>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=vn(t).pointerEl=new SD[a.type](Vp(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=vn(t).labelEl=new oe(Vp(r.label));t.add(a),Wp(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=vn(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=vn(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),Wp(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=bm(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){uy(l.event)},onmousedown:Cl(this._onHandleDragMove,this,0,0),drift:Cl(this._onHandleDragMove,this),ondragend:Cl(this._onHandleDragEnd,this)}),n.add(i)),Up(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=a.get("size");z(u)||(u=[u,u]),i.scaleX=u[0]/2,i.scaleY=u[1]/2,S0(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){$p(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Ml(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(Ml(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Ml(i)),vn(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),wf(this,"_doDispatchAxisPointer")},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 $p(e,t,r,n){Y_(vn(r).lastProp,n)||(vn(r).lastProp=n,t?se(r,n,e):(r.stopAnimation(),r.attr(n)))}function Y_(e,t){if(X(e)&&X(t)){var r=!0;return M(t,function(n,i){r=r&&Y_(e[i],n)}),!!r}else return e===t}function Wp(e,t){e[t.get(["label","show"])?"show":"hide"]()}function Ml(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Up(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)})}function AE(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 LE(e,t,r,n,i){var a=r.get("value"),o=X_(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),u=Lh(s.get("padding")||0),l=s.getFont(),f=ah(o,l),h=i.position,c=f.width+u[1]+u[3],v=f.height+u[0]+u[2],d=i.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(h[1]-=v),g==="middle"&&(h[1]-=v/2),IE(h,c,v,n);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=t.get(["axisLine","lineStyle","color"])),e.label={x:h[0],y:h[1],style:wn(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:p}),z2:10}}function IE(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 X_(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:Xh(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};M(n,function(u){var l=r.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,h=l&&l.getDataParams(f);h&&s.seriesData.push(h)}),W(o)?a=o.replace("{value}",a):J(o)&&(a=o(s))}return a}function q_(e,t,r){var n=jn();return nh(n,n,r.rotation),$l(n,n,r.position),Sh([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function PE(e,t,r,n,i,a){var o=Er.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),LE(t,n,i,a,{position:q_(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function EE(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function RE(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}var OE=function(e){H(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,u=s.grid,l=a.get("type"),f=Yp(u,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var c=AE(a),v=kE[l](s,h,f);v.style=c,r.graphicKey=v.type,r.pointer=v}var d=Of(u.model,i);PE(n,r,d,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=Of(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=q_(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,u=o.getGlobalExtent(!0),l=Yp(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[r.x,r.y];h[f]+=n[f],h[f]=Math.min(u[1],h[f]),h[f]=Math.max(u[0],h[f]);var c=(l[1]+l[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(DE);function Yp(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var kE={line:function(e,t,r){var n=EE([t,r[0]],[t,r[1]],Xp(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:RE([t-n/2,r[0]],[n,i],Xp(e))}}};function Xp(e){return e.dim==="x"?0:1}var BE=function(e){H(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",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}},t}(st),lr=mt(),NE=M;function Z_(e,t,r){if(!q.node){var n=t.getZr();lr(n).records||(lr(n).records={}),FE(n,t);var i=lr(n).records[e]||(lr(n).records[e]={});i.handler=r}}function FE(e,t){if(lr(e).initialized)return;lr(e).initialized=!0,r("click",Yt(qp,"click")),r("mousemove",Yt(qp,"mousemove")),r("globalout",GE);function r(n,i){e.on(n,function(a){var o=HE(t);NE(lr(e).records,function(s){s&&i(s,a,o.dispatchAction)}),zE(o.pendings,t)})}}function zE(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 GE(e,t,r){e.handler("leave",null,r)}function qp(e,t,r,n){t.handler(e,r,n)}function HE(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 Nf(e,t){if(!q.node){var r=t.getZr(),n=(lr(r).records||{})[e];n&&(lr(r).records[e]=null)}}var VE=function(e){H(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";Z_("axisPointer",i,function(s,u,l){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&l({type:"updateAxisPointer",currTrigger:s,x:u&&u.offsetX,y:u&&u.offsetY})})},t.prototype.remove=function(r,n){Nf("axisPointer",n)},t.prototype.dispose=function(r,n){Nf("axisPointer",n)},t.type="axisPointer",t}(Re);function j_(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Na(a,e);if(o==null||o<0||z(o))return{point:[]};var s=a.getItemGraphicEl(o),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(u&&u.dataToPoint)if(e.isStacked){var l=u.getBaseAxis(),f=u.getOtherAxis(l),h=f.dim,c=l.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),g=[];g[v]=a.get(d,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=u.dataToPoint(g)||[]}else r=u.dataToPoint(a.getValues($(u.dimensions,function(y){return a.mapDimension(y)}),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 Zp=mt();function $E(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||_t(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Uo(i)&&(i=j_({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var u=Uo(i),l=a.axesInfo,f=s.axesInfo,h=n==="leave"||Uo(i),c={},v={},d={list:[],map:{}},g={showPointer:Yt(UE,v),showTooltip:Yt(YE,d)};M(s.coordSysMap,function(y,m){var _=u||y.containPoint(i);M(s.coordSysAxesInfo[m],function(w,x){var S=w.axis,b=jE(l,w);if(!h&&_&&(!l||b)){var T=b&&b.value;T==null&&!u&&(T=S.pointToData(i)),T!=null&&jp(w,T,g,!1,c)}})});var p={};return M(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&M(_.axesInfo,function(w,x){var S=v[x];if(w!==y&&S){var b=S.value;_.mapper&&(b=y.axis.scale.parse(_.mapper(b,Kp(w),Kp(y)))),p[y.key]=b}})}),M(p,function(y,m){jp(f[m],y,g,!0,c)}),XE(v,f,c),qE(d,i,e,o),ZE(f,o,r),c}}function jp(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=WE(t,e),s=o.payloadBatch,u=o.snapToValue;s[0]&&i.seriesIndex==null&&B(i,s[0]),!n&&e.snap&&a.containData(u)&&u!=null&&(t=u),r.showPointer(e,t,s),r.showTooltip(e,o,u)}}function WE(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return M(t.seriesModels,function(u,l){var f=u.getData().mapDimensionsAll(n),h,c;if(u.getAxisTooltipData){var v=u.getAxisTooltipData(f,e,r);c=v.dataIndices,h=v.nestestValue}else{if(c=u.getData().indicesOfNearest(f[0],e,r.type==="category"?.5:null),!c.length)return;h=u.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=e-h,g=Math.abs(d);g<=o&&((g=0&&s<0)&&(o=g,s=d,i=h,a.length=0),M(c,function(p){a.push({seriesIndex:u.seriesIndex,dataIndexInside:p,dataIndex:u.getData().getRawIndex(p)})}))}}),{payloadBatch:a,snapToValue:i}}function UE(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function YE(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var u=t.coordSys.model,l=Aa(u),f=e.map[l];f||(f=e.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.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 XE(e,t,r){var n=r.axesInfo=[];M(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 qE(e,t,r,n){if(Uo(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 ZE(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=Zp(n)[i]||{},o=Zp(n)[i]={};M(e,function(l,f){var h=l.axisPointerModel.option;h.status==="show"&&l.triggerEmphasis&&M(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],u=[];M(a,function(l,f){!o[f]&&u.push(l)}),M(o,function(l,f){!a[f]&&s.push(l)}),u.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function jE(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 Kp(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 Uo(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function K_(e){$_.registerAxisPointerClass("CartesianAxisPointer",OE),e.registerComponentModel(BE),e.registerComponentView(VE),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!z(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=vE(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},$E)}function KE(e){Ma(ME),Ma(K_)}var QE=function(e){H(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={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}(st);function Q_(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function J_(e){if(q.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r-1?(s+="top:50%",u+="translateY(-50%) rotate("+(l=a==="left"?-225:-45)+"deg)"):(s+="left:50%",u+="translateX(-50%) rotate("+(l=a==="top"?225:45)+"deg)");var f=l*Math.PI/180,h=o+i,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*i)/2+Math.SQRT2*i-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+u+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return''}function aR(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+=q.transformSupported?","+Kh+n:",left"+n+",top"+n),eR+":"+i}function Qp(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!q.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=q.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+Kh+":"+o+";":[["top",0],["left",0],[t1,o]]}function oR(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=K(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,u=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+u+"px "+o+"px "+a),M(["decoration","align"],function(l){var f=e.get(l);f&&t.push("text-"+l+":"+f)}),t.join(";")}function sR(e,t,r){var n=[],i=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),u=e.get("shadowOffsetX"),l=e.get("shadowOffsetY"),f=e.getModel("textStyle"),h=m0(e,"html"),c=u+"px "+l+"px "+o+"px "+s;return n.push("box-shadow:"+c),t&&i&&n.push(aR(i,r)),a&&n.push("background-color:"+a),M(["width","color","radius"],function(v){var d="border-"+v,g=Hm(d),p=e.get(g);p!=null&&n.push(d+":"+p+(v==="color"?"":"px"))}),n.push(oR(f)),h!=null&&n.push("padding:"+Lh(h).join("px ")+"px"),n.join(";")+";"}function Jp(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&Vb(e,o,r,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 uR=function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,q.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(W(a)?document.querySelector(a):va(a)?a:J(a)&&a(t.getDom()));Jp(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(u){if(u=u||window.event,!s._enterable){var l=i.handler,f=i.painter.getViewportRoot();ve(f,u,!0),l.dispatch("mousemove",u)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=tR(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,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=rR+sR(t,!this._firstShow,this._longHide)+Qp(a[0],a[1],!0)+("border-color:"+_a(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(W(a)&&n.get("trigger")==="item"&&!Q_(n)&&(s=iR(n,i,a)),W(t))o.innerHTML=t+s;else if(t){o.innerHTML="",z(t)||(t=[t]);for(var u=0;u=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,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||q.node||!i.getDom())){var o=rg(a,i);this._ticket="";var s=a.dataByCoordSys,u=pR(a,n,i);if(u){var l=u.el.getBoundingRect().clone();l.applyTransform(u.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:u.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=fR;f.x=a.x,f.y=a.y,f.update(),ut(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 h=j_(a,n),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.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._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(rg(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,u=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||u==null)){var l=n.getSeriesByIndex(o);if(l){var f=l.getData(),h=Fi([f.getItemModel(s),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(h.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){var s=ut(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var u,l;Ui(i,function(f){if(ut(f).dataIndex!=null)return u=f,!0;if(ut(f).tooltipConfig!=null)return l=f,!0},!0),u?this._showSeriesItemTooltip(r,u,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=_t(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=Fi([n.tooltipOption],a),u=this._renderMode,l=[],f=ba("section",{blocks:[],noHeader:!0}),h=[],c=new rl;M(r,function(m){M(m.dataByAxis,function(_){var w=i.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!w||x==null)){var S=X_(x,w.axis,i,_.seriesDataIndices,_.valueLabelOpt),b=ba("section",{header:S,noHeader:!$e(S),sortBlocks:!0,blocks:[]});f.blocks.push(b),M(_.seriesDataIndices,function(T){var C=i.getSeriesByIndex(T.seriesIndex),D=T.dataIndexInside,A=C.getDataParams(D);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=Xh(w.axis,{value:x}),A.axisValueLabel=S,A.marker=c.makeTooltipMarker("item",_a(A.color),u);var P=_d(C.formatTooltip(D,!0,null)),L=P.frag;if(L){var I=Fi([C],a).get("valueFormatter");b.blocks.push(I?B({valueFormatter:I},L):L)}P.text&&h.push(P.text),l.push(A)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,d=s.get("order"),g=Cd(f,c,u,d,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var p=u==="richText"?`
+
+`:"
",y=h.join(p);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,l)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(s,y,l,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=ut(n),s=o.seriesIndex,u=a.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,h=o.dataType,c=l.getData(h),v=this._renderMode,d=r.positionDefault,g=Fi([c.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=g.get("trigger");if(!(p!=null&&p!=="item")){var y=l.getDataParams(f,h),m=new rl;y.marker=m.makeTooltipMarker("item",_a(y.color),v);var _=_d(l.formatTooltip(f,!1,h)),w=g.get("order"),x=g.get("valueFormatter"),S=_.frag,b=S?Cd(x?B({valueFormatter:x},S):S,m,v,w,a.get("useUTC"),g.get("textStyle")):_.text,T="item_"+l.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,b,y,T,r.offsetX,r.offsetY,r.position,r.target,m)}),i({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=ut(n),s=o.tooltipConfig,u=s.option||{},l=u.encodeHTMLContent;if(W(u)){var f=u;u={content:f,formatter:f},l=!0}l&&a&&u.content&&(u=nt(u),u.content=Kt(u.content));var h=[u],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:u.content});var v=r.positionDefault,d=Fi(h,this._tooltipModel,v?{position:v}:null),g=d.get("content"),p=Math.random()+"",y=new rl;this._showOrMove(d,function(){var m=nt(d.get("formatterParams")||{});this._showTooltipContent(d,g,m,p,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,u,l,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var c=r.get("formatter");u=u||r.get("position");var v=n,d=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),g=d.color;if(c)if(W(c)){var p=r.ecModel.get("useUTC"),y=z(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=Us(y.axisValue,v,p)),v=Vm(v,i,!0)}else if(J(c)){var _=_t(function(w,x){w===this._ticket&&(h.setContent(x,f,r,g,u),this._updatePosition(r,u,o,s,h,i,l))},this);this._ticket=a,v=c(i,a,_)}else v=c;h.setContent(v,f,r,g,u),h.show(r,g),this._updatePosition(r,u,o,s,h,i,l)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||z(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!z(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,u){var l=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),c=r.get("align"),v=r.get("verticalAlign"),d=u&&u.getBoundingRect().clone();if(u&&d.applyTransform(u.transform),J(n)&&(n=n([i,a],s,o.el,d,{viewSize:[l,f],contentSize:h.slice()})),z(n))i=pt(n[0],l),a=pt(n[1],f);else if(X(n)){var g=n;g.width=h[0],g.height=h[1];var p=js(g,{width:l,height:f});i=p.x,a=p.y,c=null,v=null}else if(W(n)&&u){var y=dR(n,d,h,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=vR(i,a,o,l,f,c?null:20,v?null:20);i=y[0],a=y[1]}if(c&&(i-=ng(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=ng(v)?h[1]/2:v==="bottom"?h[1]:0),Q_(r)){var y=cR(i,a,o,l,f);i=y[0],a=y[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&M(i,function(s,u){var l=s.dataByAxis||[],f=r[u]||{},h=f.dataByAxis||[];o=o&&l.length===h.length,o&&M(l,function(c,v){var d=h[v]||{},g=c.seriesDataIndices||[],p=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&g.length===p.length,o&&M(g,function(y,m){var _=p[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&M(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],w=a[m];_&&w&&w.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){q.node||!n.getDom()||(wf(this,"_updatePosition"),this._tooltipContent.dispose(),Nf("itemTooltip",n))},t.type="tooltip",t}(Re);function Fi(e,t,r){var n=t.ecModel,i;r?(i=new Ct(r,n,n),i=new Ct(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),W(o)&&(o={formatter:o}),o&&(i=new Ct(o,i,n)))}return i}function rg(e,t){return e.dispatchAction||_t(t.dispatchAction,t)}function vR(e,t,r,n,i,a,o){var s=r.getSize(),u=s[0],l=s[1];return a!=null&&(e+u+a+2>n?e-=u+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function cR(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 dR(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,u=0,l=t.width,f=t.height;switch(e){case"inside":s=t.x+l/2-i/2,u=t.y+f/2-a/2;break;case"top":s=t.x+l/2-i/2,u=t.y-a-o;break;case"bottom":s=t.x+l/2-i/2,u=t.y+f+o;break;case"left":s=t.x-i-o,u=t.y+f/2-a/2;break;case"right":s=t.x+l+o,u=t.y+f/2-a/2}return[s,u]}function ng(e){return e==="center"||e==="middle"}function pR(e,t,r){var n=uh(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Fa(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),u;if(s.group.traverse(function(l){var f=ut(l).tooltipConfig;if(f&&f.name===e.name)return u=l,!0}),u)return{componentMainType:i,componentIndex:o.componentIndex,el:u}}}}function gR(e){Ma(K_),e.registerComponentModel(QE),e.registerComponentView(hR),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ee),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ee)}var yR=function(e){H(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(st),mR=function(e){H(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"),u=r.get("textAlign"),l=K(r.get("textBaseline"),r.get("textVerticalAlign")),f=new oe({style:wn(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=r.get("subtext"),v=new oe({style:wn(s,{text:c,fill:s.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=r.get("link"),g=r.get("sublink"),p=r.get("triggerEvent",!0);f.silent=!d&&!p,v.silent=!g&&!p,d&&f.on("click",function(){ed(d,"_"+r.get("target"))}),g&&v.on("click",function(){ed(g,"_"+r.get("subtarget"))}),ut(f).eventData=ut(v).eventData=p?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),c&&a.add(v);var y=a.getBoundingRect(),m=r.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=js(m,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));u||(u=r.get("left")||r.get("right"),u==="middle"&&(u="center"),u==="right"?_.x+=_.width:u==="center"&&(_.x+=_.width/2)),l||(l=r.get("top")||r.get("bottom"),l==="center"&&(l="middle"),l==="bottom"?_.y+=_.height:l==="middle"&&(_.y+=_.height/2),l=l||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var w={align:u,verticalAlign:l};f.setStyle(w),v.setStyle(w),y=a.getBoundingRect();var x=_.margin,S=r.getItemStyle(["color","opacity"]);S.fill=r.get("backgroundColor");var b=new Et({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:r.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(b)}},t.type="title",t}(Re);function _R(e){e.registerComponentModel(yR),e.registerComponentView(mR)}var ig={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},wR=function(){function e(t){var r=this._condVal=W(t)?new RegExp(t):Ab(t)?t:null;if(r==null){var n="";tt(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return W(r)?this._condVal.test(t):vt(r)?this._condVal.test(t+""):!1},e}(),SR=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),xR=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r2&&n.push(i),i=[L,I]}function f(L,I,E,O){qn(L,E)&&qn(I,O)||i.push(L,I,E,O,E,O)}function h(L,I,E,O,N,R){var k=Math.abs(I-L),F=Math.tan(k/4)*4/3,G=IT:A2&&n.push(i),n}function zf(e,t,r,n,i,a,o,s,u,l){if(qn(e,r)&&qn(t,n)&&qn(i,o)&&qn(a,s)){u.push(o,s);return}var f=2/l,h=f*f,c=o-e,v=s-t,d=Math.sqrt(c*c+v*v);c/=d,v/=d;var g=r-e,p=n-t,y=i-o,m=a-s,_=g*g+p*p,w=y*y+m*m;if(_=0&&T=0){u.push(o,s);return}var C=[],D=[];Or(e,r,i,o,.5,C),Or(t,n,a,s,.5,D),zf(C[0],D[0],C[1],D[1],C[2],D[2],C[3],D[3],u,l),zf(C[4],D[4],C[5],D[5],C[6],D[6],C[7],D[7],u,l)}function BR(e,t){var r=Ff(e),n=[];t=t||1;for(var i=0;i0)for(var l=0;lMath.abs(l),h=n1([u,l],f?0:1,t),c=(f?s:l)/h.length,v=0;vi,o=n1([n,i],a?0:1,t),s=a?"width":"height",u=a?"height":"width",l=a?"x":"y",f=a?"y":"x",h=e[s]/o.length,c=0;c1?null:new U(g*u+e,g*l+t)}function zR(e,t,r){var n=new U;U.sub(n,r,t),n.normalize();var i=new U;U.sub(i,e,t);var a=i.dot(n);return a}function Gn(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function GR(e,t,r){for(var n=e.length,i=[],a=0;ao?(l.x=f.x=s+a/2,l.y=u,f.y=u+o):(l.y=f.y=u+o/2,l.x=s,f.x=s+a),GR(t,l,f)}function Ss(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);Ss(e,a[0],i,n),Ss(e,a[1],r-i,n)}return n}function HR(e,t){for(var r=[],n=0;n0;l/=2){var f=0,h=0;(e&l)>0&&(f=1),(t&l)>0&&(h=1),s+=l*l*(3*f^h),h===0&&(f===1&&(e=l-1-e,t=l-1-t),u=e,e=t,t=u)}return s}function Ts(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=$(e,function(s){var u=s.getBoundingRect(),l=s.getComputedTransform(),f=u.x+u.width/2+(l?l[4]:0),h=u.y+u.height/2+(l?l[5]:0);return t=Math.min(f,t),r=Math.min(h,r),n=Math.max(f,n),i=Math.max(h,i),[f,h]}),o=$(a,function(s,u){return{cp:s,z:jR(s[0],s[1],t,r,n,i),path:e[u]}});return o.sort(function(s,u){return s.z-u.z}).map(function(s){return s.path})}function o1(e){return WR(e.path,e.count)}function Gf(){return{fromIndividuals:[],toIndividuals:[],count:0}}function KR(e,t,r){var n=[];function i(x){for(var S=0;S=0;i--)if(!r[i].many.length){var u=r[s].many;if(u.length<=1)if(s)s=0;else return r;var a=u.length,l=Math.ceil(a/2);r[i].many=u.slice(l,a),r[s].many=u.slice(0,l),s++}return r}var JR={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o),l,f;vg(e)&&(l=e,f=t),vg(t)&&(l=t,f=e);function h(y,m,_,w,x){var S=y.many,b=y.one;if(S.length===1&&!x){var T=m?S[0]:b,C=m?b:S[0];if(xs(T))h({many:[T],one:C},!0,_,w,!0);else{var D=s?et({delay:s(_,w)},u):u;Jh(T,C,D),a(T,C,T,C,D)}}else for(var A=et({dividePath:JR[r],individualDelay:s&&function(N,R,k,F){return s(N+_,w)}},u),P=m?KR(S,b,A):QR(b,S,A),L=P.fromIndividuals,I=P.toIndividuals,E=L.length,O=0;Ot.length,v=l?cg(f,l):cg(c?t:e,[c?e:t]),d=0,g=0;gs1))for(var a=n.getIndices(),o=0;o0&&S.group.traverse(function(T){T instanceof rt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},b)})})}function mg(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function _g(e){return z(e)?e.sort().join(","):e}function Dr(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function oO(e,t){var r=Z(),n=Z(),i=Z();return M(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],u=e.oldData[o],l=mg(a),f=_g(l);n.set(f,{dataGroupId:s,data:u}),z(l)&&M(l,function(h){i.set(h,{key:f,dataGroupId:s,data:u})})}),M(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),u=mg(a),l=_g(u),f=n.get(l);if(f)r.set(l,{oldSeries:[{dataGroupId:f.dataGroupId,divide:Dr(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:Dr(s),data:s}]});else if(z(u)){var h=[];M(u,function(d){var g=n.get(d);g.data&&h.push({dataGroupId:g.dataGroupId,divide:Dr(g.data),data:g.data})}),h.length&&r.set(l,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:Dr(s)}]})}else{var c=i.get(u);if(c){var v=r.get(c.key);v||(v={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:Dr(c.data)}],newSeries:[]},r.set(c.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Dr(s)})}}}}),r}function wg(e,t){for(var r=0;r=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Dr(t.oldData[s]),groupIdDim:o.dimension})}),M(Mt(e.to),function(o){var s=wg(r.updatedSeries,o);if(s>=0){var u=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:u,divide:Dr(u),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&u1(i,a,n)}function uO(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){M(Mt(n.seriesTransition),function(i){M(Mt(i.to),function(a){for(var o=n.updatedSeries,s=0;s=s)}}for(var h=this.__startIndex;h15)break}}I.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=p.__endIndex;else for(var D=v.dpr,A=0;A0&&t>i[0]){for(u=0;ut);u++);s=n[i[u]]}if(i.splice(u+1,0,t),n[t]=r,!r.virtual)if(s){var l=s.dom;l.nextSibling?o.insertBefore(r.dom,l.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i0?Lo:0),this._needsManuallyCompositing),f.__builtin__||Jf("ZLevel "+l+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==u&&(f.__dirty=!0),f.__startIndex=u,f.incremental?f.__drawIndex=-1:f.__drawIndex=u,r(u),a=f),i.__dirty&ie&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=u))}r(u),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__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,M(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?ft(n[t],r,!0):n[t]=r;for(var i=0;i");Ma([_R,gR,KE,kR,ER,kP,vP,uO,cO,qP]);function pO(e){let t,r;return C1(()=>{r===void 0&&t&&(r=E2(t));const n=e.data,i={show:!0,feature:{mark:{show:!0},dataView:{show:!0,readOnly:!1},restore:{show:!0},saveAsImage:{show:!0}}},a={};if(a.toolbox=i,e.type==="Pie")a.tooltip={trigger:"item"},a.legend={orient:"vertical",left:"left"},a.series=[{name:'"Access From"',type:"pie",radius:"50%",data:Object.keys(n).map(o=>{const s=parseInt(o),u=s>>8,l=s&255;return{value:n[s],name:`${u}角色${l}武器`}}),emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}];else if(e.type==="Bar"){const o=[],s=[];Object.keys(n).forEach(u=>{const l=parseInt(u),f=l>>8,h=l&255;o.push(`${f}角色${h}武器`),s.push(n[l])}),a.xAxis={type:"category",data:o},a.yAxis={type:"value"},a.series=[{type:"bar",data:s}]}r&&r.setOption(a)}),(()=>{var n=dO(),i=n.firstChild,a=t;return typeof a=="function"?R1(a,i):t=i,n})()}var gO=Vf("
OP抽卡期望模拟