=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function OO(e,t,n){if(DD(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function kO(e,t,n){return new(e.type===`polar`?cd:qc)({shape:OO(t,n,e),silent:!0,z2:0})}function AO(e){e.registerChartView(lO),e.registerSeriesModel(QD),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,B(tC,`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,nC(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,YD(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})}var jO=Math.PI*2,MO=Math.PI/180;function NO(e,t){return mm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function PO(e,t){var n=NO(e,t),r=e.get(`center`),i=e.get(`radius`);V(i)||(i=[0,i]);var a=Z(n.width,t.getWidth()),o=Z(n.height,t.getHeight()),s=Math.min(a,o),c=Z(i[0],s/2),l=Z(i[1],s/2),u,d,f=e.coordinateSystem;if(f){var p=f.dataToPoint(r);u=p[0]||0,d=p[1]||0}else V(r)||(r=[r,r]),u=Z(r[0],a)+n.x,d=Z(r[1],o)+n.y;return{cx:u,cy:d,r0:c,r:l}}function FO(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),r=t.mapDimension(`value`),i=NO(e,n),a=PO(e,n),o=a.cx,s=a.cy,c=a.r,l=a.r0,u=-e.get(`startAngle`)*MO,d=e.get(`endAngle`),f=e.get(`padAngle`)*MO;d=d===`auto`?u-jO:-d*MO;var p=e.get(`minAngle`)*MO+f,m=0;t.each(r,function(e){!isNaN(e)&&m++});var h=t.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=t.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;sc(S,!_),u=S[0],d=S[1];var w=IO(e);w.startAngle=u,w.endAngle=d,w.clockwise=_;var T=Math.abs(d-u),E=T,D=0,O=u;if(t.setLayout({viewRect:i,r:c}),t.each(r,function(e,n){var r;if(isNaN(e)){t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:o,cy:s,r0:l,r:v?NaN:c});return}r=v===`area`?T/m:h===0&&y?g:e*g,rr?(a=O+x*r/2,u=a):(a=O+C,u=i-C),t.setItemLayout(n,{angle:r,startAngle:a,endAngle:u,clockwise:_,cx:o,cy:s,r0:l,r:v?Aa(e,b,[l,c]):c}),O=i}),En?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)e.unconstrainedWidth?null:p:null;r.setStyle(`width`,m)}var h=r.getBoundingRect();a.width=h.width;var g=(r.style.margin||0)+2.1;a.height=h.height+g,a.y-=(a.height-d)/2}}}function HO(e){return e.position===`center`}function UO(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*RO,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,f=s.getTextContent(),h=s.getTextGuideLine(),g=t.getItemModel(e),_=g.getModel(`label`),v=_.get(`position`)||g.get([`emphasis`,`label`,`position`]),y=_.get(`distanceToLabelLine`),b=_.get(`alignTo`),x=Z(_.get(`edgeDistance`),l),S=_.get(`bleedMargin`),C=g.getModel(`labelLine`),w=C.get(`length`);w=Z(w,l);var T=C.get(`length2`);if(T=Z(T,l),Math.abs(d.endAngle-d.startAngle)0?`right`:`left`:D>0?`left`:`right`}var re=Math.PI,R=0,ie=_.get(`rotate`);if(oe(ie))R=re/180*ie;else if(v===`center`)R=0;else if(ie===`radial`||ie===!0)R=D<0?-E+re:-E;else if(ie===`tangential`&&v!==`outside`&&v!==`outer`){var z=Math.atan2(D,O);z<0&&(z=re*2+z),O>0&&(z=re+z),R=z-re}if(a=!!R,f.x=k,f.y=A,f.rotation=R,f.setStyle({verticalAlign:`middle`}),N){f.setStyle({align:M});var B=f.states.select;B&&(B.x+=f.x,B.y+=f.y)}else{var V=f.getBoundingRect().clone();V.applyTransform(f.getComputedTransform());var H=(f.style.margin||0)+2.1;V.y-=H/2,V.height+=H,n.push({label:f,labelLine:h,position:v,len:w,len2:T,minTurnAngle:C.get(`minTurnAngle`),maxSurfaceAngle:C.get(`maxSurfaceAngle`),surfaceNormal:new J(D,O),linePoints:j,textAlign:M,labelDistance:y,labelAlignTo:b,edgeDistance:x,bleedMargin:S,rect:V,unconstrainedWidth:V.width,labelStyleWidth:f.style.width})}s.setTextConfig({inside:N})}}),!a&&e.get(`avoidLabelOverlap`)&&BO(n,r,i,c,l,f,u,d);for(var h=0;h0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l=n.r0}},t.type=`pie`,t}(q_);function KO(e,t,n){t=V(t)&&{coordDimensions:t}||j({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=uS(r,t).dimensions,a=new lS(i,e);return a.initData(r,n),a}var qO=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),JO=To(),YO=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new qO(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return KO(this,{coordDimensions:[`value`],encodeDefaulter:B(zm,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=JO(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Ia(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){ro(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`75%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(P_);function XO(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(oe(r)&&!isNaN(r)&&r<0)})}}}function ZO(e){e.registerChartView(GO),e.registerSeriesModel(YO),Kv(`pie`,e.registerAction),e.registerLayout(B(FO,`pie`)),e.registerProcessor(LO(`pie`)),e.registerProcessor(XO(`pie`))}var QO=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return wS(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:`#212121`}},universalTransition:{divideShape:`clone`}},t}(P_),$O=4,ek=function(){function e(){}return e}(),tk=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new ek},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<$O,c=this.softClipShape,l;if(s){this._ctx=o;return}for(this._ctx=null,l=this._off;l=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),rk=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var i=KD(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get(`clip`,!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new nk:new uD,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(q_),ik=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`10%`,top:60,right:`10%`,bottom:70,containLabel:!1,backgroundColor:`rgba(0,0,0,0)`,borderWidth:1,borderColor:`#ccc`},t}(Sm),ak=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,ko).models[0]},t.type=`cartesian2dAxis`,t}(Sm);P(ak,GC);var ok={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)`]}}},sk=k({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`},axisLabel:{interval:`auto`}},ok),ck=k({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}}},ok),lk={category:sk,value:ck,time:k({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},ck),log:M({logBase:10},ck)},uk={value:1,category:1,time:1,log:1};function dk(e,t,n,i){F(uk,function(a,o){var s=k(k({},lk[o],!0),i,!0),c=function(e){r(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+o,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=_m(this),r=n?ym(e):{};k(e,t.getTheme().get(o+`Axis`)),k(e,this.getDefaultOption()),e.type=fk(e),n&&vm(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=kS.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+`Axis.`+o,n.defaultOption=s,n}(n);e.registerComponentModel(c)}),e.registerSubTypeDefaulter(t+`Axis`,fk)}function fk(e){return e.type||(e.data?`category`:`value`)}var pk=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return I(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),L(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),mk=[`x`,`y`];function hk(e){return e.type===`interval`||e.type===`time`}var gk=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`cartesian2d`,t.dimensions=mk,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!hk(e)||!hk(t))){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=It([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Y(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Je(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return Je(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Y(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(pk),_k=function(e){r(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Tw);function vk(e,t,n){n||={};var r=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,c=o?`onZero`:s,l=i.dim,u=r.getRect(),d=[u.x,u.x+u.width,u.y,u.y+u.height],f={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get(`offset`)||0,m=l===`x`?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(o){var h=o.toGlobalCoord(o.dataToCoord(0));m[f.onZero]=Math.max(Math.min(h,m[1]),m[0])}a.position=[l===`y`?m[f[c]]:d[0],l===`x`?m[f[c]]:d[3]],a.rotation=Math.PI/2*(l===`x`?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=o?m[f[s]]-m[f.onZero]:0,t.get([`axisTick`,`inside`])&&(a.tickDirection=-a.tickDirection),me(n.labelInside,t.get([`axisLabel`,`inside`]))&&(a.labelDirection=-a.labelDirection);var g=t.get([`axisLabel`,`rotate`]);return a.labelRotate=c===`top`?-g:g,a.z2=1,a}function yk(e){return e.get(`coordinateSystem`)===`cartesian2d`}function bk(e){var t={xAxisModel:null,yAxisModel:null};return F(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,ko).models[0]}),t}var xk=Math.log;function Sk(e,t,n){var r=HS.prototype,i=r.getTicks.call(n),a=r.getTicks.call(n,!0),o=i.length-1,s=r.getInterval.call(n),c=MC(e,t),l=c.extent,u=c.fixMin,d=c.fixMax;if(e.type===`log`){var f=xk(e.base);l=[xk(l[0])/f,xk(l[1])/f]}e.setExtent(l[0],l[1]),e.calcNiceExtent({splitNumber:o,fixMin:u,fixMax:d});var p=r.getExtent.call(e);u&&(l[0]=p[0]),d&&(l[1]=p[1]);var m=r.getInterval.call(e),h=l[0],g=l[1];if(u&&d)m=(g-h)/o;else if(u)for(g=l[0]+m*o;gl[0]&&isFinite(h)&&isFinite(l[0]);)m=NS(m),h=l[1]-m*o;else{e.getTicks().length-1>o&&(m=NS(m));var _=m*o;g=Math.ceil(l[1]/m)*m,h=ja(g-_),h<0&&l[0]>=0?(h=0,g=ja(_)):g>0&&l[1]<=0&&(g=0,h=-ja(_))}var v=(i[0].value-a[0].value)/s,y=(i[o].value-a[o].value)/s;r.setExtent.call(e,h+m*v,g+m*y),r.setInterval.call(e,m),(v||y)&&r.setNiceExtent.call(e,h+m,g-m)}var Ck=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=mk,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function r(e){var t,n=R(e),r=n.length;if(r){for(var i=[],a=r-1;a>=0;a--){var o=e[+n[a]],s=o.model,c=o.scale;jS(c)&&s.get(`alignTicks`)&&s.get(`interval`)==null?i.push(o):(PC(c,s),jS(c)&&(t=o))}i.length&&(t||(t=i.pop(),PC(t.scale,t.model)),F(i,function(e){Sk(e.scale,e.model,t.scale)}))}}r(n.x),r(n.y);var i={};F(n.x,function(e){Tk(n,`y`,e,i)}),F(n.y,function(e){Tk(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get(`containLabel`),a=mm(r,{width:t.getWidth(),height:t.getHeight()});this._rect=a;var o=this._axesList;s(),i&&(F(o,function(e){if(!e.model.get([`axisLabel`,`inside`])){var t=zC(e);if(t){var n=e.isHorizontal()?`height`:`width`,r=e.model.get([`axisLabel`,`margin`]);a[n]-=t[n]+r,e.position===`top`?a.y+=t.height+r:e.position===`left`&&(a.x+=t.width+r)}}}),s()),F(this._coordsList,function(e){e.calcAffineTransform()});function s(){F(o,function(e){var t=e.isHorizontal(),n=t?[0,a.width]:[0,a.height],r=+!!e.inverse;e.setExtent(n[r],n[1-r]),Dk(e,t?a.x:a.y)})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}W(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r0?`top`:`bottom`,i=`center`):za(r-Ok)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),Ak={axisLine:function(e,t,n,r){var i=t.get([`axisLine`,`show`]);if(i===`auto`&&e.handleAutoShown&&(i=e.handleAutoShown(`axisLine`)),i){var a=t.axis.getExtent(),o=r.transform,s=[a[0],0],c=[a[1],0],l=s[0]>c[0];o&&(Je(s,s,o),Je(c,c,o));var u=j({lineCap:`round`},t.getModel([`axisLine`,`lineStyle`]).getLineStyle()),d=new yd({shape:{x1:s[0],y1:s[1],x2:c[0],y2:c[1]},style:u,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});lf(d.shape,d.style.lineWidth),d.anid=`line`,n.add(d);var f=t.get([`axisLine`,`symbol`]);if(f!=null){var p=t.get([`axisLine`,`symbolSize`]);U(f)&&(f=[f,f]),(U(p)||oe(p))&&(p=[p,p]);var m=sy(t.get([`axisLine`,`symbolOffset`])||0,p),h=p[0],g=p[1];F([{rotate:e.rotation+Math.PI/2,offset:m[0],r:0},{rotate:e.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((s[0]-c[0])*(s[0]-c[0])+(s[1]-c[1])*(s[1]-c[1]))}],function(t,r){if(f[r]!==`none`&&f[r]!=null){var i=ay(f[r],-h/2,-g/2,h,g,u.stroke,!0),a=t.r+t.offset,o=l?c:s;i.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}})}}},axisTickLabel:function(e,t,n,r){var i=Lk(n,r,t,e),a=zk(n,r,t,e);Mk(t,a,i),Rk(n,r,t,e.tickDirection),t.get([`axisLabel`,`hideOverlap`])&&nT(Qw(I(a,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,r){var i=me(e.axisName,t.get(`name`));if(i){var a=t.get(`nameLocation`),o=e.nameDirection,s=t.getModel(`nameTextStyle`),c=t.get(`nameGap`)||0,l=t.axis.getExtent(),u=l[0]>l[1]?-1:1,d=[a===`start`?l[0]-u*c:a===`end`?l[1]+u*c:(l[0]+l[1])/2,Fk(a)?e.labelOffset+o*c:0],f,p=t.get(`nameRotate`);p!=null&&(p=p*Ok/180);var m;Fk(a)?f=kk.innerTextLayout(e.rotation,p??e.rotation,o):(f=jk(e.rotation,a,p||0,l),m=e.axisNameAvailableWidth,m!=null&&(m=Math.abs(m/Math.sin(f.rotation)),!isFinite(m)&&(m=null)));var h=s.getFont(),g=t.get(`nameTruncate`,!0)||{},_=g.ellipsis,v=me(e.nameTruncateMaxWidth,g.maxWidth,m),y=new Zc({x:d[0],y:d[1],rotation:f.rotation,silent:kk.isLabelSilent(t),style:Nf(s,{text:i,font:h,overflow:`truncate`,width:v,ellipsis:_,fill:s.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),align:s.get(`align`)||f.textAlign,verticalAlign:s.get(`verticalAlign`)||f.textVerticalAlign}),z2:1});if(Tf({el:y,componentModel:t,itemName:i}),y.__fullText=i,y.anid=`name`,t.get(`triggerEvent`)){var b=kk.makeAxisEventDataBase(t);b.targetType=`axisName`,b.name=i,Q(y).eventData=b}r.add(y),y.updateTransform(),n.add(y),y.decomposeTransform()}}};function jk(e,t,n,r){var i=Ra(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return za(i-Ok/2)?(o=c?`bottom`:`top`,a=`center`):za(i-Ok*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iOk/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function Mk(e,t,n){if(!HC(e.axis)){var r=e.get([`axisLabel`,`showMinLabel`]),i=e.get([`axisLabel`,`showMaxLabel`]);t||=[],n||=[];var a=t[0],o=t[1],s=t[t.length-1],c=t[t.length-2],l=n[0],u=n[1],d=n[n.length-1],f=n[n.length-2];r===!1?(Nk(a),Nk(l)):Pk(a,o)&&(r?(Nk(o),Nk(u)):(Nk(a),Nk(l))),i===!1?(Nk(s),Nk(d)):Pk(c,s)&&(i?(Nk(c),Nk(f)):(Nk(s),Nk(d)))}}function Nk(e){e&&(e.ignore=!0)}function Pk(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(!(!n||!r)){var i=At([]);return Pt(i,i,-e.rotation),n.applyTransform(Mt([],i,e.getLocalTransform())),r.applyTransform(Mt([],i,t.getLocalTransform())),n.intersect(r)}}function Fk(e){return e===`middle`||e===`center`}function Ik(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c=0||e===t}function Kk(e){var t=qk(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=Yk(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent().slice();c[0]>c[1]&&c.reverse(),(o==null||o>c[1])&&(o=c[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var f=o;d.color!=null&&(f=M({color:d.color},o));var p=k(O(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:r,axisTick:i,axisLabel:a,name:d.text,showName:s,nameLocation:`end`,nameGap:l,nameTextStyle:f,triggerEvent:u},!1);if(U(c)){var m=p.name;p.name=c.replace(`{value}`,m??``)}else H(c)&&(p.name=c(p.name,p));var h=new tp(p,null,this.ecModel);return P(h,GC.prototype),h.mainType=`radar`,h.componentIndex=this.componentIndex,h},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type=`radar`,t.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:k({lineStyle:{color:`#bbb`}},vA.axisLine),axisLabel:yA(vA.axisLabel,!1),axisTick:yA(vA.axisTick,!1),splitLine:yA(vA.splitLine,!0),splitArea:yA(vA.splitArea,!0),indicator:[]},t}(Sm),xA=[`axisLine`,`axisTickLabel`,`axisName`],SA=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem;F(I(t.getIndicatorAxes(),function(e){var n=e.model.get(`showName`)?e.name:``;return new kk(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){F(xA,e.add,e),this.group.add(e.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(!n.length)return;var r=e.get(`shape`),i=e.getModel(`splitLine`),a=e.getModel(`splitArea`),o=i.getModel(`lineStyle`),s=a.getModel(`areaStyle`),c=i.get(`show`),l=a.get(`show`),u=o.get(`color`),d=s.get(`color`),f=V(u)?u:[u],p=V(d)?d:[d],m=[],h=[];function g(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}if(r===`circle`)for(var _=n[0].getTicksCoords(),v=t.cx,y=t.cy,b=0;b<_.length;b++){if(c){var x=g(m,f,b);m[x].push(new Uu({shape:{cx:v,cy:y,r:_[b].coord}}))}if(l&&b<_.length-1){var x=g(h,p,b);h[x].push(new ud({shape:{cx:v,cy:y,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var S,C=I(n,function(e,n){var r=e.getTicksCoords();return S=S==null?r.length-1:Math.min(r.length-1,S),I(r,function(e){return t.coordToPoint(e.coord,n)})}),w=[],b=0;b<=S;b++){for(var T=[],E=0;E3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;NA(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);NA(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!AA(this._zr,`globalPan`)){var t=e.pinchScale>1?1.1:1/1.1;NA(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}($e);function NA(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(Ct(r.event),PA(e,t,n,r,i))}function PA(e,t,n,r,i){i.isAvailableBehavior=z(FA,null,n,r),e.trigger(t,i)}function FA(e,t,n){var r=n[e];return!e||r&&(!U(r)||t.event[r+`Key`])}function IA(e,t,n){var r=e.target;r.x+=t,r.y+=n,r.dirty()}function LA(e,t,n,r){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;if(o*=t,a){var s=a.min||0,c=a.max||1/0;o=Math.max(Math.min(c,o),s)}var l=o/e.zoom;e.zoom=o,i.x-=(n-i.x)*(l-1),i.y-=(r-i.y)*(l-1),i.scaleX*=l,i.scaleY*=l,i.dirty()}var RA={axisPointer:1,tooltip:1,brush:1};function zA(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!RA.hasOwnProperty(r.mainType)&&i&&i.model!==n}function BA(e){U(e)&&(e=new DOMParser().parseFromString(e,`text/xml`));var t=e;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!==`svg`||t.nodeType!==1;)t=t.nextSibling;return t}var VA,HA={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`},UA=R(HA),WA={"alignment-baseline":`textBaseline`,"stop-color":`stopColor`},GA=R(WA),KA=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t||={};var n=BA(e);this._defsUsePending=[];var r=new X;this._root=r;var i=[],a=n.getAttribute(`viewBox`)||``,o=parseFloat(n.getAttribute(`width`)||t.width),s=parseFloat(n.getAttribute(`height`)||t.height);isNaN(o)&&(o=null),isNaN(s)&&(s=null),QA(n,r,null,!0,!1);for(var c=n.firstChild;c;)this._parseNode(c,r,i,null,!1,!1),c=c.nextSibling;nj(this._defs,this._defsUsePending),this._defsUsePending=[];var l,u;if(a){var d=ij(a);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&o!=null&&s!=null&&(u=dj(l,{x:0,y:0,width:o,height:s}),!t.ignoreViewBox)){var f=r;r=new X,r.add(f),f.scaleX=f.scaleY=u.scale,f.x=u.x,f.y=u.y}return!t.ignoreRootClip&&o!=null&&s!=null&&r.setClipPath(new qc({shape:{x:0,y:0,width:o,height:s}})),{root:r,width:o,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,r,i,a){var o=e.nodeName.toLowerCase(),s,c=r;if(o===`defs`&&(i=!0),o===`text`&&(a=!0),o===`defs`||o===`switch`)s=t;else{if(!i){var l=VA[o];if(l&&q(VA,o)){s=l.call(this,e,t);var u=e.getAttribute(`name`);if(u){var d={name:u,namedFrom:null,svgNodeTagLower:o,el:s};n.push(d),o===`g`&&(c=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:o,el:s});t.add(s)}}var f=qA[o];if(f&&q(qA,o)){var p=f.call(this,e),m=e.getAttribute(`id`);m&&(this._defs[m]=p)}}if(s&&s.isGroup)for(var h=e.firstChild;h;)h.nodeType===1?this._parseNode(h,s,n,c,i,a):h.nodeType===3&&a&&this._parseText(h,s),h=h.nextSibling},e.prototype._parseText=function(e,t){var n=new Fc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});XA(t,n),QA(e,n,this._defsUsePending,!1,!1),$A(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9),r.font=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+`px`,r.fontFamily||`sans-serif`].join(` `);var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=(function(){VA={g:function(e,t){var n=new X;return XA(t,n),QA(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new qc;return XA(t,n),QA(e,n,this._defsUsePending,!1,!1),n.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`)}),n.silent=!0,n},circle:function(e,t){var n=new Uu;return XA(t,n),QA(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),r:parseFloat(e.getAttribute(`r`)||`0`)}),n.silent=!0,n},line:function(e,t){var n=new yd;return XA(t,n),QA(e,n,this._defsUsePending,!1,!1),n.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`)}),n.silent=!0,n},ellipse:function(e,t){var n=new Gu;return XA(t,n),QA(e,n,this._defsUsePending,!1,!1),n.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`)}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=ZA(n));var i=new md({shape:{points:r||[]},silent:!0});return XA(t,i),QA(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=ZA(n));var i=new gd({shape:{points:r||[]},silent:!0});return XA(t,i),QA(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new zc;return XA(t,n),QA(e,n,this._defsUsePending,!1,!1),n.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`)}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute(`x`)||`0`,r=e.getAttribute(`y`)||`0`,i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`;this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(a);var o=new X;return XA(t,o),QA(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var n=e.getAttribute(`x`),r=e.getAttribute(`y`);n!=null&&(this._textX=parseFloat(n)),r!=null&&(this._textY=parseFloat(r));var i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`,o=new X;return XA(t,o),QA(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(a),o},path:function(e,t){var n=Ru(e.getAttribute(`d`)||``);return XA(t,n),QA(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),e}(),qA={lineargradient:function(e){var t=new Od(parseInt(e.getAttribute(`x1`)||`0`,10),parseInt(e.getAttribute(`y1`)||`0`,10),parseInt(e.getAttribute(`x2`)||`10`,10),parseInt(e.getAttribute(`y2`)||`0`,10));return JA(e,t),YA(e,t),t},radialgradient:function(e){var t=new kd(parseInt(e.getAttribute(`cx`)||`0`,10),parseInt(e.getAttribute(`cy`)||`0`,10),parseInt(e.getAttribute(`r`)||`0`,10));return JA(e,t),YA(e,t),t}};function JA(e,t){e.getAttribute(`gradientUnits`)===`userSpaceOnUse`&&(t.global=!0)}function YA(e,t){for(var n=e.firstChild;n;){if(n.nodeType===1&&n.nodeName.toLocaleLowerCase()===`stop`){var r=n.getAttribute(`offset`),i=void 0;i=r&&r.indexOf(`%`)>0?parseInt(r,10)/100:r?parseFloat(r):0;var a={};lj(n,a,a);var o=a.stopColor||n.getAttribute(`stop-color`)||`#000000`;t.colorStops.push({offset:i,color:o})}n=n.nextSibling}}function XA(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||={},M(t.__inheritedStyle,e.__inheritedStyle))}function ZA(e){for(var t=ij(e),n=[],r=0;r0;a-=2){var o=r[a],s=r[a-1],c=ij(o);switch(i||=kt(),s){case`translate`:Nt(i,i,[parseFloat(c[0]),parseFloat(c[1]||`0`)]);break;case`scale`:Ft(i,i,[parseFloat(c[0]),parseFloat(c[1]||c[0])]);break;case`rotate`:Pt(i,i,-parseFloat(c[0])*oj,[parseFloat(c[1]||`0`),parseFloat(c[2]||`0`)]);break;case`skewX`:var l=Math.tan(parseFloat(c[0])*oj);Mt(i,[1,0,l,1,0,0],i);break;case`skewY`:var u=Math.tan(parseFloat(c[0])*oj);Mt(i,[1,u,0,1,0,0],i);break;case`matrix`:i[0]=parseFloat(c[0]),i[1]=parseFloat(c[1]),i[2]=parseFloat(c[2]),i[3]=parseFloat(c[3]),i[4]=parseFloat(c[4]),i[5]=parseFloat(c[5])}}t.setLocalTransform(i)}}var cj=/([^\s:;]+)\s*:\s*([^:;]+)/g;function lj(e,t,n){var r=e.getAttribute(`style`);if(r){cj.lastIndex=0;for(var i;(i=cj.exec(r))!=null;){var a=i[1],o=q(HA,a)?HA[a]:null;o&&(t[o]=i[2]);var s=q(WA,a)?WA[a]:null;s&&(n[s]=i[2])}}}function uj(e,t,n){for(var r=0;r0,m={api:n,geo:s,mapOrGeoModel:e,data:o,isVisualEncodedByVisualMap:p,isGeo:a,transformInfoRaw:d};s.resourceType===`geoJSON`?this._buildGeoJSON(m):s.resourceType===`geoSVG`&&this._buildSVG(m),this._updateController(e,t,n),this._updateMapSelectHandler(e,c,n,r)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=K(),n=K(),r=this._regionsGroup,i=e.transformInfoRaw,a=e.mapOrGeoModel,o=e.data,s=e.geo.projection,c=s&&s.stream;function l(e,t){return t&&(e=t(e)),e&&[e[0]*i.scaleX+i.x,e[1]*i.scaleY+i.y]}function u(e){for(var t=[],n=!c&&s&&s.project,r=0;r=0)&&(f=i);var p=o?{normal:{align:`center`,verticalAlign:`middle`}}:null;jf(t,Mf(r),{labelFetcher:f,labelDataIndex:d,defaultText:n},p);var m=t.getTextContent();if(m&&(Lj(m).ignore=m.ignore,t.textConfig&&o)){var h=t.getBoundingRect().clone();t.textConfig.layoutRect=h,t.textConfig.position=[(o[0]-h.x)/h.width*100+`%`,(o[1]-h.y)/h.height*100+`%`]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Uj(e,t,n,r,i,a){e.data?e.data.setItemGraphicEl(a,t):Q(t).eventData={componentType:`geo`,componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:n,region:r&&r.option||{}}}function Wj(e,t,n,r,i){e.data||Tf({el:t,componentModel:i,itemName:n,itemTooltipOption:r.get(`tooltip`)})}function Gj(e,t,n,r,i){t.highDownSilentOnTouch=!!i.get(`selectedMode`);var a=r.getModel(`emphasis`),o=a.get(`focus`);return su(t,o,a.get(`blurScope`),a.get(`disabled`)),e.isGeo&&mu(t,i,n),o}function Kj(e,t,n){var r=[],i;function a(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),F(e,function(e){s.lineStart();for(var t=0;t-1&&(n.style.stroke=n.style.fill,n.style.fill=`#fff`,n.style.lineWidth=2),n},t.type=`series.map`,t.dependencies=[`geo`],t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystem:`geo`,map:``,left:`center`,top:`center`,aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:`#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`},t}(P_);function Yj(e,t){var n={};return F(e,function(e){e.each(e.mapDimension(`value`),function(t,r){var i=`ec-`+e.getName(r);n[i]=n[i]||[],isNaN(t)||n[i].push(t)})}),e[0].map(e[0].mapDimension(`value`),function(r,i){for(var a=`ec-`+e[0].getName(i),o=0,s=1/0,c=-1/0,l=n[a].length,u=0;u1?(b.width=y,b.height=y/g):(b.height=y,b.width=y*g),b.y=v[1]-b.height/2,b.x=v[0]-b.width/2;else{var x=e.getBoxLayoutParams();x.aspect=g,b=mm(x,{width:m,height:h})}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(e.get(`center`),t),this.setZoom(e.get(`zoom`))}function oM(e,t){F(t.get(`geoCoord`),function(t,n){e.addGeoCoord(n,t)})}var sM=new(function(){function e(){this.dimensions=nM}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get(`nameProperty`),aspectScale:e.get(`aspectScale`),projection:e.get(`projection`)}}e.eachComponent(`geo`,function(e,i){var a=e.get(`map`),o=new rM(a+i,a,j({nameMap:e.get(`nameMap`)},r(e)));o.zoomLimit=e.get(`scaleLimit`),n.push(o),e.coordinateSystem=o,o.model=e,o.resize=aM,o.resize(e,t)}),e.eachSeries(function(e){e.get(`coordinateSystem`)===`geo`&&(e.coordinateSystem=n[e.get(`geoIndex`)||0])});var i={};return e.eachSeriesByType(`map`,function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}}),F(i,function(e,i){var a=new rM(i,i,j({nameMap:A(I(e,function(e){return e.get(`nameMap`)}))},r(e[0])));a.zoomLimit=me.apply(null,I(e,function(e){return e.get(`scaleLimit`)})),n.push(a),a.resize=aM,a.resize(e[0],t),F(e,function(e){e.coordinateSystem=a,oM(a,e)})}),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),a=K(),o=0;o=0;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}function gM(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){xM(e);var a=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=SM(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function _M(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function vM(e){return arguments.length?e:DM}function yM(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function bM(e,t){return mm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function xM(e){for(var t=e.children,n=t.length,r=0,i=0;--n>=0;){var a=t[n];a.hierNode.prelim+=r,a.hierNode.modifier+=r,i+=a.hierNode.change,r+=a.hierNode.shift+i}}function SM(e,t,n,r){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,c=i.hierNode.modifier,l=a.hierNode.modifier,u=o.hierNode.modifier,d=s.hierNode.modifier;s=CM(s),a=wM(a),s&&a;){i=CM(i),o=wM(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+d-a.hierNode.prelim-l+r(s,a);f>0&&(EM(TM(s,e,n),e,f),l+=f,c+=f),d+=s.hierNode.modifier,l+=a.hierNode.modifier,c+=i.hierNode.modifier,u+=o.hierNode.modifier}s&&!CM(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-c),a&&!wM(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=l-u,n=e)}return n}function CM(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function wM(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function TM(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function EM(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function DM(e,t){return e.parentNode===t.parentNode?1:2}var OM=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),kM=function(e){r(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new OM},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,a=n[0],o=n[r-1];if(r===1){e.moveTo(i[0],i[1]),e.lineTo(a[0],a[1]);return}var s=t.orient,c=s===`TB`||s===`BT`?0:1,l=1-c,u=Z(t.forkPosition,1),d=[];d[c]=i[c],d[l]=i[l]+(o[l]-i[l])*u,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[c]=a[c],e.lineTo(d[0],d[1]),d[c]=o[c],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(var f=1;fv.x,x||(b-=Math.PI));var C=x?`left`:`right`,w=s.getModel(`label`),T=w.get(`rotate`),E=Math.PI/180*T,D=g.getTextContent();D&&(g.setTextConfig({position:w.get(`position`)||C,rotation:T==null?-b:E,origin:`center`}),D.setStyle(`verticalAlign`,`middle`))}var O=s.get([`emphasis`,`focus`]),k=O===`relative`?De(o.getAncestorsIndices(),o.getDescendantIndices()):O===`ancestor`?o.getAncestorsIndices():O===`descendant`?o.getDescendantIndices():null;k&&(Q(n).focus=k),NM(i,o,u,n,m,p,h,r),n.__edge&&(n.onHoverStateChange=function(t){if(t!==`blur`){var r=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);r&&r.hoverState===1||Nl(n.__edge,t)}})}function NM(e,t,n,r,i,a,o,s){var c=t.getModel(),l=e.get(`edgeShape`),u=e.get(`layout`),d=e.getOrient(),f=e.get([`lineStyle`,`curveness`]),p=e.get(`edgeForkPosition`),m=c.getModel(`lineStyle`).getLineStyle(),h=r.__edge;if(l===`curve`)t.parentNode&&t.parentNode!==n&&(h||=r.__edge=new Cd({shape:LM(u,d,f,i,i)}),Bd(h,{shape:LM(u,d,f,a,o)},e));else if(l===`polyline`&&u===`orthogonal`&&t!==n&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,_=[],v=0;vt&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=n.getData().tree.root,i=e.targetNode;if(U(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function QM(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function $M(e,t){return N(QM(e),t)>=0}function eN(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var tN=function(e){r(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=new tp(e.leaves||{},this,this.ecModel),r=YM.createTree(t,this,i);function i(e){e.wrapMethod(`getItemModel`,function(e,t){var i=r.getNodeByDataIndex(t);return i&&i.children.length&&i.isExpand||(e.parentModel=n),e})}var a=0;r.eachNode(`preorder`,function(e){e.depth>a&&(a=e.depth)});var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode(`preorder`,function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&t.collapsed!=null?!t.collapsed:e.depth<=o}),r.data},t.prototype.getOrient=function(){var e=this.get(`orient`);return e===`horizontal`?e=`LR`:e===`vertical`&&(e=`TB`),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,i=r.root.children[0],a=r.getNodeByDataIndex(e),o=a.getValue(),s=a.name;a&&a!==i;)s=a.parentNode.name+`.`+s,a=a.parentNode;return p_(`nameValue`,{name:s,value:o,noValue:isNaN(o)||o==null})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=eN(r,this),n.collapsed=!r.isExpand,n},t.type=`series.tree`,t.layoutMode=`box`,t.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},t}(P_);function nN(e,t,n){for(var r=[e],i=[],a;a=r.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)n.push(i[a])}}function iN(e,t){e.eachSeriesByType(`tree`,function(e){aN(e,t)})}function aN(e,t){var n=bM(e,t);e.layoutInfo=n;var r=e.get(`layout`),i=0,a=0,o=null;r===`radial`?(i=2*Math.PI,a=Math.min(n.height,n.width)/2,o=vM(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(i=n.width,a=n.height,o=vM());var s=e.getData().tree.root,c=s.children[0];if(c){hM(s),nN(c,gM,o),s.hierNode.modifier=-c.hierNode.prelim,rN(c,_M);var l=c,u=c,d=c;rN(c,function(e){var t=e.getLayout().x;tu.getLayout().x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:o(l,u)/2,p=f-l.getLayout().x,m=0,h=0,g=0,_=0;if(r===`radial`)m=i/(u.getLayout().x+f+p),h=a/(d.depth-1||1),rN(c,function(e){g=(e.getLayout().x+p)*m,_=(e.depth-1)*h;var t=yM(g,_);e.setLayout({x:t.x,y:t.y,rawX:g,rawY:_},!0)});else{var v=e.getOrient();v===`RL`||v===`LR`?(h=a/(u.getLayout().x+f+p),m=i/(d.depth-1||1),rN(c,function(e){_=(e.getLayout().x+p)*h,g=v===`LR`?(e.depth-1)*m:i-(e.depth-1)*m,e.setLayout({x:g,y:_},!0)})):(v===`TB`||v===`BT`)&&(m=i/(u.getLayout().x+f+p),h=a/(d.depth-1||1),rN(c,function(e){g=(e.getLayout().x+p)*m,_=v===`TB`?(e.depth-1)*h:a-(e.depth-1)*h,e.setLayout({x:g,y:_},!0)}))}}}function oN(e){e.eachSeriesByType(`tree`,function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel(`itemStyle`).getItemStyle();j(t.ensureUniqueItemVisual(e.dataIndex,`style`),n)})})}function sN(e){e.registerAction({type:`treeExpandAndCollapse`,event:`treeExpandAndCollapse`,update:`update`},function(e,t){t.eachComponent({mainType:`series`,subType:`tree`,query:e},function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),e.registerAction({type:`treeRoam`,event:`treeRoam`,update:`none`},function(e,t,n){t.eachComponent({mainType:`series`,subType:`tree`,query:e},function(t){var r=t.coordinateSystem,i=uM(r,e,void 0,n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)})})}function cN(e){e.registerChartView(AM),e.registerSeriesModel(tN),e.registerLayout(iN),e.registerVisual(oN),sN(e)}var lN=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function uN(e){for(var t=0;t1;)r=r.parentNode;var i=Xm(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var fN=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};pN(n);var r=e.levels||[],i=new tp({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=mN(r,t);var a=I(r||[],function(e){return new tp(e,i,t)},this),o=YM.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return p_(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=eN(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},j(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=K(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){dN(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,left:`center`,top:`middle`,width:`80%`,height:`80%`,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,top:`bottom`,emptyItemWidth:25,itemStyle:{color:`rgba(0,0,0,0.7)`,textStyle:{color:`#fff`}},emphasis:{itemStyle:{color:`rgba(0,0,0,0.9)`}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:`#fff`,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:`#fff`,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(P_);function pN(e){var t=0;F(e.children,function(e){pN(e);var n=e.value;V(n)&&(n=n[0]),t+=n});var n=e.value;V(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),V(e.value)?e.value[0]=n:e.value=n}function mN(e,t){var n=no(t.get(`color`)),r=no(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;F(e,function(e){var t=new tp(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var hN=8,gN=8,_N=5,vN=function(){function e(e){this.group=new X,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u={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(n,u,c),this._renderContent(e,u,o,s,c,l,r),hm(a,u.pos,u.box)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=_o(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+hN*2,t.emptyItemWidth);t.totalWidth+=o+gN,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o){for(var s=0,c=t.emptyItemWidth,l=e.get([`breadcrumb`,`height`]),u=pm(t.pos,t.box),d=t.totalWidth,f=t.renderList,p=r.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>u.width&&(d-=_-c,_=c,v=null);var y=new md({shape:{points:yN(s,0,_,l,m===f.length-1,m===0)},style:M(n.getItemStyle(),{lineJoin:`bevel`}),textContent:new Zc({style:Nf(i,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:B(o,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Nf(a,{text:v}),y.ensureState(`emphasis`).style=p,su(y,r.get(`focus`),r.get(`blurScope`),r.get(`disabled`)),this.group.add(y),bN(y,e,g),s+=_+gN}},e.prototype.remove=function(){this.group.removeAll()},e}();function yN(e,t,n,r,i,a){var o=[[i?e:e-_N,t],[e+n,t],[e+n,t+r],[i?e:e-_N,t+r]];return!a&&o.splice(2,0,[e+n+_N,t+r/2]),!i&&o.push([e,t+r/2]),o}function bN(e,t,n){Q(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&eN(n,t)}}var xN=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;rTN||Math.abs(e.dy)>TN)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale;if(this._state!==`animating`){var i=this.seriesModel.getData().tree.root;if(!i)return;var a=i.getLayout();if(!a)return;var o=new Y(a.x,a.y,a.width,a.height),s=null,c=this._controllerHost;s=c.zoomLimit;var l=c.zoom=c.zoom||1;if(l*=r,s){var u=s.min||0,d=s.max||1/0;l=Math.max(Math.min(d,l),u)}var f=l/c.zoom;c.zoom=l;var p=this.seriesModel.layoutInfo;t-=p.x,n-=p.y;var m=kt();Nt(m,m,[-t,-n]),Ft(m,m,[f,f]),Nt(m,m,[t,n]),o.applyTransform(m),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&sm(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new vN(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&($M(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=FN(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(q_);function FN(){return{nodeGroup:[],background:[],content:[]}}function IN(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=R(`nodeGroup`,CN);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),NN(D).nodeWidth=p,NN(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=R(`background`,wN,l,kN);O&&F(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),M=k.get(`blurScope`),N=k.get(`disabled`),ee=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)pu(D)&&fu(D,!1),O&&(fu(O,!N),d.setItemGraphicEl(o.dataIndex,O),cu(O,ee,M));else{var P=R(`content`,wN,l,AN);P&&I(D,P),O.disableMorphing=!0,O&&pu(O)&&fu(O,!1),fu(D,!N),d.setItemGraphicEl(o.dataIndex,D);var te=f.getShallow(`cursor`);te&&P.attr(`cursor`,te),cu(D,ee,M)}return D;function F(t,n,r){var i=Q(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)ne(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=MN(S);c.fill=s;var l=jN(C);l.fill=C.get(`borderColor`);var u=jN(w);u.fill=w.get(`borderColor`);var d=jN(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;L(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,zl(n)}t.add(n)}function I(t,n){var r=Q(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)ne(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=MN(S);l.fill=c,l.decal=s.decal;var u=jN(C),d=jN(w),f=jN(T);L(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,zl(n)}t.add(n)}function ne(e){!e.invisible&&a.push(e)}function L(t,n,r,i){var a=f.getModel(i?DN:EN),s=_o(f.get(`name`),null),c=a.getShallow(`show`);jf(t,Mf(f,i?DN:EN),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=_e(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,re(d,i,u);var m=l.getState(`emphasis`);re(m?m.style:null,i,u)}}function re(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function R(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ie(c,s)):g||(s=new r,s instanceof Ts&&(s.z2=LN(a,o)),z(c,s)),t[e][_]=s}function ie(e,t){var n=e[_]={};t instanceof CN?(n.oldX=t.x,n.oldY=t.y):n.oldShape=j({},t.shape)}function z(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof X;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function LN(e,t){return e*ON+t}var RN=F,zN=W,BN=-1,VN=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=O(t);this.type=r,this.mappingMethod=n,this._normalizeData=$N[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(WN(i),HN(i)):n===`category`?i.categories?UN(i):WN(i,!0):(ve(n!==`linear`||i.dataExtent),WN(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return z(this._normalizeData,this)},e.listVisualTypes=function(){return R(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){W(e)?F(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=V(t)?[]:W(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&RN(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(V(e))e=e.slice();else if(zN(e)){var t=[];RN(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function WN(e,t){var n=e.visual,r=[];W(n)?RN(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),QN(e,r)}function GN(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:XN([0,1])}}function KN(e){var t=this.option.visual;return t[Math.round(Aa(e,[0,1],[0,t.length-1],!0))]||{}}function qN(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function JN(e){var t=this.option.visual;return t[this.option.loop&&e!==BN?e%t.length:e]}function YN(){return this.option.visual[0]}function XN(e){return{linear:function(t){return Aa(t,e,this.option.visual,!0)},category:JN,piecewise:function(t,n){var r=ZN.call(this,n);return r??=Aa(t,e,this.option.visual,!0),r},fixed:YN}}function ZN(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[VN.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function QN(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=I(t,function(e){return ur(e)||[0,0,0,1]})),t}var $N={linear:function(e){return Aa(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=VN.findPieceIndex(e,t,!0);if(n!=null)return Aa(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??BN},fixed:Ae};function eP(e,t,n){return e?t<=n:t=n.length||e===n[e.depth])&&iP(e,dP(i,c,e,t,m,r),n,r)})}}}function aP(e,t,n){var r=j({},t),i=n.designatedVisualItemStyle;return F([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function oP(e){var t=cP(e,`color`);if(t){var n=cP(e,`colorAlpha`),r=cP(e,`colorSaturation`);return r&&(t=gr(t,null,null,r)),n&&(t=_r(t,n)),t}}function sP(e,t){return t==null?null:gr(t,null,null,e)}function cP(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function lP(e,t,n,r,i,a){if(!(!a||!a.length)){var o=uP(t,`color`)||i.color!=null&&i.color!==`none`&&(uP(t,`colorAlpha`)||uP(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&sl[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new VN(d);return nP(f).drColorMappingBy=u,f}}}function uP(e,t){var n=e.get(t);return V(n)&&n.length?{name:t,range:n}:null}function dP(e,t,n,r,i,a){var o=j({},t);if(i){var s=i.type,c=s===`color`&&nP(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}var fP=Math.max,pP=Math.min,mP=me,hP=F,gP=[`itemStyle`,`borderWidth`],_P=[`itemStyle`,`gapWidth`],vP=[`upperLabel`,`show`],yP=[`upperLabel`,`height`],bP={seriesType:`treemap`,reset:function(e,t,n,r){var i=n.getWidth(),a=n.getHeight(),o=e.option,s=mm(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),c=o.size||[],l=Z(mP(s.width,c[0]),i),u=Z(mP(s.height,c[1]),a),d=r&&r.type,f=ZM(r,[`treemapZoomToNode`,`treemapRootToNode`],e),p=d===`treemapRender`||d===`treemapMove`?r.rootRect:null,m=e.getViewRoot(),h=QM(m);if(d!==`treemapMove`){var g=d===`treemapZoomToNode`?OP(e,f,m,l,u):p?[p.width,p.height]:[l,u],_=o.sort;_&&_!==`asc`&&_!==`desc`&&(_=`desc`);var v={squareRatio:o.squareRatio,sort:_,leafDepth:o.leafDepth};m.hostTree.clearLayouts();var y={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};m.setLayout(y),xP(m,v,!1,0),y=m.getLayout(),hP(h,function(e,t){var n=(h[t+1]||m).getValue();e.setLayout(j({dataExtent:[n,n],borderWidth:0,upperHeight:0},y))})}var b=e.getData().tree.root;b.setLayout(kP(s,p,f),!0),e.setLayoutInfo(s),AP(b,new Y(-s.x,-s.y,i,a),h,m,0)}};function xP(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(gP),l=s.get(_P)/2,u=jP(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=fP(i-2*f,0),a=fP(a-f-p,0);var m=i*a,h=SP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=pP(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*ts[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function EP(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;ar&&(r=o));var c=e.area*e.area,l=t*t*n;return c?fP(l*r/c,c/(l*i)):1/0}function DP(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d9007199254740991&&(l=9007199254740991),a=s}l`,RP=function(e){return e.get(`autoCurveness`)||null},zP=function(e,t){var n=RP(e),r=20,i=[];if(oe(n))r=n;else if(V(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(X),SF=function(){function e(e){this.group=new X,this._LineCtor=e||xF}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=wF(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=wF(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(e){!e.isGroup&&!CF(e)&&(e.incremental=!0,e.ensureState(`emphasis`).hoverLayer=!0)}for(var r=e.start;r0}function wF(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Mf(t)}}function TF(e){return isNaN(e[0])||isNaN(e[1])}function EF(e){return e&&!TF(e[0])&&!TF(e[1])}var DF=[],OF=[],kF=[],AF=Rn,jF=Ke,MF=Math.abs;function NF(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){DF[0]=AF(r[0],i[0],a[0],u),DF[1]=AF(r[1],i[1],a[1],u);var d=MF(jF(DF,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function PF(e,t){var n=[],r=Hn,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[Pe(c[0]),Pe(c[1])],c[2]&&c.__original.push(Pe(c[2])));var d=c.__original;if(c[2]!=null){if(Ne(i[0],d[0]),Ne(i[1],d[2]),Ne(i[2],d[1]),l&&l!==`none`){var f=QP(e.node1),p=NF(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=QP(e.node2),p=NF(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}Ne(c[0],i[0]),Ne(c[1],i[2]),Ne(c[2],i[1])}else{if(Ne(a[0],d[0]),Ne(a[1],d[1]),Re(o,a[1],a[0]),He(o,o),l&&l!==`none`){var f=QP(e.node1);Le(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=QP(e.node2);Le(a[1],a[1],o,-f*t)}Ne(c[0],a[0]),Ne(c[1],a[1])}})}function FF(e){return e.type===`view`}var IF=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){var n=new uD,r=new SF,i=this.group;this._controller=new MA(t.getZr()),this._controllerHost={target:i},i.add(n.group),i.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem;this._model=e;var a=this._symbolDraw,o=this._lineDraw,s=this.group;if(FF(i)){var c={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY};this._firstRender?s.attr(c):Bd(s,c,e)}PF(e.getGraph(),ZP(e));var l=e.getData();a.updateData(l);var u=e.getEdgeData();o.updateData(u),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,f=e.get([`force`,`layoutAnimation`]);d&&this._startForceLayoutIteration(d,f);var p=e.get(`layout`);l.graph.eachNode(function(t){var n=t.dataIndex,i=t.getGraphicEl(),a=t.getModel();if(i){i.off(`drag`).off(`dragend`);var o=a.get(`draggable`);o&&i.on(`drag`,function(a){switch(p){case`force`:d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,f),d.setFixed(n),l.setItemLayout(n,[i.x,i.y]);break;case`circular`:l.setItemLayout(n,[i.x,i.y]),t.setLayout({fixed:!0},!0),tF(e,`symbolSize`,t,[a.offsetX,a.offsetY]),r.updateLayout(e);break;default:l.setItemLayout(n,[i.x,i.y]),YP(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){d&&d.setUnfixed(n)}),i.setDraggable(o,!!a.get(`cursor`)),a.get([`emphasis`,`focus`])===`adjacency`&&(Q(i).focus=t.getAdjacentDataIndices())}}),l.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(Q(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var m=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),h=l.getLayout(`cx`),g=l.getLayout(`cy`);l.graph.eachNode(function(e){rF(e,m,h,g)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t){var n=this;(function r(){e.step(function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(r,16):r())})})()},t.prototype._updateController=function(e,t,n){var r=this,i=this._controller,a=this._controllerHost,o=this.group;if(i.setPointerChecker(function(t,r,i){var a=o.getBoundingRect();return a.applyTransform(o.transform),a.contain(r,i)&&!zA(t,n,e)}),!FF(e.coordinateSystem)){i.disable();return}i.enable(e.get(`roam`)),a.zoomLimit=e.get(`scaleLimit`),a.zoom=e.coordinateSystem.getZoom(),i.off(`pan`).off(`zoom`).on(`pan`,function(t){IA(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:`graphRoam`,dx:t.dx,dy:t.dy})}).on(`zoom`,function(t){LA(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:`graphRoam`,zoom:t.scale,originX:t.originX,originY:t.originY}),r._updateNodeAndLinkScale(),PF(e.getGraph(),ZP(e)),r._lineDraw.updateLayout(),n.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=ZP(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){PF(e.getGraph(),ZP(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type=`graph`,t}(q_);function LF(e){return`_EC_`+e}var RF=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[LF(e)]){var r=new zF(e,t);return r.hostGraph=this,this.nodes.push(r),n[LF(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[LF(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(oe(e)&&(e=this.nodes[e]),oe(t)&&(t=this.nodes[t]),e instanceof zF||(e=r[LF(e)]),t instanceof zF||(t=r[LF(t)]),!(!e||!t)){var a=e.id+`-`+t.id,o=new BF(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof zF&&(e=e.id),t instanceof zF&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof zF||(t=this._nodesMap[LF(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}P(zF,VF(`hostGraph`,`data`)),P(BF,VF(`hostGraph`,`edgeData`));function HF(e,t,n,r,i){for(var a=new RF(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`)m=wS(e,n);else{var h=mh.get(p),g=h&&h.dimensions||[];N(g,`value`)<0&&g.concat([`value`]);var _=uS(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new lS(_,n),m.initData(e)}var v=new lS([`value`],n);return v.initData(c,s),i&&i(m,v),zM({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var UF=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new qO(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),ro(t,`edgeLabel`,[`show`])},t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=this;if(r&&n){GP(this);var a=HF(r,n,this,!0,o);return F(a.edges,function(e){KP(e.node1,e.node2,this,e.dataIndex)},this),a.data}function o(e,t){e.wrapMethod(`getItemModel`,function(e){var t=i._categoriesModels[e.getShallow(`category`)];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e});var n=tp.prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=a,r}t.wrapMethod(`getItemModel`,function(e){return e.resolveParentPath=a,e.getModel=r,e});function a(e){if(e&&(e[0]===`label`||e[1]===`label`)){var t=e.slice();return e[0]===`label`?t[0]=`edgeLabel`:e[1]===`label`&&(t[1]=`edgeLabel`),t}return e}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if(n===`edge`){var r=this.getData(),i=this.getDataParams(e,n),a=r.graph.getEdgeByIndex(e),o=r.getName(a.node1.dataIndex),s=r.getName(a.node2.dataIndex),c=[];return o!=null&&c.push(o),s!=null&&c.push(s),p_(`nameValue`,{name:c.join(` > `),value:i.value,noValue:i.value==null})}return k_({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=I(this.option.categories||[],function(e){return e.value==null?j({value:0},e):e}),t=new lS([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.type=`series.graph`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:`#aaa`,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:`#212121`}}},t}(P_),WF={type:`graphRoam`,event:`graphRoam`,update:`none`};function GF(e){e.registerChartView(IF),e.registerSeriesModel(UF),e.registerProcessor(NP),e.registerVisual(PP),e.registerVisual(IP),e.registerLayout(XP),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,iF),e.registerLayout(sF),e.registerCoordinateSystem(`graphView`,{dimensions:$j.dimensions,create:lF}),e.registerAction({type:`focusNodeAdjacency`,event:`focusNodeAdjacency`,update:`series:focusNodeAdjacency`},Ae),e.registerAction({type:`unfocusNodeAdjacency`,event:`unfocusNodeAdjacency`,update:`series:unfocusNodeAdjacency`},Ae),e.registerAction(WF,function(e,t,n){t.eachComponent({mainType:`series`,query:e},function(t){var r=t.coordinateSystem,i=uM(r,e,void 0,n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)})})}var KF=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),qF=function(e){r(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new KF},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(Nc);function JF(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:Z(n[0],t.getWidth()),cy:Z(n[1],t.getHeight()),r:Z(e.get(`radius`),a/2)}}function YF(e,t){var n=e==null?``:e+``;return t&&(U(t)?n=t.replace(`{value}`,n):H(t)&&(n=t(e))),n}var XF=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=JF(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?eO:cd,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];sc(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v=e&&(t===0?0:r[t-1][0])Math.PI/2&&(I+=Math.PI)):F===`tangential`?I=-S-Math.PI/2:oe(F)&&(I=F*Math.PI/180),I===0?l.add(new Zc({style:Nf(_,{text:N,x:P,y:te,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:ee}),silent:!0})):l.add(new Zc({style:Nf(_,{text:N,x:P,y:te,verticalAlign:`middle`,align:`center`},{inheritColor:ee}),silent:!0,originX:P,originY:te,rotation:I}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var ne=0;ne<=y;ne++){O=Math.cos(S),k=Math.sin(S);var L=new yd({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-x-j)+u,y2:k*(f-x-j)+d},silent:!0,style:E});E.stroke===`auto`&&L.setStyle({stroke:r((A+ne/y)/v)}),l.add(L),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=Z(r.get(`width`),i.r),o=Z(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=Z(c[0],i.r),u=Z(c[1],i.r),d=r.get(`keepAspect`),f=s?ay(s,l-a/2,u-o,a,o,null,d):new qF({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?eO:cd,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=Aa(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);Vd(r,{rotation:-((isNaN(+n)?x[0]:Aa(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Vd(i,{shape:{endAngle:Aa(n,b,x,m.get(`clip`))}},e),l.add(i),dl(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,Bd(s,{rotation:-((isNaN(+r)?x[0]:Aa(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);Bd(v,{shape:{endAngle:Aa(r,b,x,m.get(`clip`))}},e),l.add(v),dl(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`);if(p){var s=g.getItemGraphicEl(e),c=g.getItemVisual(e,`style`),l=c.fill;if(s instanceof zc){var u=s.style;s.useStyle(j({image:u.image,x:u.x,y:u.y,width:u.width,height:u.height},c))}else s.useStyle(c),s.type!==`pointer`&&s.setColor(l);s.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),s.style.fill===`auto`&&s.setStyle(`fill`,r(Aa(g.get(_,e),b,[0,1],!0))),s.z2EmphasisLift=0,du(s,t),su(s,i,a,o)}if(h){var d=f[e];d.useStyle(g.getItemVisual(e,`style`)),d.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),d.z2EmphasisLift=0,du(d,t),su(d,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=ay(i,t.cx-r/2+Z(a[0],t.r),t.cy-r/2+Z(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new X,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Zc({silent:!0}),f[e]=new Zc({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new X,g=r(Aa(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+Z(v[0],i.r),b=i.cy+Z(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:Nf(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var C=S.get(`offsetCenter`),w=i.cx+Z(C[0],i.r),T=i.cy+Z(C[1],i.r),E=Z(S.get(`width`),i.r),D=Z(S.get(`height`),i.r),O=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],k=S.get(`formatter`);x.attr({z2:m?0:2,style:Nf(S,{x:w,y:T,text:YF(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),Uf(x,{normal:S},a,function(e){return YF(e,k)}),p&&Wf(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return YF(o?o.interpolatedValue:a,k)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(q_),ZF=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return KO(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,`#E6EBF8`]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:`#63677A`,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:`#63677A`,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:`#464646`,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:`#fff`,borderWidth:0,borderColor:`#5470c6`}},title:{show:!0,offsetCenter:[0,`20%`],color:`#464646`,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:`rgba(0,0,0,0)`,borderWidth:0,borderColor:`#ccc`,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:`#464646`,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(P_);function QF(e){e.registerChartView(XF),e.registerSeriesModel(ZF)}var $F=[`itemStyle`,`opacity`],eI=function(e){r(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new gd,o=new Zc;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get($F);c??=1,n||Kd(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Vd(r,{style:{opacity:c}},i,t)):Bd(r,{style:{opacity:c},shape:{points:o.points}},i,t),du(r,a),this._updateLabel(e,t),su(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;jf(i,Mf(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:l,outsideFill:l});var u=s.linePoints;r.setShape({points:u}),n.textGuideLineConfig={anchor:u?new J(u[0][0],u[0][1]):null},Bd(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Xw(n,Zw(o),{stroke:l})},t}(md),tI=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new eI(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){Gd(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=`funnel`,t}(q_),nI=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new qO(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return KO(this,{coordDimensions:[`value`],encodeDefaulter:B(zm,this)})},t.prototype._defaultLabelLine=function(e){ro(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.funnel`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:60,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:`#fff`,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:`#212121`}}},t}(P_);function rI(e,t){return mm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function iI(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();owI)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);r.behavior!==`none`&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!DI(this,`mousemove`))){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;r===`jump`&&this._throttledDispatchExpand.debounceNextCall(t.get(`axisExpandDebounce`)),this._throttledDispatchExpand(r===`none`?null:{axisExpandWindow:n.axisExpandWindow,animation:r===`jump`?null:{duration:0}})}}};function DI(e,t){var n=e._model;return n.get(`axisExpandable`)&&n.get(`axisExpandTriggerOn`)===t}var OI=function(e){r(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&k(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get(`parallelIndex`);return n!=null&&t.getComponent(`parallel`,n)===this},t.prototype.setAxisExpand=function(e){F([`axisExpandable`,`axisExpandCenter`,`axisExpandCount`,`axisExpandWidth`,`axisExpandWindow`],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];F(L(this.ecModel.queryComponents({mainType:`parallelAxis`}),function(e){return(e.get(`parallelIndex`)||0)===this.componentIndex},this),function(n){e.push(`dim`+n.get(`dim`)),t.push(n.componentIndex)})},t.type=`parallel`,t.dependencies=[`parallelAxis`],t.layoutMode=`box`,t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:`horizontal`,axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:`click`,parallelAxisDefault:null},t}(Sm),kI=function(e){r(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.type=i||`value`,o.axisIndex=a,o}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get(`layout`)!==`horizontal`},t}(Tw);function AI(e,t,n,r,i,a){e||=0;var o=n[1]-n[0];if(i!=null&&(i=MI(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(t[1]-t[0]);s=MI(s,[0,o]),i=a=MI(s,[i,a]),r=0}t[0]=MI(t[0],n),t[1]=MI(t[1],n);var c=jI(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]+=l:u[1]-=l,t[r]=MI(t[r],u);var d=jI(t,r);return i!=null&&(d.sign!==c.sign||d.span