>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/t,l/t])}return a}function qB(r,e){return r=ZB(r),F(At(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new a1(o[0],o.slice(1)));break;case"MultiPolygon":D(n.coordinates,function(l){l[0]&&i.push(new a1(l[0],l.slice(1)))});break;case"LineString":i.push(new n1([n.coordinates]));break;case"MultiLineString":i.push(new n1(n.coordinates))}var s=new rD(a[e||"name"],i,a.cp);return s.properties=a,s})}var il=xt();function nD(r,e){var t=F(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function KB(r){var e=r.getLabelModel().get("customValues");if(e){var t=No(r),a=r.scale.getExtent(),n=nD(r,e),i=At(n,function(o){return o>=a[0]&&o<=a[1]});return{labels:F(i,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?jB(r):tV(r)}function QB(r,e){var t=r.getTickModel().get("customValues");if(t){var a=r.scale.getExtent(),n=nD(r,t);return{ticks:At(n,function(i){return i>=a[0]&&i<=a[1]})}}return r.type==="category"?JB(r,e):{ticks:F(r.scale.getTicks(),function(i){return i.value})}}function jB(r){var e=r.getLabelModel(),t=iD(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function iD(r,e){var t=oD(r,"labels"),a=py(e),n=sD(t,a);if(n)return n;var i,o;return Q(a)?i=fD(r,a):(o=a==="auto"?eV(r):a,i=uD(r,o)),lD(t,a,{labels:i,labelCategoryInterval:o})}function JB(r,e){var t=oD(r,"ticks"),a=py(e),n=sD(t,a);if(n)return n;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),Q(a))i=fD(r,a,!0);else if(a==="auto"){var s=iD(r,r.getLabelModel());o=s.labelCategoryInterval,i=F(s.labels,function(l){return l.tickValue})}else o=a,i=uD(r,o,!0);return lD(t,a,{ticks:i,tickCategoryInterval:o})}function tV(r){var e=r.scale.getTicks(),t=No(r);return{labels:F(e,function(a,n){return{level:a.level,formattedLabel:t(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function oD(r,e){return il(r)[e]||(il(r)[e]=[])}function sD(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(a)),h=Math.abs(u*Math.sin(a)),v=0,c=0;l<=i[1];l+=s){var p=0,d=0,g=_l(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,v=Math.max(v,p,7),c=Math.max(c,d,7)}var y=v/f,m=c/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=il(r.model),b=r.getExtent(),x=S.lastAutoInterval,w=S.lastTickCount;return x!=null&&w!=null&&Math.abs(x-_)<=1&&Math.abs(w-o)<=1&&x>_&&S.axisExtent0===b[0]&&S.axisExtent1===b[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=b[0],S.axisExtent1=b[1]),_}function aV(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function uD(r,e,t){var a=No(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=tD(r),v=o.get("showMinLabel")||h,c=o.get("showMaxLabel")||h;v&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);c&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function fD(r,e,t){var a=r.scale,n=No(r),i=[];return D(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),i}var i1=[0,1],Er=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=a&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return vT(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(a=a.slice(),o1(a,n.count())),Dt(e,i1,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),o1(a,n.count()));var i=Dt(e,a,i1,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=QB(this,t),n=a.ticks,i=F(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return nV(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),n=F(a,function(i){return F(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return KB(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(){return rV(this)},r}();function o1(r,e){var t=r[1]-r[0],a=e,n=t/a/2;r[0]+=n,r[1]-=n}function nV(r,e,t,a){var n=e.length;if(!r.onBand||t||!n)return;var i=r.getExtent(),o,s;if(n===1)e[0].coord=i[0],o=e[1]={coord:i[1],tickValue:e[0].tickValue};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;D(e,function(c){c.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s,tickValue:f[1]+1},e.push(o)}var h=i[0]>i[1];v(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&v(i[0],e[0].coord)&&e.unshift({coord:i[0]}),v(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&v(o.coord,i[1])&&e.push({coord:i[1]});function v(c,p){return c=Yt(c),p=Yt(p),h?c>p:cn&&(n+=rs);var c=Math.atan2(s,o);if(c<0&&(c+=rs),c>=a&&c<=n||c+rs>=a&&c+rs<=n)return l[0]=f,l[1]=h,u-t;var p=t*Math.cos(a)+r,d=t*Math.sin(a)+e,g=t*Math.cos(n)+r,y=t*Math.sin(n)+e,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 Wf(r,e,t,a,n,i,o,s){var l=n-r,u=i-e,f=t-r,h=a-e,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var c=l*f+u*h,p=c/v;s&&(p=Math.min(Math.max(p,0),1)),p*=v;var d=o[0]=r+p*f,g=o[1]=e+p*h;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function hD(r,e,t,a,n,i,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-n)*(u-n)+(f-i)*(f-i))}var br=[];function lV(r,e,t){var a=hD(e.x,e.y,e.width,e.height,r.x,r.y,br);return t.set(br[0],br[1]),a}function uV(r,e,t){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=e.data,h=r.x,v=r.y,c=0;c0){e=e/180*Math.PI,Ar.fromArray(r[0]),Nt.fromArray(r[1]),$t.fromArray(r[2]),ft.sub($r,Ar,Nt),ft.sub(Hr,$t,Nt);var t=$r.len(),a=Hr.len();if(!(t<.001||a<.001)){$r.scale(1/t),Hr.scale(1/a);var n=$r.dot(Hr),i=Math.cos(e);if(i1&&ft.copy(Me,$t),Me.toArray(r[1])}}}}function fV(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ar.fromArray(r[0]),Nt.fromArray(r[1]),$t.fromArray(r[2]),ft.sub($r,Nt,Ar),ft.sub(Hr,$t,Nt);var a=$r.len(),n=Hr.len();if(!(a<.001||n<.001)){$r.scale(1/a),Hr.scale(1/n);var i=$r.dot(e),o=Math.cos(t);if(i=l)ft.copy(Me,$t);else{Me.scaleAndAdd(Hr,s/Math.tan(Math.PI/2-f));var h=$t.x!==Nt.x?(Me.x-Nt.x)/($t.x-Nt.x):(Me.y-Nt.y)/($t.y-Nt.y);if(isNaN(h))return;h<0?ft.copy(Me,Nt):h>1&&ft.copy(Me,$t)}Me.toArray(r[1])}}}}function sc(r,e,t,a){var n=t==="normal",i=n?r:r.ensureState(t);i.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function hV(r,e){var t=e.smooth,a=e.points;if(a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var n=Ha(a[0],a[1]),i=Ha(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*t,s=$u([],a[1],a[0],o/n),l=$u([],a[1],a[2],o/i),u=$u([],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],a[2][0],a[2][1])}else for(var f=1;f0){_(C*T,0,o);var A=C+x;A<0&&S(-A*T,1)}else S(-x*T,1)}}function _(x,w,T){x!==0&&(u=!0);for(var C=w;C0)for(var A=0;A0;A--){var P=T[A-1]*L;_(-P,A,o)}}}function b(x){var w=x<0?-1:1;x=Math.abs(x);for(var T=Math.ceil(x/(o-1)),C=0;C0?_(T,0,C+1):_(-T,o-C-1,o),x-=T,x<=0)return}return u}function vV(r,e,t,a){return pD(r,"x","width",e,t)}function dD(r,e,t,a){return pD(r,"y","height",e,t)}function gD(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new ht(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var n=0;n=0&&a.attr(i.oldLayoutSelect),ct(v,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),Tt(a,u,t,l)}else if(a.attr(u),!Mo(a).valueAnimation){var h=st(a.style.opacity,1);a.style.opacity=0,zt(a,{style:{opacity:h}},t,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};mu(c,u,_u),mu(c,a.states.select,_u)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};mu(p,u,_u),mu(p,a.states.emphasis,_u)}sC(a,l,f,t,t)}if(n&&!n.ignore&&!n.invisible){var i=dV(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),Tt(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,zt(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}(),uc=xt();function yV(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=uc(t).labelManager;n||(n=uc(t).labelManager=new gV),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=uc(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var fc=Math.sin,hc=Math.cos,yD=Math.PI,kn=Math.PI*2,mV=180/yD,mD=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){this._add("C",e,t,a,n,i,o)},r.prototype.quadraticCurveTo=function(e,t,a,n){this._add("Q",e,t,a,n)},r.prototype.arc=function(e,t,a,n,i,o){this.ellipse(e,t,a,a,0,n,i,o)},r.prototype.ellipse=function(e,t,a,n,i,o,s,l){var u=s-o,f=!l,h=Math.abs(u),v=Xa(h-kn)||(f?u>=kn:-u>=kn),c=u>0?u%kn:u%kn+kn,p=!1;v?p=!0:Xa(h)?p=!1:p=c>=yD==!!f;var d=e+a*hc(o),g=t+n*fc(o);this._start&&this._add("M",d,g);var y=Math.round(i*mV);if(v){var m=1/this._p,_=(f?1:-1)*(kn-m);this._add("A",a,n,y,1,+f,e+a*hc(o+_),t+n*fc(o+_)),m>.01&&this._add("A",a,n,y,0,+f,d,g)}else{var S=e+a*hc(s),b=t+n*fc(s);this._add("A",a,n,y,+p,+f,S,b)}},r.prototype.rect=function(e,t,a,n){this._add("M",e,t),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,n,i,o,s,l,u){for(var f=[],h=this._p,v=1;v"}function DV(r){return""+r+">"}function my(r,e){e=e||{};var t=e.newline?`
`:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return AV(o,s)+(o!=="style"?Ie(l):l||"")+(i?""+t+F(i,function(u){return a(u)}).join(t)+t:"")+DV(o)}return a(r)}function MV(r,e,t){t=t||{};var a=t.newline?`
`:"",n=" {"+a,i=a+"}",o=F(_t(r),function(l){return l+n+F(_t(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=F(_t(e),function(l){return"@keyframes "+l+n+F(_t(e[l]),function(u){return u+n+F(_t(e[l][u]),function(f){var h=e[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function Td(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function f1(r,e,t,a){return ne("svg","root",{width:r,height:e,xmlns:_D,"xmlns:xlink":SD,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var IV=0;function bD(){return IV++}var h1={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"},Bn="transform-origin";function LV(r,e,t){var a=V({},r.shape);V(a,e),r.buildPath(t,a);var n=new mD;return n.reset(aT(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function PV(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[Bn]=t+"px "+a+"px")}var EV={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function wD(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function RV(r,e,t){var a=r.shape.paths,n={},i,o;if(D(a,function(l){var u=Td(t.zrId);u.animation=!0,Uh(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,v=_t(f),c=v.length;if(c){o=v[c-1];var p=f[o];for(var d in p){var g=p[d];n[d]=n[d]||{d:""},n[d].d+=g.d||""}for(var y in h){var m=h[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=wD(n,t);return i.replace(o,s)}}function v1(r){return Y(r)?h1[r]?"cubic-bezier("+h1[r]+")":wg(r)?r:"":""}function Uh(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof Vg){var s=RV(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var Wt=wD(w,t);return Wt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+bD();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function kV(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};c1(a,e,t)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=n.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=Np(l))}var u=n.lineWidth;if(u){var f=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),c1(a,e,t)}}function c1(r,e,t,a){var n=JSON.stringify(r),i=t.cssStyleCache[n];i||(i=t.zrId+"-cls-"+bD(),t.cssStyleCache[n]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var ol=Math.round;function TD(r){return r&&Y(r.src)}function CD(r){return r&&Q(r.toDataURL)}function _y(r,e,t,a){wV(function(n,i){var o=n==="fill"||n==="stroke";o&&rT(i)?DD(e,r,n,a):o&&Tg(i)?MD(t,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),GV(t,r,a)}function Sy(r,e){var t=EP(e);t&&(t.each(function(a,n){a!=null&&(r[(u1+n).toLowerCase()]=a+"")}),e.isSilent()&&(r[u1+"silent"]="true"))}function p1(r){return Xa(r[0]-1)&&Xa(r[1])&&Xa(r[2])&&Xa(r[3]-1)}function OV(r){return Xa(r[4])&&Xa(r[5])}function xy(r,e,t){if(e&&!(OV(e)&&p1(e))){var a=1e4;r.transform=p1(e)?"translate("+ol(e[4]*a)/a+" "+ol(e[5]*a)/a+")":eP(e)}}function d1(r,e,t){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Ee(v,g),Ee(c,g)}else if(v==null||c==null){var y=function(A,M){if(A){var I=A.elm,L=v||M.width,P=c||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=Lg(p,null,r,function(A){l||y(x,A),y(h,A)});m&&m.width&&m.height&&(v=v||m.width,c=c||m.height)}h=ne("image","img",{href:p,width:v,height:c}),o.width=v,o.height=c}else n.svgElement&&(h=rt(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(h){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var b=nT(n);b&&(o.patternTransform=b);var x=ne("pattern","",o,[h]),w=my(x),T=a.patternCache,C=T[w];C||(C=a.zrId+"-p"+a.patternIdx++,T[w]=C,o.id=C,x=a.defs[C]=ne("pattern",C,o,[h])),e[t]=dh(C)}}function HV(r,e,t){var a=t.clipPathCache,n=t.defs,i=a[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=ne("clipPath",i,o,[AD(r,t)])}e["clip-path"]=dh(i)}function m1(r){return document.createTextNode(r)}function Un(r,e,t){r.insertBefore(e,t)}function _1(r,e){r.removeChild(e)}function S1(r,e){r.appendChild(e)}function ID(r){return r.parentNode}function LD(r){return r.nextSibling}function vc(r,e){r.textContent=e}var x1=58,WV=120,UV=ne("","");function Cd(r){return r===void 0}function Fr(r){return r!==void 0}function YV(r,e,t){for(var a={},n=e;n<=t;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function Ss(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function sl(r){var e,t=r.children,a=r.tag;if(Fr(a)){var n=r.elm=xD(a);if(by(UV,r),z(t))for(e=0;ei?(p=t[l+1]==null?null:t[l+1].elm,PD(r,p,t,n,l)):Yf(r,e,a,i))}function Qi(r,e){var t=e.elm=r.elm,a=r.children,n=e.children;r!==e&&(by(r,e),Cd(e.text)?Fr(a)&&Fr(n)?a!==n&&$V(t,a,n):Fr(n)?(Fr(r.text)&&vc(t,""),PD(t,null,n,0,n.length-1)):Fr(a)?Yf(t,a,0,a.length-1):Fr(r.text)&&vc(t,""):r.text!==e.text&&(Fr(a)&&Yf(t,a,0,a.length-1),vc(t,e.text)))}function XV(r,e){if(Ss(r,e))Qi(r,e);else{var t=r.elm,a=ID(t);sl(e),a!==null&&(Un(a,e.elm,LD(t)),Yf(a,[r],0,0))}return e}var ZV=0,qV=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=b1(),this.configLayer=b1(),this.storage=t,this._opts=a=V({},a),this.root=e,this._id="zr"+ZV++,this._oldVNode=f1(a.width,a.height),e&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=xD("svg");by(null,this._oldVNode),n.appendChild(i),e.appendChild(n)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",XV(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return y1(e,Td(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=Td(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=KV(a,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=ne("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=F(_t(i.defs),function(v){return i.defs[v]});if(u.length&&o.push(ne("defs","defs",{},u)),e.animation){var f=MV(i.cssNodes,i.cssAnims,{newline:!0});if(f){var h=ne("style","stl",{},[],f);o.push(h)}}return f1(a,n,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},my(this.renderToVNode({animation:st(e.cssAnimation,!0),emphasis:st(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:st(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var n=e.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(v&&l&&v[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 h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=c.dpr,M=0;M0&&e>n[0]){for(l=0;le);l++);s=a[n[l]]}if(n.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,n=0;n0?Su:0),this._needsManuallyCompositing),f.__builtin__||gg("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,t(l),i=f),n.__dirty&Xe&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,D(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?ut(a[e],t,!0):a[e]=t;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Vt);function yo(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var n=co(r,e,t[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(e[i])}return a.join(" ")}var Pl=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this)||this;return o.updateData(t,a,n,i),o}return e.prototype._createSymbol=function(t,a,n,i,o){this.removeAll();var s=Kt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=n5,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){ya(this.childAt(0))},e.prototype.downplay=function(){ma(this.childAt(0))},e.prototype.setZ=function(t,a){var n=this.childAt(0);n.zlevel=t,n.z=a},e.prototype.setDraggable=function(t,a){var n=this.childAt(0);n.draggable=t,n.cursor=!a&&t?"move":n.cursor},e.prototype.updateData=function(t,a,n,i){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=o!==this._symbolType,f=i&&i.disableAnimation;if(u){var h=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,h)}else{var v=this.childAt(0);v.silent=!1;var c={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(c):Tt(v,c,s,a),Lr(v)}if(this._updateCommon(t,a,l,n,i),u){var v=this.childAt(0);if(!f){var c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,zt(v,c,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,n,i,o){var s=this.childAt(0),l=t.hostModel,u,f,h,v,c,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,h=i.selectItemStyle,v=i.focus,c=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),p=_.get("disabled"),d=oe(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=xi(t.getItemVisual(a,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(a,"style"),w=x.fill;if(s instanceof he){var T=s.style;s.useStyle(V({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(V({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"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;de(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:x.opacity});function I(E){return M?t.getName(E):yo(t,E)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,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),Ht(this,v,c,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,n){var i=this.childAt(0),o=nt(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&nn(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();nn(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return Oo(t.getItemVisual(a,"symbolSize"))},e}(at);function n5(r,e){this.parent.drift(r,e)}function pc(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function C1(r){return r!=null&&!et(r)&&(r={isIgnore:r}),r||{}}function A1(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:oe(e),cursorStyle:e.get("cursor")}}var El=function(){function r(e){this.group=new at,this._SymbolCtor=e||Pl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=C1(t);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=A1(e),u={disableAnimation:s},f=t.getSymbolPoint||function(h){return e.getItemLayout(h)};i||a.removeAll(),e.diff(i).add(function(h){var v=f(h);if(pc(e,v,h,t)){var c=new o(e,h,l,u);c.setPosition(v),e.setItemGraphicEl(h,c),a.add(c)}}).update(function(h,v){var c=i.getItemGraphicEl(v),p=f(h);if(!pc(e,p,h,t)){a.remove(c);return}var d=e.getItemVisual(h,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==d)a.remove(c),c=new o(e,h,l,u),c.setPosition(p);else{c.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?c.attr(y):Tt(c,y,n)}a.add(c),e.setItemGraphicEl(h,c)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&v.fadeOut(function(){a.remove(v)},n)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,n){var i=e._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=A1(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=C1(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=a[0]:a[1]<0&&(t=a[1]),t}function kD(r,e,t,a){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,a),o[1-i]=n,e.dataToPoint(o)}function o5(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,n){t.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function s5(r,e,t,a,n,i,o,s){for(var l=o5(r,e),u=[],f=[],h=[],v=[],c=[],p=[],d=[],g=RD(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=n||d<0)break;if(li(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),h=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=i;continue}if(o>0){for(var b=d+i,x=e[b*2],w=e[b*2+1];x===y&&w===m&&g=a||li(x,w))c=y,p=m;else{A=x-u,M=w-f;var P=y-u,E=x-y,R=m-f,N=w-m,O=void 0,B=void 0;if(s==="x"){O=Math.abs(P),B=Math.abs(E);var G=A>0?1:-1;c=y-G*O*o,p=m,I=y+G*B*o,L=m}else if(s==="y"){O=Math.abs(R),B=Math.abs(N);var H=M>0?1:-1;c=y,p=m-H*O*o,I=y,L=m+H*B*o}else O=Math.sqrt(P*P+R*R),B=Math.sqrt(E*E+N*N),C=B/(B+O),c=y-A*o*(1-C),p=m-M*o*(1-C),I=y+A*o*C,L=m+M*o*C,I=Ra(I,ka(x,y)),L=Ra(L,ka(w,m)),I=ka(I,Ra(x,y)),L=ka(L,Ra(w,m)),A=I-y,M=L-m,c=y-A*O/B,p=m-M*O/B,c=Ra(c,ka(u,y)),p=Ra(p,ka(f,m)),c=ka(c,Ra(u,y)),p=ka(p,Ra(f,m)),A=y-c,M=m-p,I=y+A*B/O,L=m+M*B/O}r.bezierCurveTo(h,v,c,p,y,m),h=I,v=L}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var OD=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),l5=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new OD},e.prototype.buildPath=function(t,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&li(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(p-l)*_+l:(c-s)*_+s;return u?[t,S]:[S,t]}s=c,l=p;break;case o.C:c=i[h++],p=i[h++],d=i[h++],g=i[h++],y=i[h++],m=i[h++];var b=u?Sf(s,c,d,y,t,f):Sf(l,p,g,m,t,f);if(b>0)for(var x=0;x=0){var S=u?re(l,p,g,m,w):re(s,c,d,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(gt),u5=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(OD),ND=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new u5},e.prototype.buildPath=function(t,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&li(n[s*2-2],n[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),i=l}return t}function v5(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=e.getAxis(n),u=F(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var v=h5(u,n==="x"?t.getWidth():t.getHeight()),c=v.length;if(!c&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var p=10,d=v[0].coord-p,g=v[c-1].coord+p,y=g-d;if(y<.001)return"transparent";D(v,function(_){_.offset=(_.coord-d)/y}),v.push({offset:c?v[c-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:h[0]||"transparent"});var m=new Tl(0,0,0,0,v,!0);return m[n]=d,m[n+"2"]=g,m}}}function c5(r,e,t){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(n&&p5(i,e))){var o=e.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(e.get(o,l))}}}}function p5(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function d5(r,e){return isNaN(r)||isNaN(e)}function g5(r){for(var e=r.length/2;e>0&&d5(r[e*2-2],r[e*2-1]);e--);return e-1}function P1(r,e){return[r[e*2],r[e*2+1]]}function y5(r,e,t){for(var a=r.length/2,n=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function zD(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var B=p.getState("emphasis").style;B.lineWidth=+p.style.lineWidth+1}nt(p).seriesIndex=t.seriesIndex,Ht(p,R,N,O);var G=L1(t.get("smooth")),H=t.get("smoothMonotone");if(p.setShape({smooth:G,smoothMonotone:H,connectNulls:w}),d){var U=s.getCalculationInfo("stackedOnSeries"),K=0;d.useStyle(J(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),U&&(K=L1(U.get("smooth"))),d.setShape({smooth:G,stackedOnSmooth:K,smoothMonotone:H,connectNulls:w}),pe(d,t,"areaStyle"),nt(d).seriesIndex=t.seriesIndex,Ht(d,R,N,O)}var j=this._changePolyState;s.eachItemGraphicEl(function(it){it&&(it.onHoverStateChange=j)}),this._polyline.onHoverStateChange=j,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,p),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,a){nt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,n,i){var o=t.getData(),s=hi(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],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=t.get("zlevel")||0,c=t.get("z")||0;u=new Pl(o,s),u.x=f,u.y=h,u.setZ(v,c);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=v,p.z=c,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Et.prototype.highlight.call(this,t,a,n,i)},e.prototype.downplay=function(t,a,n,i){var o=t.getData(),s=hi(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 Et.prototype.downplay.call(this,t,a,n,i)},e.prototype._changePolyState=function(t){var a=this._polygon;Df(this._polyline,t),a&&Df(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new l5({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ND({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");Q(f)&&(f=f(null));var h=u.get("animationDelay")||0,v=Q(h)?h(null):h;t.eachItemGraphicEl(function(c,p){var d=c;if(d){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,b=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=n;i?(y=x.x,m=x.x+x.width,_=c.x):(y=x.y+x.height,m=x.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=Q(h)?h(p):f*w+v,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}})},e.prototype._initOrUpdateEndLabel=function(t,a,n){var i=t.getModel("endLabel");if(zD(t)){var o=t.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 bt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=g5(l);f>=0&&(de(s,oe(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:f,defaultText:function(h,v,c){return c!=null?ED(o,c):yo(o,h)},enableTextSetter:!0},m5(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var h=n.getLayout("points"),v=n.hostModel,c=v.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=y5(h,S,w),C=T.range,A=C[1]-C[0],M=void 0;if(A>=1){if(A>1&&!c){var I=P1(h,C[0]);u.attr({x:I[0]+b,y:I[1]+x}),o&&(M=v.getRawValue(C[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+b,y:I[1]+x});var L=v.getRawValue(C[0]),P=v.getRawValue(C[1]);o&&(M=wT(n,p,L,P,T.t))}i.lastFrameIndex=C[0]}else{var E=t===1||i.lastFrameIndex>0?C[0]:0,I=P1(h,E);o&&(M=v.getRawValue(E)),u.attr({x:I[0]+b,y:I[1]+x})}if(o){var R=Mo(u);typeof R.setLabelText=="function"&&R.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,h=t.hostModel,v=s5(this._data,t,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),c=v.current,p=v.stackedOnCurrent,d=v.next,g=v.stackedOnNext;if(o&&(p=Oa(v.stackedOnCurrent,v.current,n,o,l),c=Oa(v.current,null,n,o,l),g=Oa(v.stackedOnNext,v.next,n,o,l),d=Oa(v.next,null,n,o,l)),I1(c,d)>3e3||f&&I1(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=c;var y={shape:{points:d}};v.current!==c&&(y.shape.__points=v.next),u.stopAnimation(),Tt(u,y,h),f&&(f.setShape({points:c,stackedOnPoints:p}),f.stopAnimation(),Tt(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),c=Math.round(s/v);if(isFinite(c)&&c>1){i==="lttb"?e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/c)):i==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/c));var p=void 0;Y(i)?p=S5[i]:Q(i)&&(p=i),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/c,p,x5))}}}}}function b5(r){r.registerChartView(_5),r.registerSeriesModel(a5),r.registerLayout(kl("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,FD("line"))}var ll=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Ca(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(n)D(i.getAxes(),function(v,c){if(v.type==="category"&&a!=null){var p=v.getTicksCoords(),d=v.getTickModel().get("alignWithLabel"),g=o[c],y=a[c]==="x1"||a[c]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[c]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;bg){_=(x+m)/2;break}b===1&&(S=w-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[c]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Vt);Vt.registerClass(ll);var w5=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Ca(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,n){return n.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=hn(ll.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(ll),T5=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}(),$f=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new T5},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,h=a.endAngle,v=a.clockwise,c=Math.PI*2,p=v?h-fMath.PI/2&&fs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,n,i){if(this._isOrderChangedWithinSameData(t,a,n)){var o=this._dataSort(t,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,n){var i=a.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){js(i,t,nt(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Et),E1={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,i=r.y+r.height,o=gc(e.x,r.x),s=yc(e.x+e.width,n),l=gc(e.y,r.y),u=yc(e.y+e.height,i),f=sn?s:o,e.y=h&&l>i?u:l,e.width=f?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),f||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var n=yc(e.r,r.r),i=gc(e.r0,r.r0);e.r=n,e.r0=i;var o=n-i<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},R1={cartesian2d:function(r,e,t,a,n,i,o,s,l){var u=new St({shape:V({},a),z2:1});if(u.__dataIndex=t,u.name="item",i){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,e,t,a,n,i,o,s,l){var u=!n&&l?$f:ke,f=new u({shape:a,z2:1});f.name="item";var h=GD(n);if(f.calculateTextPosition=C5(h,{isRoundCap:u===$f}),i){var v=f.shape,c=n?"r":"endAngle",p={};v[c]=n?a.r0:a.startAngle,p[c]=a[c],(s?Tt:zt)(f,{shape:p},i)}return f}};function I5(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function k1(r,e,t,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?Tt:zt)(t,{shape:l},e,n,null);var f=e?r.baseAxis.model:null;(o?Tt:zt)(t,{shape:u},f,n)}function O1(r,e){for(var t=0;t0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function E5(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function GD(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function B1(r,e,t,a,n,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var f=r.shape,h=ti(a.getModel("itemStyle"),f,!0);V(f,h),r.setShape(f)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=a.getShallow("cursor");v&&r.attr("cursor",v);var c=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=oe(a);de(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:yo(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var d=r.getTextContent();if(s&&d){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,A5(r,g==="outside"?c:g,GD(o),a.get(["label","rotate"]))}oC(d,p,i.getRawValue(t),function(m){return ED(e,m)});var y=a.getModel(["emphasis"]);Ht(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),pe(r,a),E5(n)&&(r.style.fill="none",r.style.stroke="none",D(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function R5(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,n,i)}var k5=function(){function r(){}return r}(),V1=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new k5},e.prototype.buildPath=function(t,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function O5(r,e,t){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=i.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function HD(r,e,t){if(wi(t,"cartesian2d")){var a=e,n=t.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=t.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function N5(r,e,t){var a=r.type==="polar"?ke:St;return new a({shape:HD(e,t,r),silent:!0,z2:0})}function B5(r){r.registerChartView(M5),r.registerSeriesModel(w5),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,lt(XA,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ZA("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,FD("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var G1=Math.PI*2,Tu=Math.PI/180;function WD(r,e){return te(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function UD(r,e){var t=WD(r,e),a=r.get("center"),n=r.get("radius");z(n)||(n=[0,n]);var i=W(t.width,e.getWidth()),o=W(t.height,e.getHeight()),s=Math.min(i,o),l=W(n[0],s/2),u=W(n[1],s/2),f,h,v=r.coordinateSystem;if(v){var c=v.dataToPoint(a);f=c[0]||0,h=c[1]||0}else z(a)||(a=[a,a]),f=W(a[0],i)+t.x,h=W(a[1],o)+t.y;return{cx:f,cy:h,r0:l,r:u}}function V5(r,e,t){e.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=WD(a,t),s=UD(a,t),l=s.cx,u=s.cy,f=s.r,h=s.r0,v=-a.get("startAngle")*Tu,c=a.get("endAngle"),p=a.get("padAngle")*Tu;c=c==="auto"?v-G1:-c*Tu;var d=a.get("minAngle")*Tu,g=d+p,y=0;n.each(i,function(N){!isNaN(N)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),b=a.get("roseType"),x=a.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var T=S?1:-1,C=[v,c],A=T*p/2;Pg(C,!S),v=C[0],c=C[1];var M=YD(a);M.startAngle=v,M.endAngle=c,M.clockwise=S;var I=Math.abs(c-v),L=I,P=0,E=v;if(n.setLayout({viewRect:o,r:f}),n.each(i,function(N,O){var B;if(isNaN(N)){n.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:h,r:b?NaN:f});return}b!=="area"?B=m===0&&x?_:N*_:B=I/y,BB?(H=E+T*B/2,U=H):(H=E+A,U=G-A),n.setItemLayout(O,{angle:B,startAngle:H,endAngle:U,clockwise:S,cx:l,cy:u,r0:h,r:b?Dt(N,w,[h,f]):f}),E=G}),Lt?y:g,b=Math.abs(_.label.y-t);if(b>=S.maxY){var x=_.label.x-e-_.len2*n,w=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:c:null;a.setStyle("width",p)}var d=a.getBoundingRect();i.width=d.width;var g=(a.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-h)/2}}}function mc(r){return r.position==="center"}function G5(r){var e=r.getData(),t=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*z5,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,v=s.height;function c(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}e.each(function(x){var w=e.getItemGraphicEl(x),T=w.shape,C=w.getTextContent(),A=w.getTextGuideLine(),M=e.getItemModel(x),I=M.getModel("label"),L=I.get("position")||M.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),E=I.get("alignTo"),R=W(I.get("edgeDistance"),u),N=I.get("bleedMargin"),O=M.getModel("labelLine"),B=O.get("length");B=W(B,u);var G=O.get("length2");if(G=W(G,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":U>0?"left":"right"}var Rt=Math.PI,Ft=0,ee=I.get("rotate");if(wt(ee))Ft=ee*(Rt/180);else if(L==="center")Ft=0;else if(ee==="radial"||ee===!0){var Ue=U<0?-H+Rt:-H;Ft=Ue}else if(ee==="tangential"&&L!=="outside"&&L!=="outer"){var Be=Math.atan2(U,K);Be<0&&(Be=Rt*2+Be);var vn=K>0;vn&&(Be=Rt+Be),Ft=Be-Rt}if(i=!!Ft,C.x=j,C.y=it,C.rotation=Ft,C.setStyle({verticalAlign:"middle"}),vt){C.setStyle({align:Wt});var jh=C.states.select;jh&&(jh.x+=C.x,jh.y+=C.y)}else{var Aa=C.getBoundingRect().clone();Aa.applyTransform(C.getComputedTransform());var xm=(C.style.margin||0)+2.1;Aa.y-=xm/2,Aa.height+=xm,t.push({label:C,labelLine:A,position:L,len:B,len2:G,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new ft(U,K),linePoints:Lt,textAlign:Wt,labelDistance:P,labelAlignTo:E,edgeDistance:R,bleedMargin:N,rect:Aa,unconstrainedWidth:Aa.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:vt})}}),!i&&r.get("avoidLabelOverlap")&&F5(t,a,n,l,u,v,f,h);for(var d=0;d0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=i.r0}},e.type="pie",e}(Et);function Bo(r,e,t){e=z(e)&&{coordDimensions:e}||V({encodeDefine:r.getEncode()},e);var a=r.getSource(),n=Il(a,e).dimensions,i=new Le(n,r);return i.initData(a,t),i}var Nl=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}(),U5=xt(),Y5=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nl($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Bo(this,{coordDimensions:["value"],encodeDefaulter:lt(Zg,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),n=U5(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=NP(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){fi(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Vt);function $5(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(wt(o)&&!isNaN(o)&&o<0)})}}}function X5(r){r.registerChartView(W5),r.registerSeriesModel(Y5),vA("pie",r.registerAction),r.registerLayout(lt(V5,"pie")),r.registerProcessor(Ol("pie")),r.registerProcessor($5("pie"))}var Z5=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return Ca(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,a,n){return n.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Vt),XD=4,q5=function(){function r(){}return r}(),K5=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new q5},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var f=u*2,h=i[f]-s/2,v=i[f+1]-l/2;if(t>=h&&a>=v&&t<=h+s&&a<=v+l)return u}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,h=-1/0,v=0;v=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),j5=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=kl("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new Q5:new El,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Et),J5=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(mt),Dd=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",qt).models[0]},e.type="cartesian2dAxis",e}(mt);Qt(Dd,Ll);var ZD={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},tz=ut({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},ZD),wy=ut({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},ZD),ez=ut({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},wy),rz=J({logBase:10},wy);const qD={category:tz,value:wy,time:ez,log:rz};var az={value:1,category:1,time:1,log:1};function mo(r,e,t,a){D(az,function(n,i){var o=ut(ut({},qD[i],!0),a,!0),s=function(l){k(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var v=tl(this),c=v?Po(f):{},p=h.getTheme();ut(f,p.get(i+"Axis")),ut(f,this.getDefaultOption()),f.type=W1(f),v&&on(f,c,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Sd.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",W1)}function W1(r){return r.type||(r.data?"category":"value")}var nz=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return F(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),At(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),Md=["x","y"];function U1(r){return r.type==="interval"||r.type==="time"}var iz=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Md,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!U1(t)||!U1(a))){var n=t.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,v=o[0]-n[0]*f,c=o[1]-i[0]*h,p=this._transform=[f,0,0,h,v,c];this._invTransform=To([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var n=this.dataToPoint(t),i=this.dataToPoint(a),o=this.getArea(),s=new ht(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return ce(n,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},e.prototype.clampData=function(t,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(t[0]),u=i.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a){var n=[];if(this._invTransform)return ce(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),a),n[1]=o.coordToData(o.toLocalCoord(t[1]),a),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-t,o=Math.min(n[0],n[1])-t,s=Math.max(a[0],a[1])-i+t,l=Math.max(n[0],n[1])-o+t;return new ht(i,o,s,l)},e}(nz),oz=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Er);function Id(r,e,t){t=t||{};var a=r.coordinateSystem,n=e.axis,i={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,f=a.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],v={left:0,right:1,top:0,bottom:1,onZero:2},c=e.get("offset")||0,p=u==="x"?[h[2]-c,h[3]+c]:[h[0]-c,h[1]+c];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[v.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[v[l]]:h[0],u==="x"?p[v[l]]:h[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[v[s]]-p[v.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),fe(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function Y1(r){return r.get("coordinateSystem")==="cartesian2d"}function $1(r){var e={xAxisModel:null,yAxisModel:null};return D(e,function(t,a){var n=a.replace(/Model$/,""),i=r.getReferringComponents(n,qt).models[0];e[a]=i}),e}var _c=Math.log;function KD(r,e,t){var a=Sa.prototype,n=a.getTicks.call(t),i=a.getTicks.call(t,!0),o=n.length-1,s=a.getInterval.call(t),l=JA(r,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var v=_c(r.base);u=[_c(u[0])/v,_c(u[1])/v]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var c=a.getExtent.call(r);f&&(u[0]=c[0]),h&&(u[1]=c[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(f&&h)p=(g-d)/o;else if(f)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=nc(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=nc(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Yt(g-m),d<0&&u[0]>=0?(d=0,g=Yt(m)):g>0&&u[1]<=0&&(g=0,d=-Yt(m))}var _=(n[0].value-i[0].value)/s,S=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+p*_,g+p*S),a.setInterval.call(r,p),(_||S)&&a.setNiceExtent.call(r,d+p,g-p)}var sz=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Md,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=_t(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var v=+l[h],c=o[v],p=c.model,d=c.scale;xd(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(c):(go(d,p),xd(d)&&(s=c))}f.length&&(s||(s=f.pop(),go(s.scale,s.model)),D(f,function(g){KD(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};D(a.x,function(o){X1(a,"y",o,i)}),D(a.y,function(o){X1(a,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var n=e.getBoxLayoutParams(),i=!a&&e.get("containLabel"),o=te(n,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=GB(u);if(f){var h=u.isHorizontal()?"height":"width",v=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+v,u.position==="top"?o.y+=f.height+v:u.position==="left"&&(o.x+=f.width+v)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],v=u.inverse?1:0;u.setExtent(h[v],h[1-v]),lz(u,f?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}et(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n0?"top":"bottom",i="center"):Zs(n-Za)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),q1={axisLine:function(r,e,t,a){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var i=e.axis.getExtent(),o=a.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(ce(s,s,o),ce(l,l,o));var f=V({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new ae({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});vo(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var v=e.get(["axisLine","symbol"]);if(v!=null){var c=e.get(["axisLine","symbolSize"]);Y(v)&&(v=[v,v]),(Y(c)||wt(c))&&(c=[c,c]);var p=xi(e.get(["axisLine","symbolOffset"])||0,c),d=c[0],g=c[1];D([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(v[m]!=="none"&&v[m]!=null){var _=Kt(v[m],-d/2,-g/2,d,g,f.stroke,!0),S=y.r+y.offset,b=u?l:s;_.attr({rotation:y.rotate,x:b[0]+S*Math.cos(r.rotation),y:b[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,a){var n=hz(t,a,e,r),i=cz(t,a,e,r);if(fz(e,i,n),vz(t,a,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=cD(F(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));gD(o)}},axisName:function(r,e,t,a){var n=fe(r.axisName,e.get("name"));if(n){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[i==="start"?u[0]-f*l:i==="end"?u[1]+f*l:(u[0]+u[1])/2,Q1(i)?r.labelOffset+o*l:0],v,c=e.get("nameRotate");c!=null&&(c=c*Za/180);var p;Q1(i)?v=Pe.innerTextLayout(r.rotation,c??r.rotation,o):(v=uz(r.rotation,i,c||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(v.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=fe(r.nameTruncateMaxWidth,g.maxWidth,p),_=new bt({x:h[0],y:h[1],rotation:v.rotation,silent:Pe.isLabelSilent(e),style:Bt(s,{text:n,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(_i({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var S=Pe.makeAxisEventDataBase(e);S.targetType="axisName",S.name=n,nt(_).eventData=S}a.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function uz(r,e,t,a){var n=cT(t-r),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Zs(n-Za/2)?(o=l?"bottom":"top",i="center"):Zs(n-Za*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nZa/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function fz(r,e,t){if(!tD(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],h=t[t.length-1],v=t[t.length-2];a===!1?(Je(i),Je(u)):K1(i,o)&&(a?(Je(o),Je(f)):(Je(i),Je(u))),n===!1?(Je(s),Je(h)):K1(l,s)&&(n?(Je(l),Je(v)):(Je(s),Je(h)))}}function Je(r){r&&(r.ignore=!0)}function K1(r,e){var t=r&&r.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(!(!t||!a)){var n=ph([]);return mi(n,n,-r.rotation),t.applyTransform(ha([],n,r.getLocalTransform())),a.applyTransform(ha([],n,e.getLocalTransform())),t.intersect(a)}}function Q1(r){return r==="middle"||r==="center"}function QD(r,e,t,a,n){for(var i=[],o=[],s=[],l=0;l=0||r===e}function _z(r){var e=Ty(r);if(e){var t=e.axisPointerModel,a=e.axis.scale,n=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=Ld(t);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=J({color:p.color},l));var g=ut(rt(p),{boundaryGap:t,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:v},!1);if(Y(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else Q(f)&&(g.name=f(g.name,g));var m=new Mt(g,null,this.ecModel);return Qt(m,Ll.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ut({lineStyle:{color:"#bbb"}},as.axisLine),axisLabel:Cu(as.axisLabel,!1),axisTick:Cu(as.axisTick,!1),splitLine:Cu(as.splitLine,!0),splitArea:Cu(as.splitArea,!0),indicator:[]},e}(mt),Ez=["axisLine","axisTickLabel","axisName"],Rz=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes(),i=F(n,function(o){var s=o.model.get("showName")?o.name:"",l=new Pe(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(i,function(o){D(Ez,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),v=l.get("color"),c=u.get("color"),p=z(v)?v:[v],d=z(c)?c:[c],g=[],y=[];function m(E,R,N){var O=N%R.length;return E[O]=E[O]||[],O}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,b=a.cy,x=0;x<_.length;x++){if(f){var w=m(g,p,x);g[w].push(new Ta({shape:{cx:S,cy:b,r:_[x].coord}}))}if(h&&x<_.length-1){var w=m(y,d,x);y[w].push(new bl({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=F(n,function(E,R){var N=E.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),F(N,function(O){return a.coordToPoint(O.coord,R)})}),A=[],x=0;x<=T;x++){for(var M=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;bc(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(i),v=(i>0?1:-1)*(h>3?.4:h>1?.15:.05);bc(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!aS(this._zr,"globalPan")){var a=t.pinchScale>1?1.1:1/1.1;bc(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(pr);function bc(r,e,t,a,n){r.pointerChecker&&r.pointerChecker(a,n.originX,n.originY)&&(da(a.event),aM(r,e,t,a,n))}function aM(r,e,t,a,n){n.isAvailableBehavior=$(of,null,t,a),r.trigger(e,n)}function of(r,e,t){var a=t[r];return!r||a&&(!Y(a)||e.event[a+"Key"])}function Ay(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function Dy(r,e,t,a){var n=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(a-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var Fz={axisPointer:1,tooltip:1,brush:1};function Yh(r,e,t){var a=e.getComponentByElement(r.topTarget),n=a&&a.coordinateSystem;return a&&a!==t&&!Fz.hasOwnProperty(a.mainType)&&n&&n.model!==t}function nM(r){if(Y(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var wc,Xf={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},nS=_t(Xf),Zf={"alignment-baseline":"textBaseline","stop-color":"stopColor"},iS=_t(Zf),Gz=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=nM(e);this._defsUsePending=[];var n=new at;this._root=n;var i=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Ye(a,n,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;Uz(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var v=$h(o);v.length>=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(h=oM(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=n;n=new at,n.add(c),c.scaleX=c.scaleY=h.scale,c.x=h.x,c.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new St({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:i}},r.prototype._parseNode=function(e,t,a,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var f=wc[s];if(f&&X(wc,s)){l=f.call(this,e,t);var h=e.getAttribute("name");if(h){var v={name:h,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var c=oS[s];if(c&&X(oS,s)){var p=c.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var a=new ho({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});tr(t,a),Ye(e,a,this._defsUsePending,!1,!1),Hz(a,t);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=function(){wc={g:function(e,t){var a=new at;return tr(t,a),Ye(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new St;return tr(t,a),Ye(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new Ta;return tr(t,a),Ye(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new ae;return tr(t,a),Ye(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new Th;return tr(t,a),Ye(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),n;a&&(n=uS(a));var i=new Oe({shape:{points:n||[]},silent:!0});return tr(t,i),Ye(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var a=e.getAttribute("points"),n;a&&(n=uS(a));var i=new Ne({shape:{points:n||[]},silent:!0});return tr(t,i),Ye(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var a=new he;return tr(t,a),Ye(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new at;return tr(t,s),Ye(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),n=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new at;return tr(t,s),Ye(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",n=ZT(a);return tr(t,n),Ye(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),oS={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new Tl(e,t,a,n);return sS(r,i),lS(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new jT(e,t,a);return sS(r,n),lS(r,n),n}};function sS(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function lS(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};iM(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function tr(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),J(e.__inheritedStyle,r.__inheritedStyle))}function uS(r){for(var e=$h(r),t=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=$h(o);switch(n=n||qe(),s){case"translate":Kr(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":bg(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":mi(n,n,-parseFloat(l[0])*Tc,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Tc);ha(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*Tc);ha(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var hS=/([^\s:;]+)\s*:\s*([^:;]+)/g;function iM(r,e,t){var a=r.getAttribute("style");if(a){hS.lastIndex=0;for(var n;(n=hS.exec(a))!=null;){var i=n[1],o=X(Xf,i)?Xf[i]:null;o&&(e[o]=n[2]);var s=X(Zf,i)?Zf[i]:null;s&&(t[s]=n[2])}}}function Zz(r,e,t){for(var a=0;a0,g={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=Z(),a=Z(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(c,p){return p&&(c=p(c)),c&&[c[0]*i.scaleX+i.x,c[1]*i.scaleY+i.y]}function h(c){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(v=n);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;de(e,oe(a),{labelFetcher:v,labelDataIndex:h,defaultText:t},c);var p=e.getTextContent();if(p&&(sM(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function gS(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):nt(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function yS(r,e,t,a,n){r.data||_i({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function mS(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Ht(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&uR(e,n,t),o}function _S(r,e,t){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),D(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Vt);function pF(r,e){var t={};return D(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,f=0;f1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var b=r.getBoxLayoutParams();b.aspect=g,S=te(b,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function mF(r,e){D(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var _F=function(){function r(){this.dimensions=uM}return r.prototype.create=function(e,t){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Rd(l+s,l,V({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=wS,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return e.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=F(o,function(f){return f.get("nameMap")}),u=new Rd(s,s,V({nameMap:yg(l)},n(o[0])));u.zoomLimit=fe.apply(null,F(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=wS,u.resize(o[0],t),D(o,function(f){f.coordinateSystem=u,mF(u,f)})}),a},r.prototype.getFilledRegions=function(e,t,a,n){for(var i=(e||[]).slice(),o=Z(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function CF(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){MF(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=IF(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function AF(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function CS(r){return arguments.length?r:EF}function xs(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function DF(r,e){return te(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function MF(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function IF(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,h=s.hierNode.modifier;s=Cc(s),i=Ac(i),s&&i;){n=Cc(n),o=Ac(o),n.hierNode.ancestor=r;var v=s.hierNode.prelim+h-i.hierNode.prelim-u+a(s,i);v>0&&(PF(LF(s,r,t),r,v),u+=v,l+=v),h+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!Cc(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=h-l),i&&!Ac(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,t=r)}return t}function Cc(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Ac(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function LF(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function PF(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function EF(r,e){return r.parentNode===e.parentNode?1:2}var RF=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),kF=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new RF},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,h=1-f,v=W(a.forkPosition,1),c=[];c[f]=o[f],c[h]=o[h]+(l[h]-o[h])*v,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[f]=s[f],t.lineTo(c[0],c[1]),c[f]=l[f],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(S=S-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?-S:A,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?Us(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(nt(t).focus=L),NF(n,o,f,t,p,c,d,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var E=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===xl||Df(t.__edge,P)}})}function NF(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),h=r.getOrient(),v=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=a.__edge=new wl({shape:kd(f,h,v,n,n)})),Tt(d,{shape:kd(f,h,v,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},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 e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,n=r.targetNode;if(Y(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function dM(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Ey(r,e){var t=dM(r);return ct(t,e)>=0}function Xh(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var YF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Mt(n,this,this.ecModel),o=Py.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(v,c){var p=o.getNodeByDataIndex(c);return p&&p.children.length&&p.isExpand||(v.parentModel=i),v})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var v=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=v&&v.collapsed!=null?!v.collapsed:h.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),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})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Xh(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Vt);function $F(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function XF(r,e){r.eachSeriesByType("tree",function(t){ZF(t,e)})}function ZF(r,e){var t=DF(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=CS(function(_,S){return(_.parentNode===S.parentNode?1:2)/_.depth})):(n=t.width,i=t.height,o=CS());var s=r.getData().tree.root,l=s.children[0];if(l){TF(s),$F(l,CF,o),s.hierNode.modifier=-l.hierNode.prelim,is(l,AF);var u=l,f=l,h=l;is(l,function(_){var S=_.getLayout().x;Sf.getLayout().x&&(f=_),_.depth>h.depth&&(h=_)});var v=u===f?1:o(u,f)/2,c=v-u.getLayout().x,p=0,d=0,g=0,y=0;if(a==="radial")p=n/(f.getLayout().x+v+c),d=i/(h.depth-1||1),is(l,function(_){g=(_.getLayout().x+c)*p,y=(_.depth-1)*d;var S=xs(g,y);_.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=i/(f.getLayout().x+v+c),p=n/(h.depth-1||1),is(l,function(_){y=(_.getLayout().x+c)*d,g=m==="LR"?(_.depth-1)*p:n-(_.depth-1)*p,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=n/(f.getLayout().x+v+c),d=i/(h.depth-1||1),is(l,function(_){g=(_.getLayout().x+c)*p,y=m==="TB"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:g,y},!0)}))}}}function qF(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");V(s,o)})})}function KF(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=Iy(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function QF(r){r.registerChartView(OF),r.registerSeriesModel(YF),r.registerLayout(XF),r.registerVisual(qF),KF(r)}var LS=["treemapZoomToNode","treemapRender","treemapMove"];function jF(r){for(var e=0;e1;)i=i.parentNode;var o=ld(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var JF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};yM(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Mt({itemStyle:o},this,a);i=t.levels=tG(i,a);var l=F(i||[],function(h){return new Mt(h,s,a)},this),u=Py.createTree(n,this,f);function f(h){h.wrapMethod("getItemModel",function(v,c){var p=u.getNodeByDataIndex(c),d=p?l[p.depth]:null;return v.parentModel=d||s,v})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return se("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Xh(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},V(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=Z(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){gM(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Vt);function yM(r){var e=0;D(r.children,function(a){yM(a);var n=a.value;z(n)&&(n=n[0]),e+=n});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}function tG(r,e){var t=Pt(e.get("color")),a=Pt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,i;D(r,function(s){var l=new Mt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}var eG=8,PS=8,Dc=5,rG=function(){function r(e){this.group=new at,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),h={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(e,h,s,l,u,f,n),kh(o,h.pos,h.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=Jt(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+eG*2,t.emptyItemWidth);t.totalWidth+=s+PS,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=hk(t.pos,t.box),v=t.totalWidth,c=t.renderList,p=n.getModel("itemStyle").getItemStyle(),d=c.length-1;d>=0;d--){var g=c[d],y=g.node,m=g.width,_=g.text;v>h.width&&(v-=m-u,m=u,_=null);var S=new Oe({shape:{points:aG(l,0,m,f,d===c.length-1,d===0)},style:J(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new bt({style:Bt(i,{text:_})}),textConfig:{position:"inside"},z2:Ao*1e4,onclick:lt(s,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Bt(o,{text:_}),S.ensureState("emphasis").style=p,Ht(S,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(S),nG(S,e,y),l+=m+PS}},r.prototype.remove=function(){this.group.removeAll()},r}();function aG(r,e,t,a,n,i){var o=[[n?r:r-Dc,e],[r+t,e],[r+t,e+a],[n?r:r-Dc,e+a]];return!i&&o.splice(2,0,[r+t+Dc,e+a/2]),!n&&o.push([r,e+a/2]),o}function nG(r,e,t){nt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Xh(t,e)}}var iG=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;nRS||Math.abs(t.dy)>RS)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY,i=t.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 ht(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var h=f.zoom=f.zoom||1;if(h*=i,u){var v=u.min||0,c=u.max||1/0;h=Math.max(Math.min(c,h),v)}var p=h/f.zoom;f.zoom=h;var d=this.seriesModel.layoutInfo;a-=d.x,n-=d.y;var g=qe();Kr(g,g,[-a,-n]),bg(g,g,[p,p]),Kr(g,g,[a,n]),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}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._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&&Rf(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new rG(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(Ey(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=os(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,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(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(Et);function os(){return{nodeGroup:[],background:[],content:[]}}function hG(r,e,t,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,b=_&&_.length,x=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),C=v.getModel(["select","itemStyle"]),A=x.get("borderRadius")||0,M=it("nodeGroup",Od);if(!M)return;if(l.add(M),M.x=f.x||0,M.y=f.y||0,M.markRedraw(),qf(M).nodeWidth=c,qf(M).nodeHeight=p,f.isAboveViewRoot)return M;var I=it("background",ES,u,lG);I&&G(M,I,b&&f.upperLabelHeight);var L=v.getModel("emphasis"),P=L.get("focus"),E=L.get("blurScope"),R=L.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Qs(M)&&qn(M,!1),I&&(qn(I,!R),h.setItemGraphicEl(o.dataIndex,I),td(I,N,E));else{var O=it("content",ES,u,uG);O&&H(M,O),I.disableMorphing=!0,I&&Qs(I)&&qn(I,!1),qn(M,!R),h.setItemGraphicEl(o.dataIndex,M);var B=v.getShallow("cursor");B&&O.attr("cursor",B),td(M,N,E)}return M;function G(vt,tt,pt){var q=nt(tt);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,tt.setShape({x:0,y:0,width:c,height:p,r:A}),g)U(tt);else{tt.invisible=!1;var ot=o.getVisual("style"),Ot=ot.stroke,It=NS(x);It.fill=Ot;var Rt=zn(w);Rt.fill=w.get("borderColor");var Ft=zn(T);Ft.fill=T.get("borderColor");var ee=zn(C);if(ee.fill=C.get("borderColor"),pt){var Ue=c-2*d;K(tt,Ot,ot.opacity,{x:d,y:0,width:Ue,height:S})}else tt.removeTextContent();tt.setStyle(It),tt.ensureState("emphasis").style=Rt,tt.ensureState("blur").style=Ft,tt.ensureState("select").style=ee,ci(tt)}vt.add(tt)}function H(vt,tt){var pt=nt(tt);pt.dataIndex=o.dataIndex,pt.seriesIndex=r.seriesIndex;var q=Math.max(c-2*d,0),ot=Math.max(p-2*d,0);if(tt.culling=!0,tt.setShape({x:d,y:d,width:q,height:ot,r:A}),g)U(tt);else{tt.invisible=!1;var Ot=o.getVisual("style"),It=Ot.fill,Rt=NS(x);Rt.fill=It,Rt.decal=Ot.decal;var Ft=zn(w),ee=zn(T),Ue=zn(C);K(tt,It,Ot.opacity,null),tt.setStyle(Rt),tt.ensureState("emphasis").style=Ft,tt.ensureState("blur").style=ee,tt.ensureState("select").style=Ue,ci(tt)}vt.add(tt)}function U(vt){!vt.invisible&&i.push(vt)}function K(vt,tt,pt,q){var ot=v.getModel(q?OS:kS),Ot=Jt(v.get("name"),null),It=ot.getShallow("show");de(vt,oe(v,q?OS:kS),{defaultText:It?Ot:null,inheritColor:tt,defaultOpacity:pt,labelFetcher:r,labelDataIndex:o.dataIndex});var Rt=vt.getTextContent();if(Rt){var Ft=Rt.style,ee=_g(Ft.padding||0);q&&(vt.setTextConfig({layoutRect:q}),Rt.disableLabelLayout=!0),Rt.beforeUpdate=function(){var Be=Math.max((q?q.width:vt.shape.width)-ee[1]-ee[3],0),vn=Math.max((q?q.height:vt.shape.height)-ee[0]-ee[2],0);(Ft.width!==Be||Ft.height!==vn)&&Rt.setStyle({width:Be,height:vn})},Ft.truncateMinChar=2,Ft.lineOverflow="truncate",j(Ft,q,f);var Ue=Rt.getState("emphasis");j(Ue?Ue.style:null,q,f)}}function j(vt,tt,pt){var q=vt?vt.text:null;if(!tt&&pt.isLeafRoot&&q!=null){var ot=r.get("drillDownIcon",!0);vt.text=ot?ot+" "+q:q}}function it(vt,tt,pt,q){var ot=m!=null&&t[vt][m],Ot=n[vt];return ot?(t[vt][m]=null,Lt(Ot,ot)):g||(ot=new tt,ot instanceof cr&&(ot.z2=vG(pt,q)),Wt(Ot,ot)),e[vt][y]=ot}function Lt(vt,tt){var pt=vt[y]={};tt instanceof Od?(pt.oldX=tt.x,pt.oldY=tt.y):pt.oldShape=V({},tt.shape)}function Wt(vt,tt){var pt=vt[y]={},q=o.parentNode,ot=tt instanceof at;if(q&&(!a||a.direction==="drillDown")){var Ot=0,It=0,Rt=n.background[q.getRawIndex()];!a&&Rt&&Rt.oldShape&&(Ot=Rt.oldShape.width,It=Rt.oldShape.height),ot?(pt.oldX=0,pt.oldY=It):pt.oldShape={x:Ot,y:It,width:0,height:0}}pt.fadein=!ot}}function vG(r,e){return r*sG+e}var hl=D,cG=et,Kf=-1,ie=function(){function r(e){var t=e.mappingMethod,a=e.type,n=this.option=rt(e);this.type=a,this.mappingMethod=t,this._normalizeData=gG[t];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(Mc(n),pG(n)):t==="category"?n.categories?dG(n):Mc(n,!0):(Ee(t!=="linear"||n.dataExtent),Mc(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return $(this._normalizeData,this)},r.listVisualTypes=function(){return _t(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){et(e)?D(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var n,i=z(e)?[]:et(e)?{}:(n=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},a;return e&&hl(r.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(cG(e)){var t=[];hl(e,function(a,n){t.push(n)}),e=t}else return[];return e.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var n,i=1/0,o=0,s=t.length;o=0;i--)a[i]==null&&(delete t[e[i]],e.pop())}function Mc(r,e){var t=r.visual,a=[];et(t)?hl(t,function(i){a.push(i)}):t!=null&&a.push(t);var n={color:1,symbol:1};!e&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),mM(r,a)}function Du(r){return{applyVisual:function(e,t,a){var n=this.mapValueToVisual(e);a("color",r(t("color"),n))},_normalizedToVisual:Nd([0,1])}}function BS(r){var e=this.option.visual;return e[Math.round(Dt(r,[0,1],[0,e.length-1],!0))]||{}}function ss(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function bs(r){var e=this.option.visual;return e[this.option.loop&&r!==Kf?r%e.length:r]}function Fn(){return this.option.visual[0]}function Nd(r){return{linear:function(e){return Dt(e,r,this.option.visual,!0)},category:bs,piecewise:function(e,t){var a=Bd.call(this,t);return a==null&&(a=Dt(e,r,this.option.visual,!0)),a},fixed:Fn}}function Bd(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=ie.findPieceIndex(r,t),n=t[a];if(n&&n.visual)return n.visual[this.type]}}function mM(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=F(e,function(t){var a=Ke(t);return a||[0,0,0,1]})),e}var gG={linear:function(r){return Dt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=ie.findPieceIndex(r,e,!0);if(t!=null)return Dt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??Kf},fixed:Xt};function Mu(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=bG(n,l,d,g,p,a);SM(d,y,t,a)}})}}}function _G(r,e,t){var a=V({},e),n=t.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function VS(r){var e=Ic(r,"color");if(e){var t=Ic(r,"colorAlpha"),a=Ic(r,"colorSaturation");return a&&(e=Is(e,null,null,a)),t&&(e=xf(e,t)),e}}function SG(r,e){return e!=null?Is(e,null,null,r):null}function Ic(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function xG(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Lc(e,"color")||n.color!=null&&n.color!=="none"&&(Lc(e,"colorAlpha")||Lc(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new ie(h);return _M(v).drColorMappingBy=f,v}}}function Lc(r,e){var t=r.get(e);return z(t)&&t.length?{name:e,range:t}:null}function bG(r,e,t,a,n,i){var o=V({},e);if(n){var s=n.type,l=s==="color"&&_M(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var vl=Math.max,Qf=Math.min,zS=fe,Ry=D,xM=["itemStyle","borderWidth"],wG=["itemStyle","gapWidth"],TG=["upperLabel","show"],CG=["upperLabel","height"];const AG={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=te(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=W(zS(s.width,l[0]),n),f=W(zS(s.height,l[1]),i),h=a&&a.type,v=["treemapZoomToNode","treemapRootToNode"],c=fl(a,v,r),p=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),g=dM(d);if(h!=="treemapMove"){var y=h==="treemapZoomToNode"?EG(r,c,d,u,f):p?[p.width,p.height]:[u,f],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),bM(d,_,!1,0),S=d.getLayout(),Ry(g,function(x,w){var T=(g[w+1]||d).getValue();x.setLayout(V({dataExtent:[T,T],borderWidth:0,upperHeight:0},S))})}var b=r.getData().tree.root;b.setLayout(RG(s,p,c),!0),r.setLayoutInfo(s),wM(b,new ht(-s.x,-s.y,n,i),g,d,0)}};function bM(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(xM),u=s.get(wG)/2,f=TM(s),h=Math.max(l,f),v=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),n=vl(n-2*v,0),i=vl(i-v-c,0);var p=n*i,d=DG(r,s,p,e,t,a);if(d.length){var g={x:v,y:c,width:n,height:i},y=Qf(n,i),m=1/0,_=[];_.area=0;for(var S=0,b=d.length;S=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function PG(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=e*e*t;return l?vl(u*a/l,l/(u*n)):1/0}function FS(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],f=e?r.area/e:0;(n||f>t[l[o]])&&(f=t[l[o]]);for(var h=0,v=r.length;hJm&&(u=Jm),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0].8?"left":v[0]<-.8?"right":"center",d=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+f[0],i.y=-v[1]*m+f[1],p=v[0]>.8?"right":v[0]<-.8?"left":"center",d=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+C,p=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+h[0],i.y=h[1]+C,p=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(at),Vy=function(){function r(e){this.group=new at,this._LineCtor=e||By}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=$S(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=$S(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!QG(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function $S(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:oe(e)}}function XS(r){return isNaN(r[0])||isNaN(r[1])}function Oc(r){return r&&!XS(r[0])&&!XS(r[1])}var Nc=[],Bc=[],Vc=[],Hi=le,zc=ei,ZS=Math.abs;function qS(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){Nc[0]=Hi(a[0],n[0],i[0],f),Nc[1]=Hi(a[1],n[1],i[1],f);var h=ZS(zc(Nc,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Fc(r,e){var t=[],a=Ys,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[fa(u[0]),fa(u[1])],u[2]&&u.__original.push(fa(u[2])));var v=u.__original;if(u[2]!=null){if(Ce(n[0],v[0]),Ce(n[1],v[2]),Ce(n[2],v[1]),f&&f!=="none"){var c=Ts(s.node1),p=qS(n,v[0],c*e);a(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(h&&h!=="none"){var c=Ts(s.node2),p=qS(n,v[1],c*e);a(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}Ce(u[0],n[0]),Ce(u[1],n[2]),Ce(u[2],n[1])}else{if(Ce(i[0],v[0]),Ce(i[1],v[1]),Xn(o,i[1],i[0]),wo(o,o),f&&f!=="none"){var c=Ts(s.node1);Cp(i[0],i[0],o,c*e)}if(h&&h!=="none"){var c=Ts(s.node2);Cp(i[1],i[1],o,-c*e)}Ce(u[0],i[0]),Ce(u[1],i[1])}})}function KS(r){return r.type==="view"}var jG=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new El,i=new Vy,o=this.group;this._controller=new Bl(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(KS(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):Tt(u,f,t)}Fc(t.getGraph(),ws(t));var h=t.getData();s.updateData(h);var v=t.getEdgeData();l.updateData(v),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p);var d=t.get("layout");h.graph.eachNode(function(_){var S=_.dataIndex,b=_.getGraphicEl(),x=_.getModel();if(b){b.off("drag").off("dragend");var w=x.get("draggable");w&&b.on("drag",function(C){switch(d){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(S),h.setItemLayout(S,[b.x,b.y]);break;case"circular":h.setItemLayout(S,[b.x,b.y]),_.setLayout({fixed:!0},!0),Ny(t,"symbolSize",_,[C.offsetX,C.offsetY]),i.updateLayout(t);break;case"none":default:h.setItemLayout(S,[b.x,b.y]),Oy(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){c&&c.setUnfixed(S)}),b.setDraggable(w,!!x.get("cursor"));var T=x.get(["emphasis","focus"]);T==="adjacency"&&(nt(b).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var S=_.getGraphicEl(),b=_.getModel().get(["emphasis","focus"]);S&&b==="adjacency"&&(nt(S).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=h.getLayout("cx"),m=h.getLayout("cy");h.graph.eachNode(function(_){MM(_,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,h){var v=l.getBoundingRect();return v.applyTransform(l.transform),v.contain(f,h)&&!Yh(u,n,t)}),!KS(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Ay(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Dy(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Fc(t.getGraph(),ws(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=ws(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Fc(t.getGraph(),ws(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Et);function Wi(r){return"_EC_"+r}var JG=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[Wi(e)]){var n=new Gn(e,t);return n.hostGraph=this,this.nodes.push(n),a[Wi(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Wi(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(wt(e)&&(e=this.nodes[e]),wt(t)&&(t=this.nodes[t]),e instanceof Gn||(e=n[Wi(e)]),t instanceof Gn||(t=n[Wi(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new LM(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof Gn&&(e=e.id),t instanceof Gn&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof Gn||(t=this._nodesMap[Wi(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Qt(Gn,PM("hostGraph","data"));Qt(LM,PM("hostGraph","edgeData"));function EM(r,e,t,a,n){for(var i=new JG(a),o=0;o