import{P as ge,E as Jt,f as Ve,F as mt,H as sr,_ as z,G as j,q as ee,I as Ne,J as ss,K as Mn,L as xe,M as Vn,R as Ae,n as Ie,b as le,Z as Me,g as G,N as us,p as Le,O as He,Q as kn,l as Q,S as vs,h as $,d as Xe,B as Bt,T as an,c as Ct,U as xt,a as pa,V as cs,W as hs,X as fs,j as ke,Y as mo,$ as Na,a0 as Fr,a1 as Nt,i as rn,a2 as On,a3 as gs,a4 as ps,a5 as So,a6 as ds,a7 as bo,a8 as ys,m as Za,a9 as Ma,aa as st,ab as nn,ac as ms,ad as Ss,ae as Xt,af as Gn,ag as bs,ah as _e,ai as Hr,aj as ws,ak as wo,al as _s,am as Ea,o as Ds,an as xs,ao as As,ap as Bn,aq as Is,ar as Ls,as as zn,at as _a,au as Cs,C as Ts}from"./graphic-DeMuFa6Q.js";import{aQ as Wr,R as zt,aR as Qt,f as Ke,aS as Z,ah as se,i as ea,aT as Zt,U as je,a0 as ue,aU as Fn,aV as ce,j as ne,aW as ie,aX as Hn,ae,aY as Va,aZ as Ce,a_ as De,a$ as Ps,b0 as _o,a6 as J,b1 as Es,P as on,b2 as Wn,b3 as Ur,b4 as da,b5 as Do,b6 as ln,b7 as sn,b8 as Rs,b9 as Je,ba as Pt,y as U,bb as St,bc as ta,bd as Un,be as Ns,bf as xo,bg as qa,bh as ut,bi as Oe,bj as Ao,bk as We,aN as Ms,bl as Io,bm as Vs,bn as un,bo as Ft,bp as ks,bq as he,br as Lo,u as Pe,bs as Co,aO as Ka,bt as Os,bu as Ge,Q as vn,bv as ja,bw as To,K as Po,bx as ya,by as Ja,bz as cn,aj as Mt,M as ht,bA as Gs,bB as ka,J as Bs,bC as Oa,bD as Ht,k as Wt,bE as aa,bF as zs,bG as Yn,bH as Fs,a as $e,l as $n,bI as Qa,bJ as Eo,bK as Xn,bL as Da,bM as Zn,bN as Hs,bO as Ro,bP as Ws,bQ as Us,bR as Ys,O as qn,bS as $s,bT as Kn,bU as Xs,w as Zs,bV as No,bW as Mo,bX as Yr,m as Vo,bY as $r,bZ as qs,b_ as ko,b$ as Ks,z as ur,c0 as js,c1 as Ra,c2 as vr,c3 as Oo,c4 as jn,c5 as Go,r as Js,c6 as Qs,c7 as Bo,t as Jn,c8 as Qn,c9 as eu,a2 as ei,_ as ti,ca as tu}from"./Axis-D3q4j9rs.js";import{c as ze,S as er,a as tr,i as Ga,g as zo,b as ra,d as au,e as ru,r as nu,C as na,m as ar,f as hn,h as Et,j as ma,k as iu,s as ou,l as lu,n as su,o as Ba,p as ai,M as uu,q as za,t as vu,u as Fo,v as cu,w as hu,R as rr,x as fn,y as Ho,z as Vt,V as kt,A as Wo,B as gn,D as Uo,E as pn,F as fu,G as Yo,H as $o,L as Xo,I as ri,J as gu,K as ni,N as pu,O as du,P as yu,Q as bt,T as Zo,U as qo,W as ii,X as ia,Y as mu,Z as dn,_ as oi,$ as Su,a0 as bu,a1 as wu,a2 as _u,a3 as Du}from"./customGraphicKeyframeAnimation-C08fYDZH.js";import{c as et}from"./createSeriesData-BMcKzd6A.js";function Ko(r,t,e,a,n,i,o,l){var s=n-r,u=i-t,v=e-r,c=a-t,h=Math.sqrt(v*v+c*c);v/=h,c/=h;var f=s*v+u*c,g=f/h;g*=h;var p=o[0]=r+g*v,d=o[1]=t+g*c;return Math.sqrt((p-n)*(p-n)+(d-i)*(d-i))}var it=new ge,oe=new ge,ye=new ge,ot=new ge,Be=new ge,Fa=[],Se=new ge;function xu(r,t){if(t<=180&&t>0){t=t/180*Math.PI,it.fromArray(r[0]),oe.fromArray(r[1]),ye.fromArray(r[2]),ge.sub(ot,it,oe),ge.sub(Be,ye,oe);var e=ot.len(),a=Be.len();if(!(e<.001||a<.001)){ot.scale(1/e),Be.scale(1/a);var n=ot.dot(Be),i=Math.cos(t);if(i1&&ge.copy(Se,ye),Se.toArray(r[1])}}}}function Au(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,it.fromArray(r[0]),oe.fromArray(r[1]),ye.fromArray(r[2]),ge.sub(ot,oe,it),ge.sub(Be,ye,oe);var a=ot.len(),n=Be.len();if(!(a<.001||n<.001)){ot.scale(1/a),Be.scale(1/n);var i=ot.dot(t),o=Math.cos(e);if(i=s)ge.copy(Se,ye);else{Se.scaleAndAdd(Be,l/Math.tan(Math.PI/2-v));var c=ye.x!==oe.x?(Se.x-oe.x)/(ye.x-oe.x):(Se.y-oe.y)/(ye.y-oe.y);if(isNaN(c))return;c<0?ge.copy(Se,oe):c>1&&ge.copy(Se,ye)}Se.toArray(r[1])}}}}function cr(r,t,e,a){var n=e==="normal",i=n?r:r.ensureState(e);i.ignore=t;var o=a.get("smooth");o=o===!0?.3:Math.max(+o,0)||0,i.shape=i.shape||{},i.shape.smooth=o;var l=a.getModel("lineStyle").getLineStyle();n?r.useStyle(l):i.style=l}function Iu(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var n=mt(a[0],a[1]),i=mt(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*e,l=sr([],a[1],a[0],o/n),s=sr([],a[1],a[2],o/i),u=sr([],l,s,.5);r.bezierCurveTo(l[0],l[1],l[0],l[1],u[0],u[1]),r.bezierCurveTo(s[0],s[1],s[0],s[1],a[2][0],a[2][1])}else for(var v=1;v-1&&(u.style.stroke=u.style.fill,u.style.fill=Z.color.neutral00,u.style.lineWidth=2),a},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},t})(se);function Qo(r,t,e){var a=r.getBaseAxis(),n=r.getOtherAxis(a),i=Cu(n,e),o=a.dim,l=n.dim,s=t.mapDimension(l),u=t.mapDimension(o),v=l==="x"||l==="radius"?1:0,c=ee(r.dimensions,function(g){return t.mapDimension(g)}),h=!1,f=t.getCalculationInfo("stackResultDimension");return ea(t,c[0])&&(h=!0,c[0]=f),ea(t,c[1])&&(h=!0,c[1]=f),{dataDimsForPoint:c,valueStart:i,valueAxisDim:l,baseAxisDim:o,stacked:!!h,valueDim:s,baseDim:u,baseDataOffset:v,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Cu(r,t){var e=0,a=r.scale.getExtent();return t==="start"?e=a[0]:t==="end"?e=a[1]:Ne(t)&&!isNaN(t)?e=t:a[0]>0?e=a[0]:a[1]<0&&(e=a[1]),e}function el(r,t,e,a){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,a),o[1-i]=n,t.dataToPoint(o)}function Ee(r,t){return!isFinite(r)||!isFinite(t)}function Tu(r,t){var e=[];return t.diff(r).add(function(a){e.push({cmd:"+",idx:a})}).update(function(a,n){e.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){e.push({cmd:"-",idx:a})}).execute(),e}function Pu(r,t,e,a,n,i,o,l){for(var s=Tu(r,t),u=[],v=[],c=[],h=[],f=[],g=[],p=[],d=Qo(n,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],S=0;S=n||p<0)break;if(Ee(m,y)){if(s){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var S=m-u,b=y-v;if(S*S+b*b<.5){p+=i;continue}if(o>0){for(var w=p+i,_=t[w*2],D=t[w*2+1];_===m&&D===y&&d=a||Ee(_,D))f=m,g=y;else{I=_-u,x=D-v;var V=m-u,T=_-m,R=y-v,N=D-y,C=void 0,M=void 0;if(l==="x"){C=Math.abs(V),M=Math.abs(T);var k=I>0?1:-1;f=m-k*C*o,g=y,L=m+k*M*o,E=y}else if(l==="y"){C=Math.abs(R),M=Math.abs(N);var O=x>0?1:-1;f=m,g=y-O*C*o,L=m,E=y+O*M*o}else C=Math.sqrt(V*V+R*R),M=Math.sqrt(T*T+N*N),P=M/(M+C),f=m-I*o*(1-P),g=y-x*o*(1-P),L=m+I*o*P,E=y+x*o*P,L=at(L,rt(_,m)),E=at(E,rt(D,y)),L=rt(L,at(_,m)),E=rt(E,at(D,y)),I=L-m,x=E-y,f=m-I*C/M,g=y-x*C/M,f=at(f,rt(u,m)),g=at(g,rt(v,y)),f=rt(f,at(u,m)),g=rt(g,at(v,y)),I=m-f,x=y-g,L=m+I*M/C,E=y+x*M/C}r.bezierCurveTo(c,h,f,g,m,y),c=L,h=E}else r.lineTo(m,y)}u=m,v=y,p+=i}return d}var tl=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),Eu=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new tl},t.prototype.buildPath=function(e,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Ee(n[o*2-2],n[o*2-1]);o--);for(;i=0){var b=u?(g-s)*S+s:(f-l)*S+l;return u?[e,b]:[b,e]}l=f,s=g;break;case o.C:f=i[c++],g=i[c++],p=i[c++],d=i[c++],m=i[c++],y=i[c++];var w=u?Mn(l,f,p,m,e,v):Mn(s,g,d,y,e,v);if(w>0)for(var _=0;_=0){var b=u?Vn(s,g,d,y,D):Vn(l,f,p,m,D);return u?[e,b]:[b,e]}}l=m,s=y;break}}},t})(xe),Ru=(function(r){z(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(tl),al=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new Ru},t.prototype.buildPath=function(e,a){var n=a.points,i=a.stackedOnPoints,o=0,l=n.length/2,s=a.smoothMonotone;if(a.connectNulls){for(;l>0&&Ee(n[l*2-2],n[l*2-1]);l--);for(;ot){i?e.push(o(i,s,t)):n&&e.push(o(n,s,0),o(n,s,t));break}else n&&(e.push(o(n,s,0)),n=null),e.push(s),i=s}return e}function Vu(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&t.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var l=r.getDimensionInfo(a[o].dimension);if(n=l&&l.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var s=t.getAxis(n),u=ee(i.stops,function(S){return{coord:s.toGlobalCoord(s.dataToCoord(S.value)),color:S.color}}),v=u.length,c=i.outerColors.slice();v&&u[0].coord>u[v-1].coord&&(u.reverse(),c.reverse());var h=Mu(u,n==="x"?e.getWidth():e.getHeight()),f=h.length;if(!f&&v)return u[0].coord<0?c[1]?c[1]:u[v-1].color:c[0]?c[0]:u[0].color;var g=10,p=h[0].coord-g,d=h[f-1].coord+g,m=d-p;if(m<.001)return"transparent";G(h,function(S){S.offset=(S.coord-p)/m}),h.push({offset:f?h[f-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:c[0]||"transparent"});var y=new on(0,0,0,0,h,!0);return y[n]=p,y[n+"2"]=d,y}}}function ku(r,t,e){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(n&&Ou(i,t))){var o=t.mapDimension(i.dim),l={};return G(i.getViewLabels(),function(s){s.tick.offInterval||(l[Es(i.scale,s.tick)]=1)}),function(s){return!l.hasOwnProperty(t.get(o,s))}}}}function Ou(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function Gu(r){for(var t=r.length/2;t>0&&Ee(r[t*2-2],r[t*2-1]);t--);return t-1}function ci(r,t){return[r[t*2],r[t*2+1]]}function Bu(r,t,e){for(var a=r.length/2,n=e==="x"?0:1,i,o,l=0,s=-1,u=0;u=t||i>=t&&o<=t){s=u;break}l=u,i=o}return{range:[l,s],t:(t-i)/(o-i)}}function ol(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var M=g.getState("emphasis").style;M.lineWidth=+g.style.lineWidth+1}ne(g).seriesIndex=e.seriesIndex,ie(g,R,N,C);var k=vi(e.get("smooth")),O=e.get("smoothMonotone");if(g.setShape({smooth:k,smoothMonotone:O,connectNulls:D}),p){var B=l.getCalculationInfo("stackedOnSeries"),W=0;p.useStyle(Ve(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),B&&(W=vi(B.get("smooth"))),p.setShape({smooth:k,stackedOnSmooth:W,smoothMonotone:O,connectNulls:D}),ce(p,e,"areaStyle"),ne(p).seriesIndex=e.seriesIndex,ie(p,R,N,C)}var H=this._changePolyState;l.eachItemGraphicEl(function(F){F&&(F.onHoverStateChange=H)}),this._polyline.onHoverStateChange=H,this._data=l,this._coordSys=i,this._stackedOnPoints=w,this._points=v,this._step=I,this._valueOrigin=S;var X=e.get("triggerEvent"),ve=e.get("triggerLineEvent"),me=ve===!0||X===!0||X==="line",Y=ve===!0||X===!0||X==="area";this.packEventData(e,g,me),p&&this.packEventData(e,p,Y)},t.prototype.packEventData=function(e,a,n){ne(a).eventData=n?{componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line",selfType:a===this._polygon?"area":"line"}:null},t.prototype.highlight=function(e,a,n,i){var o=e.getData(),l=Hn(o,i);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var s=o.getLayout("points"),u=o.getItemGraphicEl(l);if(!u){var v=s[l*2],c=s[l*2+1];if(Ee(v,c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(v,c))return;var h=e.get("zlevel")||0,f=e.get("z")||0;u=new tr(o,l),u.x=v,u.y=c,u.setZ(h,f);var g=u.getSymbolPath().getTextContent();g&&(g.zlevel=h,g.z=f,g.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(l,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ae.prototype.highlight.call(this,e,a,n,i)},t.prototype.downplay=function(e,a,n,i){var o=e.getData(),l=Hn(o,i);if(this._changePolyState("normal"),l!=null&&l>=0){var s=o.getItemGraphicEl(l);s&&(s.__temp?(o.setItemGraphicEl(l,null),this.group.remove(s)):s.downplay())}else ae.prototype.downplay.call(this,e,a,n,i)},t.prototype._changePolyState=function(e){var a=this._polygon;Va(this._polyline,e),a&&Va(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new Eu({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new al({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,a,n){var i,o,l=a.getBaseAxis(),s=l.inverse;a.type==="cartesian2d"?(i=l.isHorizontal(),o=!1):a.type==="polar"&&(i=l.dim==="angle",o=!0);var u=e.hostModel,v=u.get("animationDuration");Ie(v)&&(v=v(null));var c=u.get("animationDelay")||0,h=Ie(c)?c(null):c;e.eachItemGraphicEl(function(f,g){var p=f;if(p){var d=[f.x,f.y],m=void 0,y=void 0,S=void 0;if(n)if(o){var b=n,w=a.pointToCoord(d);i?(m=b.startAngle,y=b.endAngle,S=-w[1]/180*Math.PI):(m=b.r0,y=b.r,S=w[0])}else{var _=n;i?(m=_.x,y=_.x+_.width,S=f.x):(m=_.y+_.height,y=_.y,S=f.y)}var D=y===m?0:(S-m)/(y-m);s&&(D=1-D);var A=Ie(c)?c(g):v*D+h,P=p.getSymbolPath(),I=P.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:A}),I&&I.animateFrom({style:{opacity:0}},{duration:300,delay:A}),P.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,n){var i=e.getModel("endLabel");if(ol(e)){var o=e.getData(),l=this._polyline,s=o.getLayout("points");if(!s){l.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Me({z2:200}),u.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var v=Gu(s);v>=0&&(Ce(l,De(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:v,defaultText:function(c,h,f){return f!=null?zo(o,f):ra(o,c)},enableTextSetter:!0},zu(i,a)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,n,i,o,l,s){var u=this._endLabel,v=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=n.getLayout("points"),h=n.hostModel,f=h.get("connectNulls"),g=l.get("precision"),p=l.get("distance")||0,d=s.getBaseAxis(),m=d.isHorizontal(),y=d.inverse,S=a.shape,b=y?m?S.x:S.y+S.height:m?S.x+S.width:S.y,w=(m?p:0)*(y?-1:1),_=(m?0:-p)*(y?-1:1),D=m?"x":"y",A=Bu(c,b,D),P=A.range,I=P[1]-P[0],x=void 0;if(I>=1){if(I>1&&!f){var L=ci(c,P[0]);u.attr({x:L[0]+w,y:L[1]+_}),o&&(x=h.getRawValue(P[0]))}else{var L=v.getPointOn(b,D);L&&u.attr({x:L[0]+w,y:L[1]+_});var E=h.getRawValue(P[0]),V=h.getRawValue(P[1]);o&&(x=Ps(n,g,E,V,A.t))}i.lastFrameIndex=P[0]}else{var T=e===1||i.lastFrameIndex>0?P[0]:0,L=ci(c,T);o&&(x=h.getRawValue(T)),u.attr({x:L[0]+w,y:L[1]+_})}if(o){var R=_o(u);typeof R.setLabelText=="function"&&R.setLabelText(x)}}},t.prototype._doUpdateAnimation=function(e,a,n,i,o,l,s){var u=this._polyline,v=this._polygon,c=e.hostModel,h=Pu(this._data,e,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),f=h.current,g=h.stackedOnCurrent,p=h.next,d=h.stackedOnNext;if(o&&(g=nt(h.stackedOnCurrent,h.current,n,o,s),f=nt(h.current,null,n,o,s),d=nt(h.stackedOnNext,h.next,n,o,s),p=nt(h.next,null,n,o,s)),ui(f,p)>3e3||v&&ui(g,d)>3e3){u.stopAnimation(),u.setShape({points:p}),v&&(v.stopAnimation(),v.setShape({points:p,stackedOnPoints:d}));return}u.shape.__points=h.current,u.shape.points=f;var m={shape:{points:p}};h.current!==f&&(m.shape.__points=h.next),u.stopAnimation(),J(u,m,c),v&&(v.setShape({points:f,stackedOnPoints:g}),v.stopAnimation(),J(v,{shape:{stackedOnPoints:d}},c),u.shape.points!==v.shape.points&&(v.shape.points=u.shape.points));for(var y=[],S=h.status,b=0;bt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){var s=o.getBaseAxis(),u=o.getOtherAxis(s),v=s.getExtent(),c=a.getDevicePixelRatio(),h=Math.abs(v[1]-v[0])*(c||1),f=Math.round(l/h);if(isFinite(f)&&f>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/f)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/f));var g=void 0;Le(i)?g=Hu[i]:Ie(i)&&(g=i),g&&t.setData(n.downSample(n.mapDimension(u.dim),1/f,g,Wu))}}}}}function sp(r){r.registerChartView(Fu),r.registerSeriesModel(Lu),r.registerLayout(Sa("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,ll("line"))}var Uu=ln(),Zr="__ec_stack_";function sl(r){return r.get("stack")||Zr+r.seriesIndex}function Yu(r){if(Rs(r.axis.scale)){for(var t=Je(r.axis),e=[],a=0;aS&&(S=y),S!==v&&(d.width=S,e-=S+u*S,a--)}}),v=(e-s)/(a+(a-1)*u),v=St(v,0);var c=0,h;G(o,function(p){var d=l[p];d.width||(d.width=v),h=d,c+=d.width*(1+u)}),h&&(c-=h.width*u);var f={},g=-c/2;return G(o,function(p){var d=l[p];f[p]=f[p]||{bandWidth:t,offset:g,width:d.width},g+=d.width*(1+u)}),f}function vl(r){return{seriesType:r,overallReset:function(t){var e=ar(r,na);Do(t,e,function(a){var n=$u(a,r);ta(a,e,function(i){var o=n.columnMap[sl(i)];i.getData().setLayout({bandWidth:o.bandWidth,offset:o.offset,size:o.width})})})}}}function cl(r){return{seriesType:r,plan:da(),reset:function(t){if(au(t)){var e=t.getData(),a=t.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(i.dim)),l=e.getDimensionIndex(e.mapDimension(n.dim)),s=t.get("showBackground",!0),u=e.mapDimension(i.dim),v=e.getCalculationInfo("stackResultDimension"),c=ea(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(ru(i))),g=hl(t),p=t.get("barMinHeight")||0,d=v&&e.getDimensionIndex(v),m=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(S,b){for(var w=S.count,_=g&&ze(w*3),D=g&&s&&ze(w*3),A=g&&ze(w),P=a.master.getRect(),I=h?P.width:P.height,x,L=b.getStore(),E=0;(x=S.next())!=null;){var V=L.get(c?d:o,x),T=L.get(l,x),R=f,N=void 0;c&&(N=+V-L.get(o,x));var C=void 0,M=void 0,k=void 0,O=void 0;if(h){var B=a.dataToPoint([V,T]);c&&(R=a.dataToPoint([N,T])[0]),C=R,M=B[1]+y,k=B[0]-R,O=m,Un(k)d){S=(_+y)/2;break}w===1&&(b=D-g[0].tickValue)}S==null&&(y?y&&(S=g[g.length-1].coord):S=g[0].coord),l[f]=h.toGlobalCoord(S)}});else{var s=this.getData(),u=s.getLayout("offset"),v=s.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;l[c]+=u+v/2}return l}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(se);se.registerClass(ua);var qu=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return et(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.__preparePipelineContext=function(e,a){var n=Ns(this,e,a);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,a,n){return n.rect(a.getItemLayout(e))},t.type="series."+Et,t.dependencies=["grid","polar"],t.defaultOption=xo(ua.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Z.color.primary,borderWidth:2}},realtimeSort:!1}),t})(ua),Ku=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Ha=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new Ku},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),l=Math.max(a.r,0),s=(l-o)*.5,u=o+s,v=a.startAngle,c=a.endAngle,h=a.clockwise,f=Math.PI*2,g=h?c-vMath.PI/2&&vl)return!0;l=c}return!1},t.prototype._isOrderDifferentInView=function(e,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),l=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=l;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,n,i){if(this._isOrderChangedWithinSameData(e,a,n)){var o=this._dataSort(e,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,n){var i=a.baseAxis,o=this._dataSort(e,i,function(l){return e.get(e.mapDimension(a.otherAxis.dim),l)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){ut(i,e,ne(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=Et,t})(ae),hi={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,i=r.y+r.height,o=fr(t.x,r.x),l=gr(t.x+t.width,n),s=fr(t.y,r.y),u=gr(t.y+t.height,i),v=ln?l:o,t.y=c&&s>i?u:s,t.width=v?0:l-o,t.height=c?0:u-s,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),v||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var n=gr(t.r,r.r),i=fr(t.r0,r.r0);t.r=n,t.r0=i;var o=n-i<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},fi={cartesian2d:function(r,t,e,a,n,i,o,l,s){var u=new Ae({shape:$({},a),z2:1});if(u.__dataIndex=e,u.name="item",i){var v=u.shape,c=n?"height":"width";v[c]=0}return u},polar:function(r,t,e,a,n,i,o,l,s){var u=!n&&s?Ha:je,v=new u({shape:a,z2:1});v.name="item";var c=gl(n);if(v.calculateTextPosition=ju(c,{isRoundCap:u===Ha}),i){var h=v.shape,f=n?"r":"endAngle",g={};h[f]=n?a.r0:a.startAngle,g[f]=a[f],(l?J:ue)(v,{shape:g},i)}return v}};function ev(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function gi(r,t,e,a,n,i,o,l){var s,u;i?(u={x:a.x,width:a.width},s={y:a.y,height:a.height}):(u={y:a.y,height:a.height},s={x:a.x,width:a.width}),l||(o?J:ue)(e,{shape:s},t,n,null);var v=t?r.baseAxis.model:null;(o?J:ue)(e,{shape:u},v,n)}function pi(r,t){for(var e=0;e0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function rv(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function gl(r){return(function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}})(r)}function yi(r,t,e,a,n,i,o,l){var s=t.getItemVisual(e,"style");if(l){if(!i.get("roundCap")){var v=r.shape,c=Fe(a.getModel("itemStyle"),v,!0);$(v,c),r.setShape(v)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(s);var h=a.getShallow("cursor");h&&r.attr("cursor",h);var f=l?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?sv(n,i.coordinateSystem):uv(n,i.coordinateSystem),g=De(a);Ce(r,g,{labelFetcher:i,labelDataIndex:e,defaultText:ra(i.getData(),e),inheritColor:s.fill,defaultOpacity:s.opacity,defaultOutsidePosition:f});var p=r.getTextContent();if(l&&p){var d=a.get(["label","position"]);r.textConfig.inside=d==="middle"?!0:null,Ju(r,d==="outside"?f:d,gl(o),a.get(["label","rotate"]))}Ao(p,g,i.getRawValue(e),function(y){return zo(t,y)});var m=a.getModel(["emphasis"]);ie(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),ce(r,a),rv(n)&&(r.style.fill="none",r.style.stroke="none",G(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function nv(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var iv=(function(){function r(){}return r})(),mi=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new iv},t.prototype.buildPath=function(e,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,l=[],s=[],u=this.barWidth,v=0;v=0?e:null},30,!1);function ov(r,t,e){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,l=[],s=[],u=r.barWidth,v=0,c=i.length/3;v=l[0]&&t<=l[0]+s[0]&&e>=l[1]&&e<=l[1]+s[1])return o[v]}return-1}function pl(r,t,e){if(Ga(e,"cartesian2d")){var a=t,n=e.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=e.getArea(),i=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function lv(r,t,e){var a=r.type==="polar"?je:Ae;return new a({shape:pl(t,e,r),silent:!0,z2:0})}function sv(r,t){if(r.height===0){var e=t.getOtherAxis(t.getBaseAxis());return e.inverse?"bottom":"top"}return r.height>0?"bottom":"top"}function uv(r,t){if(r.width===0){var e=t.getOtherAxis(t.getBaseAxis());return e.inverse?"left":"right"}return r.width>=0?"right":"left"}function up(r){r.registerChartView(Qu),r.registerSeriesModel(qu),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,vl(Et)),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cl(Et)),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,ll(Et)),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})}),fl(r)}function ba(r){return{seriesType:r,reset:function(t,e){var a=e.findComponents({mainType:"legend"});if(!(!a||!a.length)){var n=t.getData();n.filterSelf(function(i){for(var o=n.getName(i),l=0;l=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r})(),vt="pie",vv=Ft(),dl=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ut(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return ma(this,{coordDimensions:["value"],encodeDefaulter:Xe(Io,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),n=vv(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(s){o.push(s)}),i=n.seats=Vs(o,a.hostModel.get("percentPrecision"))}var l=r.prototype.getDataParams.call(this,e);return l.percent=i[e]||0,l.$vars.push("percent"),l},t.prototype._defaultLabelLine=function(e){un(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series."+vt,t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t})(se);ks({fullType:dl.type,getCoord2:function(r){return r.getShallow("center")}});var cv=Math.PI/180;function wi(r,t,e,a,n,i,o,l,s,u){if(r.length<2)return;function v(p){for(var d=p.rB,m=d*d,y=0;ye?m:d,w=Math.abs(S.label.y-e);if(w>=b.maxY){var _=S.label.x-t-S.len2*n,D=a+S.len,A=Math.abs(_)r.unconstrainedWidth?null:h:null;a.setStyle("width",f)}ml(i,a)}}}function ml(r,t){_i.rect=r,iu(_i,t,fv)}var fv={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},_i={};function pr(r){return r.position==="center"}function gv(r){var t=r.getData(),e=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*cv,l=t.getLayout("viewRect"),s=t.getLayout("r"),u=l.width,v=l.x,c=l.y,h=l.height;function f(_){_.ignore=!0}function g(_){if(!_.ignore)return!0;for(var D in _.states)if(_.states[D].ignore===!1)return!0;return!1}t.each(function(_){var D=t.getItemGraphicEl(_),A=D.shape,P=D.getTextContent(),I=D.getTextGuideLine(),x=t.getItemModel(_),L=x.getModel("label"),E=L.get("position")||x.get(["emphasis","label","position"]),V=L.get("distanceToLabelLine"),T=L.get("alignTo"),R=U(L.get("edgeDistance"),u),N=L.get("bleedMargin");N==null&&(N=Math.min(u,h)>200?10:2);var C=x.getModel("labelLine"),M=C.get("length");M=U(M,u);var k=C.get("length2");if(k=U(k,u),Math.abs(A.endAngle-A.startAngle)0?"right":"left":B>0?"left":"right"}var re=Math.PI,fe=0,de=L.get("rotate");if(Ne(de))fe=de*(re/180);else if(E==="center")fe=0;else if(de==="radial"||de===!0){var tt=B<0?-O+re:-O;fe=tt}else if(de==="tangential"||de==="tangential-noflip"&&E!=="outside"&&E!=="outer"){var Ye=Math.atan2(B,W);Ye<0&&(Ye=re*2+Ye);var wa=W>0;wa&&de!=="tangential-noflip"&&(Ye=re+Ye),fe=Ye-re}if(i=!!fe,P.x=H,P.y=X,P.rotation=fe,P.setStyle({verticalAlign:"middle"}),Y){P.setStyle({align:me});var lr=P.states.select;lr&&(lr.x+=P.x,lr.y+=P.y)}else{var or=new Bt(0,0,0,0);ml(or,P),e.push({label:P,labelLine:I,position:E,len:M,len2:k,minTurnAngle:C.get("minTurnAngle"),maxSurfaceAngle:C.get("maxSurfaceAngle"),surfaceNormal:new ge(B,W),linePoints:ve,textAlign:me,labelDistance:V,labelAlignTo:T,edgeDistance:R,bleedMargin:N,rect:or,unconstrainedWidth:or.width,labelStyleWidth:P.style.width})}D.setTextConfig({inside:Y})}}),!i&&r.get("avoidLabelOverlap")&&hv(e,a,n,s,u,h,v,c);for(var p=0;pC?(k=V+D*C/2,O=k):(k=V+P,O=M-P),a.setItemLayout(N,{angle:C,startAngle:k,endAngle:O,clockwise:S,cx:o,cy:l,r0:u,r:b?Pe(R,_,[u,s]):s}),V=M}),L0){for(var v=o.getItemLayout(0),c=1;isNaN(v&&v.startAngle)&&c=i.r0}},t.type=vt,t})(ae);function Sv(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(Ne(o)&&!isNaN(o)&&o<0)})}}}function vp(r){r.registerChartView(mv),r.registerSeriesModel(dl),Co(vt,r.registerAction),r.registerLayout(pv),r.registerProcessor(ba(vt)),r.registerProcessor(Sv(vt))}var bv=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return et(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,n){return n.point(a.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Z.color.primary}},universalTransition:{divideShape:"clone"}},t})(se),bl=4,wv=(function(){function r(){}return r})(),_v=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new wv},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,a){var n=a.points,i=a.size,o=this.symbolProxy,l=o.shape,s=e.getContext?e.getContext():e,u=s&&i[0]=0;u--){var v=u*2,c=i[v]-l/2,h=i[v+1]-s/2;if(e>=c&&a>=h&&e<=c+l&&a<=h+s)return u}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.points,i=a.size,o=i[0],l=i[1],s=1/0,u=1/0,v=-1/0,c=-1/0,h=0;h=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),xv=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,dr(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._symbolDraw.incrementalUpdate(e,a.getData(),We(a),dr(a)),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,n){var i=e.getData();if(this.group.dirty(),this._finished){var o=Sa("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(dr(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new Dv:new er,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(ae);function dr(r){return{clipShape:il(r)}}function cp(r){Ka(lu),r.registerSeriesModel(bv),r.registerChartView(xv),r.registerLayout(Sa("scatter"))}function Av(r){var t=r.polar;if(t){Q(t)||(t=[t]);var e=[];G(t,function(a,n){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),r.radar=r.radar||[],Q(r.radar)||(r.radar=[r.radar]),r.radar.push(a)):e.push(a)}),r.polar=e}G(r.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})}var va="radar",Iv=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ut(le(this.getData,this),le(this.getRawData,this))},t.prototype.getInitialData=function(e,a){return ma(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.coordinateSystem,l=o.getIndicatorAxes(),s=this.getData().getName(e),u=s===""?this.name:s,v=Os(this,e);return Ge("section",{header:u,sortBlocks:!0,blocks:ee(l,function(c){var h=i.get(i.mapDimension(c.dim),e);return Ge("nameValue",{markerType:"subItem",markerColor:v,name:c.name,value:h,sortParam:h})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var a=this.getData(),n=this.coordinateSystem,i=a.getValues(ee(n.dimensions,function(u){return a.mapDimension(u)}),e),o=0,l=i.length;o=0;o--){var l=n[o];l.hierNode={defaultAncestor:null,ancestor:l,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(l)}}function Ov(r,t){var e=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(e.length){Bv(r);var i=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+t(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+t(r,n));r.parentNode.hierNode.defaultAncestor=zv(r,n,r.parentNode.hierNode.defaultAncestor||a[0],t)}function Gv(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Ii(r){return arguments.length?r:Wv}function qt(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function Bv(r){for(var t=r.children,e=t.length,a=0,n=0;--e>=0;){var i=t[e];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function zv(r,t,e,a){if(t){for(var n=r,i=r,o=i.parentNode.children[0],l=t,s=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,c=l.hierNode.modifier;l=yr(l),i=mr(i),l&&i;){n=yr(n),o=mr(o),n.hierNode.ancestor=r;var h=l.hierNode.prelim+c-i.hierNode.prelim-u+a(l,i);h>0&&(Hv(Fv(l,r,e),r,h),u+=h,s+=h),c+=l.hierNode.modifier,u+=i.hierNode.modifier,s+=n.hierNode.modifier,v+=o.hierNode.modifier}l&&!yr(n)&&(n.hierNode.thread=l,n.hierNode.modifier+=c-s),i&&!mr(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,e=r)}return e}function yr(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function mr(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function Fv(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function Hv(r,t,e){var a=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=a}function Wv(r,t){return r.parentNode===t.parentNode?1:2}var Re=Ft();function wl(r){var t=r.mainData,e=r.datas;e||(e={main:t},r.datasAttr={main:"data"}),r.datas=r.mainData=null,_l(t,e,r),G(e,function(a){G(t.TRANSFERABLE_METHODS,function(n){a.wrapMethod(n,Xe(Uv,r))})}),t.wrapMethod("cloneShallow",Xe($v,r)),G(t.CHANGABLE_METHODS,function(a){t.wrapMethod(a,Xe(Yv,r))}),hs(e[t.dataType]===t)}function Uv(r,t){if(qv(this)){var e=$({},Re(this).datas);e[this.dataType]=t,_l(t,e,r)}else yn(t,this.dataType,Re(this).mainData,r);return t}function Yv(r,t){return r.struct&&r.struct.update(),t}function $v(r,t){return G(Re(t).datas,function(e,a){e!==t&&yn(e.cloneShallow(),a,t,r)}),t}function Xv(r){var t=Re(this).mainData;return r==null||t==null?t:Re(t).datas[r]}function Zv(){var r=Re(this).mainData;return r==null?[{data:r}]:ee(fs(Re(r).datas),function(t){return{type:t,data:Re(r).datas[t]}})}function qv(r){return Re(r).mainData===r}function _l(r,t,e){Re(r).datas={},G(t,function(a,n){yn(a,n,r,e)})}function yn(r,t,e,a){Re(e).datas[t]=r,Re(r).mainData=e,r.dataType=t,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[t]]=r),r.getLinkedData=Xv,r.getLinkedDataAll=Zv}var Kv=(function(){function r(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(t,e,a){Ie(t)&&(a=e,e=t,t=null),t=t||{},Le(t)&&(t={order:t});var n=t.order||"preorder",i=this[t.attr||"children"],o;n==="preorder"&&(o=e.call(a,this));for(var l=0;!o&&le&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,n=a.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var a=e.getData().tree.root,n=r.targetNode;if(Le(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function Dl(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function Sn(r,t){var e=Dl(r);return ke(e,t)>=0}function nr(r,t){for(var e=[];r;){var a=r.dataIndex;e.push({name:r.name,dataIndex:a,value:t.getRawValue(a)}),r=r.parentNode}return e.reverse(),e}var _t="tree",Jv=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},n=e.leaves||{},i=new ht(n,this,this.ecModel),o=mn.createTree(a,this,l);function l(c){c.wrapMethod("getItemModel",function(h,f){var g=o.getNodeByDataIndex(f);return g&&g.children.length&&g.isExpand||(h.parentModel=i),h})}var s=0;o.eachNode("preorder",function(c){c.depth>s&&(s=c.depth)});var u=e.expandAndCollapse,v=u&&e.initialTreeDepth>=0?e.initialTreeDepth:s;return o.root.eachNode("preorder",function(c){var h=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=h&&h.collapsed!=null?!h.collapsed:c.depth<=v}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.formatTooltip=function(e,a,n){for(var i=this.getData().tree,o=i.root.children[0],l=i.getNodeByDataIndex(e),s=l.getValue(),u=l.name;l&&l!==o;)u=l.parentNode.name+"."+u,l=l.parentNode;return Ge("nameValue",{name:u,value:s,noValue:isNaN(s)||s==null})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=nr(n,this),a.collapsed=!n.isExpand,a},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type="series."+_t,t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:Z.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t})(se),Qv=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),ec=(function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Qv},t.prototype.buildPath=function(e,a){var n=a.childPoints,i=n.length,o=a.parentPoint,l=n[0],s=n[i-1];if(i===1){e.moveTo(o[0],o[1]),e.lineTo(l[0],l[1]);return}var u=a.orient,v=u==="TB"||u==="BT"?0:1,c=1-v,h=U(a.forkPosition,1),f=[];f[v]=o[v],f[c]=o[c]+(s[c]-o[c])*h,e.moveTo(o[0],o[1]),e.lineTo(f[0],f[1]),e.moveTo(l[0],l[1]),f[v]=l[v],e.lineTo(f[0],f[1]),f[v]=s[v],e.lineTo(f[0],f[1]),e.lineTo(s[0],s[1]);for(var g=1;gy.x,w||(b=b-Math.PI));var D=w?"left":"right",A=l.getModel("label"),P=A.get("rotate"),I=P*(Math.PI/180),x=d.getTextContent();x&&(d.setTextConfig({position:A.get("position")||D,rotation:P==null?-b:I,origin:"center"}),x.setStyle("verticalAlign","middle"))}var L=l.get(["emphasis","focus"]),E=L==="relative"?Na(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;E&&(ne(e).focus=E),ac(n,o,v,e,g,f,p,a),e.__edge&&(e.onHoverStateChange=function(V){if(V!=="blur"){var T=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);T&&T.hoverState===Gs||Va(e.__edge,V)}})}function ac(r,t,e,a,n,i,o,l){var s=t.getModel(),u=r.get("edgeShape"),v=r.get("layout"),c=r.getOrient(),h=r.get(["lineStyle","curveness"]),f=r.get("edgeForkPosition"),g=s.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(p||(p=a.__edge=new Bs({shape:qr(v,c,h,n,n)})),J(p,{shape:qr(v,c,h,i,o)},r));else if(u==="polyline"&&v==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var d=t.children,m=[],y=0;y=0;i--)e.push(n[i])}}function nc(r,t){r.eachSeriesByType("tree",function(e){ic(e,t)})}function ic(r,t){var e=Ht(r,t).refContainer,a=Wt(r.getBoxLayoutParams(),e);r.layoutInfo=a;var n=r.get("layout"),i=0,o=0,l=null;n==="radial"?(i=2*Math.PI,o=Math.min(a.height,a.width)/2,l=Ii(function(b,w){return(b.parentNode===w.parentNode?1:2)/b.depth})):(i=a.width,o=a.height,l=Ii());var s=r.getData().tree.root,u=s.children[0];if(u){kv(s),rc(u,Ov,l),s.hierNode.modifier=-u.hierNode.prelim,Yt(u,Gv);var v=u,c=u,h=u;Yt(u,function(b){var w=b.getLayout().x;wc.getLayout().x&&(c=b),b.depth>h.depth&&(h=b)});var f=v===c?1:l(v,c)/2,g=f-v.getLayout().x,p=0,d=0,m=0,y=0;if(n==="radial")p=i/(c.getLayout().x+f+g),d=o/(h.depth-1||1),Yt(u,function(b){m=(b.getLayout().x+g)*p,y=(b.depth-1)*d;var w=qt(m,y);b.setLayout({x:w.x,y:w.y,rawX:m,rawY:y},!0)});else{var S=r.getOrient();S==="RL"||S==="LR"?(d=o/(c.getLayout().x+f+g),p=i/(h.depth-1||1),Yt(u,function(b){y=(b.getLayout().x+g)*d,m=S==="LR"?(b.depth-1)*p:i-(b.depth-1)*p,b.setLayout({x:m,y},!0)})):(S==="TB"||S==="BT")&&(p=i/(c.getLayout().x+f+g),d=o/(h.depth-1||1),Yt(u,function(b){m=(b.getLayout().x+g)*p,y=S==="TB"?(b.depth-1)*d:o-(b.depth-1)*d,b.setLayout({x:m,y},!0)}))}}}function oc(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:aa,subType:_t,query:t},function(a){var n=t.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),pn(r,aa,_t)}var lc=he(_t,sc);function sc(r){r.eachSeriesByType(_t,function(t){var e=t.getData(),a=e.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),l=e.ensureUniqueItemVisual(n.dataIndex,"style");$(l,o)})})}function gp(r){r.registerChartView(tc),r.registerSeriesModel(Jv),r.registerLayout(nc),r.registerVisual(lc),oc(r)}var Ei=["treemapZoomToNode","treemapRender","treemapMove"];function uc(r){for(var t=0;t1;)i=i.parentNode;var o=zs(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var vc=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};Il(n);var i=e.levels||[],o=this.designatedVisualItemStyle={},l=new ht({itemStyle:o},this,a);i=e.levels=cc(i,a);var s=ee(i||[],function(c){return new ht(c,l,a)},this),u=mn.createTree(n,this,v);function v(c){c.wrapMethod("getItemModel",function(h,f){var g=u.getNodeByDataIndex(f),p=g?s[g.depth]:null;return h.parentModel=p||l,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.getRawValue(e),l=i.getName(e);return Ge("nameValue",{name:l,value:o})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=nr(n,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},$(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=Nt(),this._idIndexMapCount=0);var n=a.get(e);return n==null&&a.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 a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){Al(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:Z.size.l,top:Z.size.xxxl,right:Z.size.l,bottom:Z.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"â–¶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:Z.size.m,emptyItemWidth:25,itemStyle:{color:Z.color.backgroundShade,textStyle:{color:Z.color.secondary}},emphasis:{itemStyle:{color:Z.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:Z.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Z.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t})(se);function Il(r){var t=0;G(r.children,function(a){Il(a);var n=a.value;Q(n)&&(n=n[0]),t+=n});var e=r.value;Q(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),Q(r.value)?r.value[0]=e:r.value=e}function cc(r,t){var e=Yn(t.get("color")),a=Yn(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,i;G(r,function(l){var s=new ht(l),u=s.get("color"),v=s.get("decal");(s.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(s.get(["itemStyle","decal"])||v&&v!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!i&&a&&(o.decal=a.slice()),r}}var hc=8,Ri=8,Sr=5,fc=(function(){function r(t){this.group=new j,t.add(this.group)}return r.prototype.render=function(t,e,a,n){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var l=i.getModel("itemStyle"),s=i.getModel("emphasis"),u=l.getModel("textStyle"),v=s.getModel(["itemStyle","textStyle"]),c=Ht(t,e).refContainer,h={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},f={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},g=Wt(h,c);this._prepare(a,f,u),this._renderContent(t,f,g,l,s,u,v,n),Fs(o,h,c)}},r.prototype._prepare=function(t,e,a){for(var n=t;n;n=n.parentNode){var i=Ja(n.getModel().get("name"),""),o=a.getTextRect(i),l=Math.max(o.width+hc*2,e.emptyItemWidth);e.totalWidth+=l+Ri,e.renderList.push({node:n,text:i,width:l})}},r.prototype._renderContent=function(t,e,a,n,i,o,l,s){for(var u=0,v=e.emptyItemWidth,c=t.get(["breadcrumb","height"]),h=e.totalWidth,f=e.renderList,g=i.getModel("itemStyle").getItemStyle(),p=f.length-1;p>=0;p--){var d=f[p],m=d.node,y=d.width,S=d.text;h>a.width&&(h-=y-v,y=v,S=null);var b=new vn({shape:{points:gc(u,0,y,c,p===f.length-1,p===0)},style:Ve(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Me({style:$e(o,{text:S})}),textConfig:{position:"inside"},z2:ya*1e4,onclick:Xe(s,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=$e(l,{text:S}),b.ensureState("emphasis").style=g,ie(b,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(b),pc(b,t,m),u+=y+Ri}},r.prototype.remove=function(){this.group.removeAll()},r})();function gc(r,t,e,a,n,i){var o=[[n?r:r-Sr,t],[r+e,t],[r+e,t+a],[n?r:r-Sr,t+a]];return!i&&o.splice(2,0,[r+e+Sr,t+a/2]),!n&&o.push([r,t+a/2]),o}function pc(r,t,e){ne(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&nr(e,t)}}var dc=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,a,n,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,i=this._storage.length;n=0;s--){var u=n[a==="asc"?o-s-1:s].getValue();u/e*tl[1]&&(l[1]=u)})),{sum:a,dataExtent:l}}function Ic(r,t,e){for(var a=0,n=1/0,i=0,o=void 0,l=r.length;ia&&(a=o));var s=r.area*r.area,u=t*t*e;return s?ha(u*a/s,s/(u*n)):1/0}function Ni(r,t,e,a,n){var i=t===e.width?0:1,o=1-i,l=["x","y"],s=["width","height"],u=e[l[i]],v=t?r.area/t:0;(n||v>e[s[o]])&&(v=e[s[o]]);for(var c=0,h=r.length;c$n&&(v=$n),n=s}vVi||Math.abs(e.dy)>Vi)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var a=e.originX,n=e.originY,i=e.scale,o=this.seriesModel;if(this._state!=="animating"){var l=o.getData().tree.root;if(!l)return;var s=l.getLayout();if(!s)return;var u=new Bt(s.x,s.y,s.width,s.height),v=o.layoutInfo,c=El(v,s),h=c*i;h=Rl(h,o);var f=h/c;a-=v.x,n-=v.y;var g=ds();On(g,g,[-a,-n]),gs(g,g,[f,f]),On(g,g,[a,n]),u.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:u.x,y:u.y,width:u.width,height:u.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var l=o.node;if(l.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var s=l.hostTree.data.getItemModel(l.dataIndex),u=s.get("link",!0),v=s.get("target",!0)||"blank";u&&Eo(u,v)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,n){var i=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new fc(this.group))).render(e,a,n.node,function(o){i._state!=="animating"&&(Sn(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=$t(),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,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var l=this._storage.background[o.getRawIndex()];if(l){var s=l.transformCoordToLocal(e,a),u=l.shape;if(u.x<=s[0]&&s[0]<=u.x+u.width&&u.y<=s[1]&&s[1]<=u.y+u.height)n={node:o,offsetX:s[0],offsetY:s[1]};else return!1}},this),n},t.type="treemap",t})(ae);function $t(){return{nodeGroup:[],background:[],content:[]}}function Nc(r,t,e,a,n,i,o,l,s,u){if(!o)return;var v=o.getLayout(),c=r.getData(),h=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var f=v.width,g=v.height,p=v.borderWidth,d=v.invisible,m=o.getRawIndex(),y=l&&l.getRawIndex(),S=o.viewChildren,b=v.upperHeight,w=S&&S.length,_=h.getModel("itemStyle"),D=h.getModel(["emphasis","itemStyle"]),A=h.getModel(["blur","itemStyle"]),P=h.getModel(["select","itemStyle"]),I=_.get("borderRadius")||0,x=X("nodeGroup",Kr);if(!x)return;if(s.add(x),x.x=v.x||0,x.y=v.y||0,x.markRedraw(),Ua(x).nodeWidth=f,Ua(x).nodeHeight=g,v.isAboveViewRoot)return x;var L=X("background",Mi,u,Pc);L&&k(x,L,w&&v.upperLabelHeight);var E=h.getModel("emphasis"),V=E.get("focus"),T=E.get("blurScope"),R=E.get("disabled"),N=V==="ancestor"?o.getAncestorsIndices():V==="descendant"?o.getDescendantIndices():V;if(w)Xn(x)&&Da(x,!1),L&&(Da(L,!R),c.setItemGraphicEl(o.dataIndex,L),Zn(L,N,T));else{var C=X("content",Mi,u,Ec);C&&O(x,C),L.disableMorphing=!0,L&&Xn(L)&&Da(L,!1),Da(x,!R),c.setItemGraphicEl(o.dataIndex,x);var M=h.getShallow("cursor");M&&C.attr("cursor",M),Zn(x,N,T)}return x;function k(Y,F,q){var K=ne(F);if(K.dataIndex=o.dataIndex,K.seriesIndex=r.seriesIndex,F.setShape({x:0,y:0,width:f,height:g,r:I}),d)B(F);else{F.invisible=!1;var te=o.getVisual("style"),pe=te.stroke,we=Gi(_);we.fill=pe;var re=dt(D);re.fill=D.get("borderColor");var fe=dt(A);fe.fill=A.get("borderColor");var de=dt(P);if(de.fill=P.get("borderColor"),q){var tt=f-2*p;W(F,pe,te.opacity,{x:p,y:0,width:tt,height:b})}else F.removeTextContent();F.setStyle(we),F.ensureState("emphasis").style=re,F.ensureState("blur").style=fe,F.ensureState("select").style=de,Oa(F)}Y.add(F)}function O(Y,F){var q=ne(F);q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex;var K=Math.max(f-2*p,0),te=Math.max(g-2*p,0);if(F.culling=!0,F.setShape({x:p,y:p,width:K,height:te,r:I}),d)B(F);else{F.invisible=!1;var pe=o.getVisual("style"),we=pe.fill,re=Gi(_);re.fill=we,re.decal=pe.decal;var fe=dt(D),de=dt(A),tt=dt(P);W(F,we,pe.opacity,null),F.setStyle(re),F.ensureState("emphasis").style=fe,F.ensureState("blur").style=de,F.ensureState("select").style=tt,Oa(F)}Y.add(F)}function B(Y){!Y.invisible&&i.push(Y)}function W(Y,F,q,K){var te=h.getModel(K?Oi:ki),pe=Ja(h.get("name"),null),we=te.getShallow("show");Ce(Y,De(h,K?Oi:ki),{defaultText:we?pe:null,inheritColor:F,defaultOpacity:q,labelFetcher:r,labelDataIndex:o.dataIndex});var re=Y.getTextContent();if(re){var fe=re.style,de=ps(fe.padding||0);K&&(Y.setTextConfig({layoutRect:K}),re.disableLabelLayout=!0),re.beforeUpdate=function(){var Ye=Math.max((K?K.width:Y.shape.width)-de[1]-de[3],0),wa=Math.max((K?K.height:Y.shape.height)-de[0]-de[2],0);(fe.width!==Ye||fe.height!==wa)&&re.setStyle({width:Ye,height:wa})},fe.truncateMinChar=2,fe.lineOverflow="truncate",H(fe,K,v);var tt=re.getState("emphasis");H(tt?tt.style:null,K,v)}}function H(Y,F,q){var K=Y?Y.text:null;if(!F&&q.isLeafRoot&&K!=null){var te=r.get("drillDownIcon",!0);Y.text=te?te+" "+K:K}}function X(Y,F,q,K){var te=y!=null&&e[Y][y],pe=n[Y];return te?(e[Y][y]=null,ve(pe,te)):d||(te=new F,te instanceof So&&(te.z2=Mc(q,K)),me(pe,te)),t[Y][m]=te}function ve(Y,F){var q=Y[m]={};F instanceof Kr?(q.oldX=F.x,q.oldY=F.y):q.oldShape=$({},F.shape)}function me(Y,F){var q=Y[m]={},K=o.parentNode,te=F instanceof j;if(K&&(!a||a.direction==="drillDown")){var pe=0,we=0,re=n.background[K.getRawIndex()];!a&&re&&re.oldShape&&(pe=re.oldShape.width,we=re.oldShape.height),te?(q.oldX=0,q.oldY=we):q.oldShape={x:pe,y:we,width:0,height:0}}q.fadein=!te}}function Mc(r,t){return r*Tc+t}var Vc="itemStyle",Nl=Ft();const kc={seriesType:"treemap",reset:function(r){var t=r.getData().tree,e=t.root;e.isRemoved()||Ml(e,{},r.getViewRoot().getAncestors(),r)}};function Ml(r,t,e,a){var n=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var l=n.getModel(Vc),s=Oc(l,t,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),v=l.get("borderColor"),c=l.get("borderColorSaturation"),h;c!=null&&(h=Bi(s),v=Gc(c,h)),u.stroke=v;var f=r.viewChildren;if(!f||!f.length)h=Bi(s),u.fill=h;else{var g=Bc(r,n,i,l,s,f);G(f,function(p,d){if(p.depth>=e.length||p===e[p.depth]){var m=zc(n,s,p,d,g,a);Ml(p,m,e,a)}})}}}function Oc(r,t,e){var a=$({},t),n=e.designatedVisualItemStyle;return G(["color","colorAlpha","colorSaturation"],function(i){n[i]=t[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function Bi(r){var t=br(r,"color");if(t){var e=br(r,"colorAlpha"),a=br(r,"colorSaturation");return a&&(t=bo(t,null,null,a)),e&&(t=ys(t,e)),t}}function Gc(r,t){return t!=null?bo(t,null,null,r):null}function br(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function Bc(r,t,e,a,n,i){if(!(!i||!i.length)){var o=wr(t,"color")||n.color!=null&&n.color!=="none"&&(wr(t,"colorAlpha")||wr(t,"colorSaturation"));if(o){var l=t.get("visualMin"),s=t.get("visualMax"),u=e.dataExtent.slice();l!=null&&lu[1]&&(u[1]=s);var v=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var h=new Yo(c);return Nl(h).drColorMappingBy=v,h}}}function wr(r,t){var e=r.get(t);return Q(e)&&e.length?{name:t,range:e}:null}function zc(r,t,e,a,n,i){var o=$({},t);if(n){var l=n.type,s=l==="color"&&Nl(n).drColorMappingBy,u=s==="index"?a:s==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[l]=n.mapValueToVisual(u)}return o}function pp(r){r.registerSeriesModel(vc),r.registerChartView(Rc),r.registerVisual(kc),r.registerLayout(wc),uc(r)}function At(r){return"_EC_"+r}var Fc=(function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var a=this._nodesMap;if(!a[At(t)]){var n=new yt(t,e);return n.hostGraph=this,this.nodes.push(n),a[At(t)]=n,n}},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[At(t)]},r.prototype.addEdge=function(t,e,a){var n=this._nodesMap,i=this._edgesMap;if(Ne(t)&&(t=this.nodes[t]),Ne(e)&&(e=this.nodes[e]),t instanceof yt||(t=n[At(t)]),e instanceof yt||(e=n[At(e)]),!(!t||!e)){var o=t.id+"-"+e.id,l=new Vl(t,e,a);return l.hostGraph=this,this._directed&&(t.outEdges.push(l),e.inEdges.push(l)),t.edges.push(l),t!==e&&e.edges.push(l),this.edges.push(l),i[o]=l,l}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof yt&&(t=t.id),e instanceof yt&&(e=e.id);var a=this._edgesMap;return this._directed?a[t+"-"+e]:a[t+"-"+e]||a[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var a=this.nodes,n=a.length,i=0;i=0&&t.call(e,a[i],i)},r.prototype.eachEdge=function(t,e){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&t.call(e,a[i],i)},r.prototype.breadthFirstTraverse=function(t,e,a,n){if(e instanceof yt||(e=this._nodesMap[At(e)]),!!e){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&s.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&!t.hasKey(g)&&(t.set(g,!0),o.push(f.node1))}for(s=0;s=0&&!t.hasKey(S)&&(t.set(S,!0),l.push(y.node2))}}}return{edge:t.keys(),node:e.keys()}},r})(),Vl=(function(){function r(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=Nt(),e=Nt();t.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i=0&&!t.hasKey(c)&&(t.set(c,!0),a.push(v.node1))}for(i=0;i=0&&!t.hasKey(p)&&(t.set(p,!0),n.push(g.node2))}return{edge:t.keys(),node:e.keys()}},r})();function kl(r,t){return{getValue:function(e){var a=this[r][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}Za(yt,kl("hostGraph","data"));Za(Vl,kl("hostGraph","edgeData"));function wn(r,t,e,a,n){for(var i=new Fc(a),o=0;o "+h)),u++)}var f=e.get("coordinateSystem"),g;if(f==="cartesian2d"||f==="polar"||f==="matrix")g=et(r,e);else{var p=Ro.get(f),d=p?p.dimensions||[]:[];ke(d,"value")<0&&d.concat(["value"]);var m=cn(r,{coordDimensions:d,encodeDefine:e.getEncode()}).dimensions;g=new Mt(m,e),g.initData(r)}var y=new Mt(["value"],e);return y.initData(s,l),n&&n(g,y),wl({mainData:g,struct:i,structAttr:"graph",datas:{node:g,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var jr="-->",ir=function(r){return r.get("autoCurveness")||null},Ol=function(r,t){var e=ir(r),a=20,n=[];if(Ne(e))a=e;else if(Q(e)){r.__curvenessList=e;return}t>a&&(a=t);var i=a%2?a+2:a+3;n=[];for(var o=0;o "),value:o.value,noValue:o.value==null})}var c=Ws({series:this,dataIndex:e,multipleSeries:a});return c},t.prototype._updateCategoriesData=function(){var e=ee(this.option.categories||[],function(n){return n.value!=null?n:$({value:0},n)}),a=new Mt(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return $o(e)&&e},t.type="series."+be,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:Z.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t})(se);function Ca(r){return r instanceof Array||(r=[r,r]),r}var Xc=he(be,Zc);function Zc(r){r.eachSeriesByType(be,function(t){var e=t.getGraph(),a=t.getEdgeData(),n=Ca(t.get("edgeSymbol")),i=Ca(t.get("edgeSymbolSize"));a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",i&&i[0]),a.setVisual("toSymbolSize",i&&i[1]),a.setVisual("style",t.getModel("lineStyle").getLineStyle()),a.each(function(o){var l=a.getItemModel(o),s=e.getEdgeByIndex(o),u=Ca(l.getShallow("symbol",!0)),v=Ca(l.getShallow("symbolSize",!0)),c=l.getModel("lineStyle").getLineStyle(),h=a.ensureUniqueItemVisual(o,"style");switch($(h,c),h.stroke){case"source":{var f=s.node1.getVisual("style");h.stroke=f&&f.fill;break}case"target":{var f=s.node2.getVisual("style");h.stroke=f&&f.fill;break}}u[0]&&s.setVisual("fromSymbol",u[0]),u[1]&&s.setVisual("toSymbol",u[1]),v[0]&&s.setVisual("fromSymbolSize",v[0]),v[1]&&s.setVisual("toSymbolSize",v[1])})})}function Bl(r){var t=r.coordinateSystem;if(!(t&&t.type!=="view")){var e=r.getGraph();e.eachNode(function(a){var n=a.getModel();a.setLayout([+n.get("x"),+n.get("y")])}),Dn(e,r)}}function Dn(r,t){r.eachEdge(function(e,a){var n=xt(e.getModel().get(["lineStyle","curveness"]),-_n(e,t,a,!0),0),i=st(e.node1.getLayout()),o=st(e.node2.getLayout()),l=[i,o];+n&&l.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),e.setLayout(l)})}var qc=he(be,Kc);function Kc(r,t){r.eachSeriesByType(be,function(e){var a=e.get("layout"),n=e.coordinateSystem;if(n&&n.type!=="view"){var i=e.getData(),o=[];G(n.dimensions,function(h){o=o.concat(i.mapDimensionsAll(h))});for(var l=0;l=0?l=l+u:l=l-u:g>=0?l=l-u:l=l+u}return l}function Lr(r,t){var e=[],a=ws,n=[[],[],[]],i=[[],[]],o=[];t/=2,r.eachEdge(function(l,s){var u=l.getLayout(),v=l.getVisual("fromSymbol"),c=l.getVisual("toSymbol");u.__original||(u.__original=[st(u[0]),st(u[1])],u[2]&&u.__original.push(st(u[2])));var h=u.__original;if(u[2]!=null){if(_e(n[0],h[0]),_e(n[1],h[2]),_e(n[2],h[1]),v&&v!=="none"){var f=jt(l.node1),g=Hi(n,h[0],f*t);a(n[0][0],n[1][0],n[2][0],g,e),n[0][0]=e[3],n[1][0]=e[4],a(n[0][1],n[1][1],n[2][1],g,e),n[0][1]=e[3],n[1][1]=e[4]}if(c&&c!=="none"){var f=jt(l.node2),g=Hi(n,h[1],f*t);a(n[0][0],n[1][0],n[2][0],g,e),n[1][0]=e[1],n[2][0]=e[2],a(n[0][1],n[1][1],n[2][1],g,e),n[1][1]=e[1],n[2][1]=e[2]}_e(u[0],n[0]),_e(u[1],n[2]),_e(u[2],n[1])}else{if(_e(i[0],h[0]),_e(i[1],h[1]),Xt(o,i[1],i[0]),nn(o,o),v&&v!=="none"){var f=jt(l.node1);Hr(i[0],i[0],o,f*t)}if(c&&c!=="none"){var f=jt(l.node2);Hr(i[1],i[1],o,-f*t)}_e(u[0],i[0]),_e(u[1],i[1])}})}var ih=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=be,e}return t.prototype.init=function(e,a){var n=new er,i=new Xo,o=this.group,l=new j;this._controller=new rr(a.getZr()),l.add(n.group),l.add(i.group),o.add(l),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=l,this._firstRender=!0},t.prototype.render=function(e,a,n){var i=this,o=ri(e),l=!1;this._model=e,this._api=n,this._active=!0;var s=this._mainGroup,u=this._getThumbnailInfo();u&&u.bridge.reset(n);var v=this._symbolDraw,c=this._lineDraw;o&&Vt(s,kt,o,this._firstRender?null:e),Lr(e.getGraph(),Kt(e));var h=e.getData();v.updateData(h);var f=e.getEdgeData();c.updateData(f),this._updateNodeAndLinkScale(),o&&fn(e,n,this._controller,function(b,w,_){return e.coordinateSystem.containPoint([w,_])},null),clearTimeout(this._layoutTimeout);var g=e.forceLayout,p=e.get(["force","layoutAnimation"]);g&&(l=!0,this._startForceLayoutIteration(g,n,p));var d=e.get("layout");h.graph.eachNode(function(b){var w=b.dataIndex,_=b.getGraphicEl(),D=b.getModel();if(_){_.off("drag").off("dragend");var A=D.get("draggable");A&&_.on("drag",function(I){switch(d){case"force":g.warmUp(),!i._layouting&&i._startForceLayoutIteration(g,n,p),g.setFixed(w),h.setItemLayout(w,[_.x,_.y]);break;case"circular":h.setItemLayout(w,[_.x,_.y]),b.setLayout({fixed:!0},!0),xn(e,"symbolSize",b,[I.offsetX,I.offsetY]),i.updateLayout(e);break;default:h.setItemLayout(w,[_.x,_.y]),Dn(e.getGraph(),e),i.updateLayout(e);break}}).on("dragend",function(){g&&g.setUnfixed(w)}),_.setDraggable(A,!!D.get("cursor"));var P=D.get(["emphasis","focus"]);P==="adjacency"&&(ne(_).focus=b.getAdjacentDataIndices())}}),h.graph.eachEdge(function(b){var w=b.getGraphicEl(),_=b.getModel().get(["emphasis","focus"]);w&&_==="adjacency"&&(ne(w).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var m=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),y=h.getLayout("cx"),S=h.getLayout("cy");h.graph.eachNode(function(b){zl(b,m,y,S)}),this._firstRender=!1,l||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,a,n){var i=this,o=!1;(function l(){e.step(function(s){i.updateLayout(i._model),(s||!o)&&(o=!0,i._renderThumbnail(i._model,a,i._symbolDraw,i._lineDraw)),(i._layouting=!s)&&(n?i._layoutTimeout=setTimeout(l,16):l())})})()},t.prototype.__updateOnOwnRoam=function(e,a,n){var i=ri(a);!this._active||!i||(Vt(this._mainGroup,kt,i,null),Wo(e)&&(this._updateNodeAndLinkScale(),Lr(a.getGraph(),Kt(a)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),n=Kt(e);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(Lr(e.getGraph(),Kt(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,a=e.coordinateSystem;if(a.type==="view"){var n=gu(e);if(n)return{bridge:n,coordSys:a}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(ni(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,a,n,i){var o=this._getThumbnailInfo();if(o){var l=new j,s=n.group.children(),u=i.group.children(),v=new j,c=new j;l.add(c),l.add(v);for(var h=0;h "),value:i.value,noValue:i.value==null})}return Ge("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(e);if(n.name==null&&(n.name=i.getName(e)),n.value==null){var l=o.getLayout().value;n.value=l}}return n},t.type="series."+ga,t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t})(se),Wi=(function(r){z(t,r);function t(e,a,n){var i=r.call(this)||this;ne(i).dataType="node",i.z2=2;var o=new Me;return i.setTextContent(o),i.updateData(e,a,n,!0),i}return t.prototype.updateData=function(e,a,n,i){var o=this,l=e.graph.getNodeByIndex(a),s=e.hostModel,u=l.getModel(),v=u.getModel("emphasis"),c=e.getItemLayout(a),h=$(Fe(u.getModel("itemStyle"),c,!0),c),f=this;if(isNaN(h.startAngle)){f.setShape(h);return}i?f.setShape(h):J(f,{shape:h},s,a);var g=$(Fe(u.getModel("itemStyle"),c,!0),c);o.setShape(g),o.useStyle(e.getItemVisual(a,"style")),ce(o,u),this._updateLabel(s,u,l),e.setItemGraphicEl(a,f),ce(f,u,"itemStyle");var p=v.get("focus");ie(this,p==="adjacency"?l.getAdjacentDataIndices():p,v.get("blurScope"),v.get("disabled"))},t.prototype._updateLabel=function(e,a,n){var i=this.getTextContent(),o=n.getLayout(),l=(o.startAngle+o.endAngle)/2,s=Math.cos(l),u=Math.sin(l),v=a.getModel("label");i.ignore=!v.get("show");var c=De(a),h=n.getVisual("style");Ce(i,c,{labelFetcher:{getFormattedLabel:function(y,S,b,w,_,D){return e.getFormattedLabel(y,S,"node",w,xt(_,c.normal&&c.normal.get("formatter"),a.get("name")),D)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var f=v.get("position")||"outside",g=v.get("distance")||0,p;f==="outside"?p=o.r+g:p=(o.r+o.r0)/2,this.textConfig={inside:f!=="outside"};var d=f!=="outside"?v.get("align")||"center":s>0?"left":"right",m=f!=="outside"?v.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:s*p+o.cx,y:u*p+o.cy,rotation:0,style:{align:d,verticalAlign:m}})},t})(je),ch=(function(r){z(t,r);function t(e,a,n,i){var o=r.call(this)||this;return ne(o).dataType="edge",o.updateData(e,a,n,i,!0),o}return t.prototype.buildPath=function(e,a){e.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;e.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),e.bezierCurveTo((a.cx-a.s2[0])*n+a.s2[0],(a.cy-a.s2[1])*n+a.s2[1],(a.cx-a.t1[0])*n+a.t1[0],(a.cy-a.t1[1])*n+a.t1[1],a.t1[0],a.t1[1]),e.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),e.bezierCurveTo((a.cx-a.t2[0])*n+a.t2[0],(a.cy-a.t2[1])*n+a.t2[1],(a.cx-a.s1[0])*n+a.s1[0],(a.cy-a.s1[1])*n+a.s1[1],a.s1[0],a.s1[1]),e.closePath()},t.prototype.updateData=function(e,a,n,i,o){var l=e.hostModel,s=a.graph.getEdgeByIndex(n),u=s.getLayout(),v=s.node1.getModel(),c=a.getItemModel(s.dataIndex),h=c.getModel("lineStyle"),f=c.getModel("emphasis"),g=f.get("focus"),p=$(Fe(v.getModel("itemStyle"),u,!0),u),d=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){d.setShape(p);return}o?(d.setShape(p),Ui(d,s,e,h)):(Oe(d),Ui(d,s,e,h),J(d,{shape:p},l,n)),ie(this,g==="adjacency"?s.getAdjacentDataIndices():g,f.get("blurScope"),f.get("disabled")),ce(d,c,"lineStyle"),a.setItemGraphicEl(s.dataIndex,d)},t})(xe);function Ui(r,t,e,a){var n=t.node1,i=t.node2,o=r.style;r.setStyle(a.getLineStyle());var l=a.get("color");switch(l){case"source":o.fill=e.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=e.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var s=e.getItemVisual(n.dataIndex,"style").fill,u=e.getItemVisual(i.dataIndex,"style").fill;if(Le(s)&&Le(u)){var v=r.shape,c=(v.s1[0]+v.s2[0])/2,h=(v.s1[1]+v.s2[1])/2,f=(v.t1[0]+v.t2[0])/2,g=(v.t1[1]+v.t2[1])/2;o.fill=new on(c,h,f,g,[{offset:0,color:s},{offset:1,color:u}],!0)}break}}var hh=Math.PI/180,fh=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=ga,e}return t.prototype.init=function(e,a){},t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,l=this.group,s=-e.get("startAngle")*hh;if(i.diff(o).add(function(v){var c=i.getItemLayout(v);if(c){var h=new Wi(i,v,s);ne(h).dataIndex=v,l.add(h)}}).update(function(v,c){var h=o.getItemGraphicEl(c),f=i.getItemLayout(v);if(!f){h&&ut(h,e,c);return}h?h.updateData(i,v,s):h=new Wi(i,v,s),l.add(h)}).remove(function(v){var c=o.getItemGraphicEl(v);c&&ut(c,e,v)}).execute(),!o){var u=e.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=U(u[0],n.getWidth()),this.group.originY=U(u[1],n.getHeight()),ue(this.group,{scaleX:1,scaleY:1},e)}this._data=i,this.renderEdges(e,s)},t.prototype.renderEdges=function(e,a){var n=e.getData(),i=e.getEdgeData(),o=this._edgeData,l=this.group;i.diff(o).add(function(s){var u=new ch(n,i,s,a);ne(u).dataIndex=s,l.add(u)}).update(function(s,u){var v=o.getItemGraphicEl(u);v.updateData(n,i,s,a),l.add(v)}).remove(function(s){var u=o.getItemGraphicEl(s);u&&ut(u,e,s)}).execute(),this._edgeData=i},t.prototype.dispose=function(){},t.type=ga,t})(ae),Cr=Math.PI/180,gh=he(ga,ph);function ph(r,t){r.eachSeriesByType(ga,function(e){dh(e,t)})}function dh(r,t){var e=r.getData(),a=e.graph,n=r.getEdgeData(),i=n.count();if(i){var o=Lo(r,t),l=o.cx,s=o.cy,u=o.r,v=o.r0,c=Math.max((r.get("padAngle")||0)*Cr,0),h=Math.max((r.get("minAngle")||0)*Cr,0),f=-r.get("startAngle")*Cr,g=f+Math.PI*2,p=r.get("clockwise"),d=p?1:-1,m=[f,g];an(m,!p);var y=m[0],S=m[1],b=S-y,w=e.getSum("value")===0&&n.getSum("value")===0,_=[],D=0;a.eachEdge(function(C){var M=w?1:C.getValue("value");w&&(M>0||h)&&(D+=2);var k=C.node1.dataIndex,O=C.node2.dataIndex;_[k]=(_[k]||0)+M,_[O]=(_[O]||0)+M});var A=0;if(a.eachNode(function(C){var M=C.getValue("value");isNaN(M)||(_[C.dataIndex]=Math.max(M,_[C.dataIndex]||0)),!w&&(_[C.dataIndex]>0||h)&&D++,A+=_[C.dataIndex]||0}),!(D===0||A===0)){c*D>=Math.abs(b)&&(c=Math.max(0,(Math.abs(b)-h*D)/D)),(c+h)*D>=Math.abs(b)&&(h=(Math.abs(b)-c*D)/D);var P=(b-c*D*d)/A,I=0,x=0,L=0;a.eachNode(function(C){var M=_[C.dataIndex]||0,k=P*(A?M:1)*d;Math.abs(k)x){var V=I/x;a.eachNode(function(C){var M=C.getLayout().angle;Math.abs(M)>=h?C.setLayout({angle:M*V,ratio:V},!0):C.setLayout({angle:h,ratio:h===0?1:M/h},!0)})}else a.eachNode(function(C){if(!E){var M=C.getLayout().angle,k=Math.min(M/L,1),O=k*I;M-Oh&&h>0){var k=E?1:Math.min(M/L,1),O=M-h,B=Math.min(O,Math.min(T,I*k));T-=B,C.setLayout({angle:M-B,ratio:(M-B)/M},!0)}else h>0&&C.setLayout({angle:h,ratio:M===0?1:h/M},!0)}});var R=y,N=[];a.eachNode(function(C){var M=Math.max(C.getLayout().angle,h);C.setLayout({cx:l,cy:s,r0:v,r:u,startAngle:R,endAngle:R+M*d,clockwise:p},!0),N[C.dataIndex]=R,R+=(M+c)*d}),a.eachEdge(function(C){var M=w?1:C.getValue("value"),k=P*(A?M:1)*d,O=C.node1.dataIndex,B=N[O]||0,W=Math.abs((C.node1.getLayout().ratio||1)*k),H=B+W*d,X=[l+v*Math.cos(B),s+v*Math.sin(B)],ve=[l+v*Math.cos(H),s+v*Math.sin(H)],me=C.node2.dataIndex,Y=N[me]||0,F=Math.abs((C.node2.getLayout().ratio||1)*k),q=Y+F*d,K=[l+v*Math.cos(Y),s+v*Math.sin(Y)],te=[l+v*Math.cos(q),s+v*Math.sin(q)];C.setLayout({s1:X,s2:ve,sStartAngle:B,sEndAngle:H,t1:K,t2:te,tStartAngle:Y,tEndAngle:q,cx:l,cy:s,r:v,value:M,clockwise:p}),N[O]=H,N[me]=q})}}}function yp(r){r.registerChartView(fh),r.registerSeriesModel(vh),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,gh),r.registerProcessor(ba("chord"))}var yh=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),mh=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="pointer",a}return t.prototype.getDefaultShape=function(){return new yh},t.prototype.buildPath=function(e,a){var n=Math.cos,i=Math.sin,o=a.r,l=a.width,s=a.angle,u=a.x-n(s)*l*(l>=o/3?1:2),v=a.y-i(s)*l*(l>=o/3?1:2);s=a.angle-Math.PI/2,e.moveTo(u,v),e.lineTo(a.x+n(s)*l,a.y+i(s)*l),e.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),e.lineTo(a.x-n(s)*l,a.y-i(s)*l),e.lineTo(u,v)},t})(xe);function Sh(r,t){var e=r.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n),o=U(e[0],t.getWidth()),l=U(e[1],t.getHeight()),s=U(r.get("radius"),i/2);return{cx:o,cy:l,r:s}}function Ta(r,t){var e=r==null?"":r+"";return t&&(Le(t)?e=t.replace("{value}",e):Ie(t)&&(e=t(r))),e}var bh=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=Sh(e,n);this._renderMain(e,a,n,i,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,a,n,i,o){var l=this.group,s=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,v=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),h=c.get("roundCap"),f=h?Ha:je,g=c.get("show"),p=c.getModel("lineStyle"),d=p.get("width"),m=[u,v];an(m,!s),u=m[0],v=m[1];for(var y=v-u,S=u,b=[],w=0;g&&w=P&&(I===0?0:i[I-1][0])Math.PI/2&&(H+=Math.PI)):W==="tangential"?H=-A-Math.PI/2:Ne(W)&&(H=W*Math.PI/180),H===0?c.add(new Me({style:$e(S,{text:M,x:O,y:B,verticalAlign:T<-.8?"top":T>.8?"bottom":"middle",align:V<-.4?"left":V>.4?"right":"center"},{inheritColor:k}),silent:!0})):c.add(new Me({style:$e(S,{text:M,x:O,y:B,verticalAlign:"middle",align:"center"},{inheritColor:k}),silent:!0,originX:O,originY:B,rotation:H}))}if(y.get("show")&&R!==b){var N=y.get("distance");N=N?N+v:v;for(var X=0;X<=w;X++){V=Math.cos(A),T=Math.sin(A);var ve=new qn({shape:{x1:V*(g-N)+h,y1:T*(g-N)+f,x2:V*(g-D-N)+h,y2:T*(g-D-N)+f},silent:!0,style:L});L.stroke==="auto"&&ve.setStyle({stroke:i((R+X/w)/b)}),c.add(ve),A+=I}A-=I}else A+=P}},t.prototype._renderPointer=function(e,a,n,i,o,l,s,u,v){var c=this.group,h=this._data,f=this._progressEls,g=[],p=e.get(["pointer","show"]),d=e.getModel("progress"),m=d.get("show"),y=e.getData(),S=y.mapDimension("value"),b=+e.get("min"),w=+e.get("max"),_=[b,w],D=[l,s];function A(I,x){var L=y.getItemModel(I),E=L.getModel("pointer"),V=U(E.get("width"),o.r),T=U(E.get("length"),o.r),R=e.get(["pointer","icon"]),N=E.get("offsetCenter"),C=U(N[0],o.r),M=U(N[1],o.r),k=E.get("keepAspect"),O;return R?O=Ke(R,C-V/2,M-T,V,T,null,k):O=new mh({shape:{angle:-Math.PI/2,width:V,r:T,x:C,y:M}}),O.rotation=-(x+Math.PI/2),O.x=o.cx,O.y=o.cy,O}function P(I,x){var L=d.get("roundCap"),E=L?Ha:je,V=d.get("overlap"),T=V?d.get("width"):v/y.count(),R=V?o.r-T:o.r-(I+1)*T,N=V?o.r:o.r-I*T,C=new E({shape:{startAngle:l,endAngle:x,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:N}});return V&&(C.z2=Pe(y.get(S,I),[b,w],[100,0],!0)),C}(m||p)&&(y.diff(h).add(function(I){var x=y.get(S,I);if(p){var L=A(I,l);ue(L,{rotation:-((isNaN(+x)?D[0]:Pe(x,_,D,!0))+Math.PI/2)},e),c.add(L),y.setItemGraphicEl(I,L)}if(m){var E=P(I,l),V=d.get("clip");ue(E,{shape:{endAngle:Pe(x,_,D,V)}},e),c.add(E),Kn(e.seriesIndex,y.dataType,I,E),g[I]=E}}).update(function(I,x){var L=y.get(S,I);if(p){var E=h.getItemGraphicEl(x),V=E?E.rotation:l,T=A(I,V);T.rotation=V,J(T,{rotation:-((isNaN(+L)?D[0]:Pe(L,_,D,!0))+Math.PI/2)},e),c.add(T),y.setItemGraphicEl(I,T)}if(m){var R=f[x],N=R?R.shape.endAngle:l,C=P(I,N),M=d.get("clip");J(C,{shape:{endAngle:Pe(L,_,D,M)}},e),c.add(C),Kn(e.seriesIndex,y.dataType,I,C),g[I]=C}}).execute(),y.each(function(I){var x=y.getItemModel(I),L=x.getModel("emphasis"),E=L.get("focus"),V=L.get("blurScope"),T=L.get("disabled"),R=i(Pe(y.get(S,I),_,[0,1],!0));if(p){var N=y.getItemGraphicEl(I),C=y.getItemVisual(I,"style"),M=C.fill;if(N instanceof pa){var k=N.style;N.useStyle($({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},C))}else N.useStyle(C),N.type!=="pointer"&&N.setColor(M);N.setStyle(x.getModel(["pointer","itemStyle"]).getItemStyle()),N.style.fill==="auto"&&N.setStyle("fill",R),N.z2EmphasisLift=0,ce(N,x),ie(N,E,V,T)}if(m){var O=g[I];O.useStyle(y.getItemVisual(I,"style")),O.setStyle(x.getModel(["progress","itemStyle"]).getItemStyle()),O.style.fill==="auto"&&O.setStyle("fill",R),O.z2EmphasisLift=0,ce(O,x),ie(O,E,V,T)}}),this._progressEls=g)},t.prototype._renderAnchor=function(e,a){var n=e.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),l=n.get("icon"),s=n.get("offsetCenter"),u=n.get("keepAspect"),v=Ke(l,a.cx-o/2+U(s[0],a.r),a.cy-o/2+U(s[1],a.r),o,o,null,u);v.z2=n.get("showAbove")?1:0,v.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(v)}},t.prototype._renderTitleAndDetail=function(e,a,n,i,o){var l=this,s=e.getData(),u=s.mapDimension("value"),v=+e.get("min"),c=+e.get("max"),h=new j,f=[],g=[],p=e.isAnimationEnabled(),d=e.get(["pointer","showAbove"]);s.diff(this._data).add(function(m){f[m]=new Me({silent:!0}),g[m]=new Me({silent:!0})}).update(function(m,y){f[m]=l._titleEls[y],g[m]=l._detailEls[y]}).execute(),s.each(function(m){var y=s.getItemModel(m),S=s.get(u,m),b=new j,w=i(Pe(S,[v,c],[0,1],!0)),_=y.getModel("title");if(_.get("show")){var D=_.get("offsetCenter"),A=o.cx+U(D[0],o.r),P=o.cy+U(D[1],o.r),I=f[m];I.attr({z2:d?0:2,style:$e(_,{x:A,y:P,text:s.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:w})}),b.add(I)}var x=y.getModel("detail");if(x.get("show")){var L=x.get("offsetCenter"),E=o.cx+U(L[0],o.r),V=o.cy+U(L[1],o.r),T=U(x.get("width"),o.r),R=U(x.get("height"),o.r),N=e.get(["progress","show"])?s.getItemVisual(m,"style").fill:w,I=g[m],C=x.get("formatter");I.attr({z2:d?0:2,style:$e(x,{x:E,y:V,text:Ta(S,C),width:isNaN(T)?null:T,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:N})}),Ao(I,{normal:x},S,function(k){return Ta(k,C)}),p&&Xs(I,m,s,e,{getFormattedLabel:function(k,O,B,W,H,X){return Ta(X?X.interpolatedValue:S,C)}}),b.add(I)}h.add(b)}),this.group.add(h),this._titleEls=f,this._detailEls=g},t.type="gauge",t})(ae),wh=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,a){return ma(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,Z.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Z.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Z.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:Z.color.axisLabel,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:Z.color.neutral00,borderWidth:0,borderColor:Z.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:Z.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Z.color.transparent,borderWidth:0,borderColor:Z.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:Z.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(se);function mp(r){r.registerChartView(bh),r.registerSeriesModel(wh)}var Ot="funnel",_h=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ut(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return ma(this,{coordDimensions:["value"],encodeDefaulter:Xe(Io,this)})},t.prototype._defaultLabelLine=function(e){un(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),n=r.prototype.getDataParams.call(this,e),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series."+Ot,t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,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:Z.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t})(se),Dh=["itemStyle","opacity"],xh=(function(r){z(t,r);function t(e,a){var n=r.call(this)||this,i=n,o=new zt,l=new Me;return i.setTextContent(l),n.setTextGuideLine(o),n.updateData(e,a,!0),n}return t.prototype.updateData=function(e,a,n){var i=this,o=e.hostModel,l=e.getItemModel(a),s=e.getItemLayout(a),u=l.getModel("emphasis"),v=l.get(Dh);v=v??1,n||Oe(i),i.useStyle(e.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:s.points}),i.style.opacity=0,ue(i,{style:{opacity:v}},o,a)):J(i,{style:{opacity:v},shape:{points:s.points}},o,a),ce(i,l),this._updateLabel(e,a),ie(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),l=e.hostModel,s=e.getItemModel(a),u=e.getItemLayout(a),v=u.label,c=e.getItemVisual(a,"style"),h=c.fill;Ce(o,De(s),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:c.opacity,defaultText:e.getName(a)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}});var f=s.getModel("label"),g=f.get("color"),p=g==="inherit"?h:null;n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:p,outsideFill:p});var d=v.linePoints;i.setShape({points:d}),n.textGuideLineConfig={anchor:d?new ge(d[0][0],d[0][1]):null},J(o,{style:{x:v.x,y:v.y}},l,a),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),jo(n,Jo(s),{stroke:h})},t})(vn),Ah=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=Ot,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,l=this.group;i.diff(o).add(function(s){var u=new xh(i,s);i.setItemGraphicEl(s,u),l.add(u)}).update(function(s,u){var v=o.getItemGraphicEl(u);v.updateData(i,s),l.add(v),i.setItemGraphicEl(s,v)}).remove(function(s){var u=o.getItemGraphicEl(s);ut(u,e,s)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=Ot,t})(ae);function Ih(r,t){for(var e=r.mapDimension("value"),a=r.mapArray(e,function(s){return s}),n=[],i=t==="ascending",o=0,l=r.count();o-1&&(o="left"),e&&ke(["left","right"],o)>-1&&(o="bottom")),o==="left"?(p=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,m=p-S,h=m-5,c="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,m=p+S,h=m+5,c="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,y=d-S,f=y-5,c="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,y=d+S,f=y+5,c="center"):o==="rightTop"?(p=e?u[3][0]:u[1][0],d=e?u[3][1]:u[1][1],e?(y=d-S,f=y-5,c="center"):(m=p+S,h=m+5,c="top")):o==="rightBottom"?(p=u[2][0],d=u[2][1],e?(y=d+S,f=y+5,c="center"):(m=p+S,h=m+5,c="bottom")):o==="leftTop"?(p=u[0][0],d=e?u[0][1]:u[1][1],e?(y=d-S,f=y-5,c="center"):(m=p-S,h=m-5,c="right")):o==="leftBottom"?(p=e?u[1][0]:u[3][0],d=e?u[1][1]:u[2][1],e?(y=d+S,f=y+5,c="center"):(m=p-S,h=m-5,c="right")):(p=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,e?(y=d+S,f=y+5,c="center"):(m=p+S,h=m+5,c="left")),e?(m=p,h=m):(y=d,f=y),g=[[p,d],[m,y]]}s.label={linePoints:g,x:h,y:f,verticalAlign:"middle",textAlign:c,inside:v}})}var Ch=he(Ot,Th);function Th(r,t){r.eachSeriesByType(Ot,function(e){var a=e.getData(),n=a.mapDimension("value"),i=e.get("sort"),o=Ht(e,t),l=Wt(e.getBoxLayoutParams(),o.refContainer),s=Fl(e),u=l.width,v=l.height,c=Ih(a,i),h=l.x,f=l.y,g=s?[U(e.get("minSize"),v),U(e.get("maxSize"),v)]:[U(e.get("minSize"),u),U(e.get("maxSize"),u)],p=a.getDataExtent(n),d=e.get("min"),m=e.get("max");d==null&&(d=Math.min(p[0],0)),m==null&&(m=p[1]);var y=e.get("funnelAlign"),S=e.get("gap"),b=s?u:v,w=(b-S*(a.count()-1))/a.count(),_=function(T,R){if(s){var N=a.get(n,T)||0,C=Pe(N,[d,m],g,!0),M=void 0;switch(y){case"top":M=f;break;case"center":M=f+(v-C)/2;break;case"bottom":M=f+(v-C);break}return[[R,M],[R,M+C]]}var k=a.get(n,T)||0,O=Pe(k,[d,m],g,!0),B;switch(y){case"left":B=h;break;case"center":B=h+(u-O)/2;break;case"right":B=h+u-O;break}return[[B,R],[B+O,R]]};i==="ascending"&&(w=-w,S=-S,s?h+=u:f+=v,c=c.reverse());for(var D=0;D=0&&(l[o[s].depth]=new ht(o[s],this,a));var u=wn(i,n,this,!0,v);return u.data;function v(c,h){c.wrapMethod("getItemModel",function(f,g){var p=f.parentModel,d=p.getData().getItemLayout(g);if(d){var m=d.depth,y=p.levelModels[m];y&&(f.parentModel=y)}return f}),h.wrapMethod("getItemModel",function(f,g){var p=f.parentModel,d=p.getGraph().getEdgeByIndex(g),m=d.node1.getLayout();if(m){var y=m.depth,S=p.levelModels[y];S&&(f.parentModel=S)}return f})}},t.prototype.setNodePosition=function(e,a){var n=this.option.data||this.option.nodes,i=n[e];i.localX=a[0],i.localY=a[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){function i(f){return isNaN(f)||f==null}if(n==="edge"){var o=this.getDataParams(e,n),l=o.data,s=o.value,u=l.source+" -- "+l.target;return Ge("nameValue",{name:u,value:s,noValue:i(s)})}else{var v=this.getGraph().getNodeByIndex(e),c=v.getLayout().value,h=this.getDataParams(e,n).data.name;return Ge("nameValue",{name:h!=null?h+"":null,value:c,noValue:i(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(e),o=i.getLayout().value;n.value=o}return n},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type="series."+Qe,t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:Z.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Z.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(se),zh=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r})(),Fh=(function(r){z(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new zh},t.prototype.buildPath=function(e,a){var n=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+n,a.y2),e.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(e.lineTo(a.x2,a.y2+n),e.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),e.closePath()},t.prototype.highlight=function(){No(this)},t.prototype.downplay=function(){Mo(this)},t})(xe),Hh=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=Qe,e._mainGroup=new j,e}return t.prototype.init=function(e,a){this._controller=new rr(a.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,a,n){var i=e.getGraph(),o=this._mainGroup,l=e.layoutInfo,s=l.width,u=l.height,v=e.getData(),c=e.getData("edge"),h=e.get("orient");o.removeAll(),o.x=l.x,o.y=l.y,this._updateViewCoordSys(e,n),fn(e,n,this._controller,Ho(o),null),i.eachEdge(function(f){var g=new Fh,p=ne(g);p.dataIndex=f.dataIndex,p.seriesIndex=e.seriesIndex,p.dataType="edge";var d=f.getModel(),m=d.getModel("lineStyle"),y=m.get("curveness"),S=f.node1.getLayout(),b=f.node1.getModel(),w=b.get("localX"),_=b.get("localY"),D=f.node2.getLayout(),A=f.node2.getModel(),P=A.get("localX"),I=A.get("localY"),x=f.getLayout(),L,E,V,T,R,N,C,M;g.shape.extent=Math.max(1,x.dy),g.shape.orient=h,h==="vertical"?(L=(w!=null?w*s:S.x)+x.sy,E=(_!=null?_*u:S.y)+S.dy,V=(P!=null?P*s:D.x)+x.ty,T=I!=null?I*u:D.y,R=L,N=E*(1-y)+T*y,C=V,M=E*y+T*(1-y)):(L=(w!=null?w*s:S.x)+S.dx,E=(_!=null?_*u:S.y)+x.sy,V=P!=null?P*s:D.x,T=(I!=null?I*u:D.y)+x.ty,R=L*(1-y)+V*y,N=E,C=L*y+V*(1-y),M=T),g.setShape({x1:L,y1:E,x2:V,y2:T,cpx1:R,cpy1:N,cpx2:C,cpy2:M}),g.useStyle(m.getItemStyle()),Xi(g.style,h,f);var k=""+d.get("value"),O=De(d,"edgeLabel");Ce(g,O,{labelFetcher:{getFormattedLabel:function(H,X,ve,me,Y,F){return e.getFormattedLabel(H,X,"edge",me,xt(Y,O.normal&&O.normal.get("formatter"),k),F)}},labelDataIndex:f.dataIndex,defaultText:k}),g.setTextConfig({position:"inside"});var B=d.getModel("emphasis");ce(g,d,"lineStyle",function(H){var X=H.getItemStyle();return Xi(X,h,f),X}),o.add(g),c.setItemGraphicEl(f.dataIndex,g);var W=B.get("focus");ie(g,W==="adjacency"?f.getAdjacentDataIndices():W==="trajectory"?f.getTrajectoryDataIndices():W,B.get("blurScope"),B.get("disabled"))}),i.eachNode(function(f){var g=f.getLayout(),p=f.getModel(),d=p.get("localX"),m=p.get("localY"),y=p.getModel("emphasis"),S=p.get(["itemStyle","borderRadius"])||0,b=new Ae({shape:{x:d!=null?d*s:g.x,y:m!=null?m*u:g.y,width:g.dx,height:g.dy,r:S},style:p.getModel("itemStyle").getItemStyle(),z2:10});Ce(b,De(p),{labelFetcher:{getFormattedLabel:function(_,D){return e.getFormattedLabel(_,D,"node")}},labelDataIndex:f.dataIndex,defaultText:f.id}),b.disableLabelAnimation=!0,b.setStyle("fill",f.getVisual("color")),b.setStyle("decal",f.getVisual("style").decal),ce(b,p),o.add(b),v.setItemGraphicEl(f.dataIndex,b),ne(b).dataType="node";var w=y.get("focus");ie(b,w==="adjacency"?f.getAdjacentDataIndices():w==="trajectory"?f.getTrajectoryDataIndices():w,y.get("blurScope"),y.get("disabled"))}),v.eachItemGraphicEl(function(f,g){var p=v.getItemModel(g);p.get("draggable")&&(f.drift=function(d,m){this.shape.x+=d,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:v.getRawIndex(g),localX:this.shape.x/s,localY:this.shape.y/u})},f.draggable=!0,f.cursor="move")}),!this._data&&e.isAnimationEnabled()&&o.setClipPath(Wh(o.getBoundingRect(),e,function(){o.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,a,n){Vt(this.group,kt,a.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,a){var n=e.layoutInfo,i=e.coordinateSystem=gn(e,a,n.x,n.y,n.width,n.height);Vt(this.group,kt,i,this._firstRender?null:e)},t.type=Qe,t})(ae);function Xi(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),n=e.node2.getVisual("color");Le(a)&&Le(n)&&(r.fill=new on(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function Wh(r,t,e){var a=new Ae({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return ue(a,{shape:{width:r.width+20}},t,e),a}var Uh=he(Qe,Yh);function Yh(r,t){r.eachSeriesByType(Qe,function(e){var a=e.get("nodeWidth"),n=e.get("nodeGap"),i=Ht(e,t).refContainer,o=Wt(e.getBoxLayoutParams(),i);e.layoutInfo=o;var l=o.width,s=o.height,u=e.getGraph(),v=u.nodes,c=u.edges;Xh(v);var h=rn(v,function(d){return d.getLayout().value===0}),f=h.length!==0?0:e.get("layoutIterations"),g=e.get("orient"),p=e.get("nodeAlign");$h(v,c,a,n,l,s,f,g,p)})}function $h(r,t,e,a,n,i,o,l,s){Zh(r,t,e,n,i,l,s),Jh(r,t,i,n,a,o,l),sf(r,l)}function Xh(r){G(r,function(t){var e=ct(t.outEdges,Ya),a=ct(t.inEdges,Ya),n=t.getValue()||0,i=Math.max(e,a,n);t.setLayout({value:i},!0)})}function Zh(r,t,e,a,n,i,o){for(var l=[],s=[],u=[],v=[],c=0,h=0;h=0;m&&d.depth>f&&(f=d.depth),p.setLayout({depth:m?d.depth:c},!0),i==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var y=0;yc-1?f:c-1;o&&o!=="left"&&qh(r,o,i,D);var A=i==="vertical"?(n-e)/D:(a-e)/D;jh(r,A,i)}function Wl(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function qh(r,t,e,a){if(t==="right"){for(var n=[],i=r,o=0;i.length;){for(var l=0;l0;i--)s*=.99,tf(l,s,o),Pr(l,n,e,a,o),lf(l,s,o),Pr(l,n,e,a,o)}function Qh(r,t){var e=[],a=t==="vertical"?"y":"x",n=Yr(r,function(i){return i.getLayout()[a]});return Vo(n.keys),G(n.keys,function(i){e.push(n.buckets.get(i))}),e}function ef(r,t,e,a,n,i){var o=1/0;G(r,function(l){var s=l.length,u=0;G(l,function(c){u+=c.getLayout().value});var v=i==="vertical"?(a-(s-1)*n)/u:(e-(s-1)*n)/u;v0&&(l=s.getLayout()[i]+u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),v=s.getLayout()[i]+s.getLayout()[h]+t;var g=n==="vertical"?a:e;if(u=v-t-g,u>0){l=s.getLayout()[i]-u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0),v=l;for(var f=c-2;f>=0;--f)s=o[f],u=s.getLayout()[i]+s.getLayout()[h]+t-v,u>0&&(l=s.getLayout()[i]-u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),v=s.getLayout()[i]}})}function tf(r,t,e){G(r.slice().reverse(),function(a){G(a,function(n){if(n.outEdges.length){var i=ct(n.outEdges,af,e)/ct(n.outEdges,Ya);if(isNaN(i)){var o=n.outEdges.length;i=o?ct(n.outEdges,rf,e)/o:0}if(e==="vertical"){var l=n.getLayout().x+(i-ft(n,e))*t;n.setLayout({x:l},!0)}else{var s=n.getLayout().y+(i-ft(n,e))*t;n.setLayout({y:s},!0)}}})})}function af(r,t){return ft(r.node2,t)*r.getValue()}function rf(r,t){return ft(r.node2,t)}function nf(r,t){return ft(r.node1,t)*r.getValue()}function of(r,t){return ft(r.node1,t)}function ft(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Ya(r){return r.getValue()}function ct(r,t,e){for(var a=0,n=r.length,i=-1;++io&&(o=s)}),G(a,function(l){var s=new Yo({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),u=s.mapValueToVisual(l.getLayout().value),v=l.getModel().get(["itemStyle","color"]);v!=null?(l.setVisual("color",v),l.setVisual("style",{fill:v})):(l.setVisual("color",u),l.setVisual("style",{fill:u}))})}n.length&&G(n,function(l){var s=l.getModel().get("lineStyle");l.setVisual("style",s)})})}function wp(r){r.registerChartView(Hh),r.registerSeriesModel(Bh),r.registerLayout(Uh),r.registerVisual(uf),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:aa,subType:Qe,query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),pn(r,aa,Qe)}var Ul=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var a,n=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),l=i.get("type"),s,u=t.layout;o==="category"?(u="horizontal",a=n.getOrdinalMeta(),s=!this._hasEncodeRule("x")):l==="category"&&(u="vertical",a=i.getOrdinalMeta(),s=!this._hasEncodeRule("y")),u||(u=l==="time"?"vertical":"horizontal"),this._layout=u;var v=["x","y"],c=u==="horizontal"?0:1,h=this._baseAxisDim=v[c],f=v[1-c],g=[n,i],p=g[c].get("type"),d=g[1-c].get("type"),m=t.data;if(m&&s){var y=[];G(m,function(w,_){var D;Q(w)?(D=w.slice(),w.unshift(_)):Q(w.value)?(D=$({},w),D.value=D.value.slice(),w.value.unshift(_)):D=w,y.push(D)}),t.data=y}var S=this.defaultValueDimensions,b=[{name:h,type:$r(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:$r(d),dimsDef:S.slice()}];return ma(this,{coordDimensions:b,dimensionsCount:S.length+1,encodeDefaulter:Xe(qs,b,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r.prototype.getWhiskerBoxesLayout=function(){return this._layout},r})();function $a(r,t){for(var e=t.ends.length,a=0,n=0;np){var b=[m,S];a.push(b)}}}return{boxData:e,outliers:a}}var _f={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==js){var a="";Ra(a)}var n=wf(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function _p(r){r.registerSeriesModel(Yl),r.registerChartView(cf),r.registerLayout(df),r.registerTransform(_f),bf(r)}var gt="candlestick",Xl=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,a,n){var i=a.getItemLayout(e);return i&&n.rect(i.brushRect)},t.type="series."+gt,t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t})(se);Za(Xl,Ul,!0);var Df=["itemStyle","borderColor"],xf=["itemStyle","borderColor0"],Af=["itemStyle","borderColorDoji"],If=["itemStyle","color"],Lf=["itemStyle","color0"];function An(r,t){return t.get(r>0?If:Lf)}function In(r,t){return t.get(r===0?Af:r>0?Df:xf)}var Cf={seriesType:gt,plan:da(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),l=n.getItemLayout(i).sign,s=o.getItemStyle();s.fill=An(l,o),s.stroke=In(l,o)||s.fill;var u=n.ensureUniqueItemVisual(i,"style");$(u,s)}}}}}},Tf=["color","borderColor"],Pf=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){qa(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),l=e.get("clip",!0),s=e.coordinateSystem,u=s.getArea&&s.getArea(),v=l&&wt(s,!1,e);this._data||i.removeAll();var c=qi(e);a.diff(n).add(function(h){if(a.hasValue(h)){var f=a.getItemLayout(h),g=l?$a(u,f):oa;if(g===sa)return;var p=Er(f,h,c,!0);ue(p,{shape:{points:f.ends}},e,h),Tt(g===la,p,v),Rr(p,a,h,o),i.add(p),a.setItemGraphicEl(h,p)}}).update(function(h,f){var g=n.getItemGraphicEl(f);if(!a.hasValue(h)){i.remove(g);return}var p=a.getItemLayout(h),d=l?$a(u,p):oa;if(d===sa){i.remove(g);return}g?(J(g,{shape:{points:p.ends}},e,h),Oe(g)):g=Er(p,h,c),Rr(g,a,h,o),Tt(d===la,g,v),i.add(g),a.setItemGraphicEl(h,g)}).remove(function(h){var f=n.getItemGraphicEl(h);f&&i.remove(f)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),Ki(e,this.group);var a=e.get("clip",!0)?wt(e.coordinateSystem,!1,e):null;Tt(!!a,this.group,a)},t.prototype._incrementalRenderNormal=function(e,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o=qi(a),l;(l=e.next())!=null;){var s=n.getItemLayout(l),u=Er(s,l,o);Rr(u,n,l,i),u.incremental=We(a),this.group.add(u),this._progressiveEls.push(u)}},t.prototype._incrementalRenderLarge=function(e,a){Ki(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),Tt(!1,this.group,null),this._data=null},t.type=gt,t})(ae),Ef=(function(){function r(){}return r})(),Rf=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new Ef},t.prototype.buildPath=function(e,a){var n=a.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t})(xe);function Er(r,t,e,a){var n=r.ends;return new Rf({shape:{points:a?Nf(n,e,r):n},z2:100})}function Rr(r,t,e,a){var n=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0;var i=n.getShallow("cursor");i&&r.attr("cursor",i),r.__simpleBox=a,ce(r,n);var o=t.getItemLayout(e).sign;G(r.states,function(s,u){var v=n.getModel(u),c=An(o,v),h=In(o,v)||c,f=s.style||(s.style={});c&&(f.fill=c),h&&(f.stroke=h)});var l=n.getModel("emphasis");ie(r,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Nf(r,t,e){return ee(r,function(a){return a=a.slice(),a[t]=e.initBaseline,a})}function qi(r){return r.getWhiskerBoxesLayout()==="horizontal"?1:0}var Mf=(function(){function r(){}return r})(),Nr=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new Mf},t.prototype.buildPath=function(e,a){for(var n=a.points,i=0;iw?x[i]:I[i],ends:V,brushRect:M(_,D,S)})}function N(O,B){var W=[];return W[n]=B,W[i]=O,isNaN(B)||isNaN(O)?[NaN,NaN]:t.dataToPoint(W)}function C(O,B,W){var H=B.slice(),X=B.slice();H[n]=vr(H[n]+a/2,1,!1),X[n]=vr(X[n]-a/2,1,!0),W?O.push(H,X):O.push(X,H)}function M(O,B,W){var H=N(O,W),X=N(B,W);return H[n]-=a/2,X[n]-=a/2,{x:H[0],y:H[1],width:i?a:X[0]-H[0],height:i?X[1]-H[1]:a}}function k(O){return O[n]=vr(O[n],1),O}}function g(p,d){for(var m=ze(p.count*4),y=0,S,b=[],w=[],_,D=d.getStore(),A=!!r.get(["itemStyle","borderColorDoji"]);(_=p.next())!=null;){var P=D.get(l,_),I=D.get(u,_),x=D.get(v,_),L=D.get(c,_),E=D.get(h,_);if(isNaN(P)||isNaN(L)||isNaN(E)){m[y++]=NaN,y+=3;continue}m[y++]=ji(D,_,I,x,v,A),b[n]=P,b[i]=L,S=t.dataToPoint(b,null,w),m[y++]=S?S[0]:NaN,m[y++]=S?S[1]:NaN,b[i]=E,S=t.dataToPoint(b,null,w),m[y++]=S?S[1]:NaN}d.setLayout("largePoints",m)}}};function ji(r,t,e,a,n,i){var o;return e>a?o=-1:e0?r.get(n,t-1)<=a?1:-1:1,o}function Gf(r,t){var e=r.getBaseAxis(),a=Je(e,{fromStat:{key:bt(gt)},min:1}).w,n=U(Jt(r.get("barMaxWidth"),a),a),i=U(Jt(r.get("barMinWidth"),1),a),o=r.get("barWidth");return o!=null?U(o,a):St(Pt(a/2,n),i)}function Bf(r){kf(r,function(){var t=bt(gt);ko(r,{key:t,seriesType:gt,getMetrics:Zo}),sn(t,hn(t))})}function Dp(r){r.registerChartView(Pf),r.registerSeriesModel(Xl),r.registerPreprocessor(Vf),r.registerVisual(Cf),r.registerLayout(Of),Bf(r)}function Ji(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var zf=(function(r){z(t,r);function t(e,a){var n=r.call(this)||this,i=new tr(e,a),o=new j;return n.add(i),n.add(o),n.updateData(e,a),n}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,n=e.color,i=e.rippleNumber,o=this.childAt(1),l=0;l0&&(l=this._getLineLength(i)/v*1e3),l!==this._period||s!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;Ie(c)?h=c(n):h=c,i.__t>0&&(h=-l*i.__t),this._animateSymbol(i,l,h,s,u)}this._period=l,this._loop=s,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,n,i,o){if(a>0){e.__t=0;var l=this,s=e.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){l._updateSymbolPosition(e)});i||s.done(function(){l.remove(e)}),s.start()}},t.prototype._getLineLength=function(e){return mt(e.__p1,e.__cp1)+mt(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,n){this.childAt(0).updateData(e,a,n),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,n=e.__p2,i=e.__cp1,o=e.__t<=1?e.__t:2-e.__t,l=[e.x,e.y],s=l.slice(),u=wo,v=As;l[0]=u(a[0],i[0],n[0],o),l[1]=u(a[1],i[1],n[1],o);var c=e.__t<=1?v(a[0],i[0],n[0],o):v(n[0],i[0],a[0],1-o),h=e.__t<=1?v(a[1],i[1],n[1],o):v(n[1],i[1],a[1],1-o);e.rotation=-Math.atan2(h,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT=0&&!(i[s]<=a);s--);s=Math.min(s,o-2)}else{for(s=l;sa);s++);s=Math.min(s-1,o-2)}var v=(a-i[s])/(i[s+1]-i[s]),c=n[s],h=n[s+1];e.x=c[0]*(1-v)+v*h[0],e.y=c[1]*(1-v)+v*h[1];var f=e.__t<=1?h[0]-c[0]:c[0]-h[0],g=e.__t<=1?h[1]-c[1]:c[1]-h[1];e.rotation=-Math.atan2(g,f)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=a,e.ignore=!1}},t})(Zl),Uf=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),Yf=(function(r){z(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Uf},t.prototype.buildPath=function(e,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){e.moveTo(n[o++],n[o++]);for(var s=1;s0){var f=(u+c)/2-(v-h)*i,g=(v+h)/2-(c-u)*i;e.quadraticCurveTo(f,g,c,h)}else e.lineTo(c,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var n=this.shape,i=n.segs,o=n.curveness,l=this.style.lineWidth;if(n.polyline)for(var s=0,u=0;u0)for(var c=i[u++],h=i[u++],f=1;f0){var d=(c+g)/2-(h-p)*o,m=(h+p)/2-(g-c)*o;if(Is(c,h,d,m,g,p,l,e,a))return s}else if(Bn(c,h,g,p,l,e,a))return s;s++}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,l=-1/0,s=-1/0,u=0;u0&&(o.dataIndex=s+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),Kl={seriesType:"lines",plan:da(),reset:function(r){var t=r.coordinateSystem;if(t){var e=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var l=void 0,s=n.end-n.start;if(e){for(var u=0,v=n.start;v0&&v&&u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)}),o.updateData(i);var c=e.get("clip",!0)&&wt(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=l,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateLineDraw(i,e);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._lineDraw.incrementalUpdate(e,a.getData(),We(a)),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,n){var i=e.getData(),o=this._lineDraw;if(!this._finished||!o||!o.updateLayout)return{update:!0};var l=Kl.reset(e,a,n);l.progress&&l.progress({start:0,end:i.count(),count:i.count()},i),o.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),l=a.pipelineContext,s=l.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||s!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=s?new $f:new Xo(o?i?Wf:ql:i?Zl:qo),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=jn(e);a&&this._lastZlevel!=null&&a.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t})(ae),Zf=typeof Uint32Array>"u"?Array:Uint32Array,qf=typeof Float64Array>"u"?Array:Float64Array;function eo(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=ee(t,function(e){var a=[e[0].coord,e[1].coord],n={coords:a};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),Ls([n,e[0],e[1]])}))}var Kf=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],eo(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(eo(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Na(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Na(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],i=this._flatCoordsOffset[e*2+1],o=0;o ")}return Ge("nameValue",{name:s,value:o,noValue:o==null||isNaN(o)})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t})(se);function Pa(r){return r instanceof Array||(r=[r,r]),r}var jf={seriesType:"lines",reset:function(r){var t=Pa(r.get("symbol")),e=Pa(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function n(i,o){var l=i.getItemModel(o),s=Pa(l.getShallow("symbol",!0)),u=Pa(l.getShallow("symbolSize",!0));s[0]&&i.setItemVisual(o,"fromSymbol",s[0]),s[1]&&i.setItemVisual(o,"toSymbol",s[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function Ap(r){r.registerChartView(Xf),r.registerSeriesModel(Kf),r.registerLayout(Kl),r.registerVisual(jf)}var Jf=256,Qf=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=zn.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,a,n,i,o){var l=this._getBrush(),s=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),f=t.length;c.width=e,c.height=a;for(var g=0;g0){var L=o(S)?s:u;S>0&&(S=S*I+A),w[_++]=L[x],w[_++]=L[x+1],w[_++]=L[x+2],w[_++]=L[x+3]*S*256}else _+=4}return h.putImageData(b,0,0),c},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=zn.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var n=t.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=Z.color.neutral99,n.beginPath(),n.arc(-e,e,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),t},r.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,n=a[e]||(a[e]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,l=0;l<256;l++)t[e](l/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r})();function eg(r,t,e){var a=r[1]-r[0];t=ee(t,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=t.length,i=0;return function(o){var l;for(l=i;l=0;l--){var s=t[l].interval;if(s[0]<=o&&o<=s[1]){i=l;break}}return l>=0&&l=t[0]&&a<=t[1]}}var ag=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i;a.eachComponent("visualMap",function(l){l.eachTargetSeries(function(s){s===e&&(i=l)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,n,0,e.getData().count()):ii(o)&&this._renderOnGeo(o,e,i,n)},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,n,i){var o=a.coordinateSystem;o&&(ii(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){qa(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,a,n,i,o){var l=e.coordinateSystem,s=Ga(l,"cartesian2d"),u=Ga(l,"matrix"),v,c,h,f;if(s){var g=l.getAxis("x"),p=l.getAxis("y");v=Je(g).w+.5,c=Je(p).w+.5,h=g.scale.getExtent(),f=p.scale.getExtent()}for(var d=this.group,m=e.getData(),y=e.getModel(["emphasis","itemStyle"]).getItemStyle(),S=e.getModel(["blur","itemStyle"]).getItemStyle(),b=e.getModel(["select","itemStyle"]).getItemStyle(),w=e.get(["itemStyle","borderRadius"]),_=De(e),D=e.getModel("emphasis"),A=D.get("focus"),P=D.get("blurScope"),I=D.get("disabled"),x=s||u?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],L=n;Lh[1]||Rf[1])continue;var N=l.dataToPoint([T,R]);E=new Ae({shape:{x:N[0]-v/2,y:N[1]-c/2,width:v,height:c},style:V})}else if(u){var C=l.dataToLayout([m.get(x[0],L),m.get(x[1],L)]).rect;if(Ea(C.x))continue;E=new Ae({z2:1,shape:C,style:V})}else{if(isNaN(m.get(x[1],L)))continue;var M=l.dataToLayout([m.get(x[0],L)]),C=M.contentRect||M.rect;if(Ea(C.x)||Ea(C.y))continue;E=new Ae({z2:1,shape:C,style:V})}if(m.hasItemOption){var k=m.getItemModel(L),O=k.getModel("emphasis");y=O.getModel("itemStyle").getItemStyle(),S=k.getModel(["blur","itemStyle"]).getItemStyle(),b=k.getModel(["select","itemStyle"]).getItemStyle(),w=k.get(["itemStyle","borderRadius"]),A=O.get("focus"),P=O.get("blurScope"),I=O.get("disabled"),_=De(k)}E.shape.r=w;var B=e.getRawValue(L),W="-";B&&B[2]!=null&&(W=B[2]+""),Ce(E,_,{labelFetcher:e,labelDataIndex:L,defaultOpacity:V.opacity,defaultText:W}),E.ensureState("emphasis").style=y,E.ensureState("blur").style=S,E.ensureState("select").style=b,ie(E,A,P,I),E.incremental=We(e,o),o&&(E.states.emphasis.hoverLayer=Go),d.add(E),m.setItemGraphicEl(L,E),this._progressiveEls&&this._progressiveEls.push(E)}},t.prototype._renderOnGeo=function(e,a,n,i){var o=n.targetVisuals.inRange,l=n.targetVisuals.outOfRange,s=a.getData(),u=this._hmLayer||this._hmLayer||new Qf;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var v=e.getViewRect().clone(),c=e.getRoamTransform();v.applyTransform(c);var h=Math.max(v.x,0),f=Math.max(v.y,0),g=Math.min(v.width+v.x,i.getWidth()),p=Math.min(v.height+v.y,i.getHeight()),d=g-h,m=p-f,y=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],S=s.mapArray(y,function(D,A,P){var I=e.dataToPoint([D,A]);return I[0]-=h,I[1]-=f,I.push(P),I}),b=n.getExtent(),w=n.type==="visualMap.continuous"?tg(b,n.option.range):eg(b,n.getPieceList(),n.option.selected);u.update(S,d,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},w);var _=new pa({style:{width:d,height:m,x:h,y:f,image:u.canvas},silent:!0});this.group.add(_)},t.type="heatmap",t})(ae),rg=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return et(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Ro.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Z.color.primary}}},t})(se);function Ip(r){r.registerChartView(ag),r.registerSeriesModel(rg)}var ng=["itemStyle","borderWidth"],to=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Vr=new Po,ig=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=ia,e}return t.prototype.render=function(e,a,n){var i=this.group,o=e.getData(),l=this._data,s=e.coordinateSystem,u=s.getBaseAxis(),v=u.isHorizontal(),c=s.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:s,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:v,valueDim:to[+v],categoryDim:to[1-+v]};o.diff(l).add(function(g){if(o.hasValue(g)){var p=ro(o,g),d=ao(o,g,p,h),m=no(o,h,d);o.setItemGraphicEl(g,m),i.add(m),oo(m,h,d)}}).update(function(g,p){var d=l.getItemGraphicEl(p);if(!o.hasValue(g)){i.remove(d);return}var m=ro(o,g),y=ao(o,g,m,h),S=as(o,y);d&&S!==d.__pictorialShapeStr&&(i.remove(d),o.setItemGraphicEl(g,null),d=null),d?hg(d,h,y):d=no(o,h,y,!0),o.setItemGraphicEl(g,d),d.__pictorialSymbolMeta=y,i.add(d),oo(d,h,y)}).remove(function(g){var p=l.getItemGraphicEl(g);p&&io(l,g,p.__pictorialSymbolMeta.animationModel,p)}).execute();var f=e.get("clip",!0)?wt(e.coordinateSystem,!1,e):null;return f?i.setClipPath(f):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,a){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){io(i,ne(o).dataIndex,e,o)}):n.removeAll()},t.type=ia,t})(ae);function ao(r,t,e,a){var n=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),l=e.get("symbolPosition")||"start",s=e.get("symbolRotate"),u=(s||0)*Math.PI/180||0,v=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),h={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:v,rotation:u,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};og(e,i,n,a,h),lg(r,t,n,i,o,h.boundingLength,h.pxSign,v,a,h),sg(e,h.symbolScale,u,a,h);var f=h.symbolSize,g=Oo(e.get("symbolOffset"),f);return ug(e,f,n,i,o,g,l,h.valueLineWidth,h.boundingLength,h.repeatCutLength,a,h),h}function og(r,t,e,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),l=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),s=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(e[i.wh]<=0),v;if(Q(o)){var c=[kr(l,o[0])-s,kr(l,o[1])-s];c[1]=0?1:-1:v>0?1:-1}function kr(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function lg(r,t,e,a,n,i,o,l,s,u){var v=s.valueDim,c=s.categoryDim,h=Math.abs(e[c.wh]),f=r.getItemVisual(t,"symbolSize"),g;Q(f)?g=f.slice():f==null?g=["100%","100%"]:g=[f,f],g[c.index]=U(g[c.index],h),g[v.index]=U(g[v.index],a?h:Math.abs(i)),u.symbolSize=g;var p=u.symbolScale=[g[0]/l,g[1]/l];p[v.index]*=(s.isHorizontal?-1:1)*o}function sg(r,t,e,a,n){var i=r.get(ng)||0;i&&(Vr.attr({scaleX:t[0],scaleY:t[1],rotation:e}),Vr.updateTransform(),i/=Vr.getLineScale(),i*=t[a.valueDim.index]),n.valueLineWidth=i||0}function ug(r,t,e,a,n,i,o,l,s,u,v,c){var h=v.categoryDim,f=v.valueDim,g=c.pxSign,p=Math.max(t[f.index]+l,0),d=p;if(a){var m=Math.abs(s),y=Ma(r.get("symbolMargin"),"15%")+"",S=!1;y.lastIndexOf("!")===y.length-1&&(S=!0,y=y.slice(0,y.length-1));var b=U(y,t[f.index]),w=Math.max(p+b*2,0),_=S?0:b*2,D=Js(a),A=D?a:lo((m+_)/w),P=m-A*p;b=P/2/(S?A:Math.max(A-1,1)),w=p+b*2,_=S?0:b*2,!D&&a!=="fixed"&&(A=u?lo((Math.abs(u)+_)/w):0),d=A*w-_,c.repeatTimes=A,c.symbolMargin=b}var I=g*(d/2),x=c.pathPosition=[];x[h.index]=e[h.wh]/2,x[f.index]=o==="start"?I:o==="end"?s-I:s/2,i&&(x[0]+=i[0],x[1]+=i[1]);var L=c.bundlePosition=[];L[h.index]=e[h.xy],L[f.index]=e[f.xy];var E=c.barRectShape=$({},e);E[f.wh]=g*Math.max(Math.abs(e[f.wh]),Math.abs(x[f.index]+I)),E[h.wh]=e[h.wh];var V=c.clipShape={};V[h.xy]=-e[h.xy],V[h.wh]=v.ecSize[h.wh],V[f.xy]=0,V[f.wh]=e[f.wh]}function jl(r){var t=r.symbolPatternSize,e=Ke(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function Jl(r,t,e,a){var n=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,l=e.pathPosition,s=t.valueDim,u=e.repeatTimes||0,v=0,c=i[t.valueDim.index]+o+e.symbolMargin*2;for(Ln(r,function(p){p.__pictorialAnimationIndex=v,p.__pictorialRepeatTimes=u,v0:m<0)&&(y=u-1-p),d[s.index]=c*(y-u/2+.5)+l[s.index],{x:d[0],y:d[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function Ql(r,t,e,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?Rt(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,a):(i=r.__pictorialMainPath=jl(e),n.add(i),Rt(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,a))}function es(r,t,e){var a=$({},t.barRectShape),n=r.__pictorialBarRect;n?Rt(n,null,{shape:a},t,e):(n=r.__pictorialBarRect=new Ae({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function ts(r,t,e,a){if(e.symbolClip){var n=r.__pictorialClipPath,i=$({},e.clipShape),o=t.valueDim,l=e.animationModel,s=e.dataIndex;if(n)J(n,{shape:i},l,s);else{i[o.wh]=0,n=new Ae({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],ja[a?"updateProps":"initProps"](n,{shape:u},l,s)}}}function ro(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=vg,e.isAnimationEnabled=cg,e}function vg(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function cg(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function no(r,t,e,a){var n=new j,i=new j;return n.add(i),n.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?Jl(n,t,e):Ql(n,t,e),es(n,e,a),ts(n,t,e,a),n.__pictorialShapeStr=as(r,e),n.__pictorialSymbolMeta=e,n}function hg(r,t,e){var a=e.animationModel,n=e.dataIndex,i=r.__pictorialBundle;J(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},a,n),e.symbolRepeat?Jl(r,t,e,!0):Ql(r,t,e,!0),es(r,e,!0),ts(r,t,e,!0)}function io(r,t,e,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];Ln(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(e=null),G(i,function(o){ka(o,{scaleX:0,scaleY:0},e,t,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(t,null)}function as(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function Ln(r,t,e){G(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&t.call(e,a)})}function Rt(r,t,e,a,n,i){t&&r.attr(t),a.symbolClip&&!n?e&&r.attr(e):e&&ja[n?"updateProps":"initProps"](r,e,a.animationModel,a.dataIndex,i)}function oo(r,t,e){var a=e.dataIndex,n=e.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),l=n.getModel(["blur","itemStyle"]).getItemStyle(),s=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),v=i.get("focus"),c=i.get("blurScope"),h=i.get("scale");Ln(r,function(p){if(p instanceof pa){var d=p.style;p.useStyle($({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},e.style))}else p.useStyle(e.style);var m=p.ensureState("emphasis");m.style=o,h&&(m.scaleX=p.scaleX*1.1,m.scaleY=p.scaleY*1.1),p.ensureState("blur").style=l,p.ensureState("select").style=s,u&&(p.cursor=u),p.z2=e.z2});var f=t.valueDim.posDesc[+(e.boundingLength>0)],g=r.__pictorialBarRect;g.ignoreClip=!0,Ce(g,De(n),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:ra(t.seriesModel.getData(),a),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:f}),ie(r,v,c,i.get("disabled"))}function lo(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var fg=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series."+ia,t.dependencies=["grid"],t.defaultOption=xo(ua.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:Z.color.primary}}}),t})(ua);function Lp(r){r.registerChartView(ig),r.registerSeriesModel(fg),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,vl(ia)),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cl(ia)),fl(r)}var Or=2,Gt="themeRiver",gg=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ut(le(this.getData,this),le(this.getRawData,this))},t.prototype.fixData=function(e){var a=e.length,n={},i=Yr(e,function(h){return n.hasOwnProperty(h[0]+"")||(n[h[0]+""]=-1),h[2]}),o=[];i.buckets.each(function(h,f){o.push({name:f,dataList:h})});for(var l=o.length,s=0;si&&(i=l),a.push(l)}for(var u=0;ui&&(i=c)}return{y0:n,max:i}}function Cp(r){r.registerChartView(pg),r.registerSeriesModel(gg),r.registerLayout(yg),r.registerProcessor(ba(Gt))}var bg=2,wg=4,uo=(function(r){z(t,r);function t(e,a,n,i){var o=r.call(this)||this;o.z2=bg,o.textConfig={inside:!0},ne(o).seriesIndex=a.seriesIndex;var l=new Me({z2:wg,silent:e.getModel().get(["label","silent"])});return o.setTextContent(l),o.updateData(!0,e,a,n,i),o}return t.prototype.updateData=function(e,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var l=this;ne(l).dataIndex=a.dataIndex;var s=a.getModel(),u=s.getModel("emphasis"),v=a.getLayout(),c=$({},v);c.label=null;var h=a.getVisual("style");h.lineJoin="bevel";var f=a.getVisual("decal");f&&(h.decal=Bo(f,o));var g=Fe(s.getModel("itemStyle"),c,!0);$(c,g),G(Qt,function(y){var S=l.ensureState(y),b=s.getModel([y,"itemStyle"]);S.style=b.getItemStyle();var w=Fe(b,c);w&&(S.shape=w)}),e?(l.setShape(c),l.shape.r=v.r0,ue(l,{shape:{r:v.r}},n,a.dataIndex)):(J(l,{shape:c},n),Oe(l)),l.useStyle(h),this._updateLabel(n);var p=s.getShallow("cursor");p&&l.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var d=u.get("focus"),m=d==="relative"?Na(a.getAncestorsIndices(),a.getDescendantIndices()):d==="ancestor"?a.getAncestorsIndices():d==="descendant"?a.getDescendantIndices():d;ie(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),l=o.endAngle-o.startAngle,s=(o.startAngle+o.endAngle)/2,u=Math.cos(s),v=Math.sin(s),c=this,h=c.getTextContent(),f=this.node.dataIndex,g=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(g!=null&&Math.abs(l)V&&!Jn(R-V)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,e,a,n):(o.virtualPiece=new uo(y,e,a,n),v.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(S.parentNode)})):o.virtualPiece&&(v.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=e.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var l=o.getModel().get("nodeClick");if(l==="rootToNode")e._rootToNode(o);else if(l==="link"){var s=o.getModel(),u=s.get("link");if(u){var v=s.get("target",!0)||"_blank";Eo(u,v)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Qr,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,l=e[1]-i.cy,s=Math.sqrt(o*o+l*l);return s<=i.r&&s>=i.r0}},t.type=Dt,t})(ae),Ig=he(Dt,Lg);function Lg(r){var t={};function e(a,n,i){if(a.depth===0)return Z.color.neutral50;for(var o=a;o&&o.depth>1;)o=o.parentNode;var l=n.getColorFromPalette(o.name||o.dataIndex+"",t);return a.depth>1&&Le(l)&&(l=Cs(l,(a.depth-1)/(i-1)*.5)),l}r.eachSeriesByType(Dt,function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var l=o.getModel(),s=l.getModel("itemStyle").getItemStyle();s.fill||(s.fill=e(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");$(u,s)})})}var co=Math.PI/180,Cg=he(Dt,Tg);function Tg(r,t){r.eachSeriesByType(Dt,function(e){var a=e.get("center"),n=e.get("radius");Q(n)||(n=[0,n]),Q(a)||(a=[a,a]);var i=t.getWidth(),o=t.getHeight(),l=Math.min(i,o),s=U(a[0],i),u=U(a[1],o),v=U(n[0],l/2),c=U(n[1],l/2),h=-e.get("startAngle")*co,f=e.get("minAngle")*co,g=e.getData().tree.root,p=e.getViewRoot(),d=p.depth,m=e.get("sort");m!=null&&ns(p,m);var y=0;G(p.children,function(T){!isNaN(T.getValue())&&y++});var S=p.getValue(),b=Math.PI/(S||y)*2,w=p.depth>0,_=p.height-(w?-1:1),D=(c-v)/(_||1),A=e.get("clockwise"),P=e.get("stillShowZeroSum"),I=A?1:-1,x=function(T,R){if(T){var N=R;if(T!==g){var C=T.getValue(),M=S===0&&P?b:C*b;Ma[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=t.dataToRadius(n[0]),o=e.dataToAngle(n[1]),l=r.coordToPoint([i,o]);return l.push(i,o*Math.PI/180),l},size:le(Bg,r)}}}function Fg(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)},layout:function(a,n){return r.dataToLayout(a,n)}}}}function Hg(r){var t=r.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e,a){return r.dataToPoint(e,a)},layout:function(e,a){return r.dataToLayout(e,a)}}}}var qe="emphasis",lt="normal",Cn="blur",Tn="select",pt=[lt,qe,Cn,Tn],Gr={normal:["itemStyle"],emphasis:[qe,"itemStyle"],blur:[Cn,"itemStyle"],select:[Tn,"itemStyle"]},Br={normal:["label"],emphasis:[qe,"label"],blur:[Cn,"label"],select:[Tn,"label"]},Wg=["x","y"],Ug="e\0\0",Te={normal:{},emphasis:{},blur:{},select:{}},Yg={cartesian2d:Mg,geo:kg,single:Gg,polar:zg,calendar:Fg,matrix:Hg};function en(r){return r instanceof xe}function tn(r){return r instanceof So}function $g(r,t){t.copyTransform(r),tn(t)&&tn(r)&&(t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t.invisible=r.invisible,t.ignore=r.ignore,en(t)&&en(r)&&t.setShape(r.shape))}var Xg=(function(r){z(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n,i){this._progressiveEls=null;var o=this._data,l=e.getData(),s=this.group,u=fo(e,l,a,n);o||s.removeAll(),l.diff(o).add(function(c){zr(n,null,c,u(c,i),e,s,l)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&dn(h,Ze(h).option,e)}).update(function(c,h){var f=o.getItemGraphicEl(h);zr(n,f,c,u(c,i),e,s,l)}).execute();var v=e.get("clip",!0)?wt(e.coordinateSystem,!1,e):null;v?s.setClipPath(v):s.removeClipPath(),this._data=l},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,a,n,i,o){var l=a.getData(),s=fo(a,l,n,i),u=this._progressiveEls=[];function v(f){f.isGroup||(f.incremental=We(a),f.ensureState("emphasis").hoverLayer=Go)}for(var c=e.start;c=0?t.getStore().get(C,R):void 0}var M=t.get(N.name,R),k=N&&N.ordinalMeta;return k?k.categories[M]:M}function D(T,R){R==null&&(R=v);var N=t.getItemVisual(R,"style"),C=N&&N.fill,M=N&&N.opacity,k=S(R,lt).getItemStyle();C!=null&&(k.fill=C),M!=null&&(k.opacity=M);var O={inheritColor:Le(C)?C:Z.color.neutral99},B=b(R,lt),W=$e(B,null,O,!1,!0);W.text=B.getShallow("show")?Jt(r.getFormattedLabel(R,lt),ra(t,R)):null;var H=Qn(B,O,!1);return I(T,k),k=oi(k,W,H),T&&P(k,T),k.legacy=!0,k}function A(T,R){R==null&&(R=v);var N=S(R,qe).getItemStyle(),C=b(R,qe),M=$e(C,null,null,!0,!0);M.text=C.getShallow("show")?xt(r.getFormattedLabel(R,qe),r.getFormattedLabel(R,lt),ra(t,R)):null;var k=Qn(C,null,!0);return I(T,N),N=oi(N,M,k),T&&P(N,T),N.legacy=!0,N}function P(T,R){for(var N in R)He(R,N)&&(T[N]=R[N])}function I(T,R){T&&(T.textFill&&(R.textFill=T.textFill),T.textPosition&&(R.textPosition=T.textPosition))}function x(T,R){if(R==null&&(R=v),He(ho,T)){var N=t.getItemVisual(R,"style");return N?N[ho[T]]:null}if(He(Eg,T))return t.getItemVisual(R,T)}function L(T){if(o.type==="cartesian2d"){var R=o.getBaseAxis();return Yu(Ve({axis:R},T))}}function E(){return e.getCurrentSeriesIndices()}function V(T){return eu(T,e)}}function Kg(r){var t={};return G(r.dimensions,function(e){var a=r.getDimensionInfo(e);if(!a.isExtraCoord){var n=a.coordDim,i=t[n]=t[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(e)}}),t}function zr(r,t,e,a,n,i,o){if(!a){i.remove(t);return}var l=Rn(r,t,e,a,n,i);return l&&o.setItemGraphicEl(e,l),l&&ie(l,a.focus,a.blurScope,a.emphasisDisabled),l}function Rn(r,t,e,a,n,i){var o=-1,l=t;t&&os(t,a,n)&&(o=ke(i.childrenRef(),t),t=null);var s=!t,u=t;u?u.clearStates():(u=Pn(a),l&&$g(l,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),Te.normal.cfg=Te.normal.conOpt=Te.emphasis.cfg=Te.emphasis.conOpt=Te.blur.cfg=Te.blur.conOpt=Te.select.cfg=Te.select.conOpt=null,Te.isLegacy=!1,Jg(u,e,a,n,s,Te),jg(u,e,a,n,s),En(r,u,e,a,Te,n,s),He(a,"info")&&(Ze(u).info=a.info);for(var v=0;v=0?i.replaceAt(u,o):i.add(u),u}function os(r,t,e){var a=Ze(r),n=t.type,i=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&rp(i)&&ls(i)!==a.customPathData||n==="image"&&He(o,"image")&&o.image!==a.customImagePath}function jg(r,t,e,a,n){var i=e.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&os(o,i,a)&&(o=null),o||(o=Pn(i),r.setClipPath(o)),En(null,o,t,i,null,a,n)}}function Jg(r,t,e,a,n,i){if(!(r.isGroup||r.type==="compoundPath")){go(e,null,i),go(e,qe,i);var o=i.normal.conOpt,l=i.emphasis.conOpt,s=i.blur.conOpt,u=i.select.conOpt;if(o!=null||l!=null||u!=null||s!=null){var v=r.getTextContent();if(o===!1)v&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=Pn(o),r.setTextContent(v)),En(null,v,t,o,null,a,n);for(var c=o&&o.style,h=0;h=v;f--){var g=t.childAt(f);ep(t,g,n)}}}function ep(r,t,e){t&&dn(t,Ze(r).option,e)}function tp(r){new Qa(r.oldChildren,r.newChildren,po,po,r).add(yo).update(yo).remove(ap).execute()}function po(r,t){var e=r&&r.name;return e??Ug+t}function yo(r,t){var e=this.context,a=r!=null?e.newChildren[r]:null,n=t!=null?e.oldChildren[t]:null;Rn(e.api,n,e.dataIndex,a,e.seriesModel,e.group)}function ap(r){var t=this.context,e=t.oldChildren[r];e&&dn(e,Ze(e).option,t.seriesModel)}function ls(r){return r&&(r.pathData||r.d)}function rp(r){return r&&(He(r,"pathData")||He(r,"d"))}function Pp(r){r.registerChartView(Xg),r.registerSeriesModel(Rg)}export{up as BarChart,_p as BoxplotChart,Dp as CandlestickChart,yp as ChordChart,Pp as CustomChart,xp as EffectScatterChart,Sp as FunnelChart,mp as GaugeChart,dp as GraphChart,Ip as HeatmapChart,sp as LineChart,Ap as LinesChart,fp as MapChart,bp as ParallelChart,Lp as PictorialBarChart,vp as PieChart,hp as RadarChart,wp as SankeyChart,cp as ScatterChart,Tp as SunburstChart,Cp as ThemeRiverChart,gp as TreeChart,pp as TreemapChart};