>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/e,l/e])}return n}function k4(r,t){return r=I4(r),Y(Ht(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,a=e.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new $b(o[0],o.slice(1)));break;case"MultiPolygon":D(a.coordinates,function(l){l[0]&&i.push(new $b(l[0],l.slice(1)))});break;case"LineString":i.push(new Xb([a.coordinates]));break;case"MultiLineString":i.push(new Xb(a.coordinates))}var s=new hk(n[t||"name"],i,n.cp);return s.properties=n,s})}var P4=Ct(),Su=Ct(),hn={estimate:1,determine:2};function Hh(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function pk(r,t){var e=Y(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function E4(r,t){var e=r.getLabelModel().get("customValues");if(e){var n=ol(r),a=r.scale.getExtent(),i=pk(r,e),o=Ht(i,function(s){return s>=a[0]&&s<=a[1]});return{labels:Y(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?O4(r,t):B4(r)}function R4(r,t,e){var n=r.getTickModel().get("customValues");if(n){var a=r.scale.getExtent(),i=pk(r,n);return{ticks:Ht(i,function(o){return o>=a[0]&&o<=a[1]})}}return r.type==="category"?N4(r,t):{ticks:Y(r.scale.getTicks(e),function(o){return o.value})}}function O4(r,t){var e=r.getLabelModel(),n=dk(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:n}function dk(r,t,e){var n=V4(r),a=D_(t),i=e.kind===hn.estimate;if(!i){var o=yk(n,a);if(o)return o}var s,l;it(a)?s=xk(r,a):(l=a==="auto"?F4(r,e):a,s=_k(r,l));var u={labels:s,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return fm(n,a,u),!0}):fm(n,a,u),u}function N4(r,t){var e=z4(r),n=D_(t),a=yk(e,n);if(a)return a;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),it(n))i=xk(r,n,!0);else if(n==="auto"){var s=dk(r,r.getLabelModel(),Hh(hn.determine));o=s.labelCategoryInterval,i=Y(s.labels,function(l){return l.tickValue})}else o=n,i=_k(r,o,!0);return fm(e,n,{ticks:i,tickCategoryInterval:o})}function B4(r){var t=r.scale.getTicks(),e=ol(r);return{labels:Y(t,function(n,a){return{formattedLabel:e(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var z4=gk("axisTick"),V4=gk("axisLabel");function gk(r){return function(e){return Su(e)[r]||(Su(e)[r]={list:[]})}}function yk(r,t){for(var e=0;ef&&(u=Math.max(1,Math.floor(l/f)));for(var c=s[0],h=r.dataToCoord(c+1)-r.dataToCoord(c),v=Math.abs(h*Math.cos(i)),p=Math.abs(h*Math.sin(i)),d=0,g=0;c<=s[1];c+=u){var y=0,m=0,_=Mv(a({value:c}),n.font,"center","top");y=_.width*1.3,m=_.height*1.3,d=Math.max(d,y,7),g=Math.max(g,m,7)}var x=d/v,b=g/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(x,b)));if(e===hn.estimate)return t.out.noPxChangeTryDetermine.push(K(H4,null,r,S,l)),S;var w=mk(r,S,l);return w??S}function H4(r,t,e){return mk(r,t,e)==null}function mk(r,t,e){var n=P4(r.model),a=r.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-e)<=1&&i>t&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=e,n.lastAutoInterval=t,n.axisExtent0=a[0],n.axisExtent1=a[1]}function W4(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function _k(r,t,e){var n=ol(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=uk(r),h=o.get("showMinLabel")||c,v=o.get("showMaxLabel")||c;h&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);v&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(e?g:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function xk(r,t,e){var n=r.scale,a=ol(r),i=[];return D(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:a(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var Zb=[0,1],dn=(function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=n&&t<=a},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return f2(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,a=this.scale;return t=a.normalize(a.parse(t)),this.onBand&&a.type==="ordinal"&&(n=n.slice(),jb(n,a.count())),Gt(t,Zb,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),jb(n,a.count()));var i=Gt(t,n,Zb,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=R4(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),a=n.ticks,i=Y(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return U4(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),a=Y(n,function(i){return Y(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(t){return t=t||Hh(hn.determine),E4(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(t){return t=t||Hh(hn.determine),G4(this,t)},r})();function jb(r,t){var e=r[1]-r[0],n=t,a=e/n/2;r[0]+=a,r[1]-=a}function U4(r,t,e,n){var a=t.length;if(!r.onBand||e||!a)return;var i=r.getExtent(),o,s;if(a===1)t[0].coord=i[0],t[0].onBand=!0,o=t[1]={coord:i[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;D(t,function(v){v.coord-=u/2,v.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-t[a-1].tickValue,o={coord:t[a-1].coord+u*s,tickValue:f[1]+1,onBand:!0},t.push(o)}var c=i[0]>i[1];h(t[0].coord,i[0])&&(n?t[0].coord=i[0]:t.shift()),n&&h(i[0],t[0].coord)&&t.unshift({coord:i[0],onBand:!0}),h(i[1],o.coord)&&(n?o.coord=i[1]:t.pop()),n&&h(o.coord,i[1])&&t.push({coord:i[1],onBand:!0});function h(v,p){return v=ye(v),p=ye(p),c?v>p:va&&(a+=Il);var v=Math.atan2(s,o);if(v<0&&(v+=Il),v>=n&&v<=a||v+Il>=n&&v+Il<=a)return l[0]=f,l[1]=c,u-e;var p=e*Math.cos(n)+r,d=e*Math.sin(n)+t,g=e*Math.cos(a)+r,y=e*Math.sin(a)+t,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Wh(r,t,e,n,a,i,o,s){var l=a-r,u=i-t,f=e-r,c=n-t,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var v=l*f+u*c,p=v/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var d=o[0]=r+p*f,g=o[1]=t+p*c;return Math.sqrt((d-a)*(d-a)+(g-i)*(g-i))}function Sk(r,t,e,n,a,i,o){e<0&&(r=r+e,e=-e),n<0&&(t=t+n,n=-n);var s=r+e,l=t+n,u=o[0]=Math.min(Math.max(a,r),s),f=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-a)*(u-a)+(f-i)*(f-i))}var nn=[];function Z4(r,t,e){var n=Sk(t.x,t.y,t.width,t.height,r.x,r.y,nn);return e.set(nn[0],nn[1]),n}function j4(r,t,e){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,f=t.data,c=r.x,h=r.y,v=0;v0){t=t/180*Math.PI,an.fromArray(r[0]),Jt.fromArray(r[1]),ce.fromArray(r[2]),ct.sub(Nn,an,Jt),ct.sub(In,ce,Jt);var e=Nn.len(),n=In.len();if(!(e<.001||n<.001)){Nn.scale(1/e),In.scale(1/n);var a=Nn.dot(In),i=Math.cos(t);if(i1&&ct.copy(ar,ce),ar.toArray(r[1])}}}}function q4(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,an.fromArray(r[0]),Jt.fromArray(r[1]),ce.fromArray(r[2]),ct.sub(Nn,Jt,an),ct.sub(In,ce,Jt);var n=Nn.len(),a=In.len();if(!(n<.001||a<.001)){Nn.scale(1/n),In.scale(1/a);var i=Nn.dot(t),o=Math.cos(e);if(i=l)ct.copy(ar,ce);else{ar.scaleAndAdd(In,s/Math.tan(Math.PI/2-f));var c=ce.x!==Jt.x?(ar.x-Jt.x)/(ce.x-Jt.x):(ar.y-Jt.y)/(ce.y-Jt.y);if(isNaN(c))return;c<0?ct.copy(ar,Jt):c>1&&ct.copy(ar,ce)}ar.toArray(r[1])}}}}function xd(r,t,e,n){var a=e==="normal",i=a?r:r.ensureState(e);i.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function K4(r,t){var e=t.smooth,n=t.points;if(n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var a=Ha(n[0],n[1]),i=Ha(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*e,s=Yc([],n[1],n[0],o/a),l=Yc([],n[1],n[2],o/i),u=Yc([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f0){x(A*C,0,i);var M=A+w;M<0&&b(-M*C,1)}else b(-w*C,1)}}function x(w,T,C){w!==0&&(f=!0);for(var A=T;A0)for(var M=0;M0;M--){var E=C[M-1]*P;x(-E,M,i)}}}function S(w){var T=w<0?-1:1;w=Math.abs(w);for(var C=Math.ceil(w/(i-1)),A=0;A0?x(C,0,A+1):x(-C,i-A-1,i),w-=C,w<=0)return}return f}function tH(r){for(var t=0;t=0&&n.attr(i.oldLayoutSelect),St(h,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),Bt(n,u,e,l)}else if(n.attr(u),!el(n).valueAnimation){var c=nt(n.style.opacity,1);n.style.opacity=0,Qt(n,{style:{opacity:c}},e,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};uc(v,u,fc),uc(v,n.states.select,fc)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};uc(p,u,fc),uc(p,n.states.emphasis,fc)}uL(n,l,f,e,e)}if(a&&!a.ignore&&!a.invisible){var i=nH(a),o=i.oldLayout,d={points:a.shape.points};o?(a.attr({shape:o}),Bt(a,{shape:d},e)):(a.setShape(d),a.style.strokePercent=0,Qt(a,{style:{strokePercent:1}},e)),i.oldLayout=d}},r})(),wd=Ct();function iH(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var a=wd(e).labelManager;a||(a=wd(e).labelManager=new aH),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var a=wd(e).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),a.updateLayoutConfig(e),a.layout(e),a.processLabelsOverall()})}var Td=Math.sin,Cd=Math.cos,Mk=Math.PI,Fi=Math.PI*2,oH=180/Mk,Dk=(function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,n,a,i,o){this._add("C",t,e,n,a,i,o)},r.prototype.quadraticCurveTo=function(t,e,n,a){this._add("Q",t,e,n,a)},r.prototype.arc=function(t,e,n,a,i,o){this.ellipse(t,e,n,n,0,a,i,o)},r.prototype.ellipse=function(t,e,n,a,i,o,s,l){var u=s-o,f=!l,c=Math.abs(u),h=Xa(c-Fi)||(f?u>=Fi:-u>=Fi),v=u>0?u%Fi:u%Fi+Fi,p=!1;h?p=!0:Xa(c)?p=!1:p=v>=Mk==!!f;var d=t+n*Cd(o),g=e+a*Td(o);this._start&&this._add("M",d,g);var y=Math.round(i*oH);if(h){var m=1/this._p,_=(f?1:-1)*(Fi-m);this._add("A",n,a,y,1,+f,t+n*Cd(o+_),e+a*Td(o+_)),m>.01&&this._add("A",n,a,y,0,+f,d,g)}else{var x=t+n*Cd(s),b=e+a*Td(s);this._add("A",n,a,y,+p,+f,x,b)}},r.prototype.rect=function(t,e,n,a){this._add("M",t,e),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,n,a,i,o,s,l,u){for(var f=[],c=this._p,h=1;h"}function dH(r){return""+r+">"}function P_(r,t){t=t||{};var e=t.newline?`
`:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return pH(o,s)+(o!=="style"?ir(l):l||"")+(i?""+e+Y(i,function(u){return n(u)}).join(e)+e:"")+dH(o)}return n(r)}function gH(r,t,e){e=e||{};var n=e.newline?`
`:"",a=" {"+n,i=n+"}",o=Y(kt(r),function(l){return l+a+Y(kt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=Y(kt(t),function(l){return"@keyframes "+l+a+Y(kt(t[l]),function(u){return u+a+Y(kt(t[l][u]),function(f){var c=t[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":[""].join(n)}function dm(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ew(r,t,e,n){return Pe("svg","root",{width:r,height:t,xmlns:Lk,"xmlns:xlink":Ik,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+t:!1},e)}var yH=0;function Pk(){return yH++}var rw={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Wi="transform-origin";function mH(r,t,e){var n=W({},r.shape);W(n,t),r.buildPath(e,n);var a=new Dk;return a.reset(e2(r)),e.rebuildPath(a,1),a.generateStr(),a.getStr()}function _H(r,t){var e=t.originX,n=t.originY;(e||n)&&(r[Wi]=e+"px "+n+"px")}var xH={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Ek(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function SH(r,t,e){var n=r.shape.paths,a={},i,o;if(D(n,function(l){var u=dm(e.zrId);u.animation=!0,Kv(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,h=kt(f),v=h.length;if(v){o=h[v-1];var p=f[o];for(var d in p){var g=p[d];a[d]=a[d]||{d:""},a[d].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){t.d=!1;var s=Ek(a,e);return i.replace(o,s)}}function nw(r){return q(r)?rw[r]?"cubic-bezier("+rw[r]+")":k0(r)?r:"":""}function Kv(r,t,e,n){var a=r.animators,i=a.length,o=[];if(r instanceof Vv){var s=SH(r,t,e);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var zt=Ek(w,e);return zt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=e.zrId+"-cls-"+Pk();e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function bH(r,t,e){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};aw(n,t,e)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=a.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=py(l))}var u=a.lineWidth;if(u){var f=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),u&&(n["stroke-width"]=u),aw(n,t,e)}}function aw(r,t,e,n){var a=JSON.stringify(r),i=e.cssStyleCache[a];i||(i=e.zrId+"-cls-"+Pk(),e.cssStyleCache[a]=i,e.cssNodes["."+i+":hover"]=r),t.class=t.class?t.class+" "+i:i}var Yu=Math.round;function Rk(r){return r&&q(r.src)}function Ok(r){return r&&it(r.toDataURL)}function E_(r,t,e,n){cH(function(a,i){var o=a==="fill"||a==="stroke";o&&t2(i)?Bk(t,r,a,n):o&&P0(i)?zk(e,r,a,n):r[a]=i,o&&n.ssr&&i==="none"&&(r["pointer-events"]="visible")},t,e,!1),LH(e,r,n)}function R_(r,t){var e=qB(t);e&&(e.each(function(n,a){n!=null&&(r[(tw+a).toLowerCase()]=n+"")}),t.isSilent()&&(r[tw+"silent"]="true"))}function iw(r){return Xa(r[0]-1)&&Xa(r[1])&&Xa(r[2])&&Xa(r[3]-1)}function wH(r){return Xa(r[4])&&Xa(r[5])}function O_(r,t,e){if(t&&!(wH(t)&&iw(t))){var n=1e4;r.transform=iw(t)?"translate("+Yu(t[4]*n)/n+" "+Yu(t[5]*n)/n+")":mB(t)}}function ow(r,t,e){for(var n=r.points,a=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";qe(h,g),qe(v,g)}else if(h==null||v==null){var y=function(A,M){if(A){var I=A.elm,L=h||M.width,P=v||M.height;A.tag==="pattern"&&(u?(P=1,L/=i.width):f&&(L=1,P/=i.height)),A.attrs.width=L,A.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},m=z0(p,null,r,function(A){l||y(S,A),y(c,A)});m&&m.width&&m.height&&(h=h||m.width,v=v||m.height)}c=Pe("image","img",{href:p,width:h,height:v}),o.width=h,o.height=v}else a.svgElement&&(c=ut(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(c){var _,x;l?_=x=1:u?(x=1,_=o.width/i.width):f?(_=1,x=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var b=r2(a);b&&(o.patternTransform=b);var S=Pe("pattern","",o,[c]),w=P_(S),T=n.patternCache,C=T[w];C||(C=n.zrId+"-p"+n.patternIdx++,T[w]=C,o.id=C,S=n.defs[C]=Pe("pattern",C,o,[c])),t[e]=Av(C)}}function IH(r,t,e){var n=e.clipPathCache,a=e.defs,i=n[r.id];if(!i){i=e.zrId+"-c"+e.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=Pe("clipPath",i,o,[Nk(r,e)])}t["clip-path"]=Av(i)}function uw(r){return document.createTextNode(r)}function qi(r,t,e){r.insertBefore(t,e)}function fw(r,t){r.removeChild(t)}function cw(r,t){r.appendChild(t)}function Vk(r){return r.parentNode}function Fk(r){return r.nextSibling}function Ad(r,t){r.textContent=t}var hw=58,kH=120,PH=Pe("","");function gm(r){return r===void 0}function Mn(r){return r!==void 0}function EH(r,t,e){for(var n={},a=t;a<=e;++a){var i=r[a].key;i!==void 0&&(n[i]=a)}return n}function au(r,t){var e=r.key===t.key,n=r.tag===t.tag;return n&&e}function $u(r){var t,e=r.children,n=r.tag;if(Mn(n)){var a=r.elm=kk(n);if(N_(PH,r),U(e))for(t=0;ti?(p=e[l+1]==null?null:e[l+1].elm,Gk(r,p,e,a,l)):Xh(r,t,n,i))}function vs(r,t){var e=t.elm=r.elm,n=r.children,a=t.children;r!==t&&(N_(r,t),gm(t.text)?Mn(n)&&Mn(a)?n!==a&&RH(e,n,a):Mn(a)?(Mn(r.text)&&Ad(e,""),Gk(e,null,a,0,a.length-1)):Mn(n)?Xh(e,n,0,n.length-1):Mn(r.text)&&Ad(e,""):r.text!==t.text&&(Mn(n)&&Xh(e,n,0,n.length-1),Ad(e,t.text)))}function OH(r,t){if(au(r,t))vs(r,t);else{var e=r.elm,n=Vk(e);$u(t),n!==null&&(qi(n,t.elm,Fk(e)),Xh(n,[r],0,0))}return t}var NH=0,BH=(function(){function r(t,e,n){if(this.type="svg",this.refreshHover=vw(),this.configLayer=vw(),this.storage=e,this._opts=n=W({},n),this.root=t,this._id="zr"+NH++,this._oldVNode=ew(n.width,n.height),t&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=kk("svg");N_(null,this._oldVNode),a.appendChild(i),t.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",OH(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return lw(t,dm(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=dm(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=zH(n,a,this._backgroundColor,i);s&&o.push(s);var l=t.compress?null:this._mainVNode=Pe("g","main",{},[]);this._paintList(e,i,l?l.children:o),l&&o.push(l);var u=Y(kt(i.defs),function(h){return i.defs[h]});if(u.length&&o.push(Pe("defs","defs",{},u)),t.animation){var f=gH(i.cssNodes,i.cssAnims,{newline:!0});if(f){var c=Pe("style","stl",{},[],f);o.push(c)}}return ew(n,a,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},P_(this.renderToVNode({animation:nt(t.cssAnimation,!0),emphasis:nt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:nt(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,n){for(var a=t.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(h&&l&&h[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y=s)}}for(var c=this.__startIndex;c15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=v.dpr,M=0;M0&&t>a[0]){for(l=0;lt);l++);s=n[a[l]]}if(a.splice(l+1,0,t),n[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,a=0;a0?cc:0),this._needsManuallyCompositing),f.__builtin__||C0("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),i=f),a.__dirty&Tr&&!a.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(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)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?bt(n[t],e,!0):n[t]=e;for(var a=0;a-1&&(u.style.stroke=u.style.fill,u.style.fill=V.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})(Kt);function Gs(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var a=Ns(r,t,e[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(t[i])}return n.join(" ")}var mf=(function(r){F(t,r);function t(e,n,a,i){var o=r.call(this)||this;return o.updateData(e,n,a,i),o}return t.prototype._createSymbol=function(e,n,a,i,o,s){this.removeAll();var l=be(e,-1,-1,2,2,null,s);l.attr({z2:nt(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=$H,this._symbolType=e,this.add(l)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){ya(this.childAt(0))},t.prototype.downplay=function(){ma(this.childAt(0))},t.prototype.setZ=function(e,n){var a=this.childAt(0);a.zlevel=e,a.z=n},t.prototype.setDraggable=function(e,n){var a=this.childAt(0);a.draggable=e,a.cursor=!n&&e?"move":a.cursor},t.prototype.updateData=function(e,n,a,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=t.getSymbolZ2(e,n),f=o!==this._symbolType,c=i&&i.disableAnimation;if(f){var h=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};c?v.attr(p):Bt(v,p,s,n),qr(v)}if(this._updateCommon(e,n,l,a,i),f){var v=this.childAt(0);if(!c){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Qt(v,p,s,n)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,a,i,o){var s=this.childAt(0),l=e.hostModel,u,f,c,h,v,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,c=i.selectItemStyle,h=i.focus,v=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(n),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),v=_.get("blurScope"),p=_.get("disabled"),d=De(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var x=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=ko(e.getItemVisual(n,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var S=e.getItemVisual(n,"style"),w=S.fill;if(s instanceof Fe){var T=s.style;s.useStyle(W({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(W({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=e.getItemVisual(n,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var M=o&&o.useNameLabel;Re(s,d,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:w,defaultOpacity:S.opacity});function I(E){return M?e.getName(E):Gs(e,E)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),ne(this,h,v,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,a){var i=this.childAt(0),o=dt(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&ii(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ii(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return il(e.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(e,n){return e.getItemVisual(n,"z2")},t})(ot);function $H(r,t){this.parent.drift(r,t)}function Dd(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function gw(r){return r!=null&&!vt(r)&&(r={isIgnore:r}),r||{}}function yw(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:De(t),cursorStyle:t.get("cursor")}}var _f=(function(){function r(t){this.group=new ot,this._SymbolCtor=t||mf}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=gw(e);var n=this.group,a=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=yw(t),u={disableAnimation:s},f=e.getSymbolPoint||function(c){return t.getItemLayout(c)};i||n.removeAll(),t.diff(i).add(function(c){var h=f(c);if(Dd(t,h,c,e)){var v=new o(t,c,l,u);v.setPosition(h),t.setItemGraphicEl(c,v),n.add(v)}}).update(function(c,h){var v=i.getItemGraphicEl(h),p=f(c);if(!Dd(t,p,c,e)){n.remove(v);return}var d=t.getItemVisual(c,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==d)n.remove(v),v=new o(t,c,l,u),v.setPosition(p);else{v.updateData(t,c,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Bt(v,y,a)}n.add(v),t.setItemGraphicEl(c,v)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,a){var i=t._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=yw(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=gw(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?e=n[0]:n[1]<0&&(e=n[1]),e}function Uk(r,t,e,n){var a=NaN;r.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,n),o[1-i]=a,t.dataToPoint(o)}function ZH(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,a){e.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function jH(r,t,e,n,a,i,o,s){for(var l=ZH(r,t),u=[],f=[],c=[],h=[],v=[],p=[],d=[],g=Wk(a,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=a||d<0)break;if(vo(y,m)){if(l){d+=i;continue}break}if(d===e)r[i>0?"moveTo":"lineTo"](y,m),c=y,h=m;else{var _=y-u,x=m-f;if(_*_+x*x<.5){d+=i;continue}if(o>0){for(var b=d+i,S=t[b*2],w=t[b*2+1];S===y&&w===m&&g=n||vo(S,w))v=y,p=m;else{A=S-u,M=w-f;var P=y-u,E=S-y,R=m-f,B=w-m,N=void 0,z=void 0;if(s==="x"){N=Math.abs(P),z=Math.abs(E);var k=A>0?1:-1;v=y-k*N*o,p=m,I=y+k*z*o,L=m}else if(s==="y"){N=Math.abs(R),z=Math.abs(B);var G=M>0?1:-1;v=y,p=m-G*N*o,I=y,L=m+G*z*o}else N=Math.sqrt(P*P+R*R),z=Math.sqrt(E*E+B*B),C=z/(z+N),v=y-A*o*(1-C),p=m-M*o*(1-C),I=y+A*o*C,L=m+M*o*C,I=Ra(I,Oa(S,y)),L=Ra(L,Oa(w,m)),I=Oa(I,Ra(S,y)),L=Oa(L,Ra(w,m)),A=I-y,M=L-m,v=y-A*N/z,p=m-M*N/z,v=Ra(v,Oa(u,y)),p=Ra(p,Oa(f,m)),v=Oa(v,Ra(u,y)),p=Oa(p,Ra(f,m)),A=y-v,M=m-p,I=y+A*z/N,L=m+M*z/N}r.bezierCurveTo(c,h,v,p,y,m),c=I,h=L}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var Yk=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),qH=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:V.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Yk},t.prototype.buildPath=function(e,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&vo(a[o*2-2],a[o*2-1]);o--);for(;i=0){var x=u?(p-l)*_+l:(v-s)*_+s;return u?[e,x]:[x,e]}s=v,l=p;break;case o.C:v=i[c++],p=i[c++],d=i[c++],g=i[c++],y=i[c++],m=i[c++];var b=u?gh(s,v,d,y,e,f):gh(l,p,g,m,e,f);if(b>0)for(var S=0;S=0){var x=u?ke(l,p,g,m,w):ke(s,v,d,y,w);return u?[e,x]:[x,e]}}s=y,l=m;break}}},t})(At),KH=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(Yk),$k=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new KH},t.prototype.buildPath=function(e,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&vo(a[s*2-2],a[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):a&&e.push(o(a,l,0),o(a,l,t));break}else a&&(e.push(o(a,l,0)),a=null),e.push(l),i=l}return e}function tW(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&t.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=t.getAxis(a),u=Y(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,c=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var h=QH(u,a==="x"?e.getWidth():e.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 p=10,d=h[0].coord-p,g=h[v-1].coord+p,y=g-d;if(y<.001)return"transparent";D(h,function(_){_.offset=(_.coord-d)/y}),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 Qs(0,0,0,0,h,!0);return m[a]=d,m[a+"2"]=g,m}}}function eW(r,t,e){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(a&&rW(i,t))){var o=t.mapDimension(i.dim),s={};return D(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function rW(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),o=0;on)return!1;return!0}function nW(r,t){return isNaN(r)||isNaN(t)}function aW(r){for(var t=r.length/2;t>0&&nW(r[t*2-2],r[t*2-1]);t--);return t-1}function bw(r,t){return[r[t*2],r[t*2+1]]}function iW(r,t,e){for(var n=r.length/2,a=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function jk(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var z=p.getState("emphasis").style;z.lineWidth=+p.style.lineWidth+1}dt(p).seriesIndex=e.seriesIndex,ne(p,R,B,N);var k=Sw(e.get("smooth")),G=e.get("smoothMonotone");if(p.setShape({smooth:k,smoothMonotone:G,connectNulls:w}),d){var H=s.getCalculationInfo("stackedOnSeries"),O=0;d.useStyle(ht(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(O=Sw(H.get("smooth"))),d.setShape({smooth:k,stackedOnSmooth:O,smoothMonotone:G,connectNulls:w}),Me(d,e,"areaStyle"),dt(d).seriesIndex=e.seriesIndex,ne(d,R,B,N)}var j=this._changePolyState;s.eachItemGraphicEl(function(st){st&&(st.onHoverStateChange=j)}),this._polyline.onHoverStateChange=j,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,p),d&&this.packEventData(e,d))},t.prototype.packEventData=function(e,n){dt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,a,i){var o=e.getData(),s=yo(o,i);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=e.get("zlevel")||0,v=e.get("z")||0;u=new mf(o,s),u.x=f,u.y=c,u.setZ(h,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else $t.prototype.highlight.call(this,e,n,a,i)},t.prototype.downplay=function(e,n,a,i){var o=e.getData(),s=yo(o,i);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 $t.prototype.downplay.call(this,e,n,a,i)},t.prototype._changePolyState=function(e){var n=this._polygon;Mh(this._polyline,e),n&&Mh(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new qH({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new $k({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(e,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");it(f)&&(f=f(null));var c=u.get("animationDelay")||0,h=it(c)?c(null):c;e.eachItemGraphicEl(function(v,p){var d=v;if(d){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(a)if(o){var x=a,b=n.pointToCoord(g);i?(y=x.startAngle,m=x.endAngle,_=-b[1]/180*Math.PI):(y=x.r0,m=x.r,_=b[0])}else{var S=a;i?(y=S.x,m=S.x+S.width,_=v.x):(y=S.y+S.height,m=S.y,_=v.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=it(c)?c(p):f*w+h,C=d.getSymbolPath(),A=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,a){var i=e.getModel("endLabel");if(jk(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ot({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=aW(l);f>=0&&(Re(s,De(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:f,defaultText:function(c,h,v){return v!=null?Hk(o,v):Gs(o,c)},enableTextSetter:!0},oW(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,a,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=a.getLayout("points"),h=a.hostModel,v=h.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=n.shape,x=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?d:0)*(m?-1:1),S=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=iW(c,x,w),C=T.range,A=C[1]-C[0],M=void 0;if(A>=1){if(A>1&&!v){var I=bw(c,C[0]);u.attr({x:I[0]+b,y:I[1]+S}),o&&(M=h.getRawValue(C[0]))}else{var I=f.getPointOn(x,w);I&&u.attr({x:I[0]+b,y:I[1]+S});var L=h.getRawValue(C[0]),P=h.getRawValue(C[1]);o&&(M=b2(a,p,L,P,T.t))}i.lastFrameIndex=C[0]}else{var E=e===1||i.lastFrameIndex>0?C[0]:0,I=bw(c,E);o&&(M=h.getRawValue(E)),u.attr({x:I[0]+b,y:I[1]+S})}if(o){var R=el(u);typeof R.setLabelText=="function"&&R.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,n,a,i,o,s,l){var u=this._polyline,f=this._polygon,c=e.hostModel,h=jH(this._data,e,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=h.current,p=h.stackedOnCurrent,d=h.next,g=h.stackedOnNext;if(o&&(p=Na(h.stackedOnCurrent,h.current,a,o,l),v=Na(h.current,null,a,o,l),g=Na(h.stackedOnNext,h.next,a,o,l),d=Na(h.next,null,a,o,l)),xw(v,d)>3e3||f&&xw(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=v;var y={shape:{points:d}};h.current!==v&&(y.shape.__points=h.next),u.stopAnimation(),Bt(u,y,c),f&&(f.setShape({points:v,stackedOnPoints:p}),f.stopAnimation(),Bt(f,{shape:{stackedOnPoints:g}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=h.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=e.getItemGraphicEl(_[x].idx1);S&&m.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){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(isFinite(v)&&v>1){i==="lttb"?t.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v)):i==="minmax"&&t.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/v));var p=void 0;q(i)?p=lW[i]:it(i)&&(p=i),p&&t.setData(a.downSample(a.mapDimension(u.dim),1/v,p,uW))}}}}}function fW(r){r.registerChartView(sW),r.registerSeriesModel(YH),r.registerLayout(Sf("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,qk("line"))}var Xu=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return Aa(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(a)D(i.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),d=h.getTickModel().get("alignWithLabel"),g=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[v]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,x=1,b=0;bg){_=(S+m)/2;break}b===1&&(x=w-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[v]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;s[c]+=u+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",defaultBarGap:"10%"},t})(Kt);Kt.registerClass(Xu);var cW=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Aa(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 e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,a){return a.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=vi(Xu.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:V.color.primary,borderWidth:2}},realtimeSort:!1}),t})(Xu),hW=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Zh=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new hW},t.prototype.buildPath=function(e,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,c=n.endAngle,h=n.clockwise,v=Math.PI*2,p=h?c-fMath.PI/2&&fs)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,a,i){if(this._isOrderChangedWithinSameData(e,n,a)){var o=this._dataSort(e,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,a){var i=n.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){fa(i,e,dt(i).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})($t),ww={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=r.x+r.width,i=r.y+r.height,o=Id(t.x,r.x),s=kd(t.x+t.width,a),l=Id(t.y,r.y),u=kd(t.y+t.height,i),f=sa?s:o,t.y=c&&l>i?u:l,t.width=f?0:s-o,t.height=c?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var a=kd(t.r,r.r),i=Id(t.r0,r.r0);t.r=a,t.r0=i;var o=a-i<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},Tw={cartesian2d:function(r,t,e,n,a,i,o,s,l){var u=new Tt({shape:W({},n),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,c=a?"height":"width";f[c]=0}return u},polar:function(r,t,e,n,a,i,o,s,l){var u=!a&&l?Zh:Ke,f=new u({shape:n,z2:1});f.name="item";var c=Kk(a);if(f.calculateTextPosition=vW(c,{isRoundCap:u===Zh}),i){var h=f.shape,v=a?"r":"endAngle",p={};h[v]=a?n.r0:n.startAngle,p[v]=n[v],(s?Bt:Qt)(f,{shape:p},i)}return f}};function yW(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function Cw(r,t,e,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Bt:Qt)(e,{shape:l},t,a,null);var f=t?r.baseAxis.model:null;(o?Bt:Qt)(e,{shape:u},f,a)}function Aw(r,t){for(var e=0;e0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,t,e){var n=r.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 xW(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Kk(r){return(function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}})(r)}function Dw(r,t,e,n,a,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,c=Bn(n.getModel("itemStyle"),f,!0);W(f,c),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",p=De(n);Re(r,p,{labelFetcher:i,labelDataIndex:e,defaultText:Gs(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var d=r.getTextContent();if(s&&d){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,pW(r,g==="outside"?v:g,Kk(o),n.get(["label","rotate"]))}lL(d,p,i.getRawValue(e),function(m){return Hk(t,m)});var y=n.getModel(["emphasis"]);ne(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),Me(r,n),xW(a)&&(r.style.fill="none",r.style.stroke="none",D(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function SW(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,a,i)}var bW=(function(){function r(){}return r})(),Lw=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new bW},t.prototype.buildPath=function(e,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function wW(r,t,e){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,c=i.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function Jk(r,t,e){if(si(e,"cartesian2d")){var n=t,a=e.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=e.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function TW(r,t,e){var n=r.type==="polar"?Ke:Tt;return new n({shape:Jk(t,e,r),silent:!0,z2:0})}function CW(r){r.registerChartView(gW),r.registerSeriesModel(cW),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,xt(ek,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,rk("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,qk("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var Pw=Math.PI*2,dc=Math.PI/180;function AW(r,t,e){t.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=LL(n,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=o.viewRect,h=-n.get("startAngle")*dc,v=n.get("endAngle"),p=n.get("padAngle")*dc;v=v==="auto"?h-Pw:-v*dc;var d=n.get("minAngle")*dc,g=d+p,y=0;a.each(i,function(B){!isNaN(B)&&y++});var m=a.getSum(i),_=Math.PI/(m||y)*2,x=n.get("clockwise"),b=n.get("roseType"),S=n.get("stillShowZeroSum"),w=a.getDataExtent(i);w[0]=0;var T=x?1:-1,C=[h,v],A=T*p/2;Ev(C,!x),h=C[0],v=C[1];var M=Qk(n);M.startAngle=h,M.endAngle=v,M.clockwise=x,M.cx=s,M.cy=l,M.r=u,M.r0=f;var I=Math.abs(v-h),L=I,P=0,E=h;if(a.setLayout({viewRect:c,r:u}),a.each(i,function(B,N){var z;if(isNaN(B)){a.setItemLayout(N,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:s,cy:l,r0:f,r:b?NaN:u});return}b!=="area"?z=m===0&&S?_:B*_:z=I/y,zz?(G=E+T*z/2,H=G):(G=E+A,H=k-A),a.setItemLayout(N,{angle:z,startAngle:G,endAngle:H,clockwise:x,cx:s,cy:l,r0:f,r:b?Gt(B,w,[f,u]):u}),E=k}),Le?y:g,b=Math.abs(_.label.y-e);if(b>=x.maxY){var S=_.label.x-t-_.len2*a,w=n+_.len,T=Math.abs(S)r.unconstrainedWidth?null:h:null;n.setStyle("width",v)}eP(i,n)}}}function eP(r,t){Rw.rect=r,Ck(Rw,t,LW)}var LW={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Rw={};function Pd(r){return r.position==="center"}function IW(r){var t=r.getData(),e=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*MW,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,c=s.y,h=s.height;function v(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}t.each(function(S){var w=t.getItemGraphicEl(S),T=w.shape,C=w.getTextContent(),A=w.getTextGuideLine(),M=t.getItemModel(S),I=M.getModel("label"),L=I.get("position")||M.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),E=I.get("alignTo"),R=Z(I.get("edgeDistance"),u),B=I.get("bleedMargin");B==null&&(B=Math.min(u,h)>200?10:2);var N=M.getModel("labelLine"),z=N.get("length");z=Z(z,u);var k=N.get("length2");if(k=Z(k,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":H>0?"left":"right"}var Vt=Math.PI,Ut=0,ue=I.get("rotate");if(Rt(ue))Ut=ue*(Vt/180);else if(L==="center")Ut=0;else if(ue==="radial"||ue===!0){var tr=H<0?-G+Vt:-G;Ut=tr}else if(ue==="tangential"&&L!=="outside"&&L!=="outer"){var Ge=Math.atan2(H,O);Ge<0&&(Ge=Vt*2+Ge);var gn=O>0;gn&&(Ge=Vt+Ge),Ut=Ge-Vt}if(i=!!Ut,C.x=j,C.y=st,C.rotation=Ut,C.setStyle({verticalAlign:"middle"}),lt){C.setStyle({align:zt});var hl=C.states.select;hl&&(hl.x+=C.x,hl.y+=C.y)}else{var Ma=new pt(0,0,0,0);eP(Ma,C),e.push({label:C,labelLine:A,position:L,len:z,len2:k,minTurnAngle:N.get("minTurnAngle"),maxSurfaceAngle:N.get("maxSurfaceAngle"),surfaceNormal:new ct(H,O),linePoints:_t,textAlign:zt,labelDistance:P,labelAlignTo:E,edgeDistance:R,bleedMargin:B,rect:Ma,unconstrainedWidth:Ma.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:lt})}}),!i&&r.get("avoidLabelOverlap")&&DW(e,n,a,l,u,h,f,c);for(var d=0;d0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=i.r0}},t.type="pie",t})($t);function ll(r,t,e){t=U(t)&&{coordDimensions:t}||W({encodeDefine:r.getEncode()},t);var n=r.getSource(),a=gf(n,t).dimensions,i=new or(a,r);return i.initData(n,e),i}var ul=(function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r})(),EW=Ct(),rP=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ul(K(this.getData,this),K(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return ll(this,{coordDimensions:["value"],encodeDefaulter:xt(l_,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),a=EW(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=ez(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){go(e,"labelLine",["show"]);var n=e.labelLine,a=e.emphasis.labelLine;n.show=n.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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})(Kt);H5({fullType:rP.type,getCoord2:function(r){return r.getShallow("center")}});function RW(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(Rt(o)&&!isNaN(o)&&o<0)})}}}function OW(r){r.registerChartView(PW),r.registerSeriesModel(rP),xI("pie",r.registerAction),r.registerLayout(xt(AW,"pie")),r.registerProcessor(sl("pie")),r.registerProcessor(RW("pie"))}var NW=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,n){return Aa(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,n,a){return a.point(n.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:V.color.primary}},universalTransition:{divideShape:"clone"}},t})(Kt),nP=4,BW=(function(){function r(){}return r})(),zW=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new BW},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var f=u*2,c=i[f]-s/2,h=i[f+1]-l/2;if(e>=c&&n>=h&&e<=c+s&&n<=h+l)return u}return-1},t.prototype.contain=function(e,n){var a=this.transformCoordToLocal(e,n),i=this.getBoundingRect();if(e=a[0],n=a[1],i.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,c=-1/0,h=0;h=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),FW=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,n,a){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,a){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Sf("").reset(e,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var n=e.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new VW:new _f,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})($t),aP={left:0,right:0,top:0,bottom:0},jh=["25%","25%"],GW=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,n){var a=Lo(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),a&&e.outerBounds&&$n(e.outerBounds,a)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&$n(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:aP,outerBoundsContain:"all",outerBoundsClampWidth:jh[0],outerBoundsClampHeight:jh[1],backgroundColor:V.color.transparent,borderWidth:1,borderColor:V.color.neutral30},t})(Mt),mm=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",le).models[0]},t.type="cartesian2dAxis",t})(Mt);we(mm,yf);var iP={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:V.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:V.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:V.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[V.color.backgroundTint,V.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:V.color.neutral00,borderColor:V.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},HW=bt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},iP),B_=bt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:V.color.axisMinorSplitLine,width:1}}},iP),WW=bt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},B_),UW=ht({logBase:10},B_);const oP={category:HW,value:B_,time:WW,log:UW};var YW={value:1,category:1,time:1,log:1},_m=null;function $W(r){_m||(_m=r)}function bf(){return _m}function Hs(r,t,e,n){D(YW,function(a,i){var o=bt(bt({},oP[i],!0),n,!0),s=(function(l){F(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var h=Bu(this),v=h?Lo(f):{},p=c.getTheme();bt(f,p.get(i+"Axis")),bt(f,this.getDefaultOption()),f.type=Ow(f),h&&$n(f,v,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Wu.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){var c=bf();return c?c.updateModelAxisBreak(this,f):{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Ow)}function Ow(r){return r.type||(r.data?"category":"value")}var XW=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return Y(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ht(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),xm=["x","y"];function Nw(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var ZW=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=xm,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Nw(e)||!Nw(n))){var a=e.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,h=o[0]-a[0]*f,v=o[1]-i[0]*c,p=this._transform=[f,0,0,c,h,v];this._invTransform=fn([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&a.contain(a.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var a=this.dataToPoint(e),i=this.dataToPoint(n),o=this.getArea(),s=new pt(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,a){a=a||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return pe(a,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},t.prototype.clampData=function(e,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(e[0]),u=i.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n,a){if(a=a||[],this._invTransform)return pe(a,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(e[0]),n),a[1]=o.coordToData(o.toLocalCoord(e[1]),n),a},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-e,o=Math.min(a[0],a[1])-e,s=Math.max(n[0],n[1])-i+e,l=Math.max(a[0],a[1])-o+e;return new pt(i,o,s,l)},t})(XW),sP=(function(r){F(t,r);function t(e,n,a,i,o){var s=r.call(this,e,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(dn),Jv="expandAxisBreak",lP="collapseAxisBreak",uP="toggleAxisBreak",z_="axisbreakchanged",jW={type:Jv,event:z_,update:"update",refineEvent:V_},qW={type:lP,event:z_,update:"update",refineEvent:V_},KW={type:uP,event:z_,update:"update",refineEvent:V_};function V_(r,t,e,n){var a=[];return D(r,function(i){a=a.concat(i.eventBreaks)}),{eventContent:{breaks:a}}}function JW(r){r.registerAction(jW,t),r.registerAction(qW,t),r.registerAction(KW,t);function t(e,n){var a=[],i=Ts(n,e);function o(s,l){D(i[s],function(u){var f=u.updateAxisBreaks(e);D(f.breaks,function(c){var h;a.push(ht((h={},h[l]=u.componentIndex,h),c))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:a}}}var Za=Math.PI,QW=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],t6=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Ws=Ct(),fP=Ct(),cP=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,n=t.componentIndex,a=this.recordMap,i=a[e]||(a[e]=[]);return i[n]||(i[n]={ready:{}})},r})();function e6(r,t,e,n){var a=e.axis,i=t.ensureRecord(e),o=[],s,l=F_(r.axisName)&&Fs(r.nameLocation);D(n,function(p){var d=Xn(p);if(!(!d||d.label.ignore)){o.push(d);var g=i.transGroup;l&&(g.transform?fn(kl,g.transform):Tv(kl),d.transform&&zn(kl,kl,d.transform),pt.copy(gc,d.localRect),gc.applyTransform(kl),s?s.union(gc):pt.copy(s=new pt(0,0,0,0),gc))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[u];if(o.sort(function(p,d){return Math.abs(p.label[u]-f)-Math.abs(d.label[u]-f)}),l&&s){var c=a.getExtent(),h=Math.min(c[0],c[1]),v=Math.max(c[0],c[1])-h;s.union(new pt(h,0,v,1))}i.stOccupiedRect=s,i.labelInfoList=o}var kl=ze(),gc=new pt(0,0,0,0),hP=function(r,t,e,n,a,i){if(Fs(r.nameLocation)){var o=i.stOccupiedRect;o&&vP(Q4({},o,i.transGroup.transform),n,a)}else pP(i.labelInfoList,i.dirVec,n,a)};function vP(r,t,e){var n=new ct;qv(r,t,n,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&cm(t,n)}function pP(r,t,e,n){for(var a=ct.dot(n,t)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):ku(a-Za)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),r6=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],n6={axisLine:function(r,t,e,n,a,i,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=i.transform,f=[l[0],0],c=[l[1],0],h=f[0]>c[0];u&&(pe(f,f,u),pe(c,c,u));var v=W({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())bf().buildAxisBreakLine(n,a,i,p);else{var d=new me(W({shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]}},p));Os(d.shape,d.style.lineWidth),d.anid="line",a.add(d)}var g=n.get(["axisLine","symbol"]);if(g!=null){var y=n.get(["axisLine","symbolSize"]);q(g)&&(g=[g,g]),(q(y)||Rt(y))&&(y=[y,y]);var m=ko(n.get(["axisLine","symbolOffset"])||0,y),_=y[0],x=y[1];D([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-c[0])*(f[0]-c[0])+(f[1]-c[1])*(f[1]-c[1]))}],function(b,S){if(g[S]!=="none"&&g[S]!=null){var w=be(g[S],-_/2,-x/2,_,x,v.stroke,!0),T=b.r+b.offset,C=h?c:f;w.attr({rotation:b.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),a.add(w)}})}}},axisTickLabelEstimate:function(r,t,e,n,a,i,o,s){var l=zw(t,a,s);l&&Bw(r,t,e,n,a,i,o,hn.estimate)},axisTickLabelDetermine:function(r,t,e,n,a,i,o,s){var l=zw(t,a,s);l&&Bw(r,t,e,n,a,i,o,hn.determine);var u=s6(r,a,i,n);o6(r,t.labelLayoutList,u),l6(r,a,i,n,r.tickDirection)},axisName:function(r,t,e,n,a,i,o,s){var l=e.ensureRecord(n);t.nameEl&&(a.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(F_(u)){var f=r.nameLocation,c=r.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),d=n.axis.inverse?-1:1,g=new ct(0,0),y=new ct(0,0);f==="start"?(g.x=p[0]-d*v,y.x=-d):f==="end"?(g.x=p[1]+d*v,y.x=d):(g.x=(p[0]+p[1])/2,g.y=r.labelOffset+c*v,y.y=c);var m=ze();y.transform(ci(m,m,r.rotation));var _=n.get("nameRotate");_!=null&&(_=_*Za/180);var x,b;Fs(f)?x=sr.innerTextLayout(r.rotation,_??r.rotation,c):(x=a6(r.rotation,f,_||0,p),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(x.rotation)),!isFinite(b)&&(b=null)));var S=h.getFont(),w=n.get("nameTruncate",!0)||{},T=w.ellipsis,C=Ue(r.raw.nameTruncateMaxWidth,w.maxWidth,b),A=s.nameMarginLevel||0,M=new Ot({x:g.x,y:g.y,rotation:x.rotation,silent:sr.isLabelSilent(n),style:qt(h,{text:u,font:S,overflow:"truncate",width:C,ellipsis:T,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||x.textAlign,verticalAlign:h.get("verticalAlign")||x.textVerticalAlign}),z2:1});if(Ca({el:M,componentModel:n,itemName:u}),M.__fullText=u,M.anid="name",n.get("triggerEvent")){var I=sr.makeAxisEventDataBase(n);I.targetType="axisName",I.name=u,dt(M).eventData=I}i.add(M),M.updateTransform(),t.nameEl=M;var L=l.nameLayout=Xn({label:M,priority:M.z2,defaultAttr:{ignore:M.ignore},marginDefault:Fs(f)?QW[A]:t6[A]});if(l.nameLocation=f,a.add(M),M.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=e.ensureRecord(n);e.resolveAxisNameOverlap(r,e,n,L,y,P)}}}};function Bw(r,t,e,n,a,i,o,s){gP(t)||u6(r,t,a,s,n,o);var l=t.labelLayoutList;f6(r,n,l,i),v6(n,r.rotation,l);var u=r.optionHideOverlap;i6(n,l,u),u&&Ak(Ht(l,function(f){return f&&!f.label.ignore})),e6(r,e,n,l)}function a6(r,t,e,n){var a=c2(e-r),i,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return ku(a-Za/2)?(o=l?"bottom":"top",i="center"):ku(a-Za*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",aZa/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function i6(r,t,e){if(uk(r.axis))return;function n(s,l,u){var f=Xn(t[l]),c=Xn(t[u]);if(!(!f||!c)){if(s===!1||f.suggestIgnore){iu(f.label);return}if(c.suggestIgnore){iu(c.label);return}var h=.1;if(!e){var v=[0,0,0,0];f=hm({marginForce:v},f),c=hm({marginForce:v},c)}qv(f,c,null,{touchThreshold:h})&&iu(s?c.label:f.label)}}var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=t.length;n(a,0,1),n(i,o-1,o-2)}function o6(r,t,e){r.showMinorTicks||D(t,function(n){if(n&&n.label.ignore)for(var a=0;au[0]&&isFinite(p)&&isFinite(u[0]);)v=yd(v),p=u[1]-v*o;else{var g=r.getTicks().length-1;g>o&&(v=yd(v));var y=v*o;d=Math.ceil(u[1]/v)*v,p=ye(d-y),p<0&&u[0]>=0?(p=0,d=ye(y)):d>0&&u[1]<=0&&(d=0,p=-ye(y))}var m=(a[0].value-i[0].value)/s,_=(a[o].value-i[o].value)/s;n.setExtent.call(r,p+v*m,d+v*_),n.setInterval.call(r,v),(m||_)&&n.setNiceExtent.call(r,p+v,d-v)}var Fw=[[3,1],[0,2]],y6=(function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=xm,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function a(o){var s,l=kt(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var h=+l[c],v=o[h],p=v.model,d=v.scale;om(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(v):(Vs(d,p),om(d)&&(s=v))}f.length&&(s||(s=f.pop(),Vs(s.scale,s.model)),D(f,function(g){yP(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};D(n.x,function(o){Gw(n,"y",o,i)}),D(n.y,function(o){Gw(n,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var a=Ie(t,e),i=this._rect=ae(t.getBoxLayoutParams(),a.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(bm(o,i),!n){var u=x6(i,s,o,l,e),f=void 0;if(l)wm?(wm(this._axesList,i),bm(o,i)):f=Uw(i.clone(),"axisLabel",null,i,o,u,a);else{var c=S6(t,i,a),h=c.outerBoundsRect,v=c.parsedOuterBoundsContain,p=c.outerBoundsClamp;h&&(f=Uw(h,v,p,i,o,u,a))}mP(i,o,hn.determine,null,f,a)}D(this._coordsList,function(d){d.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}vt(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a0})==null;return xo(n,s,!0,!0,e),bm(a,n),l;function u(h){D(a[mt[h]],function(v){if(Uu(v.model)){var p=i.ensureRecord(v.model),d=p.labelInfoList;if(d)for(var g=0;g0&&!Ze(v)&&v>1e-4&&(h/=v),h}}function x6(r,t,e,n,a){var i=new cP(b6);return D(e,function(o){return D(o,function(s){if(Uu(s.model)){var l=!n;s.axisBuilder=d6(r,t,s.model,a,i,l)}})}),i}function mP(r,t,e,n,a,i){var o=e===hn.determine;D(t,function(u){return D(u,function(f){Uu(f.model)&&(g6(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[mt[1-u]]=r[xe[u]]<=i.refContainer[xe[u]]*.5?0:1-u===1?2:1}D(t,function(u,f){return D(u,function(c){Uu(c.model)&&((n==="all"||o)&&c.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&c.axisBuilder.build({axisLine:!0}))})})}function S6(r,t,e){var n,a=r.get("outerBoundsMode",!0);a==="same"?n=t.clone():(a==null||a==="auto")&&(n=ae(r.get("outerBounds",!0)||aP,e.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||St(["all","axisLabel"],i)<0?o="all":o=i;var s=[wh(nt(r.get("outerBoundsClampWidth",!0),jh[0]),t.width),wh(nt(r.get("outerBoundsClampHeight",!0),jh[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var b6=function(r,t,e,n,a,i){var o=e.axis.dim==="x"?"y":"x";hP(r,t,e,n,a,i),Fs(r.nameLocation)||D(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&pP(s.labelInfoList,s.dirVec,n,a)})};function w6(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return T6(e,r,t),e.seriesInvolved&&A6(e,r),e}function T6(r,t,e){var n=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];D(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Zu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,c=f.getModel("tooltip",n);if(D(s.getAxes(),xt(d,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var h=c.get("trigger")==="axis",v=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||v)&&D(p.baseAxes,xt(d,v?"cross":!0,h)),v&&D(p.otherAxes,xt(d,"cross",!1))}function d(g,y,m){var _=m.model.getModel("axisPointer",a),x=_.get("show");if(!(!x||x==="auto"&&!g&&!Tm(_))){y==null&&(y=_.get("triggerTooltip")),_=g?C6(m,c,a,t,g,y):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),w=Zu(m.model),T=y||b||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:S,involveSeries:T,snap:b,useHandle:Tm(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var A=M6(i,m);if(A!=null){var M=o[A]||(o[A]={axesInfo:{}});M.axesInfo[w]=C,M.mapper=i[A].mapper,C.linkGroup=M}}}})}function C6(r,t,e,n,a,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};D(s,function(h){l[h]=ut(o.get(h))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var c=l.lineStyle=o.get("crossStyle");c&&ht(u,c.textStyle)}}return r.model.getModel("axisPointer",new It(l,e,n))}function A6(r,t){t.eachSeries(function(e){var n=e.coordinateSystem,a=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||D(r.coordSysAxesInfo[Zu(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function M6(r,t){for(var e=t.model,n=t.dim,a=0;a=0||r===t}function D6(r){var t=G_(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,a=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=Tm(e);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var O6=Ct();function Xw(r,t,e,n){if(r instanceof sP){var a=r.scale.type;if(a!=="category"&&a!=="ordinal")return e}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?TP(e,o,u,n):N6(r,t,e,n,o,l):e}function TP(r,t,e,n){if(e===null)return r+(Math.random()-.5)*t;var a=e-n*2,i=Math.min(Math.max(0,t),a);return r+(Math.random()-.5)*i}function N6(r,t,e,n,a,i){var o=O6(r);o.items||(o.items=[]);var s=o.items,l=Zw(s,t,e,n,a,i,1),u=Zw(s,t,e,n,a,i,-1),f=Math.abs(l-e)a/2||c&&h>c/2-n?TP(e,a,c,n):(s.push({fixedCoord:t,floatCoord:f,r:n}),f)}function Zw(r,t,e,n,a,i,o){for(var s=e,l=0;la/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=ht({color:p.color},l));var g=bt(ut(p),{boundaryGap:e,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:d,triggerEvent:h},!1);if(q(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else it(f)&&(g.name=f(g.name,g));var m=new It(g,null,this.ecModel);return we(m,yf.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:V.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:bt({lineStyle:{color:V.color.neutral20}},Pl.axisLine),axisLabel:yc(Pl.axisLabel,!1),axisTick:yc(Pl.axisTick,!1),splitLine:yc(Pl.splitLine,!0),splitArea:yc(Pl.splitArea,!0),indicator:[]},t})(Mt),Y6=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=this.group;i.removeAll(),this._buildAxes(e,a),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,n){var a=e.coordinateSystem,i=a.getIndicatorAxes(),o=Y(i,function(s){var l=s.model.get("showName")?s.name:"",u=new sr(s.model,n,{axisName:l,position:[a.cx,a.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});D(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var n=e.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),c=s.get("show"),h=l.get("color"),v=u.get("color"),p=U(h)?h:[h],d=U(v)?v:[v],g=[],y=[];function m(E,R,B){var N=B%R.length;return E[N]=E[N]||[],N}if(i==="circle")for(var _=a[0].getTicksCoords(),x=n.cx,b=n.cy,S=0;S<_.length;S++){if(f){var w=m(g,p,S);g[w].push(new Ta({shape:{cx:x,cy:b,r:_[S].coord}}))}if(c&&S<_.length-1){var w=m(y,d,S);y[w].push(new lf({shape:{cx:x,cy:b,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,C=Y(a,function(E,R){var B=E.getTicksCoords();return T=T==null?B.length-1:Math.min(B.length-1,T),Y(B,function(N){return n.coordToPoint(N.coord,R)})}),A=[],S=0;S<=T;S++){for(var M=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(a){var c=Math.abs(i),h=(i>0?1:-1)*(c>3?.4:c>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(Kw(this._zr,"globalPan")||El(e))){var n=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,n,a,i,o){e._checkPointer(i,o.originX,o.originY)&&(da(i.event),i.__ecRoamConsumed=!0,Jw(e,n,a,i,o))},t})(Kr);function El(r){return r.__ecRoamConsumed}var Q6=Ct();function Qv(r){var t=Q6(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Rl(r,t,e,n){for(var a=Qv(r),i=a.roam,o=i[t]=i[t]||[],s=0;s=4&&(f={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(f&&s!=null&&l!=null&&(c=IP(f,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var v=a;a=new ot,a.add(v),v.scaleX=v.scaleY=c.scale,v.x=c.x,v.y=c.y}return!e.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new Tt({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:f,viewBoxTransform:c,named:i}},r.prototype._parseNode=function(t,e,n,a,i,o){var s=t.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!i){var f=Od[s];if(f&&Q(Od,s)){l=f.call(this,t,e);var c=t.getAttribute("name");if(c){var h={name:c,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});e.add(l)}}var v=rT[s];if(v&&Q(rT,s)){var p=v.call(this,t),d=t.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var n=new Rs({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),nU(n,e);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,e.add(n),n},r.internalField=(function(){Od={g:function(t,e){var n=new ot;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Tt;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new Ta;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new me;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new Bv;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n=t.getAttribute("points"),a;n&&(a=iT(n));var i=new Je({shape:{points:a||[]},silent:!0});return Rr(e,i),xr(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var n=t.getAttribute("points"),a;n&&(a=iT(n));var i=new Ye({shape:{points:a||[]},silent:!0});return Rr(e,i),xr(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var n=new Fe;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",a=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new ot;return Rr(e,s),xr(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var n=t.getAttribute("x"),a=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new ot;return Rr(e,s),xr(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(t,e){var n=t.getAttribute("d")||"",a=X2(n);return Rr(e,a),xr(t,a,this._defsUsePending,!1,!1),a.silent=!0,a}}})(),r})(),rT={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new Qs(t,e,n,a);return nT(r,i),aT(r,i),i},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new K2(t,e,n);return nT(r,a),aT(r,a),a}};function nT(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function aT(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var n=e.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};LP(e,i,i);var o=i.stopColor||e.getAttribute("stop-color")||"#000000",s=i.stopOpacity||e.getAttribute("stop-opacity");if(s){var l=dr(o),u=l&&l[3];u&&(l[3]*=Ja(s),o=Vn(l,"rgba"))}t.colorStops.push({offset:a,color:o})}e=e.nextSibling}}function Rr(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),ht(t.__inheritedStyle,r.__inheritedStyle))}function iT(r){for(var t=ep(r),e=[],n=0;n0;i-=2){var o=n[i],s=n[i-1],l=ep(o);switch(a=a||ze(),s){case"translate":Wn(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":I0(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ci(a,a,-parseFloat(l[0])*Nd,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Nd);zn(a,[1,0,u,1,0,0],a);break;case"skewY":var f=Math.tan(parseFloat(l[0])*Nd);zn(a,[1,f,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}t.setLocalTransform(a)}}var sT=/([^\s:;]+)\s*:\s*([^:;]+)/g;function LP(r,t,e){var n=r.getAttribute("style");if(n){sT.lastIndex=0;for(var a;(a=sT.exec(n))!=null;){var i=a[1],o=Q(Kh,i)?Kh[i]:null;o&&(t[o]=a[2]);var s=Q(Jh,i)?Jh[i]:null;s&&(e[s]=a[2])}}}function uU(r,t,e){for(var n=0;n0,m={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(t,g,e,n),this._updateMapSelectHandler(t,u,n,a)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=et(),n=et(),a=this._regionsGroup,i=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function f(v,p){return p&&(v=p(v)),v&&[v[0]*i.scaleX+i.x,v[1]*i.scaleY+i.y]}function c(v){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(h=a);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Re(t,De(n),{labelFetcher:h,labelDataIndex:c,defaultText:e},v);var p=t.getTextContent();if(p&&(kP(p).ignore=p.ignore,t.textConfig&&o)){var d=t.getBoundingRect().clone();t.textConfig.layoutRect=d,t.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function hT(r,t,e,n,a,i){r.data?r.data.setItemGraphicEl(i,t):dt(t).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:e,region:n&&n.option||{}}}function vT(r,t,e,n,a){r.data||Ca({el:t,componentModel:a,itemName:e,itemTooltipOption:n.get("tooltip")})}function pT(r,t,e,n,a){t.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return ne(t,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&PV(t,a,e),o}function dT(r,t,e){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),D(r,function(l){s.lineStart();for(var u=0;u-1&&(a.style.stroke=a.style.fill,a.style.fill=V.color.neutral00,a.style.lineWidth=2),a},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:V.color.tertiary},itemStyle:{borderWidth:.5,borderColor:V.color.border,areaColor:V.color.background},emphasis:{label:{show:!0,color:V.color.primary},itemStyle:{areaColor:V.color.highlight}},select:{label:{show:!0,color:V.color.primary},itemStyle:{color:V.color.highlight}},nameProperty:"name"},t})(Kt);function LU(r,t){var e={};return D(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);e[o]=e[o]||[],isNaN(a)||e[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=e[i].length,f=0;f1?(_.width=m,_.height=m/d):(_.height=m,_.width=m*d),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var x=r.getBoxLayoutParams();x.aspect=d,_=ae(x,p),_=IL(r,_,d)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function EU(r,t){D(t.get("geoCoord"),function(e,n){r.addGeoCoord(n,e)})}var RU=(function(){function r(){this.dimensions=EP}return r.prototype.create=function(t,e){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Mm(l+s,l,W({nameMap:o.get("nameMap"),api:e,ecModel:t},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=_T,u.resize(o,e)}),t.eachSeries(function(o){pf({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",le).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),D(i,function(o,s){var l=Y(o,function(f){return f.get("nameMap")}),u=new Mm(s,s,W({nameMap:A0(l),api:e,ecModel:t},a(o[0])));u.zoomLimit=Ue.apply(null,Y(o,function(f){return f.get("scaleLimit")})),n.push(u),u.resize=_T,u.resize(o[0],e),D(o,function(f){f.coordinateSystem=u,EU(u,f)})}),n},r.prototype.getFilledRegions=function(t,e,n,a){for(var i=(t||[]).slice(),o=et(),s=0;s=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(s)}}function FU(r,t){var e=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(e.length){HU(r);var i=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+t(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+t(r,a));r.parentNode.hierNode.defaultAncestor=WU(r,a,r.parentNode.hierNode.defaultAncestor||n[0],t)}function GU(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function xT(r){return arguments.length?r:$U}function ou(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function HU(r){for(var t=r.children,e=t.length,n=0,a=0;--e>=0;){var i=t[e];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function WU(r,t,e,n){if(t){for(var a=r,i=r,o=i.parentNode.children[0],s=t,l=a.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,c=s.hierNode.modifier;s=Bd(s),i=zd(i),s&&i;){a=Bd(a),o=zd(o),a.hierNode.ancestor=r;var h=s.hierNode.prelim+c-i.hierNode.prelim-u+n(s,i);h>0&&(YU(UU(s,r,e),r,h),u+=h,l+=h),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,f+=o.hierNode.modifier}s&&!Bd(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),i&&!zd(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,e=r)}return e}function Bd(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function zd(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function UU(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function YU(r,t,e){var n=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=n}function $U(r,t){return r.parentNode===t.parentNode?1:2}var XU=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),ZU=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:V.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new XU},t.prototype.buildPath=function(e,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=n.orient,f=u==="TB"||u==="BT"?0:1,c=1-f,h=Z(n.forkPosition,1),v=[];v[f]=o[f],v[c]=o[c]+(l[c]-o[c])*h,e.moveTo(o[0],o[1]),e.lineTo(v[0],v[1]),e.moveTo(s[0],s[1]),v[f]=s[f],e.lineTo(v[0],v[1]),v[f]=l[f],e.lineTo(v[0],v[1]),e.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(x=x-Math.PI));var w=b?"left":"right",T=s.getModel("label"),C=T.get("rotate"),A=C*(Math.PI/180),M=g.getTextContent();M&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-x:A,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?Mu(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(dt(e).focus=L),qU(a,o,f,e,p,v,d,n),e.__edge&&(e.onHoverStateChange=function(P){if(P!=="blur"){var E=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===sf||Mh(e.__edge,P)}})}function qU(r,t,e,n,a,i,o,s){var l=t.getModel(),u=r.get("edgeShape"),f=r.get("layout"),c=r.getOrient(),h=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(d||(d=n.__edge=new uf({shape:Dm(f,c,h,a,a)})),Bt(d,{shape:Dm(f,c,h,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,y=[],m=0;me&&(e=a.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,a=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,n=e.data.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var n=e.getData().tree.root,a=r.targetNode;if(q(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function VP(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function j_(r,t){var e=VP(r);return St(e,t)>=0}function rp(r,t){for(var e=[];r;){var n=r.dataIndex;e.push({name:r.name,dataIndex:n,value:t.getRawValue(n)}),r=r.parentNode}return e.reverse(),e}var i8=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var n={name:e.name,children:e.data},a=e.leaves||{},i=new It(a,this,this.ecModel),o=Z_.createTree(n,this,s);function s(c){c.wrapMethod("getItemModel",function(h,v){var p=o.getNodeByDataIndex(v);return p&&p.children.length&&p.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=e.expandAndCollapse,f=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var h=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=h&&h.collapsed!=null?!h.collapsed:c.depth<=f}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Se("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=rp(a,this),n.collapsed=!a.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:V.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t})(Kt);function o8(r,t,e){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)e.push(a[i])}}function s8(r,t){r.eachSeriesByType("tree",function(e){l8(e,t)})}function l8(r,t){var e=Ie(r,t).refContainer,n=ae(r.getBoxLayoutParams(),e);r.layoutInfo=n;var a=r.get("layout"),i=0,o=0,s=null;a==="radial"?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,s=xT(function(x,b){return(x.parentNode===b.parentNode?1:2)/x.depth})):(i=n.width,o=n.height,s=xT());var l=r.getData().tree.root,u=l.children[0];if(u){VU(l),o8(u,FU,s),l.hierNode.modifier=-u.hierNode.prelim,Bl(u,GU);var f=u,c=u,h=u;Bl(u,function(x){var b=x.getLayout().x;bc.getLayout().x&&(c=x),x.depth>h.depth&&(h=x)});var v=f===c?1:s(f,c)/2,p=v-f.getLayout().x,d=0,g=0,y=0,m=0;if(a==="radial")d=i/(c.getLayout().x+v+p),g=o/(h.depth-1||1),Bl(u,function(x){y=(x.getLayout().x+p)*d,m=(x.depth-1)*g;var b=ou(y,m);x.setLayout({x:b.x,y:b.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(c.getLayout().x+v+p),d=i/(h.depth-1||1),Bl(u,function(x){m=(x.getLayout().x+p)*g,y=_==="LR"?(x.depth-1)*d:i-(x.depth-1)*d,x.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(d=i/(c.getLayout().x+v+p),g=o/(h.depth-1||1),Bl(u,function(x){y=(x.getLayout().x+p)*d,m=_==="TB"?(x.depth-1)*g:o-(x.depth-1)*g,x.setLayout({x:y,y:m},!0)}))}}}function u8(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),n=e.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(a.dataIndex,"style");W(s,o)})})}function f8(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var a=t.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var i=a.coordinateSystem,o=tp(i,t,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}function c8(r){r.registerChartView(jU),r.registerSeriesModel(i8),r.registerLayout(s8),r.registerVisual(u8),f8(r)}var CT=["treemapZoomToNode","treemapRender","treemapMove"];function h8(r){for(var t=0;t1;)i=i.parentNode;var o=$y(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var v8=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,n){var a={name:e.name,children:e.data};GP(a);var i=e.levels||[],o=this.designatedVisualItemStyle={},s=new It({itemStyle:o},this,n);i=e.levels=p8(i,n);var l=Y(i||[],function(c){return new It(c,s,n)},this),u=Z_.createTree(a,this,f);function f(c){c.wrapMethod("getItemModel",function(h,v){var p=u.getNodeByDataIndex(v),d=p?l[p.depth]:null;return h.parentModel=d||s,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,n,a){var i=this.getData(),o=this.getRawValue(e),s=i.getName(e);return Se("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=rp(a,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var n=this._idIndexMap;n||(n=this._idIndexMap=et(),this._idIndexMapCount=0);var a=n.get(e);return a==null&&n.set(e,a=this._idIndexMapCount++),a},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var n=this.getRawData().tree.root;(!e||e!==n&&!n.contains(e))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){FP(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:V.size.l,top:V.size.xxxl,right:V.size.l,bottom:V.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:V.size.m,emptyItemWidth:25,itemStyle:{color:V.color.backgroundShade,textStyle:{color:V.color.secondary}},emphasis:{itemStyle:{color:V.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:V.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:V.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t})(Kt);function GP(r){var t=0;D(r.children,function(n){GP(n);var a=n.value;U(a)&&(a=a[0]),t+=a});var e=r.value;U(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),U(r.value)?r.value[0]=e:r.value=e}function p8(r,t){var e=Zt(t.get("color")),n=Zt(t.get(["aria","decal","decals"]));if(e){r=r||[];var a,i;D(r,function(s){var l=new It(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=e.slice()),!i&&n&&(o.decal=n.slice()),r}}var d8=8,AT=8,Vd=5,g8=(function(){function r(t){this.group=new ot,t.add(this.group)}return r.prototype.render=function(t,e,n,a){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),c=Ie(t,e).refContainer,h={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},v={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=ae(h,c);this._prepare(n,v,u),this._renderContent(t,v,p,s,l,u,f,a),Uv(o,h,c)}},r.prototype._prepare=function(t,e,n){for(var a=t;a;a=a.parentNode){var i=Ae(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+d8*2,e.emptyItemWidth);e.totalWidth+=s+AT,e.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(t,e,n,a,i,o,s,l){for(var u=0,f=e.emptyItemWidth,c=t.get(["breadcrumb","height"]),h=e.totalWidth,v=e.renderList,p=i.getModel("itemStyle").getItemStyle(),d=v.length-1;d>=0;d--){var g=v[d],y=g.node,m=g.width,_=g.text;h>n.width&&(h-=m-f,m=f,_=null);var x=new Je({shape:{points:y8(u,0,m,c,d===v.length-1,d===0)},style:ht(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ot({style:qt(o,{text:_})}),textConfig:{position:"inside"},z2:Js*1e4,onclick:xt(l,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=qt(s,{text:_}),x.ensureState("emphasis").style=p,ne(x,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(x),m8(x,t,y),u+=m+AT}},r.prototype.remove=function(){this.group.removeAll()},r})();function y8(r,t,e,n,a,i){var o=[[a?r:r-Vd,t],[r+e,t],[r+e,t+n],[a?r:r-Vd,t+n]];return!i&&o.splice(2,0,[r+e+Vd,t+n/2]),!a&&o.push([r,t+n/2]),o}function m8(r,t,e){dt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&rp(e,t)}}var _8=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,n,a,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},a=0,i=this._storage.length;aDT||Math.abs(e.dy)>DT)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+e.dx,y:a.y+e.dy,width:a.width,height:a.height}})}},t.prototype._onZoom=function(e){var n=e.originX,a=e.originY,i=e.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new pt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var c=f.zoom=f.zoom||1;if(c*=i,u){var h=u.min||0,v=u.max||1/0;c=Math.max(Math.min(v,c),h)}var p=c/f.zoom;f.zoom=c;var d=this.seriesModel.layoutInfo;n-=d.x,a-=d.y;var g=ze();Wn(g,g,[-n,-a]),I0(g,g,[p,p]),Wn(g,g,[n,a]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(e){var n=this;e.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&kh(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(e,n,a){var i=this;a||(a=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new g8(this.group))).render(e,n,a.node,function(o){i._state!=="animating"&&(j_(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=zl(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},t.type="treemap",t})($t);function zl(){return{nodeGroup:[],background:[],content:[]}}function C8(r,t,e,n,a,i,o,s,l,u){if(!o)return;var f=o.getLayout(),c=r.getData(),h=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var v=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,x=f.upperHeight,b=_&&_.length,S=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),C=h.getModel(["select","itemStyle"]),A=S.get("borderRadius")||0,M=st("nodeGroup",Lm);if(!M)return;if(l.add(M),M.x=f.x||0,M.y=f.y||0,M.markRedraw(),Qh(M).nodeWidth=v,Qh(M).nodeHeight=p,f.isAboveViewRoot)return M;var I=st("background",MT,u,b8);I&&k(M,I,b&&f.upperLabelHeight);var L=h.getModel("emphasis"),P=L.get("focus"),E=L.get("blurScope"),R=L.get("disabled"),B=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Ru(M)&&eo(M,!1),I&&(eo(I,!R),c.setItemGraphicEl(o.dataIndex,I),Ry(I,B,E));else{var N=st("content",MT,u,w8);N&&G(M,N),I.disableMorphing=!0,I&&Ru(I)&&eo(I,!1),eo(M,!R),c.setItemGraphicEl(o.dataIndex,M);var z=h.getShallow("cursor");z&&N.attr("cursor",z),Ry(M,B,E)}return M;function k(lt,rt,yt){var tt=dt(rt);if(tt.dataIndex=o.dataIndex,tt.seriesIndex=r.seriesIndex,rt.setShape({x:0,y:0,width:v,height:p,r:A}),g)H(rt);else{rt.invisible=!1;var gt=o.getVisual("style"),Yt=gt.stroke,Pt=kT(S);Pt.fill=Yt;var Vt=Yi(w);Vt.fill=w.get("borderColor");var Ut=Yi(T);Ut.fill=T.get("borderColor");var ue=Yi(C);if(ue.fill=C.get("borderColor"),yt){var tr=v-2*d;O(rt,Yt,gt.opacity,{x:d,y:0,width:tr,height:x})}else rt.removeTextContent();rt.setStyle(Pt),rt.ensureState("emphasis").style=Vt,rt.ensureState("blur").style=Ut,rt.ensureState("select").style=ue,_o(rt)}lt.add(rt)}function G(lt,rt){var yt=dt(rt);yt.dataIndex=o.dataIndex,yt.seriesIndex=r.seriesIndex;var tt=Math.max(v-2*d,0),gt=Math.max(p-2*d,0);if(rt.culling=!0,rt.setShape({x:d,y:d,width:tt,height:gt,r:A}),g)H(rt);else{rt.invisible=!1;var Yt=o.getVisual("style"),Pt=Yt.fill,Vt=kT(S);Vt.fill=Pt,Vt.decal=Yt.decal;var Ut=Yi(w),ue=Yi(T),tr=Yi(C);O(rt,Pt,Yt.opacity,null),rt.setStyle(Vt),rt.ensureState("emphasis").style=Ut,rt.ensureState("blur").style=ue,rt.ensureState("select").style=tr,_o(rt)}lt.add(rt)}function H(lt){!lt.invisible&&i.push(lt)}function O(lt,rt,yt,tt){var gt=h.getModel(tt?IT:LT),Yt=Ae(h.get("name"),null),Pt=gt.getShallow("show");Re(lt,De(h,tt?IT:LT),{defaultText:Pt?Yt:null,inheritColor:rt,defaultOpacity:yt,labelFetcher:r,labelDataIndex:o.dataIndex});var Vt=lt.getTextContent();if(Vt){var Ut=Vt.style,ue=bv(Ut.padding||0);tt&&(lt.setTextConfig({layoutRect:tt}),Vt.disableLabelLayout=!0),Vt.beforeUpdate=function(){var Ge=Math.max((tt?tt.width:lt.shape.width)-ue[1]-ue[3],0),gn=Math.max((tt?tt.height:lt.shape.height)-ue[0]-ue[2],0);(Ut.width!==Ge||Ut.height!==gn)&&Vt.setStyle({width:Ge,height:gn})},Ut.truncateMinChar=2,Ut.lineOverflow="truncate",j(Ut,tt,f);var tr=Vt.getState("emphasis");j(tr?tr.style:null,tt,f)}}function j(lt,rt,yt){var tt=lt?lt.text:null;if(!rt&&yt.isLeafRoot&&tt!=null){var gt=r.get("drillDownIcon",!0);lt.text=gt?gt+" "+tt:tt}}function st(lt,rt,yt,tt){var gt=m!=null&&e[lt][m],Yt=a[lt];return gt?(e[lt][m]=null,_t(Yt,gt)):g||(gt=new rt,gt instanceof jr&&(gt.z2=A8(yt,tt)),zt(Yt,gt)),t[lt][y]=gt}function _t(lt,rt){var yt=lt[y]={};rt instanceof Lm?(yt.oldX=rt.x,yt.oldY=rt.y):yt.oldShape=W({},rt.shape)}function zt(lt,rt){var yt=lt[y]={},tt=o.parentNode,gt=rt instanceof ot;if(tt&&(!n||n.direction==="drillDown")){var Yt=0,Pt=0,Vt=a.background[tt.getRawIndex()];!n&&Vt&&Vt.oldShape&&(Yt=Vt.oldShape.width,Pt=Vt.oldShape.height),gt?(yt.oldX=0,yt.oldY=Pt):yt.oldShape={x:Yt,y:Pt,width:0,height:0}}yt.fadein=!gt}}function A8(r,t){return r*S8+t}var qu=D,M8=vt,tv=-1,Ee=(function(){function r(t){var e=t.mappingMethod,n=t.type,a=this.option=ut(t);this.type=n,this.mappingMethod=e,this._normalizeData=I8[e];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[e],e==="piecewise"?(Fd(a),D8(a)):e==="category"?a.categories?L8(a):Fd(a,!0):(qe(e!=="linear"||a.dataExtent),Fd(a))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return K(this._normalizeData,this)},r.listVisualTypes=function(){return kt(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,n){vt(t)?D(t,e,n):e.call(n,t)},r.mapVisual=function(t,e,n){var a,i=U(t)?[]:vt(t)?{}:(a=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(t){var e={},n;return t&&qu(r.visualHandlers,function(a,i){t.hasOwnProperty(i)&&(e[i]=t[i],n=!0)}),n?e:null},r.prepareVisualTypes=function(t){if(U(t))t=t.slice();else if(M8(t)){var e=[];qu(t,function(n,a){e.push(a)}),t=e}else return[];return t.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,n){for(var a,i=1/0,o=0,s=e.length;o=0;i--)n[i]==null&&(delete e[t[i]],t.pop())}function Fd(r,t){var e=r.visual,n=[];vt(e)?qu(e,function(i){n.push(i)}):e!=null&&n.push(e);var a={color:1,symbol:1};!t&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),HP(r,n)}function _c(r){return{applyVisual:function(t,e,n){var a=this.mapValueToVisual(t);n("color",r(e("color"),a))},_normalizedToVisual:Im([0,1])}}function PT(r){var t=this.option.visual;return t[Math.round(Gt(r,[0,1],[0,t.length-1],!0))]||{}}function Vl(r){return function(t,e,n){n(r,this.mapValueToVisual(t))}}function su(r){var t=this.option.visual;return t[this.option.loop&&r!==tv?r%t.length:r]}function $i(){return this.option.visual[0]}function Im(r){return{linear:function(t){return Gt(t,r,this.option.visual,!0)},category:su,piecewise:function(t,e){var n=km.call(this,e);return n==null&&(n=Gt(t,r,this.option.visual,!0)),n},fixed:$i}}function km(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var n=Ee.findPieceIndex(r,e),a=e[n];if(a&&a.visual)return a.visual[this.type]}}function HP(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=Y(t,function(e){var n=dr(e);return n||[0,0,0,1]})),t}var I8={linear:function(r){return Gt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Ee.findPieceIndex(r,t,!0);if(e!=null)return Gt(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??tv},fixed:ve};function xc(r,t,e){return r?t<=e:t=e.length||d===e[d.depth]){var y=N8(a,l,d,g,p,n);UP(d,y,e,n)}})}}}function E8(r,t,e){var n=W({},t),a=e.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(i){a[i]=t[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function ET(r){var t=Gd(r,"color");if(t){var e=Gd(r,"colorAlpha"),n=Gd(r,"colorSaturation");return n&&(t=Qa(t,null,null,n)),e&&(t=yh(t,e)),t}}function R8(r,t){return t!=null?Qa(t,null,null,r):null}function Gd(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function O8(r,t,e,n,a,i){if(!(!i||!i.length)){var o=Hd(t,"color")||a.color!=null&&a.color!=="none"&&(Hd(t,"colorAlpha")||Hd(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(f==="index"||f==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var h=new Ee(c);return WP(h).drColorMappingBy=f,h}}}function Hd(r,t){var e=r.get(t);return U(e)&&e.length?{name:t,range:e}:null}function N8(r,t,e,n,a,i){var o=W({},t);if(a){var s=a.type,l=s==="color"&&WP(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var Ku=Math.max,ev=Math.min,RT=Ue,q_=D,YP=["itemStyle","borderWidth"],B8=["itemStyle","gapWidth"],z8=["upperLabel","show"],V8=["upperLabel","height"];const F8={seriesType:"treemap",reset:function(r,t,e,n){var a=r.option,i=Ie(r,e).refContainer,o=ae(r.getBoxLayoutParams(),i),s=a.size||[],l=Z(RT(o.width,s[0]),i.width),u=Z(RT(o.height,s[1]),i.height),f=n&&n.type,c=["treemapZoomToNode","treemapRootToNode"],h=ju(n,c,r),v=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,p=r.getViewRoot(),d=VP(p);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?$8(r,h,p,l,u):v?[v.width,v.height]:[l,u],y=a.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:a.squareRatio,sort:y,leafDepth:a.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(_),$P(p,m,!1,0),_=p.getLayout(),q_(d,function(b,S){var w=(d[S+1]||p).getValue();b.setLayout(W({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var x=r.getData().tree.root;x.setLayout(X8(o,v,h),!0),r.setLayoutInfo(o),XP(x,new pt(-o.x,-o.y,e.getWidth(),e.getHeight()),d,p,0)}};function $P(r,t,e,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(YP),u=s.get(B8)/2,f=ZP(s),c=Math.max(l,f),h=l-u,v=c-u;r.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:f},!0),a=Ku(a-2*h,0),i=Ku(i-h-v,0);var p=a*i,d=G8(r,s,p,t,e,n);if(d.length){var g={x:h,y:v,width:a,height:i},y=ev(a,i),m=1/0,_=[];_.area=0;for(var x=0,b=d.length;x=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/e*ts[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Y8(r,t,e){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;in&&(n=o));var l=r.area*r.area,u=t*t*e;return l?Ku(u*n/l,l/(u*a)):1/0}function OT(r,t,e,n,a){var i=t===e.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=e[s[i]],f=t?r.area/t:0;(a||f>e[l[o]])&&(f=e[l[o]]);for(var c=0,h=r.length;c