1 |
- import{bF as Mi,bG as me,K as de,bH as wn,aw as ie,bI as Sn,j as ae,bJ as Z,bK as Ls,as as Le,bL as Ds,bM as Cs,bN as Ts,aq as P,bO as Li,bP as Di,bQ as Ci,bR as As,bS as Ns,bT as Ge,a6 as Te,at as xe,ac as se,bU as Ps,k as it,bV as E,bW as ye,P as oe,bX as Mn,bY as zt,bZ as Ln,b_ as Ti,b$ as Ai,c0 as Ni,aF as he,c1 as Pi,c2 as Dn,c3 as Rs,c4 as Es,J as Ri,ap as ce,c5 as Ee,c6 as Ot,c7 as Cn,ao as te,c8 as Vs,ar as W,az as F,av as G,c9 as Gt,ca as Tn,aH as _e,ay as be,M as Be,cb as Ve,aE as pe,cc as Ei,cd as gt,ce as ks,cf as De,cg as ke,ch as zs,ci as Os,U as yt,Z as Bt,b as vt,cj as Ft,ck as fe,cl as Gs,cm as ot,am as re,cn as Vi,co as Bs,cp as ki,cq as Fs,cr as zi,cs as Ht,ct as Oi,cu as Fe,cv as Ae,cw as Hs,cx as An,X as He,cy as Gi,cz as Nn,cA as Bi,cB as Ne,l as Fi,cC as We,cD as mt,cE as Xe,cF as xt,cG as Ws,cH as Xs,cI as rt,cJ as Hi,cK as Ys,cL as ge,cM as Pn,w as Wt,S as Wi,cN as Rn,G as Zs,cO as En,cP as Vn,cQ as kn,cR as zn,f as On,cS as Xt,cT as Us,cU as Xi,cV as js,cW as Gn,m as st,c as _t,cX as Yi,cY as Bn,cZ as Fn,c_ as qs,V as Hn,c$ as lt,d0 as Ye,d1 as Ks,d2 as Zi,d3 as Qs,d4 as Wn,y as $s,d5 as Js,bd as X,bo as Ui,T as el,d6 as Xn,d7 as Yn,d8 as tl,d9 as nl,o as Zn,B as Un,da as ji,db as J,dc as jn,ax as qn,dd as Kn,de as Qn,df as al,dg as qi,dh as il,di as bt,dj as ol,dk as Ki,dl as rl,dm as Qi,dn as $n,dp as Yt,Q as $i,dq as sl,dr as Ji,ds as eo,dt as to,du as ll,_ as Jn,dv as ul,dw as ea,dx as no,dy as ao,dz as io,dA as Ce,dB as dl,dC as hl,dD as cl,dE as pl,a8 as fl,a4 as gl,dF as yl,dG as vl,dH as ml,dI as xl,dJ as _l,dK as bl,dL as oo,dM as Il,a9 as wl,dN as Sl,aC as Zt,A as Ml,aG as Ll,a as Dl,n as Cl,dO as Tl,dP as Al,dQ as Nl,dR as Pl,dS as Rl,dT as El,aD as Ut,dU as ro,dV as Vl,dW as It,dX as jt,an as wt,dY as kl,dZ as zl,d_ as Ol,d$ as Gl,e0 as Bl,e1 as Fl,aA as $e,e2 as Hl,e3 as Wl,aQ as so,e4 as Xl,i as Yl,s as Zl,e5 as qt,e6 as Ul,e7 as jl,e8 as ta,g as ql,e9 as lo,ea as Kl,eb as Ql,ec as $l,ed as Jl,ee as eu,ef as tu,eg as uo,eh as nu,ei as au,ej as ho,ek as na,el as iu,em as co,en as ou,eo as ru,ep as su,eq as lu,er as Kt,aW as uu,es as du,et as hu,eu as Qt,ev as cu,ew as $t,ex as aa,ey as pu,ez as ia,eA as oa,eB as fu,bu as gu,bq as yu,bp as vu,br as mu,bD as xu,bt as _u,bs as bu,bE as Iu,bv as wu,bl as Su,bm as Mu,eC as Lu,bB as Du,bC as Cu,bx as Tu,bk as Au,bj as Nu,bA as Pu,bi as Ru,by as Eu,eD as Vu,eE as ku,bz as zu,eF as Ou,eG as Gu,bn as Bu}from"./installSVGRenderer-a67ecca0.js";function Fu(n){if(n){for(var t=[],e=0;e<n.length;e++)t.push(n[e].slice());return t}}function Hu(n,t){var e=n.label,a=t&&t.getTextGuideLine();return{dataIndex:n.dataIndex,dataType:n.dataType,seriesIndex:n.seriesModel.seriesIndex,text:n.label.style.text,rect:n.hostRect,labelRect:n.rect,align:e.style.align,verticalAlign:e.style.verticalAlign,labelLinePoints:Fu(a&&a.shape.points)}}var po=["align","verticalAlign","width","height","fontSize"],le=new Mi,ra=me(),Wu=me();function Jt(n,t,e){for(var a=0;a<e.length;a++){var i=e[a];t[i]!=null&&(n[i]=t[i])}}var en=["x","y","rotation"],Xu=function(){function n(){this._labelList=[],this._chartViewList=[]}return n.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},n.prototype._addLabel=function(t,e,a,i,o){var r=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),d=i.getBoundingRect().plain();de.applyTransform(d,d,u),u?le.setLocalTransform(u):(le.x=le.y=le.rotation=le.originX=le.originY=0,le.scaleX=le.scaleY=1),le.rotation=wn(le.rotation);var h=i.__hostTarget,c;if(h){c=h.getBoundingRect().plain();var p=h.getComputedTransform();de.applyTransform(c,c,p)}var g=c&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:g,seriesModel:a,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:d,hostRect:c,priority:c?c.width*c.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:g&&g.ignore,x:le.x,y:le.y,scaleX:le.scaleX,scaleY:le.scaleY,rotation:le.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},n.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var a=t.__model,i=a.get("labelLayout");(ie(i)||Sn(i).length)&&t.group.traverse(function(o){if(o.ignore)return!0;var r=o.getTextContent(),s=ae(o);r&&!r.disableLabelLayout&&e._addLabel(s.dataIndex,s.dataType,a,r,i)})},n.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),a=t.getHeight();function i(v,_){return function(){Ci(v,_)}}for(var o=0;o<this._labelList.length;o++){var r=this._labelList[o],s=r.label,l=s.__hostTarget,u=r.defaultAttr,d=void 0;ie(r.layoutOption)?d=r.layoutOption(Hu(r,l)):d=r.layoutOption,d=d||{},r.computedLayoutOption=d;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:d.x!=null||d.y!=null?null:u.attachedPos,rotation:d.rotate!=null?d.rotate*h:u.attachedRot,offset:[d.dx||0,d.dy||0]});var c=!1;if(d.x!=null?(s.x=Z(d.x,e),s.setStyle("x",0),c=!0):(s.x=u.x,s.setStyle("x",u.style.x)),d.y!=null?(s.y=Z(d.y,a),s.setStyle("y",0),c=!0):(s.y=u.y,s.setStyle("y",u.style.y)),d.labelLinePoints){var p=l.getTextGuideLine();p&&(p.setShape({points:d.labelLinePoints}),c=!1)}var g=ra(s);g.needsUpdateLabelLine=c,s.rotation=d.rotate!=null?d.rotate*h:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var f=0;f<po.length;f++){var y=po[f];s.setStyle(y,d[y]!=null?d[y]:u.style[y])}if(d.draggable){if(s.draggable=!0,s.cursor="move",l){var m=r.seriesModel;if(r.dataIndex!=null){var x=r.seriesModel.getData(r.dataType);m=x.getItemModel(r.dataIndex)}s.on("drag",i(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},n.prototype.layout=function(t){var e=t.getWidth(),a=t.getHeight(),i=Ls(this._labelList),o=Le(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),r=Le(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});Ds(o,0,e),Cs(r,0,a);var s=Le(i,function(l){return l.layoutOption.hideOverlap});Ts(s)},n.prototype.processLabelsOverall=function(){var t=this;P(this._chartViewList,function(e){var a=e.__model,i=e.ignoreLabelLineUpdate,o=a.isAnimationEnabled();e.group.traverse(function(r){if(r.ignore&&!r.forceLabelAnimation)return!0;var s=!i,l=r.getTextContent();!s&&l&&(s=ra(l).needsUpdateLabelLine),s&&t._updateLabelLine(r,a),o&&t._animateLabels(r,a)})})},n.prototype._updateLabelLine=function(t,e){var a=t.getTextContent(),i=ae(t),o=i.dataIndex;if(a&&o!=null){var r=e.getData(i.dataType),s=r.getItemModel(o),l={},u=r.getItemVisual(o,"style");if(u){var d=r.getVisual("drawType");l.stroke=u[d]}var h=s.getModel("labelLine");Li(t,Di(s),l),Ci(t,h)}},n.prototype._animateLabels=function(t,e){var a=t.getTextContent(),i=t.getTextGuideLine();if(a&&(t.forceLabelAnimation||!a.ignore&&!a.invisible&&!t.disableLabelAnimation&&!As(t))){var o=ra(a),r=o.oldLayout,s=ae(t),l=s.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},d=e.getData(s.dataType);if(r){a.attr(r);var h=t.prevStates;h&&(xe(h,"select")>=0&&a.attr(o.oldLayoutSelect),xe(h,"emphasis")>=0&&a.attr(o.oldLayoutEmphasis)),se(a,u,e,l)}else if(a.attr(u),!Ns(a).valueAnimation){var c=Ge(a.style.opacity,1);a.style.opacity=0,Te(a,{style:{opacity:c}},e,l)}if(o.oldLayout=u,a.states.select){var p=o.oldLayoutSelect={};Jt(p,u,en),Jt(p,a.states.select,en)}if(a.states.emphasis){var g=o.oldLayoutEmphasis={};Jt(g,u,en),Jt(g,a.states.emphasis,en)}Ps(a,l,d,e,e)}if(i&&!i.ignore&&!i.invisible){var o=Wu(i),r=o.oldLayout,f={points:i.shape.points};r?(i.attr({shape:r}),se(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,Te(i,{style:{strokePercent:1}},e)),o.oldLayout=f}},n}();const Yu=Xu;var sa=me();function Zu(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var i=sa(e).labelManager;i||(i=sa(e).labelManager=new Yu),i.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var i=sa(e).labelManager;a.updatedSeries.forEach(function(o){i.addLabelsOfSeries(e.getViewOfSeriesModel(o))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}function Uu(n){var t=n;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],a,i;a=e.pop();)if(i=a.children,a.isExpand&&i.length)for(var o=i.length,r=o-1;r>=0;r--){var s=i[r];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},e.push(s)}}function ju(n,t){var e=n.isExpand?n.children:[],a=n.parentNode.children,i=n.hierNode.i?a[n.hierNode.i-1]:null;if(e.length){Qu(n);var o=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;i?(n.hierNode.prelim=i.hierNode.prelim+t(n,i),n.hierNode.modifier=n.hierNode.prelim-o):n.hierNode.prelim=o}else i&&(n.hierNode.prelim=i.hierNode.prelim+t(n,i));n.parentNode.hierNode.defaultAncestor=$u(n,i,n.parentNode.hierNode.defaultAncestor||a[0],t)}function qu(n){var t=n.hierNode.prelim+n.parentNode.hierNode.modifier;n.setLayout({x:t},!0),n.hierNode.modifier+=n.parentNode.hierNode.modifier}function fo(n){return arguments.length?n:td}function St(n,t){return n-=Math.PI/2,{x:t*Math.cos(n),y:t*Math.sin(n)}}function Ku(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Qu(n){for(var t=n.children,e=t.length,a=0,i=0;--e>=0;){var o=t[e];o.hierNode.prelim+=a,o.hierNode.modifier+=a,i+=o.hierNode.change,a+=o.hierNode.shift+i}}function $u(n,t,e,a){if(t){for(var i=n,o=n,r=o.parentNode.children[0],s=t,l=i.hierNode.modifier,u=o.hierNode.modifier,d=r.hierNode.modifier,h=s.hierNode.modifier;s=la(s),o=ua(o),s&&o;){i=la(i),r=ua(r),i.hierNode.ancestor=n;var c=s.hierNode.prelim+h-o.hierNode.prelim-u+a(s,o);c>0&&(ed(Ju(s,n,e),n,c),u+=c,l+=c),h+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=i.hierNode.modifier,d+=r.hierNode.modifier}s&&!la(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),o&&!ua(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=u-d,e=n)}return e}function la(n){var t=n.children;return t.length&&n.isExpand?t[t.length-1]:n.hierNode.thread}function ua(n){var t=n.children;return t.length&&n.isExpand?t[0]:n.hierNode.thread}function Ju(n,t,e){return n.hierNode.ancestor.parentNode===t.parentNode?n.hierNode.ancestor:e}function ed(n,t,e){var a=e/(t.hierNode.i-n.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,n.hierNode.change+=a}function td(n,t){return n.parentNode===t.parentNode?1:2}var nd=function(){function n(){this.parentPoint=[],this.childPoints=[]}return n}(),ad=function(n){E(t,n);function t(e){return n.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new nd},t.prototype.buildPath=function(e,a){var i=a.childPoints,o=i.length,r=a.parentPoint,s=i[0],l=i[o-1];if(o===1){e.moveTo(r[0],r[1]),e.lineTo(s[0],s[1]);return}var u=a.orient,d=u==="TB"||u==="BT"?0:1,h=1-d,c=Z(a.forkPosition,1),p=[];p[d]=r[d],p[h]=r[h]+(l[h]-r[h])*c,e.moveTo(r[0],r[1]),e.lineTo(p[0],p[1]),e.moveTo(s[0],s[1]),p[d]=s[d],e.lineTo(p[0],p[1]),p[d]=l[d],e.lineTo(p[0],p[1]),e.lineTo(l[0],l[1]);for(var g=1;g<o-1;g++){var f=i[g];e.moveTo(f[0],f[1]),p[d]=f[d],e.lineTo(p[0],p[1])}},t}(ye),id=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new oe,e}return t.prototype.init=function(e,a){this._controller=new Mn(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,i){var o=e.getData(),r=e.layoutInfo,s=this._mainGroup,l=e.get("layout");l==="radial"?(s.x=r.x+r.width/2,s.y=r.y+r.height/2):(s.x=r.x,s.y=r.y),this._updateViewCoordSys(e,i),this._updateController(e,a,i);var u=this._data;o.diff(u).add(function(d){go(o,d)&&yo(o,d,null,s,e)}).update(function(d,h){var c=u.getItemGraphicEl(h);if(!go(o,d)){c&&xo(u,h,c,s,e);return}yo(o,d,c,s,e)}).remove(function(d){var h=u.getItemGraphicEl(d);h&&xo(u,d,h,s,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),e.get("expandAndCollapse")===!0&&o.eachItemGraphicEl(function(d,h){d.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:h})})}),this._data=o},t.prototype._updateViewCoordSys=function(e,a){var i=e.getData(),o=[];i.each(function(h){var c=i.getItemLayout(h);c&&!isNaN(c.x)&&!isNaN(c.y)&&o.push([+c.x,+c.y])});var r=[],s=[];zt(o,r,s);var l=this._min,u=this._max;s[0]-r[0]===0&&(r[0]=l?l[0]:r[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-r[1]===0&&(r[1]=l?l[1]:r[1]-1,s[1]=u?u[1]:s[1]+1);var d=e.coordinateSystem=new Ln;d.zoomLimit=e.get("scaleLimit"),d.setBoundingRect(r[0],r[1],s[0]-r[0],s[1]-r[1]),d.setCenter(e.get("center"),a),d.setZoom(e.get("zoom")),this.group.attr({x:d.x,y:d.y,scaleX:d.scaleX,scaleY:d.scaleY}),this._min=r,this._max=s},t.prototype._updateController=function(e,a,i){var o=this,r=this._controller,s=this._controllerHost,l=this.group;r.setPointerChecker(function(u,d,h){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(d,h)&&!Ti(u,i,e)}),r.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(u){Ai(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ni(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),o._updateNodeAndLinkScale(e),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var a=e.getData(),i=this._getNodeGlobalScale(e);a.eachItemGraphicEl(function(o,r){o.setSymbolScale(i)})},t.prototype._getNodeGlobalScale=function(e){var a=e.coordinateSystem;if(a.type!=="view")return 1;var i=this._nodeScaleRatio,o=a.scaleX||1,r=a.getZoom(),s=(r-1)*i+1;return s/o},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(he);function go(n,t){var e=n.getItemLayout(t);return e&&!isNaN(e.x)&&!isNaN(e.y)}function yo(n,t,e,a,i){var o=!e,r=n.tree.getNodeByDataIndex(t),s=r.getModel(),l=r.getVisual("style").fill,u=r.isExpand===!1&&r.children.length!==0?l:"#fff",d=n.tree.root,h=r.parentNode===d?r:r.parentNode||r,c=n.getItemGraphicEl(h.dataIndex),p=h.getLayout(),g=c?{x:c.__oldX,y:c.__oldY,rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:p,f=r.getLayout();o?(e=new Pi(n,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.x=g.x,e.y=g.y):e.updateData(n,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.__radialOldRawX=e.__radialRawX,e.__radialOldRawY=e.__radialRawY,e.__radialRawX=f.rawX,e.__radialRawY=f.rawY,a.add(e),n.setItemGraphicEl(t,e),e.__oldX=e.x,e.__oldY=e.y,se(e,{x:f.x,y:f.y},i);var y=e.getSymbolPath();if(i.get("layout")==="radial"){var m=d.children[0],x=m.getLayout(),v=m.children.length,_=void 0,b=void 0;if(f.x===x.x&&r.isExpand===!0&&m.children.length){var I={x:(m.children[0].getLayout().x+m.children[v-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[v-1].getLayout().y)/2};_=Math.atan2(I.y-x.y,I.x-x.x),_<0&&(_=Math.PI*2+_),b=I.x<x.x,b&&(_=_-Math.PI)}else _=Math.atan2(f.y-x.y,f.x-x.x),_<0&&(_=Math.PI*2+_),r.children.length===0||r.children.length!==0&&r.isExpand===!1?(b=f.x<x.x,b&&(_=_-Math.PI)):(b=f.x>x.x,b||(_=_-Math.PI));var w=b?"left":"right",S=s.getModel("label"),M=S.get("rotate"),D=M*(Math.PI/180),L=y.getTextContent();L&&(y.setTextConfig({position:S.get("position")||w,rotation:M==null?-_:D,origin:"center"}),L.setStyle("verticalAlign","middle"))}var T=s.get(["emphasis","focus"]),N=T==="relative"?Dn(r.getAncestorsIndices(),r.getDescendantIndices()):T==="ancestor"?r.getAncestorsIndices():T==="descendant"?r.getDescendantIndices():null;N&&(ae(e).focus=N),od(i,r,d,e,g,p,f,a),e.__edge&&(e.onHoverStateChange=function(C){if(C!=="blur"){var A=r.parentNode&&n.getItemGraphicEl(r.parentNode.dataIndex);A&&A.hoverState===Rs||Es(e.__edge,C)}})}function od(n,t,e,a,i,o,r,s){var l=t.getModel(),u=n.get("edgeShape"),d=n.get("layout"),h=n.getOrient(),c=n.get(["lineStyle","curveness"]),p=n.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),f=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(f||(f=a.__edge=new Ri({shape:da(d,h,c,i,i)})),se(f,{shape:da(d,h,c,o,r)},n));else if(u==="polyline"&&d==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var y=t.children,m=[],x=0;x<y.length;x++){var v=y[x].getLayout();m.push([v.x,v.y])}f||(f=a.__edge=new ad({shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]],orient:h,forkPosition:p}})),se(f,{shape:{parentPoint:[r.x,r.y],childPoints:m}},n)}f&&!(u==="polyline"&&!t.isExpand)&&(f.useStyle(ce({strokeNoScale:!0,fill:null},g)),Ee(f,l,"lineStyle"),Ot(f),s.add(f))}function vo(n,t,e,a,i){var o=t.tree.root,r=mo(o,n),s=r.source,l=r.sourceLayout,u=t.getItemGraphicEl(n.dataIndex);if(u){var d=t.getItemGraphicEl(s.dataIndex),h=d.__edge,c=u.__edge||(s.isExpand===!1||s.children.length===1?h:void 0),p=a.get("edgeShape"),g=a.get("layout"),f=a.get("orient"),y=a.get(["lineStyle","curveness"]);c&&(p==="curve"?Cn(c,{shape:da(g,f,y,l,l),style:{opacity:0}},a,{cb:function(){e.remove(c)},removeOpt:i}):p==="polyline"&&a.get("layout")==="orthogonal"&&Cn(c,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){e.remove(c)},removeOpt:i}))}}function mo(n,t){for(var e=t.parentNode===n?t:t.parentNode||t,a;a=e.getLayout(),a==null;)e=e.parentNode===n?e:e.parentNode||e;return{source:e,sourceLayout:a}}function xo(n,t,e,a,i){var o=n.tree.getNodeByDataIndex(t),r=n.tree.root,s=mo(r,o).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};Cn(e,{x:s.x+1,y:s.y+1},i,{cb:function(){a.remove(e),n.setItemGraphicEl(t,null)},removeOpt:l}),e.fadeOut(null,n.hostModel,{fadeLabel:!0,animation:l}),o.children.forEach(function(u){vo(u,n,a,i,l)}),vo(o,n,a,i,l)}function da(n,t,e,a,i){var o,r,s,l,u,d,h,c;if(n==="radial"){u=a.rawX,h=a.rawY,d=i.rawX,c=i.rawY;var p=St(u,h),g=St(u,h+(c-h)*e),f=St(d,c+(h-c)*e),y=St(d,c);return{x1:p.x||0,y1:p.y||0,x2:y.x||0,y2:y.y||0,cpx1:g.x||0,cpy1:g.y||0,cpx2:f.x||0,cpy2:f.y||0}}else u=a.x,h=a.y,d=i.x,c=i.y,(t==="LR"||t==="RL")&&(o=u+(d-u)*e,r=h,s=d+(u-d)*e,l=c),(t==="TB"||t==="BT")&&(o=u,r=h+(c-h)*e,s=d,l=c+(h-c)*e);return{x1:u,y1:h,x2:d,y2:c,cpx1:o,cpy1:r,cpx2:s,cpy2:l}}const rd=id;var Ie=me();function _o(n){var t=n.mainData,e=n.datas;e||(e={main:t},n.datasAttr={main:"data"}),n.datas=n.mainData=null,bo(t,e,n),P(e,function(a){P(t.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,te(sd,n))})}),t.wrapMethod("cloneShallow",te(ud,n)),P(t.CHANGABLE_METHODS,function(a){t.wrapMethod(a,te(ld,n))}),Vs(e[t.dataType]===t)}function sd(n,t){if(cd(this)){var e=W({},Ie(this).datas);e[this.dataType]=t,bo(t,e,n)}else ha(t,this.dataType,Ie(this).mainData,n);return t}function ld(n,t){return n.struct&&n.struct.update(),t}function ud(n,t){return P(Ie(t).datas,function(e,a){e!==t&&ha(e.cloneShallow(),a,t,n)}),t}function dd(n){var t=Ie(this).mainData;return n==null||t==null?t:Ie(t).datas[n]}function hd(){var n=Ie(this).mainData;return n==null?[{data:n}]:F(Sn(Ie(n).datas),function(t){return{type:t,data:Ie(n).datas[t]}})}function cd(n){return Ie(n).mainData===n}function bo(n,t,e){Ie(n).datas={},P(t,function(a,i){ha(a,i,n,e)})}function ha(n,t,e,a){Ie(e).datas[t]=n,Ie(n).mainData=e,n.dataType=t,a.struct&&(n[a.structAttr]=a.struct,a.struct[a.datasAttr[t]]=n),n.getLinkedData=dd,n.getLinkedDataAll=hd}var pd=function(){function n(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 n.prototype.isRemoved=function(){return this.dataIndex<0},n.prototype.eachNode=function(t,e,a){ie(t)&&(a=e,e=t,t=null),t=t||{},be(t)&&(t={order:t});var i=t.order||"preorder",o=this[t.attr||"children"],r;i==="preorder"&&(r=e.call(a,this));for(var s=0;!r&&s<o.length;s++)o[s].eachNode(t,e,a);i==="postorder"&&e.call(a,this)},n.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var a=0;a<this.children.length;a++){var i=this.children[a];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},n.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,i=a.length;e<i;e++){var o=a[e].getNodeById(t);if(o)return o}},n.prototype.contains=function(t){if(t===this)return!0;for(var e=0,a=this.children,i=a.length;e<i;e++){var o=a[e].contains(t);if(o)return o}},n.prototype.getAncestors=function(t){for(var e=[],a=t?this:this.parentNode;a;)e.push(a),a=a.parentNode;return e.reverse(),e},n.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},n.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},n.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},n.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},n.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},n.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},n.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},n.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},n.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},n.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},n.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},n.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},n.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},n.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},n}(),fd=function(){function n(t){this.type="tree",this._nodes=[],this.hostModel=t}return n.prototype.eachNode=function(t,e,a){this.root.eachNode(t,e,a)},n.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},n.prototype.getNodeById=function(t){return this.root.getNodeById(t)},n.prototype.update=function(){for(var t=this.data,e=this._nodes,a=0,i=e.length;a<i;a++)e[a].dataIndex=-1;for(var a=0,i=t.count();a<i;a++)e[t.getRawIndex(a)].dataIndex=a},n.prototype.clearLayouts=function(){this.data.clearItemLayouts()},n.createTree=function(t,e,a){var i=new n(e),o=[],r=1;s(t);function s(d,h){var c=d.value;r=Math.max(r,G(c)?c.length:1),o.push(d);var p=new pd(Gt(d.name,""),i);h?gd(p,h):i.root=p,i._nodes.push(p);var g=d.children;if(g)for(var f=0;f<g.length;f++)s(g[f],p)}i.root.updateDepthAndHeight(0);var l=Tn(o,{coordDimensions:["value"],dimensionsCount:r}).dimensions,u=new _e(l,e);return u.initData(o),a&&a(u),_o({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},n}();function gd(n,t){var e=t.children;n.parentNode!==t&&(e.push(n),n.parentNode=t)}const ca=fd;function Mt(n,t,e){if(n&&xe(t,n.type)>=0){var a=e.getData().tree.root,i=n.targetNode;if(be(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var o=n.targetNodeId;if(o!=null&&(i=a.getNodeById(o)))return{node:i}}}function Io(n){for(var t=[];n;)n=n.parentNode,n&&t.push(n);return t.reverse()}function pa(n,t){var e=Io(n);return xe(e,t)>=0}function tn(n,t){for(var e=[];n;){var a=n.dataIndex;e.push({name:n.name,dataIndex:a,value:t.getRawValue(a)}),n=n.parentNode}return e.reverse(),e}var yd=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},i=e.leaves||{},o=new Be(i,this,this.ecModel),r=ca.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(c,p){var g=r.getNodeByDataIndex(p);return g&&g.children.length&&g.isExpand||(c.parentModel=o),c})}var l=0;r.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=e.expandAndCollapse,d=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return r.root.eachNode("preorder",function(h){var c=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=c&&c.collapsed!=null?!c.collapsed:h.depth<=d}),r.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,a,i){for(var o=this.getData().tree,r=o.root.children[0],s=o.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==r;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ve("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=tn(i,this),a.collapsed=!i.isExpand,a},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(pe);const vd=yd;function md(n,t,e){for(var a=[n],i=[],o;o=a.pop();)if(i.push(o),o.isExpand){var r=o.children;if(r.length)for(var s=0;s<r.length;s++)a.push(r[s])}for(;o=i.pop();)t(o,e)}function Lt(n,t){for(var e=[n],a;a=e.pop();)if(t(a),a.isExpand){var i=a.children;if(i.length)for(var o=i.length-1;o>=0;o--)e.push(i[o])}}function xd(n,t){n.eachSeriesByType("tree",function(e){_d(e,t)})}function _d(n,t){var e=Ku(n,t);n.layoutInfo=e;var a=n.get("layout"),i=0,o=0,r=null;a==="radial"?(i=2*Math.PI,o=Math.min(e.height,e.width)/2,r=fo(function(v,_){return(v.parentNode===_.parentNode?1:2)/v.depth})):(i=e.width,o=e.height,r=fo());var s=n.getData().tree.root,l=s.children[0];if(l){Uu(s),md(l,ju,r),s.hierNode.modifier=-l.hierNode.prelim,Lt(l,qu);var u=l,d=l,h=l;Lt(l,function(v){var _=v.getLayout().x;_<u.getLayout().x&&(u=v),_>d.getLayout().x&&(d=v),v.depth>h.depth&&(h=v)});var c=u===d?1:r(u,d)/2,p=c-u.getLayout().x,g=0,f=0,y=0,m=0;if(a==="radial")g=i/(d.getLayout().x+c+p),f=o/(h.depth-1||1),Lt(l,function(v){y=(v.getLayout().x+p)*g,m=(v.depth-1)*f;var _=St(y,m);v.setLayout({x:_.x,y:_.y,rawX:y,rawY:m},!0)});else{var x=n.getOrient();x==="RL"||x==="LR"?(f=o/(d.getLayout().x+c+p),g=i/(h.depth-1||1),Lt(l,function(v){m=(v.getLayout().x+p)*f,y=x==="LR"?(v.depth-1)*g:i-(v.depth-1)*g,v.setLayout({x:y,y:m},!0)})):(x==="TB"||x==="BT")&&(g=i/(d.getLayout().x+c+p),f=o/(h.depth-1||1),Lt(l,function(v){y=(v.getLayout().x+p)*g,m=x==="TB"?(v.depth-1)*f:o-(v.depth-1)*f,v.setLayout({x:y,y:m},!0)}))}}}function bd(n){n.eachSeriesByType("tree",function(t){var e=t.getData(),a=e.tree;a.eachNode(function(i){var o=i.getModel(),r=o.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(i.dataIndex,"style");W(s,r)})})}function Id(n){n.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var i=t.dataIndex,o=a.getData().tree,r=o.getNodeByDataIndex(i);r.isExpand=!r.isExpand})}),n.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var o=i.coordinateSystem,r=Ei(o,t,void 0,a);i.setCenter&&i.setCenter(r.center),i.setZoom&&i.setZoom(r.zoom)})})}function wd(n){n.registerChartView(rd),n.registerSeriesModel(vd),n.registerLayout(xd),n.registerVisual(bd),Id(n)}var wo=["treemapZoomToNode","treemapRender","treemapMove"];function Sd(n){for(var t=0;t<wo.length;t++)n.registerAction({type:wo[t],update:"updateView"},gt);n.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,a){a.eachComponent({mainType:"series",subType:"treemap",query:e},i);function i(o,r){var s=["treemapZoomToNode","treemapRootToNode"],l=Mt(e,s,o);if(l){var u=o.getViewRoot();u&&(e.direction=pa(u,l.node)?"rollUp":"drillDown"),o.resetViewRoot(l.node)}}})}function So(n){var t=n.getData(),e=t.tree,a={};e.eachNode(function(i){for(var o=i;o&&o.depth>1;)o=o.parentNode;var r=ks(n.ecModel,o.name||o.dataIndex+"",a);i.setVisual("decal",r)})}var Md=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var i={name:e.name,children:e.data};Mo(i);var o=e.levels||[],r=this.designatedVisualItemStyle={},s=new Be({itemStyle:r},this,a);o=e.levels=Ld(o,a);var l=F(o||[],function(h){return new Be(h,s,a)},this),u=ca.createTree(i,this,d);function d(h){h.wrapMethod("getItemModel",function(c,p){var g=u.getNodeByDataIndex(p),f=g?l[g.depth]:null;return c.parentModel=f||s,c})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=this.getRawValue(e),s=o.getName(e);return Ve("nameValue",{name:s,value:r})},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=tn(i,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=De(),this._idIndexMapCount=0);var i=a.get(e);return i==null&&a.set(e,i=this._idIndexMapCount++),i},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(){So(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(pe);function Mo(n){var t=0;P(n.children,function(a){Mo(a);var i=a.value;G(i)&&(i=i[0]),t+=i});var e=n.value;G(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),G(n.value)?n.value[0]=e:n.value=e}function Ld(n,t){var e=ke(t.get("color")),a=ke(t.get(["aria","decal","decals"]));if(e){n=n||[];var i,o;P(n,function(s){var l=new Be(s),u=l.get("color"),d=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||d&&d!=="none")&&(o=!0)});var r=n[0]||(n[0]={});return i||(r.color=e.slice()),!o&&a&&(r.decal=a.slice()),n}}const Dd=Md;var Cd=8,Lo=8,fa=5,Td=function(){function n(t){this.group=new oe,t.add(this.group)}return n.prototype.render=function(t,e,a,i){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),!(!o.get("show")||!a)){var s=o.getModel("itemStyle"),l=o.getModel("emphasis"),u=s.getModel("textStyle"),d=l.getModel(["itemStyle","textStyle"]),h={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(t,h,s,l,u,d,i),zs(r,h.pos,h.box)}},n.prototype._prepare=function(t,e,a){for(var i=t;i;i=i.parentNode){var o=Gt(i.getModel().get("name"),""),r=a.getTextRect(o),s=Math.max(r.width+Cd*2,e.emptyItemWidth);e.totalWidth+=s+Lo,e.renderList.push({node:i,text:o,width:s})}},n.prototype._renderContent=function(t,e,a,i,o,r,s){for(var l=0,u=e.emptyItemWidth,d=t.get(["breadcrumb","height"]),h=Os(e.pos,e.box),c=e.totalWidth,p=e.renderList,g=i.getModel("itemStyle").getItemStyle(),f=p.length-1;f>=0;f--){var y=p[f],m=y.node,x=y.width,v=y.text;c>h.width&&(c-=x-u,x=u,v=null);var _=new yt({shape:{points:Ad(l,0,x,d,f===p.length-1,f===0)},style:ce(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Bt({style:vt(o,{text:v})}),textConfig:{position:"inside"},z2:Ft*1e4,onclick:te(s,m)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=vt(r,{text:v}),_.ensureState("emphasis").style=g,fe(_,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(_),Nd(_,t,m),l+=x+Lo}},n.prototype.remove=function(){this.group.removeAll()},n}();function Ad(n,t,e,a,i,o){var r=[[i?n:n-fa,t],[n+e,t],[n+e,t+a],[i?n:n-fa,t+a]];return!o&&r.splice(2,0,[n+e+fa,t+a/2]),!i&&r.push([n,t+a/2]),r}function Nd(n,t,e){ae(n).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&&tn(e,t)}}const Pd=Td;var Rd=function(){function n(){this._storage=[],this._elExistsMap={}}return n.prototype.add=function(t,e,a,i,o){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:i,easing:o}),!0)},n.prototype.finished=function(t){return this._finishedCallback=t,this},n.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())},i=0,o=this._storage.length;i<o;i++){var r=this._storage[i];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:a,aborted:a})}return this},n}();function Ed(){return new Rd}var ga=oe,Do=He,Co=3,To="label",Ao="upperLabel",Vd=Ft*10,kd=Ft*2,zd=Ft*3,Je=Gs([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),No=function(n){var t=Je(n);return t.stroke=t.fill=t.lineWidth=null,t},nn=me(),Od=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._state="ready",e._storage=Dt(),e}return t.prototype.render=function(e,a,i,o){var r=a.findComponents({mainType:"series",subType:"treemap",query:o});if(!(xe(r,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=Mt(o,s,e),u=o&&o.type,d=e.layoutInfo,h=!this._oldTree,c=this._storage,p=u==="treemapRootToNode"&&l&&c?{rootNodeGroup:c.nodeGroup[l.node.getRawIndex()],direction:o.direction}:null,g=this._giveContainerGroup(d),f=e.get("animation"),y=this._doRender(g,e,p);f&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(g,y,e,p):y.renderFinally(),this._resetController(i),this._renderBreadcrumb(e,i,l)}},t.prototype._giveContainerGroup=function(e){var a=this._containerGroup;return a||(a=this._containerGroup=new ga,this._initEvents(a),this.group.add(a)),a.x=e.x,a.y=e.y,a},t.prototype._doRender=function(e,a,i){var o=a.getData().tree,r=this._oldTree,s=Dt(),l=Dt(),u=this._storage,d=[];function h(y,m,x,v){return Gd(a,l,u,i,s,d,y,m,x,v)}p(o.root?[o.root]:[],r&&r.root?[r.root]:[],e,o===r||!r,0);var c=g(u);return this._oldTree=o,this._storage=l,{lastsForAnimation:s,willDeleteEls:c,renderFinally:f};function p(y,m,x,v,_){v?(m=y,P(y,function(w,S){!w.isRemoved()&&I(S,S)})):new ot(m,y,b,b).add(I).update(I).remove(te(I,null)).execute();function b(w){return w.getId()}function I(w,S){var M=w!=null?y[w]:null,D=S!=null?m[S]:null,L=h(M,D,x,_);L&&p(M&&M.viewChildren||[],D&&D.viewChildren||[],L,v,_+1)}}function g(y){var m=Dt();return y&&P(y,function(x,v){var _=m[v];P(x,function(b){b&&(_.push(b),nn(b).willDelete=!0)})}),m}function f(){P(c,function(y){P(y,function(m){m.parent&&m.parent.remove(m)})}),P(d,function(y){y.invisible=!0,y.dirty()})}},t.prototype._doAnimation=function(e,a,i,o){var r=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(ie(r)?0:r)||0,u=(ie(s)?null:s)||"cubicOut",d=Ed();P(a.willDeleteEls,function(h,c){P(h,function(p,g){if(!p.invisible){var f=p.parent,y,m=nn(f);if(o&&o.direction==="drillDown")y=f===o.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var x=0,v=0;m.willDelete||(x=m.nodeWidth/2,v=m.nodeHeight/2),y=c==="nodeGroup"?{x,y:v,style:{opacity:0}}:{shape:{x,y:v,width:0,height:0},style:{opacity:0}}}y&&d.add(p,y,l,0,u)}})}),P(this._storage,function(h,c){P(h,function(p,g){var f=a.lastsForAnimation[c][g],y={};f&&(p instanceof oe?f.oldX!=null&&(y.x=p.x,y.y=p.y,p.x=f.oldX,p.y=f.oldY):(f.oldShape&&(y.shape=W({},p.shape),p.setShape(f.oldShape)),f.fadein?(p.setStyle("opacity",0),y.style={opacity:1}):p.style.opacity!==1&&(y.style={opacity:1})),d.add(p,y,l,0,u))})},this),this._state="animating",d.finished(re(function(){this._state="ready",a.renderFinally()},this)).start()},t.prototype._resetController=function(e){var a=this._controller;a||(a=this._controller=new Mn(e.getZr()),a.enable(this.seriesModel.get("roam")),a.on("pan",re(this._onPan,this)),a.on("zoom",re(this._onZoom,this)));var i=new de(0,0,e.getWidth(),e.getHeight());a.setPointerChecker(function(o,r,s){return i.contain(r,s)})},t.prototype._clearController=function(){var e=this._controller;e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if(this._state!=="animating"&&(Math.abs(e.dx)>Co||Math.abs(e.dy)>Co)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(e){var a=e.originX,i=e.originY;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var r=o.getLayout();if(!r)return;var s=new de(r.x,r.y,r.width,r.height),l=this.seriesModel.layoutInfo;a-=l.x,i-=l.y;var u=Fs();Vi(u,u,[-a,-i]),Bs(u,u,[e.scale,e.scale]),Vi(u,u,[a,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(i){if(a._state==="ready"){var o=a.seriesModel.get("nodeClick",!0);if(o){var r=a.findTarget(i.offsetX,i.offsetY);if(r){var s=r.node;if(s.getLayout().isLeafRoot)a._rootToNode(r);else if(o==="zoomToNode")a._zoomToNode(r);else if(o==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),d=l.get("target",!0)||"blank";u&&ki(u,d)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,i){var o=this;i||(i=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Pd(this.group))).render(e,a,i.node,function(r){o._state!=="animating"&&(pa(e.getViewRoot(),r)?o._rootToNode({node:r}):o._zoomToNode({node:r}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Dt(),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 i,o=this.seriesModel.getViewRoot();return o.eachNode({attr:"viewChildren",order:"preorder"},function(r){var s=this._storage.background[r.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:r,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(he);function Dt(){return{nodeGroup:[],background:[],content:[]}}function Gd(n,t,e,a,i,o,r,s,l,u){if(!r)return;var d=r.getLayout(),h=n.getData(),c=r.getModel();if(h.setItemGraphicEl(r.dataIndex,null),!d||!d.isInView)return;var p=d.width,g=d.height,f=d.borderWidth,y=d.invisible,m=r.getRawIndex(),x=s&&s.getRawIndex(),v=r.viewChildren,_=d.upperHeight,b=v&&v.length,I=c.getModel("itemStyle"),w=c.getModel(["emphasis","itemStyle"]),S=c.getModel(["blur","itemStyle"]),M=c.getModel(["select","itemStyle"]),D=I.get("borderRadius")||0,L=q("nodeGroup",ga);if(!L)return;if(l.add(L),L.x=d.x||0,L.y=d.y||0,L.markRedraw(),nn(L).nodeWidth=p,nn(L).nodeHeight=g,d.isAboveViewRoot)return L;var T=q("background",Do,u,kd);T&&z(L,T,b&&d.upperLabelHeight);var N=c.getModel("emphasis"),C=N.get("focus"),A=N.get("blurScope"),R=N.get("disabled"),V=C==="ancestor"?r.getAncestorsIndices():C==="descendant"?r.getDescendantIndices():C;if(b)zi(L)&&Ht(L,!1),T&&(Ht(T,!R),h.setItemGraphicEl(r.dataIndex,T),Oi(T,V,A));else{var k=q("content",Do,u,zd);k&&H(L,k),T.disableMorphing=!0,T&&zi(T)&&Ht(T,!1),Ht(L,!R),h.setItemGraphicEl(r.dataIndex,L),Oi(L,V,A)}return L;function z(Y,O,j){var U=ae(O);if(U.dataIndex=r.dataIndex,U.seriesIndex=n.seriesIndex,O.setShape({x:0,y:0,width:p,height:g,r:D}),y)B(O);else{O.invisible=!1;var $=r.getVisual("style"),ue=$.stroke,Se=No(I);Se.fill=ue;var ne=Je(w);ne.fill=w.get("borderColor");var Me=Je(S);Me.fill=S.get("borderColor");var Re=Je(M);if(Re.fill=M.get("borderColor"),j){var at=p-2*f;K(O,ue,$.opacity,{x:f,y:0,width:at,height:_})}else O.removeTextContent();O.setStyle(Se),O.ensureState("emphasis").style=ne,O.ensureState("blur").style=Me,O.ensureState("select").style=Re,Ot(O)}Y.add(O)}function H(Y,O){var j=ae(O);j.dataIndex=r.dataIndex,j.seriesIndex=n.seriesIndex;var U=Math.max(p-2*f,0),$=Math.max(g-2*f,0);if(O.culling=!0,O.setShape({x:f,y:f,width:U,height:$,r:D}),y)B(O);else{O.invisible=!1;var ue=r.getVisual("style"),Se=ue.fill,ne=No(I);ne.fill=Se,ne.decal=ue.decal;var Me=Je(w),Re=Je(S),at=Je(M);K(O,Se,ue.opacity,null),O.setStyle(ne),O.ensureState("emphasis").style=Me,O.ensureState("blur").style=Re,O.ensureState("select").style=at,Ot(O)}Y.add(O)}function B(Y){!Y.invisible&&o.push(Y)}function K(Y,O,j,U){var $=c.getModel(U?Ao:To),ue=Gt(c.get("name"),null),Se=$.getShallow("show");Fe(Y,Ae(c,U?Ao:To),{defaultText:Se?ue:null,inheritColor:O,defaultOpacity:j,labelFetcher:n,labelDataIndex:r.dataIndex});var ne=Y.getTextContent();if(ne){var Me=ne.style,Re=Hs(Me.padding||0);U&&(Y.setTextConfig({layoutRect:U}),ne.disableLabelLayout=!0),ne.beforeUpdate=function(){var wi=Math.max((U?U.width:Y.shape.width)-Re[1]-Re[3],0),Si=Math.max((U?U.height:Y.shape.height)-Re[0]-Re[2],0);(Me.width!==wi||Me.height!==Si)&&ne.setStyle({width:wi,height:Si})},Me.truncateMinChar=2,Me.lineOverflow="truncate",Q(Me,U,d);var at=ne.getState("emphasis");Q(at?at.style:null,U,d)}}function Q(Y,O,j){var U=Y?Y.text:null;if(!O&&j.isLeafRoot&&U!=null){var $=n.get("drillDownIcon",!0);Y.text=$?$+" "+U:U}}function q(Y,O,j,U){var $=x!=null&&e[Y][x],ue=i[Y];return $?(e[Y][x]=null,ee(ue,$)):y||($=new O,$ instanceof An&&($.z2=Bd(j,U)),ve(ue,$)),t[Y][m]=$}function ee(Y,O){var j=Y[m]={};O instanceof ga?(j.oldX=O.x,j.oldY=O.y):j.oldShape=W({},O.shape)}function ve(Y,O){var j=Y[m]={},U=r.parentNode,$=O instanceof oe;if(U&&(!a||a.direction==="drillDown")){var ue=0,Se=0,ne=i.background[U.getRawIndex()];!a&&ne&&ne.oldShape&&(ue=ne.oldShape.width,Se=ne.oldShape.height),$?(j.oldX=0,j.oldY=Se):j.oldShape={x:ue,y:Se,width:0,height:0}}j.fadein=!$}}function Bd(n,t){return n*Vd+t}const Fd=Od;var Hd="itemStyle",Po=me();const Wd={seriesType:"treemap",reset:function(n){var t=n.getData().tree,e=t.root;e.isRemoved()||Ro(e,{},n.getViewRoot().getAncestors(),n)}};function Ro(n,t,e,a){var i=n.getModel(),o=n.getLayout(),r=n.hostTree.data;if(!(!o||o.invisible||!o.isInView)){var s=i.getModel(Hd),l=Xd(s,t,a),u=r.ensureUniqueItemVisual(n.dataIndex,"style"),d=s.get("borderColor"),h=s.get("borderColorSaturation"),c;h!=null&&(c=Eo(l),d=Yd(h,c)),u.stroke=d;var p=n.viewChildren;if(!p||!p.length)c=Eo(l),u.fill=c;else{var g=Zd(n,i,o,s,l,p);P(p,function(f,y){if(f.depth>=e.length||f===e[f.depth]){var m=Ud(i,l,f,y,g,a);Ro(f,m,e,a)}})}}}function Xd(n,t,e){var a=W({},t),i=e.designatedVisualItemStyle;return P(["color","colorAlpha","colorSaturation"],function(o){i[o]=t[o];var r=n.get(o);i[o]=null,r!=null&&(a[o]=r)}),a}function Eo(n){var t=ya(n,"color");if(t){var e=ya(n,"colorAlpha"),a=ya(n,"colorSaturation");return a&&(t=Gi(t,null,null,a)),e&&(t=Nn(t,e)),t}}function Yd(n,t){return t!=null?Gi(t,null,null,n):null}function ya(n,t){var e=n[t];if(e!=null&&e!=="none")return e}function Zd(n,t,e,a,i,o){if(!(!o||!o.length)){var r=va(t,"color")||i.color!=null&&i.color!=="none"&&(va(t,"colorAlpha")||va(t,"colorSaturation"));if(r){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var d=t.get("colorMappingBy"),h={type:r.name,dataExtent:u,visual:r.range};h.type==="color"&&(d==="index"||d==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var c=new Bi(h);return Po(c).drColorMappingBy=d,c}}}function va(n,t){var e=n.get(t);return G(e)&&e.length?{name:t,range:e}:null}function Ud(n,t,e,a,i,o){var r=W({},t);if(i){var s=i.type,l=s==="color"&&Po(i).drColorMappingBy,u=l==="index"?a:l==="id"?o.mapIdToIndex(e.getId()):e.getValue(n.get("visualDimension"));r[s]=i.mapValueToVisual(u)}return r}var Ct=Math.max,an=Math.min,Vo=Ne,ma=P,ko=["itemStyle","borderWidth"],jd=["itemStyle","gapWidth"],qd=["upperLabel","show"],Kd=["upperLabel","height"];const Qd={seriesType:"treemap",reset:function(n,t,e,a){var i=e.getWidth(),o=e.getHeight(),r=n.option,s=it(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=r.size||[],u=Z(Vo(s.width,l[0]),i),d=Z(Vo(s.height,l[1]),o),h=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],p=Mt(a,c,n),g=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,f=n.getViewRoot(),y=Io(f);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?ah(n,p,f,u,d):g?[g.width,g.height]:[u,d],x=r.sort;x&&x!=="asc"&&x!=="desc"&&(x="desc");var v={squareRatio:r.squareRatio,sort:x,leafDepth:r.leafDepth};f.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(_),zo(f,v,!1,0),_=f.getLayout(),ma(y,function(I,w){var S=(y[w+1]||f).getValue();I.setLayout(W({dataExtent:[S,S],borderWidth:0,upperHeight:0},_))})}var b=n.getData().tree.root;b.setLayout(ih(s,g,p),!0),n.setLayoutInfo(s),Go(b,new de(-s.x,-s.y,i,o),y,f,0)}};function zo(n,t,e,a){var i,o;if(!n.isRemoved()){var r=n.getLayout();i=r.width,o=r.height;var s=n.getModel(),l=s.get(ko),u=s.get(jd)/2,d=Bo(s),h=Math.max(l,d),c=l-u,p=h-u;n.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:d},!0),i=Ct(i-2*c,0),o=Ct(o-c-p,0);var g=i*o,f=$d(n,s,g,t,e,a);if(f.length){var y={x:c,y:p,width:i,height:o},m=an(i,o),x=1/0,v=[];v.area=0;for(var _=0,b=f.length;_<b;){var I=f[_];v.push(I),v.area+=I.getLayout().area;var w=nh(v,m,t.squareRatio);w<=x?(_++,x=w):(v.area-=v.pop().getLayout().area,Oo(v,m,y,u,!1),m=an(y.width,y.height),v.length=v.area=0,x=1/0)}if(v.length&&Oo(v,m,y,u,!0),!e){var S=s.get("childrenVisibleMin");S!=null&&g<S&&(e=!0)}for(var _=0,b=f.length;_<b;_++)zo(f[_],t,e,a+1)}}}function $d(n,t,e,a,i,o){var r=n.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=o;if(i&&!l)return n.viewChildren=[];r=Le(r,function(p){return!p.isRemoved()}),eh(r,s);var u=th(t,r,s);if(u.sum===0)return n.viewChildren=[];if(u.sum=Jd(t,e,u.sum,s,r),u.sum===0)return n.viewChildren=[];for(var d=0,h=r.length;d<h;d++){var c=r[d].getValue()/u.sum*e;r[d].setLayout({area:c})}return l&&(r.length&&n.setLayout({isLeafRoot:!0},!0),r.length=0),n.viewChildren=r,n.setLayout({dataExtent:u.dataExtent},!0),r}function Jd(n,t,e,a,i){if(!a)return e;for(var o=n.get("visibleMin"),r=i.length,s=r,l=r-1;l>=0;l--){var u=i[a==="asc"?r-l-1:l].getValue();u/e*t<o&&(s=l,e-=u)}return a==="asc"?i.splice(0,r-s):i.splice(s,r-s),e}function eh(n,t){return t&&n.sort(function(e,a){var i=t==="asc"?e.getValue()-a.getValue():a.getValue()-e.getValue();return i===0?t==="asc"?e.dataIndex-a.dataIndex:a.dataIndex-e.dataIndex:i}),n}function th(n,t,e){for(var a=0,i=0,o=t.length;i<o;i++)a+=t[i].getValue();var r=n.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:r==="value"&&e?(s=[t[t.length-1].getValue(),t[0].getValue()],e==="asc"&&s.reverse()):(s=[1/0,-1/0],ma(t,function(l){var u=l.getValue(r);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function nh(n,t,e){for(var a=0,i=1/0,o=0,r=void 0,s=n.length;o<s;o++)r=n[o].getLayout().area,r&&(r<i&&(i=r),r>a&&(a=r));var l=n.area*n.area,u=t*t*e;return l?Ct(u*a/l,l/(u*i)):1/0}function Oo(n,t,e,a,i){var o=t===e.width?0:1,r=1-o,s=["x","y"],l=["width","height"],u=e[s[o]],d=t?n.area/t:0;(i||d>e[l[r]])&&(d=e[l[r]]);for(var h=0,c=n.length;h<c;h++){var p=n[h],g={},f=d?p.getLayout().area/d:0,y=g[l[r]]=Ct(d-2*a,0),m=e[s[o]]+e[l[o]]-u,x=h===c-1||m<f?m:f,v=g[l[o]]=Ct(x-2*a,0);g[s[r]]=e[s[r]]+an(a,y/2),g[s[o]]=u+an(a,v/2),u+=x,p.setLayout(g,!0)}e[s[r]]+=d,e[l[r]]-=d}function ah(n,t,e,a,i){var o=(t||{}).node,r=[a,i];if(!o||o===e)return r;for(var s,l=a*i,u=l*n.option.zoomToNodeRatio;s=o.parentNode;){for(var d=0,h=s.children,c=0,p=h.length;c<p;c++)d+=h[c].getValue();var g=o.getValue();if(g===0)return r;u*=d/g;var f=s.getModel(),y=f.get(ko),m=Math.max(y,Bo(f));u+=4*y*y+(3*y+m)*Math.pow(u,.5),u>Fi&&(u=Fi),o=s}u<l&&(u=l);var x=Math.pow(u/l,.5);return[a*x,i*x]}function ih(n,t,e){if(t)return{x:t.x,y:t.y};var a={x:0,y:0};if(!e)return a;var i=e.node,o=i.getLayout();if(!o)return a;for(var r=[o.width/2,o.height/2],s=i;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:n.width/2-r[0],y:n.height/2-r[1]}}function Go(n,t,e,a,i){var o=n.getLayout(),r=e[i],s=r&&r===n;if(!(r&&!s||i===e.length&&n!==a)){n.setLayout({isInView:!0,invisible:!s&&!t.intersect(o),isAboveViewRoot:s},!0);var l=new de(t.x-o.x,t.y-o.y,t.width,t.height);ma(n.viewChildren||[],function(u){Go(u,l,e,a,i+1)})}}function Bo(n){return n.get(qd)?n.get(Kd):0}function oh(n){n.registerSeriesModel(Dd),n.registerChartView(Fd),n.registerVisual(Wd),n.registerLayout(Qd),Sd(n)}function rh(n){var t=n.findComponents({mainType:"legend"});!t||!t.length||n.eachSeriesByType("graph",function(e){var a=e.getCategoriesData(),i=e.getGraph(),o=i.data,r=a.mapArray(a.getName);o.filterSelf(function(s){var l=o.getItemModel(s),u=l.getShallow("category");if(u!=null){We(u)&&(u=r[u]);for(var d=0;d<t.length;d++)if(!t[d].isSelected(u))return!1}return!0})})}function sh(n){var t={};n.eachSeriesByType("graph",function(e){var a=e.getCategoriesData(),i=e.getData(),o={};a.each(function(r){var s=a.getName(r);o["ec-"+s]=r;var l=a.getItemModel(r),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=e.getColorFromPalette(s,t)),a.setItemVisual(r,"style",u);for(var d=["symbol","symbolSize","symbolKeepAspect"],h=0;h<d.length;h++){var c=l.getShallow(d[h],!0);c!=null&&a.setItemVisual(r,d[h],c)}}),a.count()&&i.each(function(r){var s=i.getItemModel(r),l=s.getShallow("category");if(l!=null){be(l)&&(l=o["ec-"+l]);var u=a.getItemVisual(l,"style"),d=i.ensureUniqueItemVisual(r,"style");W(d,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],c=0;c<h.length;c++)i.setItemVisual(r,h[c],a.getItemVisual(l,h[c]))}})})}function on(n){return n instanceof Array||(n=[n,n]),n}function lh(n){n.eachSeriesByType("graph",function(t){var e=t.getGraph(),a=t.getEdgeData(),i=on(t.get("edgeSymbol")),o=on(t.get("edgeSymbolSize"));a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("style",t.getModel("lineStyle").getLineStyle()),a.each(function(r){var s=a.getItemModel(r),l=e.getEdgeByIndex(r),u=on(s.getShallow("symbol",!0)),d=on(s.getShallow("symbolSize",!0)),h=s.getModel("lineStyle").getLineStyle(),c=a.ensureUniqueItemVisual(r,"style");switch(W(c,h),c.stroke){case"source":{var p=l.node1.getVisual("style");c.stroke=p&&p.fill;break}case"target":{var p=l.node2.getVisual("style");c.stroke=p&&p.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),d[0]&&l.setVisual("fromSymbolSize",d[0]),d[1]&&l.setVisual("toSymbolSize",d[1])})})}var xa="-->",rn=function(n){return n.get("autoCurveness")||null},Fo=function(n,t){var e=rn(n),a=20,i=[];if(We(e))a=e;else if(G(e)){n.__curvenessList=e;return}t>a&&(a=t);var o=a%2?a+2:a+3;i=[];for(var r=0;r<o;r++)i.push((r%2?r+1:r)/10*(r%2?-1:1));n.__curvenessList=i},Tt=function(n,t,e){var a=[n.id,n.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[e.uid,a,i].join(xa)},Ho=function(n){var t=n.split(xa);return[t[0],t[2],t[1]].join(xa)},uh=function(n,t){var e=Tt(n.node1,n.node2,t);return t.__edgeMap[e]},dh=function(n,t){var e=_a(Tt(n.node1,n.node2,t),t),a=_a(Tt(n.node2,n.node1,t),t);return e+a},_a=function(n,t){var e=t.__edgeMap;return e[n]?e[n].length:0};function hh(n){rn(n)&&(n.__curvenessList=[],n.__edgeMap={},Fo(n))}function ch(n,t,e,a){if(rn(e)){var i=Tt(n,t,e),o=e.__edgeMap,r=o[Ho(i)];o[i]&&!r?o[i].isForward=!0:r&&o[i]&&(r.isForward=!0,o[i].isForward=!1),o[i]=o[i]||[],o[i].push(a)}}function ba(n,t,e,a){var i=rn(t),o=G(i);if(!i)return null;var r=uh(n,t);if(!r)return null;for(var s=-1,l=0;l<r.length;l++)if(r[l]===e){s=l;break}var u=dh(n,t);Fo(t,u),n.lineStyle=n.lineStyle||{};var d=Tt(n.node1,n.node2,t),h=t.__curvenessList,c=o||u%2?0:1;if(r.isForward)return h[c+s];var p=Ho(d),g=_a(p,t),f=h[s+g+c];return a?o?i&&i[0]===0?(g+c)%2?f:-f:((g%2?0:1)+c)%2?f:-f:(g+c)%2?f:-f:h[s+g+c]}function Wo(n){var t=n.coordinateSystem;if(!(t&&t.type!=="view")){var e=n.getGraph();e.eachNode(function(a){var i=a.getModel();a.setLayout([+i.get("x"),+i.get("y")])}),Ia(e,n)}}function Ia(n,t){n.eachEdge(function(e,a){var i=mt(e.getModel().get(["lineStyle","curveness"]),-ba(e,t,a,!0),0),o=Xe(e.node1.getLayout()),r=Xe(e.node2.getLayout()),s=[o,r];+i&&s.push([(o[0]+r[0])/2-(o[1]-r[1])*i,(o[1]+r[1])/2-(r[0]-o[0])*i]),e.setLayout(s)})}function ph(n,t){n.eachSeriesByType("graph",function(e){var a=e.get("layout"),i=e.coordinateSystem;if(i&&i.type!=="view"){var o=e.getData(),r=[];P(i.dimensions,function(c){r=r.concat(o.mapDimensionsAll(c))});for(var s=0;s<o.count();s++){for(var l=[],u=!1,d=0;d<r.length;d++){var h=o.get(r[d],s);isNaN(h)||(u=!0),l.push(h)}u?o.setItemLayout(s,i.dataToPoint(l)):o.setItemLayout(s,[NaN,NaN])}Ia(o.graph,e)}else(!a||a==="none")&&Wo(e)})}function At(n){var t=n.coordinateSystem;if(t.type!=="view")return 1;var e=n.option.nodeScaleRatio,a=t.scaleX,i=t.getZoom(),o=(i-1)*e+1;return o/a}function Nt(n){var t=n.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var Xo=Math.PI,wa=[];function Sa(n,t,e,a){var i=n.coordinateSystem;if(!(i&&i.type!=="view")){var o=i.getBoundingRect(),r=n.getData(),s=r.graph,l=o.width/2+o.x,u=o.height/2+o.y,d=Math.min(o.width,o.height)/2,h=r.count();if(r.setLayout({cx:l,cy:u}),!!h){if(e){var c=i.pointToData(a),p=c[0],g=c[1],f=[p-l,g-u];xt(f,f),Ws(f,f,d),e.setLayout([l+f[0],u+f[1]],!0);var y=n.get(["circular","rotateLabel"]);Yo(e,y,l,u)}fh[t](n,s,r,d,l,u,h),s.eachEdge(function(m,x){var v=mt(m.getModel().get(["lineStyle","curveness"]),ba(m,n,x),0),_=Xe(m.node1.getLayout()),b=Xe(m.node2.getLayout()),I,w=(_[0]+b[0])/2,S=(_[1]+b[1])/2;+v&&(v*=3,I=[l*v+w*(1-v),u*v+S*(1-v)]),m.setLayout([_,b,I])})}}}var fh={value:function(n,t,e,a,i,o,r){var s=0,l=e.getSum("value"),u=Math.PI*2/(l||r);t.eachNode(function(d){var h=d.getValue("value"),c=u*(l?h:1)/2;s+=c,d.setLayout([a*Math.cos(s)+i,a*Math.sin(s)+o]),s+=c})},symbolSize:function(n,t,e,a,i,o,r){var s=0;wa.length=r;var l=At(n);t.eachNode(function(h){var c=Nt(h);isNaN(c)&&(c=2),c<0&&(c=0),c*=l;var p=Math.asin(c/2/a);isNaN(p)&&(p=Xo/2),wa[h.dataIndex]=p,s+=p*2});var u=(2*Xo-s)/r/2,d=0;t.eachNode(function(h){var c=u+wa[h.dataIndex];d+=c,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([a*Math.cos(d)+i,a*Math.sin(d)+o]),d+=c})}};function Yo(n,t,e,a){var i=n.getGraphicEl();if(i){var o=n.getModel(),r=o.get(["label","rotate"])||0,s=i.getSymbolPath();if(t){var l=n.getLayout(),u=Math.atan2(l[1]-a,l[0]-e);u<0&&(u=Math.PI*2+u);var d=l[0]<e;d&&(u=u-Math.PI);var h=d?"left":"right";s.setTextConfig({rotation:-u,position:h,origin:"center"});var c=s.ensureState("emphasis");W(c.textConfig||(c.textConfig={}),{position:h})}else s.setTextConfig({rotation:r*=Math.PI/180})}}function gh(n){n.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&Sa(t,"symbolSize")})}var ut=Pn;function yh(n,t,e){for(var a=n,i=t,o=e.rect,r=o.width,s=o.height,l=[o.x+r/2,o.y+s/2],u=e.gravity==null?.1:e.gravity,d=0;d<a.length;d++){var h=a[d];h.p||(h.p=Xs(r*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),h.pp=Xe(h.p),h.edges=null}var c=e.friction==null?.6:e.friction,p=c,g,f;return{warmUp:function(){p=c*.8},setFixed:function(y){a[y].fixed=!0},setUnfixed:function(y){a[y].fixed=!1},beforeStep:function(y){g=y},afterStep:function(y){f=y},step:function(y){g&&g(a,i);for(var m=[],x=a.length,v=0;v<i.length;v++){var _=i[v];if(!_.ignoreForceLayout){var b=_.n1,I=_.n2;rt(m,I.p,b.p);var w=Hi(m)-_.d,S=I.w/(b.w+I.w);isNaN(S)&&(S=0),xt(m,m),!b.fixed&&ut(b.p,b.p,m,S*w*p),!I.fixed&&ut(I.p,I.p,m,-(1-S)*w*p)}}for(var v=0;v<x;v++){var M=a[v];M.fixed||(rt(m,l,M.p),ut(M.p,M.p,m,u*p))}for(var v=0;v<x;v++)for(var b=a[v],D=v+1;D<x;D++){var I=a[D];rt(m,I.p,b.p);var w=Hi(m);w===0&&(Ys(m,Math.random()-.5,Math.random()-.5),w=1);var L=(b.rep+I.rep)/w/w;!b.fixed&&ut(b.pp,b.pp,m,L),!I.fixed&&ut(I.pp,I.pp,m,-L)}for(var T=[],v=0;v<x;v++){var M=a[v];M.fixed||(rt(T,M.p,M.pp),ut(M.p,M.p,T,p),ge(M.pp,M.p))}p=p*.992;var N=p<.01;f&&f(a,i,N),y&&y(N)}}}function vh(n){n.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view"))if(t.get("layout")==="force"){var a=t.preservedPoints||{},i=t.getGraph(),o=i.data,r=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?o.each(function(v){var _=o.getId(v);o.setItemLayout(v,a[_]||[NaN,NaN])}):!l||l==="none"?Wo(t):l==="circular"&&Sa(t,"value");var u=o.getDataExtent("value"),d=r.getDataExtent("value"),h=s.get("repulsion"),c=s.get("edgeLength"),p=G(h)?h:[h,h],g=G(c)?c:[c,c];g=[g[1],g[0]];var f=o.mapArray("value",function(v,_){var b=o.getItemLayout(_),I=Wt(v,u,p);return isNaN(I)&&(I=(p[0]+p[1])/2),{w:I,rep:I,fixed:o.getItemModel(_).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),y=r.mapArray("value",function(v,_){var b=i.getEdgeByIndex(_),I=Wt(v,d,g);isNaN(I)&&(I=(g[0]+g[1])/2);var w=b.getModel(),S=mt(b.getModel().get(["lineStyle","curveness"]),-ba(b,t,_,!0),0);return{n1:f[b.node1.dataIndex],n2:f[b.node2.dataIndex],d:I,curveness:S,ignoreForceLayout:w.get("ignoreForceLayout")}}),m=e.getBoundingRect(),x=yh(f,y,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});x.beforeStep(function(v,_){for(var b=0,I=v.length;b<I;b++)v[b].fixed&&ge(v[b].p,i.getNodeByIndex(b).getLayout())}),x.afterStep(function(v,_,b){for(var I=0,w=v.length;I<w;I++)v[I].fixed||i.getNodeByIndex(I).setLayout(v[I].p),a[o.getId(I)]=v[I].p;for(var I=0,w=_.length;I<w;I++){var S=_[I],M=i.getEdgeByIndex(I),D=S.n1.p,L=S.n2.p,T=M.getLayout();T=T?T.slice():[],T[0]=T[0]||[],T[1]=T[1]||[],ge(T[0],D),ge(T[1],L),+S.curveness&&(T[2]=[(D[0]+L[0])/2-(D[1]-L[1])*S.curveness,(D[1]+L[1])/2-(L[0]-D[0])*S.curveness]),M.setLayout(T)}}),t.forceLayout=x,t.preservedPoints=a,x.step()}else t.forceLayout=null})}function mh(n,t,e){var a=W(n.getBoxLayoutParams(),{aspect:e});return it(a,{width:t.getWidth(),height:t.getHeight()})}function xh(n,t){var e=[];return n.eachSeriesByType("graph",function(a){var i=a.get("coordinateSystem");if(!i||i==="view"){var o=a.getData(),r=o.mapArray(function(y){var m=o.getItemModel(y);return[+m.get("x"),+m.get("y")]}),s=[],l=[];zt(r,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),d=mh(a,t,u);isNaN(u)&&(s=[d.x,d.y],l=[d.x+d.width,d.y+d.height]);var h=l[0]-s[0],c=l[1]-s[1],p=d.width,g=d.height,f=a.coordinateSystem=new Ln;f.zoomLimit=a.get("scaleLimit"),f.setBoundingRect(s[0],s[1],h,c),f.setViewRect(d.x,d.y,p,g),f.setCenter(a.get("center"),t),f.setZoom(a.get("zoom")),e.push(f)}}),e}var Zo=Wi.prototype,Ma=Ri.prototype,Uo=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return n}();(function(n){E(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t})(Uo);function La(n){return isNaN(+n.cpx1)||isNaN(+n.cpy1)}var _h=function(n){E(t,n);function t(e){var a=n.call(this,e)||this;return a.type="ec-line",a}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Uo},t.prototype.buildPath=function(e,a){La(a)?Zo.buildPath.call(this,e,a):Ma.buildPath.call(this,e,a)},t.prototype.pointAt=function(e){return La(this.shape)?Zo.pointAt.call(this,e):Ma.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var a=this.shape,i=La(a)?[a.x2-a.x1,a.y2-a.y1]:Ma.tangentAt.call(this,e);return xt(i,i)},t}(ye);const bh=_h;var Da=["fromSymbol","toSymbol"];function jo(n){return"_"+n+"Type"}function qo(n,t,e){var a=t.getItemVisual(e,n);if(!a||a==="none")return a;var i=t.getItemVisual(e,n+"Size"),o=t.getItemVisual(e,n+"Rotate"),r=t.getItemVisual(e,n+"Offset"),s=t.getItemVisual(e,n+"KeepAspect"),l=kn(i),u=zn(r||0,l);return a+l+u+(o||"")+(s||"")}function Ko(n,t,e){var a=t.getItemVisual(e,n);if(!(!a||a==="none")){var i=t.getItemVisual(e,n+"Size"),o=t.getItemVisual(e,n+"Rotate"),r=t.getItemVisual(e,n+"Offset"),s=t.getItemVisual(e,n+"KeepAspect"),l=kn(i),u=zn(r||0,l),d=On(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return d.__specifiedRotation=o==null||isNaN(o)?void 0:+o*Math.PI/180||0,d.name=n,d}}function Ih(n){var t=new bh({name:"line",subPixelOptimize:!0});return Ca(t.shape,n),t}function Ca(n,t){n.x1=t[0][0],n.y1=t[0][1],n.x2=t[1][0],n.y2=t[1][1],n.percent=1;var e=t[2];e?(n.cpx1=e[0],n.cpy1=e[1]):(n.cpx1=NaN,n.cpy1=NaN)}var wh=function(n){E(t,n);function t(e,a,i){var o=n.call(this)||this;return o._createLine(e,a,i),o}return t.prototype._createLine=function(e,a,i){var o=e.hostModel,r=e.getItemLayout(a),s=Ih(r);s.shape.percent=0,Te(s,{shape:{percent:1}},o,a),this.add(s),P(Da,function(l){var u=Ko(l,e,a);this.add(u),this[jo(l)]=qo(l,e,a)},this),this._updateCommonStl(e,a,i)},t.prototype.updateData=function(e,a,i){var o=e.hostModel,r=this.childOfName("line"),s=e.getItemLayout(a),l={shape:{}};Ca(l.shape,s),se(r,l,o,a),P(Da,function(u){var d=qo(u,e,a),h=jo(u);if(this[h]!==d){this.remove(this.childOfName(u));var c=Ko(u,e,a);this.add(c)}this[h]=d},this),this._updateCommonStl(e,a,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,a,i){var o=e.hostModel,r=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,d=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,c=i&&i.focus,p=i&&i.blurScope;if(!i||e.hasItemOption){var g=e.getItemModel(a),f=g.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),l=g.getModel(["blur","lineStyle"]).getLineStyle(),u=g.getModel(["select","lineStyle"]).getLineStyle(),h=f.get("disabled"),c=f.get("focus"),p=f.get("blurScope"),d=Ae(g)}var y=e.getItemVisual(a,"style"),m=y.stroke;r.useStyle(y),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=s,r.ensureState("blur").style=l,r.ensureState("select").style=u,P(Da,function(I){var w=this.childOfName(I);if(w){w.setColor(m),w.style.opacity=y.opacity;for(var S=0;S<Rn.length;S++){var M=Rn[S],D=r.getState(M);if(D){var L=D.style||{},T=w.ensureState(M),N=T.style||(T.style={});L.stroke!=null&&(N[w.__isEmptyBrush?"stroke":"fill"]=L.stroke),L.opacity!=null&&(N.opacity=L.opacity)}}w.markRedraw()}},this);var x=o.getRawValue(a);Fe(this,d,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(I,w){return o.getFormattedLabel(I,w,e.dataType)}},inheritColor:m||"#000",defaultOpacity:y.opacity,defaultText:(x==null?e.getName(a):isFinite(x)?Zs(x):x)+""});var v=this.getTextContent();if(v){var _=d.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=_.get("position")||"middle";var b=_.get("distance");G(b)||(b=[b,b]),v.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),fe(this,c,p,h)},t.prototype.highlight=function(){En(this)},t.prototype.downplay=function(){Vn(this)},t.prototype.updateLayout=function(e,a){this.setLinePoints(e.getItemLayout(a))},t.prototype.setLinePoints=function(e){var a=this.childOfName("line");Ca(a.shape,e),a.dirty()},t.prototype.beforeUpdate=function(){var e=this,a=e.childOfName("fromSymbol"),i=e.childOfName("toSymbol"),o=e.getTextContent();if(!a&&!i&&(!o||o.ignore))return;for(var r=1,s=this.parent;s;)s.scaleX&&(r/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,d=l.pointAt(0),h=l.pointAt(u),c=rt([],h,d);xt(c,c);function p(D,L){var T=D.__specifiedRotation;if(T==null){var N=l.tangentAt(L);D.attr("rotation",(L===1?-1:1)*Math.PI/2-Math.atan2(N[1],N[0]))}else D.attr("rotation",T)}if(a&&(a.setPosition(d),p(a,0),a.scaleX=a.scaleY=r*u,a.markRedraw()),i&&(i.setPosition(h),p(i,1),i.scaleX=i.scaleY=r*u,i.markRedraw()),o&&!o.ignore){o.x=o.y=0,o.originX=o.originY=0;var g=void 0,f=void 0,y=o.__labelDistance,m=y[0]*r,x=y[1]*r,v=u/2,_=l.tangentAt(v),b=[_[1],-_[0]],I=l.pointAt(v);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var w=_[0]<0?-1:1;if(o.__position!=="start"&&o.__position!=="end"){var S=-Math.atan2(_[1],_[0]);h[0]<d[0]&&(S=Math.PI+S),o.rotation=S}var M=void 0;switch(o.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":M=-x,f="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":M=x,f="top";break;default:M=0,f="middle"}switch(o.__position){case"end":o.x=c[0]*m+h[0],o.y=c[1]*x+h[1],g=c[0]>.8?"left":c[0]<-.8?"right":"center",f=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":o.x=-c[0]*m+d[0],o.y=-c[1]*x+d[1],g=c[0]>.8?"right":c[0]<-.8?"left":"center",f=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":o.x=m*w+d[0],o.y=d[1]+M,g=_[0]<0?"right":"left",o.originX=-m*w,o.originY=-M;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":o.x=I[0],o.y=I[1]+M,g="center",o.originY=-M;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":o.x=-m*w+h[0],o.y=h[1]+M,g=_[0]>=0?"right":"left",o.originX=m*w,o.originY=-M;break}o.scaleX=o.scaleY=r,o.setStyle({verticalAlign:o.__verticalAlign||f,align:o.__align||g})}},t}(oe);const Ta=wh;var Sh=function(){function n(t){this.group=new oe,this._LineCtor=t||Ta}return n.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,i=a.group,o=a._lineData;a._lineData=t,o||i.removeAll();var r=Qo(t);t.diff(o).add(function(s){e._doAdd(t,s,r)}).update(function(s,l){e._doUpdate(o,t,l,s,r)}).remove(function(s){i.remove(o.getItemGraphicEl(s))}).execute()},n.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Qo(t),this._lineData=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function a(s){!s.isGroup&&!Mh(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var o=e.getItemLayout(i);if(Aa(o)){var r=new this._LineCtor(e,i,this._seriesScope);r.traverse(a),this.group.add(r),e.setItemGraphicEl(i,r),this._progressiveEls.push(r)}}},n.prototype.remove=function(){this.group.removeAll()},n.prototype.eachRendered=function(t){Xt(this._progressiveEls||this.group,t)},n.prototype._doAdd=function(t,e,a){var i=t.getItemLayout(e);if(Aa(i)){var o=new this._LineCtor(t,e,a);t.setItemGraphicEl(e,o),this.group.add(o)}},n.prototype._doUpdate=function(t,e,a,i,o){var r=t.getItemGraphicEl(a);if(!Aa(e.getItemLayout(i))){this.group.remove(r);return}r?r.updateData(e,i,o):r=new this._LineCtor(e,i,o),e.setItemGraphicEl(i,r),this.group.add(r)},n}();function Mh(n){return n.animators&&n.animators.length>0}function Qo(n){var t=n.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Ae(t)}}function $o(n){return isNaN(n[0])||isNaN(n[1])}function Aa(n){return n&&!$o(n[0])&&!$o(n[1])}const Na=Sh;var Pa=[],Ra=[],Ea=[],dt=Xi,Va=js,Jo=Math.abs;function er(n,t,e){for(var a=n[0],i=n[1],o=n[2],r=1/0,s,l=e*e,u=.1,d=.1;d<=.9;d+=.1){Pa[0]=dt(a[0],i[0],o[0],d),Pa[1]=dt(a[1],i[1],o[1],d);var h=Jo(Va(Pa,t)-l);h<r&&(r=h,s=d)}for(var c=0;c<32;c++){var p=s+u;Ra[0]=dt(a[0],i[0],o[0],s),Ra[1]=dt(a[1],i[1],o[1],s),Ea[0]=dt(a[0],i[0],o[0],p),Ea[1]=dt(a[1],i[1],o[1],p);var h=Va(Ra,t)-l;if(Jo(h)<.01)break;var g=Va(Ea,t)-l;u/=2,h<0?g>=0?s=s+u:s=s-u:g>=0?s=s-u:s=s+u}return s}function ka(n,t){var e=[],a=Us,i=[[],[],[]],o=[[],[]],r=[];t/=2,n.eachEdge(function(s,l){var u=s.getLayout(),d=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[Xe(u[0]),Xe(u[1])],u[2]&&u.__original.push(Xe(u[2])));var c=u.__original;if(u[2]!=null){if(ge(i[0],c[0]),ge(i[1],c[2]),ge(i[2],c[1]),d&&d!=="none"){var p=Nt(s.node1),g=er(i,c[0],p*t);a(i[0][0],i[1][0],i[2][0],g,e),i[0][0]=e[3],i[1][0]=e[4],a(i[0][1],i[1][1],i[2][1],g,e),i[0][1]=e[3],i[1][1]=e[4]}if(h&&h!=="none"){var p=Nt(s.node2),g=er(i,c[1],p*t);a(i[0][0],i[1][0],i[2][0],g,e),i[1][0]=e[1],i[2][0]=e[2],a(i[0][1],i[1][1],i[2][1],g,e),i[1][1]=e[1],i[2][1]=e[2]}ge(u[0],i[0]),ge(u[1],i[2]),ge(u[2],i[1])}else{if(ge(o[0],c[0]),ge(o[1],c[1]),rt(r,o[1],o[0]),xt(r,r),d&&d!=="none"){var p=Nt(s.node1);Pn(o[0],o[0],r,p*t)}if(h&&h!=="none"){var p=Nt(s.node2);Pn(o[1],o[1],r,-p*t)}ge(u[0],o[0]),ge(u[1],o[1])}})}function tr(n){return n.type==="view"}var Lh=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){var i=new Gn,o=new Na,r=this.group;this._controller=new Mn(a.getZr()),this._controllerHost={target:r},r.add(i.group),r.add(o.group),this._symbolDraw=i,this._lineDraw=o,this._firstRender=!0},t.prototype.render=function(e,a,i){var o=this,r=e.coordinateSystem;this._model=e;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(tr(r)){var d={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?u.attr(d):se(u,d,e)}ka(e.getGraph(),At(e));var h=e.getData();s.updateData(h);var c=e.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,a,i),clearTimeout(this._layoutTimeout);var p=e.forceLayout,g=e.get(["force","layoutAnimation"]);p&&this._startForceLayoutIteration(p,g);var f=e.get("layout");h.graph.eachNode(function(v){var _=v.dataIndex,b=v.getGraphicEl(),I=v.getModel();if(b){b.off("drag").off("dragend");var w=I.get("draggable");w&&b.on("drag",function(M){switch(f){case"force":p.warmUp(),!o._layouting&&o._startForceLayoutIteration(p,g),p.setFixed(_),h.setItemLayout(_,[b.x,b.y]);break;case"circular":h.setItemLayout(_,[b.x,b.y]),v.setLayout({fixed:!0},!0),Sa(e,"symbolSize",v,[M.offsetX,M.offsetY]),o.updateLayout(e);break;case"none":default:h.setItemLayout(_,[b.x,b.y]),Ia(e.getGraph(),e),o.updateLayout(e);break}}).on("dragend",function(){p&&p.setUnfixed(_)}),b.setDraggable(w,!!I.get("cursor"));var S=I.get(["emphasis","focus"]);S==="adjacency"&&(ae(b).focus=v.getAdjacentDataIndices())}}),h.graph.eachEdge(function(v){var _=v.getGraphicEl(),b=v.getModel().get(["emphasis","focus"]);_&&b==="adjacency"&&(ae(_).focus={edge:[v.dataIndex],node:[v.node1.dataIndex,v.node2.dataIndex]})});var y=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=h.getLayout("cx"),x=h.getLayout("cy");h.graph.eachNode(function(v){Yo(v,y,m,x)}),this._firstRender=!1},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,a){var i=this;(function o(){e.step(function(r){i.updateLayout(i._model),(i._layouting=!r)&&(a?i._layoutTimeout=setTimeout(o,16):o())})})()},t.prototype._updateController=function(e,a,i){var o=this,r=this._controller,s=this._controllerHost,l=this.group;if(r.setPointerChecker(function(u,d,h){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(d,h)&&!Ti(u,i,e)}),!tr(e.coordinateSystem)){r.disable();return}r.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(u){Ai(s,u.dx,u.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ni(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),o._updateNodeAndLinkScale(),ka(e.getGraph(),At(e)),o._lineDraw.updateLayout(),i.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),i=At(e);a.eachItemGraphicEl(function(o,r){o&&o.setSymbolScale(i)})},t.prototype.updateLayout=function(e){ka(e.getGraph(),At(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(he);const Dh=Lh;function ht(n){return"_EC_"+n}var Ch=function(){function n(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return n.prototype.isDirected=function(){return this._directed},n.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var a=this._nodesMap;if(!a[ht(t)]){var i=new et(t,e);return i.hostGraph=this,this.nodes.push(i),a[ht(t)]=i,i}},n.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},n.prototype.getNodeById=function(t){return this._nodesMap[ht(t)]},n.prototype.addEdge=function(t,e,a){var i=this._nodesMap,o=this._edgesMap;if(We(t)&&(t=this.nodes[t]),We(e)&&(e=this.nodes[e]),t instanceof et||(t=i[ht(t)]),e instanceof et||(e=i[ht(e)]),!(!t||!e)){var r=t.id+"-"+e.id,s=new nr(t,e,a);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),o[r]=s,s}},n.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},n.prototype.getEdge=function(t,e){t instanceof et&&(t=t.id),e instanceof et&&(e=e.id);var a=this._edgesMap;return this._directed?a[t+"-"+e]:a[t+"-"+e]||a[e+"-"+t]},n.prototype.eachNode=function(t,e){for(var a=this.nodes,i=a.length,o=0;o<i;o++)a[o].dataIndex>=0&&t.call(e,a[o],o)},n.prototype.eachEdge=function(t,e){for(var a=this.edges,i=a.length,o=0;o<i;o++)a[o].dataIndex>=0&&a[o].node1.dataIndex>=0&&a[o].node2.dataIndex>=0&&t.call(e,a[o],o)},n.prototype.breadthFirstTraverse=function(t,e,a,i){if(e instanceof et||(e=this._nodesMap[ht(e)]),!!e){for(var o=a==="out"?"outEdges":a==="in"?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!t.call(i,e,null))for(var s=[e];s.length;)for(var l=s.shift(),u=l[o],r=0;r<u.length;r++){var d=u[r],h=d.node1===l?d.node2:d.node1;if(!h.__visited){if(t.call(i,h,l))return;s.push(h),h.__visited=!0}}}},n.prototype.update=function(){for(var t=this.data,e=this.edgeData,a=this.nodes,i=this.edges,o=0,r=a.length;o<r;o++)a[o].dataIndex=-1;for(var o=0,r=t.count();o<r;o++)a[t.getRawIndex(o)].dataIndex=o;e.filterSelf(function(s){var l=i[e.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var o=0,r=i.length;o<r;o++)i[o].dataIndex=-1;for(var o=0,r=e.count();o<r;o++)i[e.getRawIndex(o)].dataIndex=o},n.prototype.clone=function(){for(var t=new n(this._directed),e=this.nodes,a=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(var i=0;i<a.length;i++){var o=a[i];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},n}(),et=function(){function n(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t!=null?t:"",this.dataIndex=e!=null?e:-1}return n.prototype.degree=function(){return this.edges.length},n.prototype.inDegree=function(){return this.inEdges.length},n.prototype.outDegree=function(){return this.outEdges.length},n.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},n.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var a=this.edges[e];a.dataIndex<0||(t.edge.push(a.dataIndex),t.node.push(a.node1.dataIndex,a.node2.dataIndex))}return t},n.prototype.getTrajectoryDataIndices=function(){for(var t=De(),e=De(),a=0;a<this.edges.length;a++){var i=this.edges[a];if(!(i.dataIndex<0)){t.set(i.dataIndex,!0);for(var o=[i.node1],r=[i.node2],s=0;s<o.length;){var l=o[s];s++,e.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)t.set(l.inEdges[u].dataIndex,!0),o.push(l.inEdges[u].node1)}for(s=0;s<r.length;){var d=r[s];s++,e.set(d.dataIndex,!0);for(var u=0;u<d.outEdges.length;u++)t.set(d.outEdges[u].dataIndex,!0),r.push(d.outEdges[u].node2)}}}return{edge:t.keys(),node:e.keys()}},n}(),nr=function(){function n(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a!=null?a:-1}return n.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},n.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},n.prototype.getTrajectoryDataIndices=function(){var t=De(),e=De();t.set(this.dataIndex,!0);for(var a=[this.node1],i=[this.node2],o=0;o<a.length;){var r=a[o];o++,e.set(r.dataIndex,!0);for(var s=0;s<r.inEdges.length;s++)t.set(r.inEdges[s].dataIndex,!0),a.push(r.inEdges[s].node1)}for(o=0;o<i.length;){var l=i[o];o++,e.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)t.set(l.outEdges[s].dataIndex,!0),i.push(l.outEdges[s].node2)}return{edge:t.keys(),node:e.keys()}},n}();function ar(n,t){return{getValue:function(e){var a=this[n][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[n][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[n][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[n][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[n][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][t].getRawIndex(this.dataIndex)}}}st(et,ar("hostGraph","data")),st(nr,ar("hostGraph","edgeData"));const Th=Ch;function ir(n,t,e,a,i){for(var o=new Th(a),r=0;r<n.length;r++)o.addNode(Ne(n[r].id,n[r].name,r),r);for(var s=[],l=[],u=0,r=0;r<t.length;r++){var d=t[r],h=d.source,c=d.target;o.addEdge(h,c,u)&&(l.push(d),s.push(Ne(Gt(d.id,null),h+" > "+c)),u++)}var p=e.get("coordinateSystem"),g;if(p==="cartesian2d"||p==="polar")g=_t(n,e);else{var f=Yi.get(p),y=f?f.dimensions||[]:[];xe(y,"value")<0&&y.concat(["value"]);var m=Tn(n,{coordDimensions:y,encodeDefine:e.getEncode()}).dimensions;g=new _e(m,e),g.initData(n)}var x=new _e(["value"],e);return x.initData(l,s),i&&i(g,x),_o({mainData:g,struct:o,structAttr:"graph",datas:{node:g,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var Ah=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){n.prototype.init.apply(this,arguments);var a=this;function i(){return a._categoriesData}this.legendVisualProvider=new Bn(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){n.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){n.prototype.mergeDefaultAndTheme.apply(this,arguments),Fn(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,a){var i=e.edges||e.links||[],o=e.data||e.nodes||[],r=this;if(o&&i){hh(this);var s=ir(o,i,this,!0,l);return P(s.edges,function(u){ch(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,d){u.wrapMethod("getItemModel",function(g){var f=r._categoriesModels,y=g.getShallow("category"),m=f[y];return m&&(m.parentModel=g.parentModel,g.parentModel=m),g});var h=Be.prototype.getModel;function c(g,f){var y=h.call(this,g,f);return y.resolveParentPath=p,y}d.wrapMethod("getItemModel",function(g){return g.resolveParentPath=p,g.getModel=c,g});function p(g){if(g&&(g[0]==="label"||g[1]==="label")){var f=g.slice();return g[0]==="label"?f[0]="edgeLabel":g[1]==="label"&&(f[1]="edgeLabel"),f}return g}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,a,i){if(i==="edge"){var o=this.getData(),r=this.getDataParams(e,i),s=o.graph.getEdgeByIndex(e),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),d=[];return l!=null&&d.push(l),u!=null&&d.push(u),Ve("nameValue",{name:d.join(" > "),value:r.value,noValue:r.value==null})}var h=qs({series:this,dataIndex:e,multipleSeries:a});return h},t.prototype._updateCategoriesData=function(){var e=F(this.option.categories||[],function(i){return i.value!=null?i:W({value:0},i)}),a=new _e(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return n.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Nh=Ah;var Ph={type:"graphRoam",event:"graphRoam",update:"none"};function Rh(n){n.registerChartView(Dh),n.registerSeriesModel(Nh),n.registerProcessor(rh),n.registerVisual(sh),n.registerVisual(lh),n.registerLayout(ph),n.registerLayout(n.PRIORITY.VISUAL.POST_CHART_LAYOUT,gh),n.registerLayout(vh),n.registerCoordinateSystem("graphView",{dimensions:Ln.dimensions,create:xh}),n.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},gt),n.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},gt),n.registerAction(Ph,function(t,e,a){e.eachComponent({mainType:"series",query:t},function(i){var o=i.coordinateSystem,r=Ei(o,t,void 0,a);i.setCenter&&i.setCenter(r.center),i.setZoom&&i.setZoom(r.zoom)})})}var Eh=["itemStyle","opacity"],Vh=function(n){E(t,n);function t(e,a){var i=n.call(this)||this,o=i,r=new Hn,s=new Bt;return o.setTextContent(s),i.setTextGuideLine(r),i.updateData(e,a,!0),i}return t.prototype.updateData=function(e,a,i){var o=this,r=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),d=s.get(Eh);d=d!=null?d:1,i||lt(o),o.useStyle(e.getItemVisual(a,"style")),o.style.lineJoin="round",i?(o.setShape({points:l.points}),o.style.opacity=0,Te(o,{style:{opacity:d}},r,a)):se(o,{style:{opacity:d},shape:{points:l.points}},r,a),Ee(o,s),this._updateLabel(e,a),fe(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var i=this,o=this.getTextGuideLine(),r=i.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),d=u.label,h=e.getItemVisual(a,"style"),c=h.fill;Fe(r,Ae(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:e.getName(a)},{normal:{align:d.textAlign,verticalAlign:d.verticalAlign}}),i.setTextConfig({local:!0,inside:!!d.inside,insideStroke:c,outsideFill:c});var p=d.linePoints;o.setShape({points:p}),i.textGuideLineConfig={anchor:p?new Ye(p[0][0],p[0][1]):null},se(r,{style:{x:d.x,y:d.y}},s,a),r.attr({rotation:d.rotation,originX:d.x,originY:d.y,z2:10}),Li(i,Di(l),{stroke:c})},t}(yt),kh=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this._data,s=this.group;o.diff(r).add(function(l){var u=new Vh(o,l);o.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var d=r.getItemGraphicEl(u);d.updateData(o,l),s.add(d),o.setItemGraphicEl(l,d)}).remove(function(l){var u=r.getItemGraphicEl(l);Ks(u,e,l)}).execute(),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(he);const zh=kh;var Oh=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bn(re(this.getData,this),re(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return Zi(this,{coordDimensions:["value"],encodeDefaulter:te(Qs,this)})},t.prototype._defaultLabelLine=function(e){Fn(e,"labelLine",["show"]);var a=e.labelLine,i=e.emphasis.labelLine;a.show=a.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),i=n.prototype.getDataParams.call(this,e),o=a.mapDimension("value"),r=a.getSum(o);return i.percent=r?+(a.get(o,e)/r*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Gh=Oh;function Bh(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Fh(n,t){for(var e=n.mapDimension("value"),a=n.mapArray(e,function(l){return l}),i=[],o=t==="ascending",r=0,s=n.count();r<s;r++)i[r]=r;return ie(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return o?a[l]-a[u]:a[u]-a[l]}),i}function Hh(n){var t=n.hostModel,e=t.get("orient");n.each(function(a){var i=n.getItemModel(a),o=i.getModel("label"),r=o.get("position"),s=i.getModel("labelLine"),l=n.getItemLayout(a),u=l.points,d=r==="inner"||r==="inside"||r==="center"||r==="insideLeft"||r==="insideRight",h,c,p,g;if(d)r==="insideLeft"?(c=(u[0][0]+u[3][0])/2+5,p=(u[0][1]+u[3][1])/2,h="left"):r==="insideRight"?(c=(u[1][0]+u[2][0])/2-5,p=(u[1][1]+u[2][1])/2,h="right"):(c=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,p=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),g=[[c,p],[c,p]];else{var f=void 0,y=void 0,m=void 0,x=void 0,v=s.get("length");r==="left"?(f=(u[3][0]+u[0][0])/2,y=(u[3][1]+u[0][1])/2,m=f-v,c=m-5,h="right"):r==="right"?(f=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,m=f+v,c=m+5,h="left"):r==="top"?(f=(u[3][0]+u[0][0])/2,y=(u[3][1]+u[0][1])/2,x=y-v,p=x-5,h="center"):r==="bottom"?(f=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,x=y+v,p=x+5,h="center"):r==="rightTop"?(f=e==="horizontal"?u[3][0]:u[1][0],y=e==="horizontal"?u[3][1]:u[1][1],e==="horizontal"?(x=y-v,p=x-5,h="center"):(m=f+v,c=m+5,h="top")):r==="rightBottom"?(f=u[2][0],y=u[2][1],e==="horizontal"?(x=y+v,p=x+5,h="center"):(m=f+v,c=m+5,h="bottom")):r==="leftTop"?(f=u[0][0],y=e==="horizontal"?u[0][1]:u[1][1],e==="horizontal"?(x=y-v,p=x-5,h="center"):(m=f-v,c=m-5,h="right")):r==="leftBottom"?(f=e==="horizontal"?u[1][0]:u[3][0],y=e==="horizontal"?u[1][1]:u[2][1],e==="horizontal"?(x=y+v,p=x+5,h="center"):(m=f-v,c=m-5,h="right")):(f=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,e==="horizontal"?(x=y+v,p=x+5,h="center"):(m=f+v,c=m+5,h="left")),e==="horizontal"?(m=f,c=m):(x=y,p=x),g=[[f,y],[m,x]]}l.label={linePoints:g,x:c,y:p,verticalAlign:"middle",textAlign:h,inside:d}})}function Wh(n,t){n.eachSeriesByType("funnel",function(e){var a=e.getData(),i=a.mapDimension("value"),o=e.get("sort"),r=Bh(e,t),s=e.get("orient"),l=r.width,u=r.height,d=Fh(a,o),h=r.x,c=r.y,p=s==="horizontal"?[Z(e.get("minSize"),u),Z(e.get("maxSize"),u)]:[Z(e.get("minSize"),l),Z(e.get("maxSize"),l)],g=a.getDataExtent(i),f=e.get("min"),y=e.get("max");f==null&&(f=Math.min(g[0],0)),y==null&&(y=g[1]);var m=e.get("funnelAlign"),x=e.get("gap"),v=s==="horizontal"?l:u,_=(v-x*(a.count()-1))/a.count(),b=function(C,A){if(s==="horizontal"){var R=a.get(i,C)||0,V=Wt(R,[f,y],p,!0),k=void 0;switch(m){case"top":k=c;break;case"center":k=c+(u-V)/2;break;case"bottom":k=c+(u-V);break}return[[A,k],[A,k+V]]}var z=a.get(i,C)||0,H=Wt(z,[f,y],p,!0),B;switch(m){case"left":B=h;break;case"center":B=h+(l-H)/2;break;case"right":B=h+l-H;break}return[[B,A],[B+H,A]]};o==="ascending"&&(_=-_,x=-x,s==="horizontal"?h+=l:c+=u,d=d.reverse());for(var I=0;I<d.length;I++){var w=d[I],S=d[I+1],M=a.getItemModel(w);if(s==="horizontal"){var D=M.get(["itemStyle","width"]);D==null?D=_:(D=Z(D,l),o==="ascending"&&(D=-D));var L=b(w,h),T=b(S,h+D);h+=D+x,a.setItemLayout(w,{points:L.concat(T.slice().reverse())})}else{var N=M.get(["itemStyle","height"]);N==null?N=_:(N=Z(N,u),o==="ascending"&&(N=-N));var L=b(w,c),T=b(S,c+N);c+=N+x,a.setItemLayout(w,{points:L.concat(T.slice().reverse())})}}Hh(a)})}function Xh(n){n.registerChartView(zh),n.registerSeriesModel(Gh),n.registerLayout(Wh),n.registerProcessor(Wn("funnel"))}var Yh=.3,Zh=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._dataGroup=new oe,e._initialized=!1,e}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,a,i,o){this._progressiveEls=null;var r=this._dataGroup,s=e.getData(),l=this._data,u=e.coordinateSystem,d=u.dimensions,h=sr(e);s.diff(l).add(c).update(p).remove(g).execute();function c(y){var m=rr(s,r,y,d,u);za(m,s,y,h)}function p(y,m){var x=l.getItemGraphicEl(m),v=or(s,y,d,u);s.setItemGraphicEl(y,x),se(x,{shape:{points:v}},e,y),lt(x),za(x,s,y,h)}function g(y){var m=l.getItemGraphicEl(y);r.remove(m)}if(!this._initialized){this._initialized=!0;var f=Uh(u,e,function(){setTimeout(function(){r.removeClipPath()})});r.setClipPath(f)}this._data=s},t.prototype.incrementalPrepareRender=function(e,a,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,a,i){for(var o=a.getData(),r=a.coordinateSystem,s=r.dimensions,l=sr(a),u=this._progressiveEls=[],d=e.start;d<e.end;d++){var h=rr(o,this._dataGroup,d,s,r);h.incremental=!0,za(h,o,d,l),u.push(h)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(he);function Uh(n,t,e){var a=n.model,i=n.getRect(),o=new He({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),r=a.get("layout")==="horizontal"?"width":"height";return o.setShape(r,0),Te(o,{shape:{width:i.width,height:i.height}},t,e),o}function or(n,t,e,a){for(var i=[],o=0;o<e.length;o++){var r=e[o],s=n.get(n.mapDimension(r),t);jh(s,a.getAxis(r).type)||i.push(a.dataToPoint(s,r))}return i}function rr(n,t,e,a,i){var o=or(n,e,a,i),r=new Hn({shape:{points:o},z2:10});return t.add(r),n.setItemGraphicEl(e,r),r}function sr(n){var t=n.get("smooth",!0);return t===!0&&(t=Yh),t=$s(t),Js(t)&&(t=0),{smooth:t}}function za(n,t,e,a){n.useStyle(t.getItemVisual(e,"style")),n.style.fill=null,n.setShape("smooth",a.smooth);var i=t.getItemModel(e),o=i.getModel("emphasis");Ee(n,i,"lineStyle"),fe(n,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function jh(n,t){return t==="category"?n==null:n==null||isNaN(n)}const qh=Zh;var Kh=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.getInitialData=function(e,a){return _t(null,this,{useEncodeDefaulter:re(Qh,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var a=this.coordinateSystem,i=this.getData(),o=[];return a.eachActiveState(i,function(r,s){e===r&&o.push(i.getRawIndex(s))}),o},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(pe);function Qh(n){var t=n.ecModel.getComponent("parallel",n.get("parallelIndex"));if(t){var e={};return P(t.dimensions,function(a){var i=$h(a);e[a]=i}),e}}function $h(n){return+n.replace("dim","")}const Jh=Kh;var ec=["lineStyle","opacity"],tc={seriesType:"parallel",reset:function(n,t){var e=n.coordinateSystem,a={normal:n.get(["lineStyle","opacity"]),active:n.get("activeOpacity"),inactive:n.get("inactiveOpacity")};return{progress:function(i,o){e.eachActiveState(o,function(r,s){var l=a[r];if(r==="normal"&&o.hasItemOption){var u=o.getItemModel(s).get(ec,!0);u!=null&&(l=u)}var d=o.ensureUniqueItemVisual(s,"style");d.opacity=l},i.start,i.end)}}}};const nc=tc;function ac(n){X(Ui),n.registerChartView(qh),n.registerSeriesModel(Jh),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,nc)}var ic=function(){function n(){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 n}(),oc=function(n){E(t,n);function t(e){return n.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new ic},t.prototype.buildPath=function(e,a){var i=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+i,a.y2),e.bezierCurveTo(a.cpx2+i,a.cpy2,a.cpx1+i,a.cpy1,a.x1+i,a.y1)):(e.lineTo(a.x2,a.y2+i),e.bezierCurveTo(a.cpx2,a.cpy2+i,a.cpx1,a.cpy1+i,a.x1,a.y1+i)),e.closePath()},t.prototype.highlight=function(){En(this)},t.prototype.downplay=function(){Vn(this)},t}(ye),rc=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._focusAdjacencyDisabled=!1,e}return t.prototype.render=function(e,a,i){var o=this,r=e.getGraph(),s=this.group,l=e.layoutInfo,u=l.width,d=l.height,h=e.getData(),c=e.getData("edge"),p=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,r.eachEdge(function(g){var f=new oc,y=ae(f);y.dataIndex=g.dataIndex,y.seriesIndex=e.seriesIndex,y.dataType="edge";var m=g.getModel(),x=m.getModel("lineStyle"),v=x.get("curveness"),_=g.node1.getLayout(),b=g.node1.getModel(),I=b.get("localX"),w=b.get("localY"),S=g.node2.getLayout(),M=g.node2.getModel(),D=M.get("localX"),L=M.get("localY"),T=g.getLayout(),N,C,A,R,V,k,z,H;f.shape.extent=Math.max(1,T.dy),f.shape.orient=p,p==="vertical"?(N=(I!=null?I*u:_.x)+T.sy,C=(w!=null?w*d:_.y)+_.dy,A=(D!=null?D*u:S.x)+T.ty,R=L!=null?L*d:S.y,V=N,k=C*(1-v)+R*v,z=A,H=C*v+R*(1-v)):(N=(I!=null?I*u:_.x)+_.dx,C=(w!=null?w*d:_.y)+T.sy,A=D!=null?D*u:S.x,R=(L!=null?L*d:S.y)+T.ty,V=N*(1-v)+A*v,k=C,z=N*v+A*(1-v),H=R),f.setShape({x1:N,y1:C,x2:A,y2:R,cpx1:V,cpy1:k,cpx2:z,cpy2:H}),f.useStyle(x.getItemStyle()),lr(f.style,p,g);var B=""+m.get("value"),K=Ae(m,"edgeLabel");Fe(f,K,{labelFetcher:{getFormattedLabel:function(ee,ve,Y,O,j,U){return e.getFormattedLabel(ee,ve,"edge",O,mt(j,K.normal&&K.normal.get("formatter"),B),U)}},labelDataIndex:g.dataIndex,defaultText:B}),f.setTextConfig({position:"inside"});var Q=m.getModel("emphasis");Ee(f,m,"lineStyle",function(ee){var ve=ee.getItemStyle();return lr(ve,p,g),ve}),s.add(f),c.setItemGraphicEl(g.dataIndex,f);var q=Q.get("focus");fe(f,q==="adjacency"?g.getAdjacentDataIndices():q==="trajectory"?g.getTrajectoryDataIndices():q,Q.get("blurScope"),Q.get("disabled"))}),r.eachNode(function(g){var f=g.getLayout(),y=g.getModel(),m=y.get("localX"),x=y.get("localY"),v=y.getModel("emphasis"),_=new He({shape:{x:m!=null?m*u:f.x,y:x!=null?x*d:f.y,width:f.dx,height:f.dy},style:y.getModel("itemStyle").getItemStyle(),z2:10});Fe(_,Ae(y),{labelFetcher:{getFormattedLabel:function(I,w){return e.getFormattedLabel(I,w,"node")}},labelDataIndex:g.dataIndex,defaultText:g.id}),_.disableLabelAnimation=!0,_.setStyle("fill",g.getVisual("color")),_.setStyle("decal",g.getVisual("style").decal),Ee(_,y),s.add(_),h.setItemGraphicEl(g.dataIndex,_),ae(_).dataType="node";var b=v.get("focus");fe(_,b==="adjacency"?g.getAdjacentDataIndices():b==="trajectory"?g.getTrajectoryDataIndices():b,v.get("blurScope"),v.get("disabled"))}),h.eachItemGraphicEl(function(g,f){var y=h.getItemModel(f);y.get("draggable")&&(g.drift=function(m,x){o._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=x,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:h.getRawIndex(f),localX:this.shape.x/u,localY:this.shape.y/d})},g.ondragend=function(){o._focusAdjacencyDisabled=!1},g.draggable=!0,g.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(sc(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(he);function lr(n,t,e){switch(n.fill){case"source":n.fill=e.node1.getVisual("color"),n.decal=e.node1.getVisual("style").decal;break;case"target":n.fill=e.node2.getVisual("color"),n.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),i=e.node2.getVisual("color");be(a)&&be(i)&&(n.fill=new el(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:i,offset:1}]))}}function sc(n,t,e){var a=new He({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return Te(a,{shape:{width:n.width+20}},t,e),a}const lc=rc;var uc=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var i=e.edges||e.links,o=e.data||e.nodes,r=e.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l<r.length;l++)r[l].depth!=null&&r[l].depth>=0&&(s[r[l].depth]=new Be(r[l],this,a));if(o&&i){var u=ir(o,i,this,!0,d);return u.data}function d(h,c){h.wrapMethod("getItemModel",function(p,g){var f=p.parentModel,y=f.getData().getItemLayout(g);if(y){var m=y.depth,x=f.levelModels[m];x&&(p.parentModel=x)}return p}),c.wrapMethod("getItemModel",function(p,g){var f=p.parentModel,y=f.getGraph().getEdgeByIndex(g),m=y.node1.getLayout();if(m){var x=m.depth,v=f.levelModels[x];v&&(p.parentModel=v)}return p})}},t.prototype.setNodePosition=function(e,a){var i=this.option.data||this.option.nodes,o=i[e];o.localX=a[0],o.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,i){function o(p){return isNaN(p)||p==null}if(i==="edge"){var r=this.getDataParams(e,i),s=r.data,l=r.value,u=s.source+" -- "+s.target;return Ve("nameValue",{name:u,value:l,noValue:o(l)})}else{var d=this.getGraph().getNodeByIndex(e),h=d.getLayout().value,c=this.getDataParams(e,i).data.name;return Ve("nameValue",{name:c!=null?c+"":null,value:h,noValue:o(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var i=n.prototype.getDataParams.call(this,e,a);if(i.value==null&&a==="node"){var o=this.getGraph().getNodeByIndex(e),r=o.getLayout().value;i.value=r}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(pe);const dc=uc;function hc(n,t){n.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),i=e.get("nodeGap"),o=cc(e,t);e.layoutInfo=o;var r=o.width,s=o.height,l=e.getGraph(),u=l.nodes,d=l.edges;fc(u);var h=Le(u,function(f){return f.getLayout().value===0}),c=h.length!==0?0:e.get("layoutIterations"),p=e.get("orient"),g=e.get("nodeAlign");pc(u,d,a,i,r,s,c,p,g)})}function cc(n,t){return it(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function pc(n,t,e,a,i,o,r,s,l){gc(n,t,e,i,o,s,l),xc(n,t,o,i,a,r,s),Cc(n,s)}function fc(n){P(n,function(t){var e=Ue(t.outEdges,sn),a=Ue(t.inEdges,sn),i=t.getValue()||0,o=Math.max(e,a,i);t.setLayout({value:o},!0)})}function gc(n,t,e,a,i,o,r){for(var s=[],l=[],u=[],d=[],h=0,c=0;c<t.length;c++)s[c]=1;for(var c=0;c<n.length;c++)l[c]=n[c].inEdges.length,l[c]===0&&u.push(n[c]);for(var p=-1;u.length;){for(var g=0;g<u.length;g++){var f=u[g],y=f.hostGraph.data.getRawDataItem(f.dataIndex),m=y.depth!=null&&y.depth>=0;m&&y.depth>p&&(p=y.depth),f.setLayout({depth:m?y.depth:h},!0),o==="vertical"?f.setLayout({dy:e},!0):f.setLayout({dx:e},!0);for(var x=0;x<f.outEdges.length;x++){var v=f.outEdges[x],_=t.indexOf(v);s[_]=0;var b=v.node2,I=n.indexOf(b);--l[I]===0&&d.indexOf(b)<0&&d.push(b)}}++h,u=d,d=[]}for(var c=0;c<s.length;c++)if(s[c]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=p>h-1?p:h-1;r&&r!=="left"&&yc(n,r,o,w);var S=o==="vertical"?(i-e)/w:(a-e)/w;mc(n,S,o)}function ur(n){var t=n.hostGraph.data.getRawDataItem(n.dataIndex);return t.depth!=null&&t.depth>=0}function yc(n,t,e,a){if(t==="right"){for(var i=[],o=n,r=0;o.length;){for(var s=0;s<o.length;s++){var l=o[s];l.setLayout({skNodeHeight:r},!0);for(var u=0;u<l.inEdges.length;u++){var d=l.inEdges[u];i.indexOf(d.node1)<0&&i.push(d.node1)}}o=i,i=[],++r}P(n,function(h){ur(h)||h.setLayout({depth:Math.max(0,a-h.getLayout().skNodeHeight)},!0)})}else t==="justify"&&vc(n,a)}function vc(n,t){P(n,function(e){!ur(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function mc(n,t,e){P(n,function(a){var i=a.getLayout().depth*t;e==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function xc(n,t,e,a,i,o,r){var s=_c(n,r);bc(s,t,e,a,i,r),Oa(s,i,e,a,r);for(var l=1;o>0;o--)l*=.99,Ic(s,l,r),Oa(s,i,e,a,r),Dc(s,l,r),Oa(s,i,e,a,r)}function _c(n,t){var e=[],a=t==="vertical"?"y":"x",i=Xn(n,function(o){return o.getLayout()[a]});return i.keys.sort(function(o,r){return o-r}),P(i.keys,function(o){e.push(i.buckets.get(o))}),e}function bc(n,t,e,a,i,o){var r=1/0;P(n,function(s){var l=s.length,u=0;P(s,function(h){u+=h.getLayout().value});var d=o==="vertical"?(a-(l-1)*i)/u:(e-(l-1)*i)/u;d<r&&(r=d)}),P(n,function(s){P(s,function(l,u){var d=l.getLayout().value*r;o==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:d},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:d},!0))})}),P(t,function(s){var l=+s.getValue()*r;s.setLayout({dy:l},!0)})}function Oa(n,t,e,a,i){var o=i==="vertical"?"x":"y";P(n,function(r){r.sort(function(f,y){return f.getLayout()[o]-y.getLayout()[o]});for(var s,l,u,d=0,h=r.length,c=i==="vertical"?"dx":"dy",p=0;p<h;p++)l=r[p],u=d-l.getLayout()[o],u>0&&(s=l.getLayout()[o]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),d=l.getLayout()[o]+l.getLayout()[c]+t;var g=i==="vertical"?a:e;if(u=d-t-g,u>0){s=l.getLayout()[o]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),d=s;for(var p=h-2;p>=0;--p)l=r[p],u=l.getLayout()[o]+l.getLayout()[c]+t-d,u>0&&(s=l.getLayout()[o]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),d=l.getLayout()[o]}})}function Ic(n,t,e){P(n.slice().reverse(),function(a){P(a,function(i){if(i.outEdges.length){var o=Ue(i.outEdges,wc,e)/Ue(i.outEdges,sn);if(isNaN(o)){var r=i.outEdges.length;o=r?Ue(i.outEdges,Sc,e)/r:0}if(e==="vertical"){var s=i.getLayout().x+(o-Ze(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(o-Ze(i,e))*t;i.setLayout({y:l},!0)}}})})}function wc(n,t){return Ze(n.node2,t)*n.getValue()}function Sc(n,t){return Ze(n.node2,t)}function Mc(n,t){return Ze(n.node1,t)*n.getValue()}function Lc(n,t){return Ze(n.node1,t)}function Ze(n,t){return t==="vertical"?n.getLayout().x+n.getLayout().dx/2:n.getLayout().y+n.getLayout().dy/2}function sn(n){return n.getValue()}function Ue(n,t,e){for(var a=0,i=n.length,o=-1;++o<i;){var r=+t(n[o],e);isNaN(r)||(a+=r)}return a}function Dc(n,t,e){P(n,function(a){P(a,function(i){if(i.inEdges.length){var o=Ue(i.inEdges,Mc,e)/Ue(i.inEdges,sn);if(isNaN(o)){var r=i.inEdges.length;o=r?Ue(i.inEdges,Lc,e)/r:0}if(e==="vertical"){var s=i.getLayout().x+(o-Ze(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(o-Ze(i,e))*t;i.setLayout({y:l},!0)}}})})}function Cc(n,t){var e=t==="vertical"?"x":"y";P(n,function(a){a.outEdges.sort(function(i,o){return i.node2.getLayout()[e]-o.node2.getLayout()[e]}),a.inEdges.sort(function(i,o){return i.node1.getLayout()[e]-o.node1.getLayout()[e]})}),P(n,function(a){var i=0,o=0;P(a.outEdges,function(r){r.setLayout({sy:i},!0),i+=r.getLayout().dy}),P(a.inEdges,function(r){r.setLayout({ty:o},!0),o+=r.getLayout().dy})})}function Tc(n){n.eachSeriesByType("sankey",function(t){var e=t.getGraph(),a=e.nodes,i=e.edges;if(a.length){var o=1/0,r=-1/0;P(a,function(s){var l=s.getLayout().value;l<o&&(o=l),l>r&&(r=l)}),P(a,function(s){var l=new Bi({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),d=s.getModel().get(["itemStyle","color"]);d!=null?(s.setVisual("color",d),s.setVisual("style",{fill:d})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&P(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Ac(n){n.registerChartView(lc),n.registerSeriesModel(dc),n.registerLayout(hc),n.registerVisual(Tc),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var dr=function(){function n(){}return n.prototype.getInitialData=function(t,e){var a,i=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),r=i.get("type"),s=o.get("type"),l;r==="category"?(t.layout="horizontal",a=i.getOrdinalMeta(),l=!0):s==="category"?(t.layout="vertical",a=o.getOrdinalMeta(),l=!0):t.layout=t.layout||"horizontal";var u=["x","y"],d=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[d],c=u[1-d],p=[i,o],g=p[d].get("type"),f=p[1-d].get("type"),y=t.data;if(y&&l){var m=[];P(y,function(_,b){var I;G(_)?(I=_.slice(),_.unshift(b)):G(_.value)?(I=W({},_),I.value=I.value.slice(),_.value.unshift(b)):I=_,m.push(I)}),t.data=m}var x=this.defaultValueDimensions,v=[{name:h,type:Yn(g),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Yn(f),dimsDef:x.slice()}];return Zi(this,{coordDimensions:v,dimensionsCount:x.length+1,encodeDefaulter:te(tl,v,this)})},n.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},n}(),hr=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(pe);st(hr,dr,!0);const Nc=hr;var Pc=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this.group,s=this._data;this._data||r.removeAll();var l=e.get("layout")==="horizontal"?1:0;o.diff(s).add(function(u){if(o.hasValue(u)){var d=o.getItemLayout(u),h=cr(d,o,u,l,!0);o.setItemGraphicEl(u,h),r.add(h)}}).update(function(u,d){var h=s.getItemGraphicEl(d);if(!o.hasValue(u)){r.remove(h);return}var c=o.getItemLayout(u);h?(lt(h),pr(c,h,o,u)):h=cr(c,o,u,l),r.add(h),o.setItemGraphicEl(u,h)}).remove(function(u){var d=s.getItemGraphicEl(u);d&&r.remove(d)}).execute(),this._data=o},t.prototype.remove=function(e){var a=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(o){o&&a.remove(o)})},t.type="boxplot",t}(he),Rc=function(){function n(){}return n}(),Ec=function(n){E(t,n);function t(e){var a=n.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new Rc},t.prototype.buildPath=function(e,a){var i=a.points,o=0;for(e.moveTo(i[o][0],i[o][1]),o++;o<4;o++)e.lineTo(i[o][0],i[o][1]);for(e.closePath();o<i.length;o++)e.moveTo(i[o][0],i[o][1]),o++,e.lineTo(i[o][0],i[o][1])},t}(ye);function cr(n,t,e,a,i){var o=n.ends,r=new Ec({shape:{points:i?Vc(o,a,n):o}});return pr(n,r,t,e,i),r}function pr(n,t,e,a,i){var o=e.hostModel,r=nl[i?"initProps":"updateProps"];r(t,{shape:{points:n.ends}},o,a),t.useStyle(e.getItemVisual(a,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=e.getItemModel(a),l=s.getModel("emphasis");Ee(t,s),fe(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Vc(n,t,e){return F(n,function(a){return a=a.slice(),a[t]=e.initBaseline,a})}const kc=Pc;var Pt=P;function zc(n){var t=Oc(n);Pt(t,function(e){var a=e.seriesModels;a.length&&(Gc(e),Pt(a,function(i,o){Bc(i,e.boxOffsetList[o],e.boxWidthList[o])}))})}function Oc(n){var t=[],e=[];return n.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),o=xe(e,i);o<0&&(o=e.length,e[o]=i,t[o]={axis:i,seriesModels:[]}),t[o].seriesModels.push(a)}),t}function Gc(n){var t=n.axis,e=n.seriesModels,a=e.length,i=n.boxWidthList=[],o=n.boxOffsetList=[],r=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;Pt(e,function(g){l=Math.max(l,g.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}Pt(e,function(g){var f=g.get("boxWidth");G(f)||(f=[f,f]),r.push([Z(f[0],s)||0,Z(f[1],s)||0])});var d=s*.8-2,h=d/a*.3,c=(d-h*(a-1))/a,p=c/2-d/2;Pt(e,function(g,f){o.push(p),p+=h+c,i.push(Math.min(Math.max(c,r[f][0]),r[f][1]))})}function Bc(n,t,e){var a=n.coordinateSystem,i=n.getData(),o=e/2,r=n.get("layout")==="horizontal"?0:1,s=1-r,l=["x","y"],u=i.mapDimension(l[r]),d=i.mapDimensionsAll(l[s]);if(u==null||d.length<5)return;for(var h=0;h<i.count();h++){var c=i.get(u,h),p=v(c,d[2],h),g=v(c,d[0],h),f=v(c,d[1],h),y=v(c,d[3],h),m=v(c,d[4],h),x=[];_(x,f,!1),_(x,y,!0),x.push(g,f,m,y),b(x,g),b(x,m),b(x,p),i.setItemLayout(h,{initBaseline:p[s],ends:x})}function v(I,w,S){var M=i.get(w,S),D=[];D[r]=I,D[s]=M;var L;return isNaN(I)||isNaN(M)?L=[NaN,NaN]:(L=a.dataToPoint(D),L[r]+=t),L}function _(I,w,S){var M=w.slice(),D=w.slice();M[r]+=o,D[r]-=o,S?I.push(M,D):I.push(D,M)}function b(I,w){var S=w.slice(),M=w.slice();S[r]-=o,M[r]+=o,I.push(S,M)}}function Fc(n,t){t=t||{};for(var e=[],a=[],i=t.boundIQR,o=i==="none"||i===0,r=0;r<n.length;r++){var s=Zn(n[r].slice()),l=Un(s,.25),u=Un(s,.5),d=Un(s,.75),h=s[0],c=s[s.length-1],p=(i!=null?i:1.5)*(d-l),g=o?h:Math.max(h,l-p),f=o?c:Math.min(c,d+p),y=t.itemNameFormatter,m=ie(y)?y({value:r}):be(y)?y.replace("{value}",r+""):r+"";e.push([m,g,l,u,d,f]);for(var x=0;x<s.length;x++){var v=s[x];if(v<g||v>f){var _=[m,v];a.push(_)}}}return{boxData:e,outliers:a}}var Hc={type:"echarts:boxplot",transform:function(n){var t=n.upstream;if(t.sourceFormat!==ji){var e="";J(e)}var a=Fc(t.getRawData(),n.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function Wc(n){n.registerSeriesModel(Nc),n.registerChartView(kc),n.registerLayout(zc),n.registerTransform(Hc)}var Xc=["color","borderColor"],Yc=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,i){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,i,o){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){Xt(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(),i=this._data,o=this.group,r=a.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||o.removeAll(),a.diff(i).add(function(d){if(a.hasValue(d)){var h=a.getItemLayout(d);if(s&&fr(u,h))return;var c=Ga(h,d,!0);Te(c,{shape:{points:h.ends}},e,d),Ba(c,a,d,r),o.add(c),a.setItemGraphicEl(d,c)}}).update(function(d,h){var c=i.getItemGraphicEl(h);if(!a.hasValue(d)){o.remove(c);return}var p=a.getItemLayout(d);if(s&&fr(u,p)){o.remove(c);return}c?(se(c,{shape:{points:p.ends}},e,d),lt(c)):c=Ga(p),Ba(c,a,d,r),o.add(c),a.setItemGraphicEl(d,c)}).remove(function(d){var h=i.getItemGraphicEl(d);h&&o.remove(h)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),gr(e,this.group);var a=e.get("clip",!0)?jn(e.coordinateSystem,!1,e):null;a?this.group.setClipPath(a):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,a){for(var i=a.getData(),o=i.getLayout("isSimpleBox"),r;(r=e.next())!=null;){var s=i.getItemLayout(r),l=Ga(s);Ba(l,i,r,o),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,a){gr(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(he),Zc=function(){function n(){}return n}(),Uc=function(n){E(t,n);function t(e){var a=n.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new Zc},t.prototype.buildPath=function(e,a){var i=a.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))},t}(ye);function Ga(n,t,e){var a=n.ends;return new Uc({shape:{points:e?jc(a,n):a},z2:100})}function fr(n,t){for(var e=!0,a=0;a<t.ends.length;a++)if(n.contain(t.ends[a][0],t.ends[a][1])){e=!1;break}return e}function Ba(n,t,e,a){var i=t.getItemModel(e);n.useStyle(t.getItemVisual(e,"style")),n.style.strokeNoScale=!0,n.__simpleBox=a,Ee(n,i)}function jc(n,t){return F(n,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var qc=function(){function n(){}return n}(),Fa=function(n){E(t,n);function t(e){var a=n.call(this,e)||this;return a.type="largeCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new qc},t.prototype.buildPath=function(e,a){for(var i=a.points,o=0;o<i.length;)if(this.__sign===i[o++]){var r=i[o++];e.moveTo(r,i[o++]),e.lineTo(r,i[o++])}else o+=3},t}(ye);function gr(n,t,e,a){var i=n.getData(),o=i.getLayout("largePoints"),r=new Fa({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});t.add(r);var s=new Fa({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new Fa({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});t.add(l),Ha(1,r,n),Ha(-1,s,n),Ha(0,l,n),a&&(r.incremental=!0,s.incremental=!0),e&&e.push(r,s)}function Ha(n,t,e,a){var i=e.get(["itemStyle",n>0?"borderColor":"borderColor0"])||e.get(["itemStyle",n>0?"color":"color0"]);n===0&&(i=e.get(["itemStyle","borderColorDoji"]));var o=e.getModel("itemStyle").getItemStyle(Xc);t.useStyle(o),t.style.fill=null,t.style.stroke=i}const Kc=Yc;var yr=function(n){E(t,n);function t(){var e=n!==null&&n.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,i){var o=a.getItemLayout(e);return o&&i.rect(o.brushRect)},t.type="series.candlestick",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:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(pe);st(yr,dr,!0);const Qc=yr;function $c(n){!n||!G(n.series)||P(n.series,function(t){qn(t)&&t.type==="k"&&(t.type="candlestick")})}var Jc=["itemStyle","borderColor"],ep=["itemStyle","borderColor0"],tp=["itemStyle","borderColorDoji"],np=["itemStyle","color"],ap=["itemStyle","color0"],ip={seriesType:"candlestick",plan:Kn(),performRawSeries:!0,reset:function(n,t){function e(o,r){return r.get(o>0?np:ap)}function a(o,r){return r.get(o===0?tp:o>0?Jc:ep)}if(!t.isSeriesFiltered(n)){var i=n.pipelineContext.large;return!i&&{progress:function(o,r){for(var s;(s=o.next())!=null;){var l=r.getItemModel(s),u=r.getItemLayout(s).sign,d=l.getItemStyle();d.fill=e(u,l),d.stroke=a(u,l)||d.fill;var h=r.ensureUniqueItemVisual(s,"style");W(h,d)}}}}}};const op=ip;var rp={seriesType:"candlestick",plan:Kn(),reset:function(n){var t=n.coordinateSystem,e=n.getData(),a=sp(n,e),i=0,o=1,r=["x","y"],s=e.getDimensionIndex(e.mapDimension(r[i])),l=F(e.mapDimensionsAll(r[o]),e.getDimensionIndex,e),u=l[0],d=l[1],h=l[2],c=l[3];if(e.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:n.pipelineContext.large?g:p};function p(f,y){for(var m,x=y.getStore();(m=f.next())!=null;){var v=x.get(s,m),_=x.get(u,m),b=x.get(d,m),I=x.get(h,m),w=x.get(c,m),S=Math.min(_,b),M=Math.max(_,b),D=V(S,v),L=V(M,v),T=V(I,v),N=V(w,v),C=[];k(C,L,0),k(C,D,1),C.push(H(N),H(L),H(T),H(D));var A=y.getItemModel(m),R=!!A.get(["itemStyle","borderColorDoji"]);y.setItemLayout(m,{sign:vr(x,m,_,b,d,R),initBaseline:_>b?L[o]:D[o],ends:C,brushRect:z(I,w,v)})}function V(B,K){var Q=[];return Q[i]=K,Q[o]=B,isNaN(K)||isNaN(B)?[NaN,NaN]:t.dataToPoint(Q)}function k(B,K,Q){var q=K.slice(),ee=K.slice();q[i]=Qn(q[i]+a/2,1,!1),ee[i]=Qn(ee[i]-a/2,1,!0),Q?B.push(q,ee):B.push(ee,q)}function z(B,K,Q){var q=V(B,Q),ee=V(K,Q);return q[i]-=a/2,ee[i]-=a/2,{x:q[0],y:q[1],width:a,height:ee[1]-q[1]}}function H(B){return B[i]=Qn(B[i],1),B}}function g(f,y){for(var m=al(f.count*4),x=0,v,_=[],b=[],I,w=y.getStore(),S=!!n.get(["itemStyle","borderColorDoji"]);(I=f.next())!=null;){var M=w.get(s,I),D=w.get(u,I),L=w.get(d,I),T=w.get(h,I),N=w.get(c,I);if(isNaN(M)||isNaN(T)||isNaN(N)){m[x++]=NaN,x+=3;continue}m[x++]=vr(w,I,D,L,d,S),_[i]=M,_[o]=T,v=t.dataToPoint(_,null,b),m[x++]=v?v[0]:NaN,m[x++]=v?v[1]:NaN,_[o]=N,v=t.dataToPoint(_,null,b),m[x++]=v?v[1]:NaN}y.setLayout("largePoints",m)}}};function vr(n,t,e,a,i,o){var r;return e>a?r=-1:e<a?r=1:r=o?0:t>0?n.get(i,t-1)<=a?1:-1:1,r}function sp(n,t){var e=n.getBaseAxis(),a,i=e.type==="category"?e.getBandWidth():(a=e.getExtent(),Math.abs(a[1]-a[0])/t.count()),o=Z(Ge(n.get("barMaxWidth"),i),i),r=Z(Ge(n.get("barMinWidth"),1),i),s=n.get("barWidth");return s!=null?Z(s,i):Math.max(Math.min(i/2,o),r)}const lp=rp;function up(n){n.registerChartView(Kc),n.registerSeriesModel(Qc),n.registerPreprocessor($c),n.registerVisual(op),n.registerLayout(lp)}function mr(n,t){var e=t.rippleEffectColor||t.color;n.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 dp=function(n){E(t,n);function t(e,a){var i=n.call(this)||this,o=new Pi(e,a),r=new oe;return i.add(o),i.add(r),i.updateData(e,a),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,i=e.color,o=e.rippleNumber,r=this.childAt(1),s=0;s<o;s++){var l=On(a,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/o*e.period+e.effectOffset;l.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(e.period,{opacity:0}).delay(u).start(),r.add(l)}mr(r,e)},t.prototype.updateEffectAnimation=function(e){for(var a=this._effectCfg,i=this.childAt(1),o=["symbolType","period","rippleScale","rippleNumber"],r=0;r<o.length;r++){var s=o[r];if(a[s]!==e[s]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}mr(i,e)},t.prototype.highlight=function(){En(this)},t.prototype.downplay=function(){Vn(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,a){var i=this,o=e.hostModel;this.childAt(0).updateData(e,a);var r=this.childAt(1),s=e.getItemModel(a),l=e.getItemVisual(a,"symbol"),u=kn(e.getItemVisual(a,"symbolSize")),d=e.getItemVisual(a,"style"),h=d&&d.fill,c=s.getModel("emphasis");r.setScale(u),r.traverse(function(y){y.setStyle("fill",h)});var p=zn(e.getItemVisual(a,"symbolOffset"),u);p&&(r.x=p[0],r.y=p[1]);var g=e.getItemVisual(a,"symbolRotate");r.rotation=(g||0)*Math.PI/180||0;var f={};f.showEffectOn=o.get("showEffectOn"),f.rippleScale=s.get(["rippleEffect","scale"]),f.brushType=s.get(["rippleEffect","brushType"]),f.period=s.get(["rippleEffect","period"])*1e3,f.effectOffset=a/e.count(),f.z=o.getShallow("z")||0,f.zlevel=o.getShallow("zlevel")||0,f.symbolType=l,f.color=h,f.rippleEffectColor=s.get(["rippleEffect","color"]),f.rippleNumber=s.get(["rippleEffect","number"]),f.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(f):this.startEffectAnimation(f),this._effectCfg=f):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(y){y==="emphasis"?f.showEffectOn!=="render"&&i.startEffectAnimation(f):y==="normal"&&f.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=f,fe(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(oe);const hp=dp;var cp=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this._symbolDraw=new Gn(hp)},t.prototype.render=function(e,a,i){var o=e.getData(),r=this._symbolDraw;r.updateData(o,{clipShape:this._getClipShape(e)}),this.group.add(r.group)},t.prototype._getClipShape=function(e){var a=e.coordinateSystem,i=a&&a.getArea&&a.getArea();return e.get("clip",!0)?i:null},t.prototype.updateTransform=function(e,a,i){var o=e.getData();this.group.dirty();var r=qi("").reset(e,a,i);r.progress&&r.progress({start:0,end:o.count(),count:o.count()},o),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var a=e.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=il(a.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(he);const pp=cp;var fp=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return _t(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,a,i){return i.point(a.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(pe);const gp=fp;function yp(n){n.registerChartView(pp),n.registerSeriesModel(gp),n.registerLayout(qi("effectScatter"))}var vp=function(n){E(t,n);function t(e,a,i){var o=n.call(this)||this;return o.add(o.createLine(e,a,i)),o._updateEffectSymbol(e,a),o}return t.prototype.createLine=function(e,a,i){return new Ta(e,a,i)},t.prototype._updateEffectSymbol=function(e,a){var i=e.getItemModel(a),o=i.getModel("effect"),r=o.get("symbolSize"),s=o.get("symbol");G(r)||(r=[r,r]);var l=e.getItemVisual(a,"style"),u=o.get("color")||l&&l.stroke,d=this.childAt(1);this._symbolType!==s&&(this.remove(d),d=On(s,-.5,-.5,1,1,u),d.z2=100,d.culling=!0,this.add(d)),d&&(d.setStyle("shadowColor",u),d.setStyle(o.getItemStyle(["color"])),d.scaleX=r[0],d.scaleY=r[1],d.setColor(u),this._symbolType=s,this._symbolScale=r,this._updateEffectAnimation(e,o,a))},t.prototype._updateEffectAnimation=function(e,a,i){var o=this.childAt(1);if(o){var r=e.getItemLayout(i),s=a.get("period")*1e3,l=a.get("loop"),u=a.get("roundTrip"),d=a.get("constantSpeed"),h=Ne(a.get("delay"),function(p){return p/e.count()*s/3});if(o.ignore=!0,this._updateAnimationPoints(o,r),d>0&&(s=this._getLineLength(o)/d*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){o.stopAnimation();var c=void 0;ie(h)?c=h(i):c=h,o.__t>0&&(c=-s*o.__t),this._animateSymbol(o,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,i,o,r){if(a>0){e.__t=0;var s=this,l=e.animate("",o).when(r?a*2:a,{__t:r?2:1}).delay(i).during(function(){s._updateSymbolPosition(e)});o||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return bt(e.__p1,e.__cp1)+bt(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,i){this.childAt(0).updateData(e,a,i),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,i=e.__p2,o=e.__cp1,r=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=Xi,d=ol;s[0]=u(a[0],o[0],i[0],r),s[1]=u(a[1],o[1],i[1],r);var h=e.__t<1?d(a[0],o[0],i[0],r):d(i[0],o[0],a[0],1-r),c=e.__t<1?d(a[1],o[1],i[1],r):d(i[1],o[1],a[1],1-r);e.rotation=-Math.atan2(c,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT<e.__t?(e.scaleY=bt(l,s)*1.05,r===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):e.__lastT===1?e.scaleY=2*bt(a,s):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=s[0],e.y=s[1]},t.prototype.updateLayout=function(e,a){this.childAt(0).updateLayout(e,a);var i=e.getItemModel(a).getModel("effect");this._updateEffectAnimation(e,i,a)},t}(oe);const xr=vp;var mp=function(n){E(t,n);function t(e,a,i){var o=n.call(this)||this;return o._createPolyline(e,a,i),o}return t.prototype._createPolyline=function(e,a,i){var o=e.getItemLayout(a),r=new Hn({shape:{points:o}});this.add(r),this._updateCommonStl(e,a,i)},t.prototype.updateData=function(e,a,i){var o=e.hostModel,r=this.childAt(0),s={shape:{points:e.getItemLayout(a)}};se(r,s,o,a),this._updateCommonStl(e,a,i)},t.prototype._updateCommonStl=function(e,a,i){var o=this.childAt(0),r=e.getItemModel(a),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,d=i&&i.emphasisDisabled;if(!i||e.hasItemOption){var h=r.getModel("emphasis");s=h.getModel("lineStyle").getLineStyle(),d=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}o.useStyle(e.getItemVisual(a,"style")),o.style.fill=null,o.style.strokeNoScale=!0;var c=o.ensureState("emphasis");c.style=s,fe(this,l,u,d)},t.prototype.updateLayout=function(e,a){var i=this.childAt(0);i.setShape("points",e.getItemLayout(a))},t}(oe);const _r=mp;var xp=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return t.prototype.createLine=function(e,a,i){return new _r(e,a,i)},t.prototype._updateAnimationPoints=function(e,a){this._points=a;for(var i=[0],o=0,r=1;r<a.length;r++){var s=a[r-1],l=a[r];o+=bt(s,l),i.push(o)}if(o===0){this._length=0;return}for(var r=0;r<i.length;r++)i[r]/=o;this._offsets=i,this._length=o},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var a=e.__t<1?e.__t:2-e.__t,i=this._points,o=this._offsets,r=i.length;if(o){var s=this._lastFrame,l;if(a<this._lastFramePercent){var u=Math.min(s+1,r-1);for(l=u;l>=0&&!(o[l]<=a);l--);l=Math.min(l,r-2)}else{for(l=s;l<r&&!(o[l]>a);l++);l=Math.min(l-1,r-2)}var d=(a-o[l])/(o[l+1]-o[l]),h=i[l],c=i[l+1];e.x=h[0]*(1-d)+d*c[0],e.y=h[1]*(1-d)+d*c[1];var p=e.__t<1?c[0]-h[0]:h[0]-c[0],g=e.__t<1?c[1]-h[1]:h[1]-c[1];e.rotation=-Math.atan2(g,p)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,e.ignore=!1}},t}(xr);const _p=xp;var bp=function(){function n(){this.polyline=!1,this.curveness=0,this.segs=[]}return n}(),Ip=function(n){E(t,n);function t(e){var a=n.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.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new bp},t.prototype.buildPath=function(e,a){var i=a.segs,o=a.curveness,r;if(a.polyline)for(r=this._off;r<i.length;){var s=i[r++];if(s>0){e.moveTo(i[r++],i[r++]);for(var l=1;l<s;l++)e.lineTo(i[r++],i[r++])}}else for(r=this._off;r<i.length;){var u=i[r++],d=i[r++],h=i[r++],c=i[r++];if(e.moveTo(u,d),o>0){var p=(u+h)/2-(d-c)*o,g=(d+c)/2-(h-u)*o;e.quadraticCurveTo(p,g,h,c)}else e.lineTo(h,c)}this.incremental&&(this._off=r,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var i=this.shape,o=i.segs,r=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<o.length;){var d=o[u++];if(d>0)for(var h=o[u++],c=o[u++],p=1;p<d;p++){var g=o[u++],f=o[u++];if(Ki(h,c,g,f,s,e,a))return l}l++}else for(var l=0,u=0;u<o.length;){var h=o[u++],c=o[u++],g=o[u++],f=o[u++];if(r>0){var y=(h+g)/2-(c-f)*r,m=(c+f)/2-(g-h)*r;if(rl(h,c,y,m,g,f,s,e,a))return l}else if(Ki(h,c,g,f,s,e,a))return l;l++}return-1},t.prototype.contain=function(e,a){var i=this.transformCoordToLocal(e,a),o=this.getBoundingRect();if(e=i[0],a=i[1],o.contain(e,a)){var r=this.hoverDataIdx=this.findDataIndex(e,a);return r>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,i=a.segs,o=1/0,r=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var d=i[u++],h=i[u++];o=Math.min(d,o),s=Math.max(d,s),r=Math.min(h,r),l=Math.max(h,l)}e=this._rect=new de(o,r,s,l)}return e},t}(ye),wp=function(){function n(){this.group=new oe}return n.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},n.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},n.prototype.incrementalUpdate=function(t,e){var a=this._newAdded[0],i=e.getLayout("linesPoints"),o=a&&a.shape.segs;if(o&&o.length<2e4){var r=o.length,s=new Float32Array(r+i.length);s.set(o),s.set(i,r),a.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,e),l.__startIndex=t.start}},n.prototype.remove=function(){this._clear()},n.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},n.prototype._create=function(){var t=new Ip({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},n.prototype._setCommon=function(t,e,a){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("style");o&&o.stroke&&t.setStyle("stroke",o.stroke),t.setStyle("fill",null);var r=ae(t);r.seriesIndex=i.seriesIndex,t.on("mousemove",function(s){r.dataIndex=null;var l=t.hoverDataIdx;l>0&&(r.dataIndex=l+t.__startIndex)})},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}();const Sp=wp;var Mp={seriesType:"lines",plan:Kn(),reset:function(n){var t=n.coordinateSystem;if(t){var e=n.get("polyline"),a=n.pipelineContext.large;return{progress:function(i,o){var r=[];if(a){var s=void 0,l=i.end-i.start;if(e){for(var u=0,d=i.start;d<i.end;d++)u+=n.getLineCoordsCount(d);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var h=0,c=[],d=i.start;d<i.end;d++){var p=n.getLineCoords(d,r);e&&(s[h++]=p);for(var g=0;g<p;g++)c=t.dataToPoint(r[g],!1,c),s[h++]=c[0],s[h++]=c[1]}o.setLayout("linesPoints",s)}else for(var d=i.start;d<i.end;d++){var f=o.getItemModel(d),p=n.getLineCoords(d,r),y=[];if(e)for(var m=0;m<p;m++)y.push(t.dataToPoint(r[m]));else{y[0]=t.dataToPoint(r[0]),y[1]=t.dataToPoint(r[1]);var x=f.get(["lineStyle","curveness"]);+x&&(y[2]=[(y[0][0]+y[1][0])/2-(y[0][1]-y[1][1])*x,(y[0][1]+y[1][1])/2-(y[1][0]-y[0][0])*x])}o.setItemLayout(d,y)}}}}}};const br=Mp;var Lp=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this._updateLineDraw(o,e),s=e.get("zlevel"),l=e.get(["effect","trailLength"]),u=i.getZr(),d=u.painter.getType()==="svg";d||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!d&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&l>0&&(d||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),r.updateData(o);var h=e.get("clip",!0)&&jn(e.coordinateSystem,!1,e);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,i){var o=e.getData(),r=this._updateLineDraw(o,e);r.incrementalPrepareUpdate(o),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,i){this._lineDraw.incrementalUpdate(e,a.getData()),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,i){var o=e.getData(),r=e.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var s=br.reset(e,a,i);s.progress&&s.progress({start:0,end:o.count(),count:o.count()},o),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(e,a){var i=this._lineDraw,o=this._showEffect(a),r=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!i||o!==this._hasEffet||r!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Sp:new Na(r?o?_p:_r:o?xr:Ta),this._hasEffet=o,this._isPolyline=r,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=e.getZr(),i=a.painter.getType()==="svg";!i&&this._lastZlevel!=null&&a.painter.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}(he);const Dp=Lp;var Cp=typeof Uint32Array>"u"?Array:Uint32Array,Tp=typeof Float64Array>"u"?Array:Float64Array;function Ir(n){var t=n.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(n.data=F(t,function(e){var a=[e[0].coord,e[1].coord],i={coords:a};return e[0].name&&(i.fromName=e[0].name),e[1].name&&(i.toName=e[1].name),Qi([i,e[0],e[1]])}))}var Ap=function(n){E(t,n);function t(){var e=n!==null&&n.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||[],Ir(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),n.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(Ir(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))}n.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Dn(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Dn(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),i=a.option instanceof Array?a.option:a.getShallow("coords");return i},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 i=this._flatCoordsOffset[e*2],o=this._flatCoordsOffset[e*2+1],r=0;r<o;r++)a[r]=a[r]||[],a[r][0]=this._flatCoords[i+r*2],a[r][1]=this._flatCoords[i+r*2+1];return o}else{for(var s=this._getCoordsFromItemModel(e),r=0;r<s.length;r++)a[r]=a[r]||[],a[r][0]=s[r][0],a[r][1]=s[r][1];return s.length}},t.prototype._processFlatCoordsArray=function(e){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),We(e[0])){for(var i=e.length,o=new Cp(i),r=new Tp(i),s=0,l=0,u=0,d=0;d<i;){u++;var h=e[d++];o[l++]=s+a,o[l++]=h;for(var c=0;c<h;c++){var p=e[d++],g=e[d++];r[s++]=p,r[s++]=g}}return{flatCoordsOffset:new Uint32Array(o.buffer,0,l),flatCoords:r,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,a){var i=new _e(["value"],this);return i.hasItemOption=!1,i.initData(e.data,[],function(o,r,s,l){if(o instanceof Array)return NaN;i.hasItemOption=!0;var u=o.value;if(u!=null)return u instanceof Array?u[l]:u}),i},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=o.getItemModel(e),s=r.get("name");if(s)return s;var l=r.get("fromName"),u=r.get("toName"),d=[];return l!=null&&d.push(l),u!=null&&d.push(u),Ve("nameValue",{name:d.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e!=null?e:this.option.large?1e4:this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e!=null?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}(pe);const Np=Ap;function ln(n){return n instanceof Array||(n=[n,n]),n}var Pp={seriesType:"lines",reset:function(n){var t=ln(n.get("symbol")),e=ln(n.get("symbolSize")),a=n.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 i(o,r){var s=o.getItemModel(r),l=ln(s.getShallow("symbol",!0)),u=ln(s.getShallow("symbolSize",!0));l[0]&&o.setItemVisual(r,"fromSymbol",l[0]),l[1]&&o.setItemVisual(r,"toSymbol",l[1]),u[0]&&o.setItemVisual(r,"fromSymbolSize",u[0]),u[1]&&o.setItemVisual(r,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?i:null}}};const Rp=Pp;function Ep(n){n.registerChartView(Dp),n.registerSeriesModel(Np),n.registerLayout(br),n.registerVisual(Rp)}var Vp=256,kp=function(){function n(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=$n.createCanvas();this.canvas=t}return n.prototype.update=function(t,e,a,i,o,r){var s=this._getBrush(),l=this._getGradient(o,"inRange"),u=this._getGradient(o,"outOfRange"),d=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=a;for(var g=0;g<p;++g){var f=t[g],y=f[0],m=f[1],x=f[2],v=i(x);c.globalAlpha=v,c.drawImage(s,y-d,m-d)}if(!h.width||!h.height)return h;for(var _=c.getImageData(0,0,h.width,h.height),b=_.data,I=0,w=b.length,S=this.minOpacity,M=this.maxOpacity,D=M-S;I<w;){var v=b[I+3]/256,L=Math.floor(v*(Vp-1))*4;if(v>0){var T=r(v)?l:u;v>0&&(v=v*D+S),b[I++]=T[L],b[I++]=T[L+1],b[I++]=T[L+2],b[I++]=T[L+3]*v*256}else I+=4}return c.putImageData(_,0,0),h},n.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=$n.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var i=t.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},n.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,i=a[e]||(a[e]=new Uint8ClampedArray(256*4)),o=[0,0,0,0],r=0,s=0;s<256;s++)t[e](s/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},n}();const zp=kp;function Op(n,t,e){var a=n[1]-n[0];t=F(t,function(r){return{interval:[(r.interval[0]-n[0])/a,(r.interval[1]-n[0])/a]}});var i=t.length,o=0;return function(r){var s;for(s=o;s<i;s++){var l=t[s].interval;if(l[0]<=r&&r<=l[1]){o=s;break}}if(s===i)for(s=o-1;s>=0;s--){var l=t[s].interval;if(l[0]<=r&&r<=l[1]){o=s;break}}return s>=0&&s<i&&e[s]}}function Gp(n,t){var e=n[1]-n[0];return t=[(t[0]-n[0])/e,(t[1]-n[0])/e],function(a){return a>=t[0]&&a<=t[1]}}function wr(n){var t=n.dimensions;return t[0]==="lng"&&t[1]==="lat"}var Bp=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i){var o;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(o=s)})}),this._progressiveEls=null,this.group.removeAll();var r=e.coordinateSystem;r.type==="cartesian2d"||r.type==="calendar"?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):wr(r)&&this._renderOnGeo(r,e,o,i)},t.prototype.incrementalPrepareRender=function(e,a,i){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,i,o){var r=a.coordinateSystem;r&&(wr(r)?this.render(a,i,o):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,o,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Xt(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,a,i,o,r){var s=e.coordinateSystem,l=Yt(s,"cartesian2d"),u,d,h,c;if(l){var p=s.getAxis("x"),g=s.getAxis("y");u=p.getBandWidth()+.5,d=g.getBandWidth()+.5,h=p.scale.getExtent(),c=g.scale.getExtent()}for(var f=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),x=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),_=e.get(["itemStyle","borderRadius"]),b=Ae(e),I=e.getModel("emphasis"),w=I.get("focus"),S=I.get("blurScope"),M=I.get("disabled"),D=l?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],L=i;L<o;L++){var T=void 0,N=y.getItemVisual(L,"style");if(l){var C=y.get(D[0],L),A=y.get(D[1],L);if(isNaN(y.get(D[2],L))||isNaN(C)||isNaN(A)||C<h[0]||C>h[1]||A<c[0]||A>c[1])continue;var R=s.dataToPoint([C,A]);T=new He({shape:{x:R[0]-u/2,y:R[1]-d/2,width:u,height:d},style:N})}else{if(isNaN(y.get(D[1],L)))continue;T=new He({z2:1,shape:s.dataToRect([y.get(D[0],L)]).contentShape,style:N})}if(y.hasItemOption){var V=y.getItemModel(L),k=V.getModel("emphasis");m=k.getModel("itemStyle").getItemStyle(),x=V.getModel(["blur","itemStyle"]).getItemStyle(),v=V.getModel(["select","itemStyle"]).getItemStyle(),_=V.get(["itemStyle","borderRadius"]),w=k.get("focus"),S=k.get("blurScope"),M=k.get("disabled"),b=Ae(V)}T.shape.r=_;var z=e.getRawValue(L),H="-";z&&z[2]!=null&&(H=z[2]+""),Fe(T,b,{labelFetcher:e,labelDataIndex:L,defaultOpacity:N.opacity,defaultText:H}),T.ensureState("emphasis").style=m,T.ensureState("blur").style=x,T.ensureState("select").style=v,fe(T,w,S,M),T.incremental=r,r&&(T.states.emphasis.hoverLayer=!0),f.add(T),y.setItemGraphicEl(L,T),this._progressiveEls&&this._progressiveEls.push(T)}},t.prototype._renderOnGeo=function(e,a,i,o){var r=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new zp;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var d=e.getViewRect().clone(),h=e.getRoamTransform();d.applyTransform(h);var c=Math.max(d.x,0),p=Math.max(d.y,0),g=Math.min(d.width+d.x,o.getWidth()),f=Math.min(d.height+d.y,o.getHeight()),y=g-c,m=f-p,x=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],v=l.mapArray(x,function(w,S,M){var D=e.dataToPoint([w,S]);return D[0]-=c,D[1]-=p,D.push(M),D}),_=i.getExtent(),b=i.type==="visualMap.continuous"?Gp(_,i.option.range):Op(_,i.getPieceList(),i.option.selected);u.update(v,y,m,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var I=new $i({style:{width:y,height:m,x:c,y:p,image:u.canvas},silent:!0});this.group.add(I)},t.type="heatmap",t}(he);const Fp=Bp;var Hp=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return _t(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Yi.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"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(pe);const Wp=Hp;function Xp(n){n.registerChartView(Fp),n.registerSeriesModel(Wp)}var Yp=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,a,i){var o=e.getData(),r=this,s=this.group,l=e.getLayerSeries(),u=o.getLayout("layoutInfo"),d=u.rect,h=u.boundaryGap;s.x=0,s.y=d.y+h[0];function c(y){return y.name}var p=new ot(this._layersSeries||[],l,c,c),g=[];p.add(re(f,this,"add")).update(re(f,this,"update")).remove(re(f,this,"remove")).execute();function f(y,m,x){var v=r._layers;if(y==="remove"){s.remove(v[m]);return}for(var _=[],b=[],I,w=l[m].indices,S=0;S<w.length;S++){var M=o.getItemLayout(w[S]),D=M.x,L=M.y0,T=M.y;_.push(D,L),b.push(D,L+T),I=o.getItemVisual(w[S],"style")}var N,C=o.getItemLayout(w[0]),A=e.getModel("label"),R=A.get("margin"),V=e.getModel("emphasis");if(y==="add"){var k=g[m]=new oe;N=new sl({shape:{points:_,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),k.add(N),s.add(k),e.isAnimationEnabled()&&N.setClipPath(Zp(N.getBoundingRect(),e,function(){N.removeClipPath()}))}else{var k=v[x];N=k.childAt(0),s.add(k),g[m]=k,se(N,{shape:{points:_,stackedOnPoints:b}},e),lt(N)}Fe(N,Ae(e),{labelDataIndex:w[S-1],defaultText:o.getName(w[S-1]),inheritColor:I.fill},{normal:{verticalAlign:"middle"}}),N.setTextConfig({position:null,local:!0});var z=N.getTextContent();z&&(z.x=C.x-R,z.y=C.y0+C.y/2),N.useStyle(I),o.setItemGraphicEl(m,N),Ee(N,e),fe(N,V.get("focus"),V.get("blurScope"),V.get("disabled"))}this._layersSeries=l,this._layers=g},t.type="themeRiver",t}(he);function Zp(n,t,e){var a=new He({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return Te(a,{shape:{x:n.x-50,width:n.width+100,height:n.height+20}},t,e),a}const Up=Yp;var Wa=2,jp=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bn(re(this.getData,this),re(this.getRawData,this))},t.prototype.fixData=function(e){var a=e.length,i={},o=Xn(e,function(c){return i.hasOwnProperty(c[0]+"")||(i[c[0]+""]=-1),c[2]}),r=[];o.buckets.each(function(c,p){r.push({name:p,dataList:c})});for(var s=r.length,l=0;l<s;++l){for(var u=r[l].name,d=0;d<r[l].dataList.length;++d){var h=r[l].dataList[d][0]+"";i[h]=l}for(var h in i)i.hasOwnProperty(h)&&i[h]!==l&&(i[h]=l,e[a]=[h,0,u],a++)}return e},t.prototype.getInitialData=function(e,a){for(var i=this.getReferringComponents("singleAxis",Ji).models[0],o=i.get("type"),r=Le(e.data,function(g){return g[2]!==void 0}),s=this.fixData(r||[]),l=[],u=this.nameMap=De(),d=0,h=0;h<s.length;++h)l.push(s[h][Wa]),u.get(s[h][Wa])||(u.set(s[h][Wa],d),d++);var c=Tn(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Yn(o)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,p=new _e(c,this);return p.initData(s),p},t.prototype.getLayerSeries=function(){for(var e=this.getData(),a=e.count(),i=[],o=0;o<a;++o)i[o]=o;var r=e.mapDimension("single"),s=Xn(i,function(u){return e.get("name",u)}),l=[];return s.buckets.each(function(u,d){u.sort(function(h,c){return e.get(r,h)-e.get(r,c)}),l.push({name:d,indices:u})}),l},t.prototype.getAxisTooltipData=function(e,a,i){G(e)||(e=e?[e]:[]);for(var o=this.getData(),r=this.getLayerSeries(),s=[],l=r.length,u,d=0;d<l;++d){for(var h=Number.MAX_VALUE,c=-1,p=r[d].indices.length,g=0;g<p;++g){var f=o.get(e[0],r[d].indices[g]),y=Math.abs(f-a);y<=h&&(u=f,h=y,c=r[d].indices[g])}s.push(c)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=o.getName(e),s=o.get(o.mapDimension("value"),e);return Ve("nameValue",{name:r,value:s})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(pe);const qp=jp;function Kp(n,t){n.eachSeriesByType("themeRiver",function(e){var a=e.getData(),i=e.coordinateSystem,o={},r=i.getRect();o.rect=r;var s=e.get("boundaryGap"),l=i.getAxis();if(o.boundaryGap=s,l.orient==="horizontal"){s[0]=Z(s[0],r.height),s[1]=Z(s[1],r.height);var u=r.height-s[0]-s[1];Sr(a,e,u)}else{s[0]=Z(s[0],r.width),s[1]=Z(s[1],r.width);var d=r.width-s[0]-s[1];Sr(a,e,d)}a.setLayout("layoutInfo",o)})}function Sr(n,t,e){if(n.count())for(var a=t.coordinateSystem,i=t.getLayerSeries(),o=n.mapDimension("single"),r=n.mapDimension("value"),s=F(i,function(y){return F(y.indices,function(m){var x=a.dataToPoint(n.get(o,m));return x[1]=n.get(r,m),x})}),l=Qp(s),u=l.y0,d=e/l.max,h=i.length,c=i[0].indices.length,p,g=0;g<c;++g){p=u[g]*d,n.setItemLayout(i[0].indices[g],{layerIndex:0,x:s[0][g][0],y0:p,y:s[0][g][1]*d});for(var f=1;f<h;++f)p+=s[f-1][g][1]*d,n.setItemLayout(i[f].indices[g],{layerIndex:f,x:s[f][g][0],y0:p,y:s[f][g][1]*d})}}function Qp(n){for(var t=n.length,e=n[0].length,a=[],i=[],o=0,r=0;r<e;++r){for(var s=0,l=0;l<t;++l)s+=n[l][r][1];s>o&&(o=s),a.push(s)}for(var u=0;u<e;++u)i[u]=(o-a[u])/2;o=0;for(var d=0;d<e;++d){var h=a[d]+i[d];h>o&&(o=h)}return{y0:i,max:o}}function $p(n){n.registerChartView(Up),n.registerSeriesModel(qp),n.registerLayout(Kp),n.registerProcessor(Wn("themeRiver"))}var Jp=2,ef=4,tf=function(n){E(t,n);function t(e,a,i,o){var r=n.call(this)||this;r.z2=Jp,r.textConfig={inside:!0},ae(r).seriesIndex=a.seriesIndex;var s=new Bt({z2:ef,silent:e.getModel().get(["label","silent"])});return r.setTextContent(s),r.updateData(!0,e,a,i,o),r}return t.prototype.updateData=function(e,a,i,o,r){this.node=a,a.piece=this,i=i||this._seriesModel,o=o||this._ecModel;var s=this;ae(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),d=a.getLayout(),h=W({},d);h.label=null;var c=a.getVisual("style");c.lineJoin="bevel";var p=a.getVisual("decal");p&&(c.decal=eo(p,r));var g=to(l.getModel("itemStyle"),h,!0);W(h,g),P(Rn,function(x){var v=s.ensureState(x),_=l.getModel([x,"itemStyle"]);v.style=_.getItemStyle();var b=to(_,h);b&&(v.shape=b)}),e?(s.setShape(h),s.shape.r=d.r0,Te(s,{shape:{r:d.r}},i,a.dataIndex)):(se(s,{shape:h},i),lt(s)),s.useStyle(c),this._updateLabel(i);var f=l.getShallow("cursor");f&&s.attr("cursor",f),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel;var y=u.get("focus"),m=y==="ancestor"?a.getAncestorsIndices():y==="descendant"?a.getDescendantIndices():y;fe(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,i=this.node.getModel(),o=i.getModel("label"),r=this.node.getLayout(),s=r.endAngle-r.startAngle,l=(r.startAngle+r.endAngle)/2,u=Math.cos(l),d=Math.sin(l),h=this,c=h.getTextContent(),p=this.node.dataIndex,g=o.get("minAngle")/180*Math.PI,f=o.get("show")&&!(g!=null&&Math.abs(s)<g);c.ignore=!f,P(ll,function(m){var x=m==="normal"?i.getModel("label"):i.getModel([m,"label"]),v=m==="normal",_=v?c:c.ensureState(m),b=e.getFormattedLabel(p,m);v&&(b=b||a.node.name),_.style=vt(x,{},null,m!=="normal",!0),b&&(_.style.text=b);var I=x.get("show");I!=null&&!v&&(_.ignore=!I);var w=y(x,"position"),S=v?h:h.states[m],M=S.style.fill;S.textConfig={outsideFill:x.get("color")==="inherit"?M:null,inside:w!=="outside"};var D,L=y(x,"distance")||0,T=y(x,"align");w==="outside"?(D=r.r+L,T=l>Math.PI/2?"right":"left"):!T||T==="center"?(s===2*Math.PI&&r.r0===0?D=0:D=(r.r+r.r0)/2,T="center"):T==="left"?(D=r.r0+L,l>Math.PI/2&&(T="right")):T==="right"&&(D=r.r-L,l>Math.PI/2&&(T="left")),_.style.align=T,_.style.verticalAlign=y(x,"verticalAlign")||"middle",_.x=D*u+r.cx,_.y=D*d+r.cy;var N=y(x,"rotate"),C=0;N==="radial"?(C=wn(-l),C>Math.PI/2&&C<Math.PI*1.5&&(C+=Math.PI)):N==="tangential"?(C=Math.PI/2-l,C>Math.PI/2?C-=Math.PI:C<-Math.PI/2&&(C+=Math.PI)):We(N)&&(C=N*Math.PI/180),_.rotation=wn(C)});function y(m,x){var v=m.get(x);return v!=null?v:o.get(x)}c.dirtyStyle()},t}(Jn);const Mr=tf;var Xa="sunburstRootToNode",Lr="sunburstHighlight",nf="sunburstUnhighlight";function af(n){n.registerAction({type:Xa,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},a);function a(i,o){var r=Mt(t,[Xa],i);if(r){var s=i.getViewRoot();s&&(t.direction=pa(s,r.node)?"rollUp":"drillDown"),i.resetViewRoot(r.node)}}}),n.registerAction({type:Lr,update:"none"},function(t,e,a){t=W({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(o){var r=Mt(t,[Lr],o);r&&(t.dataIndex=r.node.dataIndex)}a.dispatchAction(W(t,{type:"highlight"}))}),n.registerAction({type:nf,update:"updateView"},function(t,e,a){t=W({},t),a.dispatchAction(W(t,{type:"downplay"}))})}var of=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,o){var r=this;this.seriesModel=e,this.api=i,this.ecModel=a;var s=e.getData(),l=s.tree.root,u=e.getViewRoot(),d=this.group,h=e.get("renderLabelForZeroData"),c=[];u.eachNode(function(x){c.push(x)});var p=this._oldChildren||[];g(c,p),m(l,u),this._initEvents(),this._oldChildren=c;function g(x,v){if(x.length===0&&v.length===0)return;new ot(v,x,_,_).add(b).update(b).remove(te(b,null)).execute();function _(I){return I.getId()}function b(I,w){var S=I==null?null:x[I],M=w==null?null:v[w];f(S,M)}}function f(x,v){if(!h&&x&&!x.getValue()&&(x=null),x!==l&&v!==l){if(v&&v.piece)x?(v.piece.updateData(!1,x,e,a,i),s.setItemGraphicEl(x.dataIndex,v.piece)):y(v);else if(x){var _=new Mr(x,e,a,i);d.add(_),s.setItemGraphicEl(x.dataIndex,_)}}}function y(x){x&&x.piece&&(d.remove(x.piece),x.piece=null)}function m(x,v){v.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,x,e,a,i):(r.virtualPiece=new Mr(x,e,a,i),d.add(r.virtualPiece)),v.piece.off("click"),r.virtualPiece.on("click",function(_){r._rootToNode(v.parentNode)})):r.virtualPiece&&(d.remove(r.virtualPiece),r.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var i=!1,o=e.seriesModel.getViewRoot();o.eachNode(function(r){if(!i&&r.piece&&r.piece===a.target){var s=r.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(r);else if(s==="link"){var l=r.getModel(),u=l.get("link");if(u){var d=l.get("target",!0)||"_blank";ki(u,d)}}i=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Xa,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var i=a.getData(),o=i.getItemLayout(0);if(o){var r=e[0]-o.cx,s=e[1]-o.cy,l=Math.sqrt(r*r+s*s);return l<=o.r&&l>=o.r0}},t.type="sunburst",t}(he);const rf=of;var sf=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var i={name:e.name,children:e.data};Dr(i);var o=this._levelModels=F(e.levels||[],function(l){return new Be(l,this,a)},this),r=ca.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,d){var h=r.getNodeByDataIndex(d),c=o[h.depth];return c&&(u.parentModel=c),u})}return r.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=n.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=tn(i,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},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(){So(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(pe);function Dr(n){var t=0;P(n.children,function(a){Dr(a);var i=a.value;G(i)&&(i=i[0]),t+=i});var e=n.value;G(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),G(n.value)?n.value[0]=e:n.value=e}const lf=sf;var Cr=Math.PI/180;function uf(n,t,e){t.eachSeriesByType(n,function(a){var i=a.get("center"),o=a.get("radius");G(o)||(o=[0,o]),G(i)||(i=[i,i]);var r=e.getWidth(),s=e.getHeight(),l=Math.min(r,s),u=Z(i[0],r),d=Z(i[1],s),h=Z(o[0],l/2),c=Z(o[1],l/2),p=-a.get("startAngle")*Cr,g=a.get("minAngle")*Cr,f=a.getData().tree.root,y=a.getViewRoot(),m=y.depth,x=a.get("sort");x!=null&&Tr(y,x);var v=0;P(y.children,function(R){!isNaN(R.getValue())&&v++});var _=y.getValue(),b=Math.PI/(_||v)*2,I=y.depth>0,w=y.height-(I?-1:1),S=(c-h)/(w||1),M=a.get("clockwise"),D=a.get("stillShowZeroSum"),L=M?1:-1,T=function(R,V){if(R){var k=V;if(R!==f){var z=R.getValue(),H=_===0&&D?b:z*b;H<g&&(H=g),k=V+L*H;var B=R.depth-m-(I?-1:1),K=h+S*B,Q=h+S*(B+1),q=a.getLevelModel(R);if(q){var ee=q.get("r0",!0),ve=q.get("r",!0),Y=q.get("radius",!0);Y!=null&&(ee=Y[0],ve=Y[1]),ee!=null&&(K=Z(ee,l/2)),ve!=null&&(Q=Z(ve,l/2))}R.setLayout({angle:H,startAngle:V,endAngle:k,clockwise:M,cx:u,cy:d,r0:K,r:Q})}if(R.children&&R.children.length){var O=0;P(R.children,function(j){O+=T(j,V+O)})}return k-V}};if(I){var N=h,C=h+S,A=Math.PI*2;f.setLayout({angle:A,startAngle:p,endAngle:p+A,clockwise:M,cx:u,cy:d,r0:N,r:C})}T(y,p)})}function Tr(n,t){var e=n.children||[];n.children=df(e,t),e.length&&P(n.children,function(a){Tr(a,t)})}function df(n,t){if(ie(t)){var e=F(n,function(i,o){var r=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return r}},index:o}});return e.sort(function(i,o){return t(i.params,o.params)}),F(e,function(i){return n[i.index]})}else{var a=t==="asc";return n.sort(function(i,o){var r=(i.getValue()-o.getValue())*(a?1:-1);return r===0?(i.dataIndex-o.dataIndex)*(a?-1:1):r})}}function hf(n){var t={};function e(a,i,o){for(var r=a;r&&r.depth>1;)r=r.parentNode;var s=i.getColorFromPalette(r.name||r.dataIndex+"",t);return a.depth>1&&be(s)&&(s=ul(s,(a.depth-1)/(o-1)*.5)),s}n.eachSeriesByType("sunburst",function(a){var i=a.getData(),o=i.tree;o.eachNode(function(r){var s=r.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(r,a,o.root.height));var u=i.ensureUniqueItemVisual(r.dataIndex,"style");W(u,l)})})}function cf(n){n.registerChartView(rf),n.registerSeriesModel(lf),n.registerLayout(te(uf,"sunburst")),n.registerProcessor(te(Wn,"sunburst")),n.registerVisual(hf),af(n)}var Ar={color:"fill",borderColor:"stroke"},pf={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ze=me(),ff=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,a){return _t(null,this)},t.prototype.getDataParams=function(e,a,i){var o=n.prototype.getDataParams.call(this,e,a);return i&&(o.info=ze(i).info),o},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(pe);const gf=ff;function yf(n,t){return t=t||[0,0],F(["x","y"],function(e,a){var i=this.getAxis(e),o=t[a],r=n[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-r)-i.dataToCoord(o+r))},this)}function vf(n){var t=n.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return n.dataToPoint(e)},size:re(yf,n)}}}function mf(n,t){return t=t||[0,0],F([0,1],function(e){var a=t[e],i=n[e]/2,o=[],r=[];return o[e]=a-i,r[e]=a+i,o[1-e]=r[1-e]=t[1-e],Math.abs(this.dataToPoint(o)[e]-this.dataToPoint(r)[e])},this)}function xf(n){var t=n.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:n.getZoom()},api:{coord:function(e){return n.dataToPoint(e)},size:re(mf,n)}}}function _f(n,t){var e=this.getAxis(),a=t instanceof Array?t[0]:t,i=(n instanceof Array?n[0]:n)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(a-i)-e.dataToCoord(a+i))}function bf(n){var t=n.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return n.dataToPoint(e)},size:re(_f,n)}}}function If(n,t){return t=t||[0,0],F(["Radius","Angle"],function(e,a){var i="get"+e+"Axis",o=this[i](),r=t[a],s=n[a]/2,l=o.type==="category"?o.getBandWidth():Math.abs(o.dataToCoord(r-s)-o.dataToCoord(r+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function wf(n){var t=n.getRadiusAxis(),e=n.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:n.cx,cy:n.cy,r:a[1],r0:a[0]},api:{coord:function(i){var o=t.dataToRadius(i[0]),r=e.dataToAngle(i[1]),s=n.coordToPoint([o,r]);return s.push(o,r*Math.PI/180),s},size:re(If,n)}}}function Sf(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,i){return n.dataToPoint(a,i)}}}}var Oe="emphasis",je="normal",Ya="blur",Za="select",qe=[je,Oe,Ya,Za],Ua={normal:["itemStyle"],emphasis:[Oe,"itemStyle"],blur:[Ya,"itemStyle"],select:[Za,"itemStyle"]},ja={normal:["label"],emphasis:[Oe,"label"],blur:[Ya,"label"],select:[Za,"label"]},Mf=["x","y"],Lf="e\0\0",we={normal:{},emphasis:{},blur:{},select:{}},Df={cartesian2d:vf,geo:xf,single:bf,polar:wf,calendar:Sf};function qa(n){return n instanceof ye}function Ka(n){return n instanceof An}function Cf(n,t){t.copyTransform(n),Ka(t)&&Ka(n)&&(t.setStyle(n.style),t.z=n.z,t.z2=n.z2,t.zlevel=n.zlevel,t.invisible=n.invisible,t.ignore=n.ignore,qa(t)&&qa(n)&&t.setShape(n.shape))}var Tf=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,i,o){this._progressiveEls=null;var r=this._data,s=e.getData(),l=this.group,u=Pr(e,s,a,i);r||l.removeAll(),s.diff(r).add(function(h){Ja(i,null,h,u(h,o),e,l,s)}).remove(function(h){var c=r.getItemGraphicEl(h);c&&ea(c,ze(c).option,e)}).update(function(h,c){var p=r.getItemGraphicEl(c);Ja(i,p,h,u(h,o),e,l,s)}).execute();var d=e.get("clip",!0)?jn(e.coordinateSystem,!1,e):null;d?l.setClipPath(d):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(e,a,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,a,i,o,r){var s=a.getData(),l=Pr(a,s,i,o),u=this._progressiveEls=[];function d(p){p.isGroup||(p.incremental=!0,p.ensureState("emphasis").hoverLayer=!0)}for(var h=e.start;h<e.end;h++){var c=Ja(null,null,h,l(h,r),a,this.group,s);c&&(c.traverse(d),u.push(c))}},t.prototype.eachRendered=function(e){Xt(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,a,i,o){var r=a.element;if(r==null||i.name===r)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===r)return!0;return!1},t.type="custom",t}(he);const Af=Tf;function Qa(n){var t=n.type,e;if(t==="path"){var a=n.shape,i=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,o=zr(a);e=fl(o,null,i,a.layout||"center"),ze(e).customPathData=o}else if(t==="image")e=new $i({}),ze(e).customImagePath=n.style.image;else if(t==="text")e=new Bt({});else if(t==="group")e=new oe;else{if(t==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var r=gl(t);if(!r){var s="";J(s)}e=new r}return ze(e).customGraphicType=t,e.name=n.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function $a(n,t,e,a,i,o,r){yl(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),a&&a.transition==null&&(a.transition=Mf);var l=a&&a.style;if(l){if(t.type==="text"){var u=l;Ce(u,"textFill")&&(u.fill=u.textFill),Ce(u,"textStroke")&&(u.stroke=u.textStroke)}var d=void 0,h=qa(t)?l.decal:null;n&&h&&(h.dirty=!0,d=eo(h,n)),l.__decalPattern=d}if(Ka(t)&&l){var d=l.__decalPattern;d&&(l.decal=d)}vl(t,a,o,{dataIndex:e,isInit:r,clearStyle:!0}),ml(t,a.keyframeAnimation,o)}function Nr(n,t,e,a,i){var o=t.isGroup?null:t,r=i&&i[n].cfg;if(o){var s=o.ensureState(n);if(a===!1){var l=o.getState(n);l&&(l.style=null)}else s.style=a||null;r&&(s.textConfig=r),Ot(o)}}function Nf(n,t,e){if(!n.isGroup){var a=n,i=e.currentZ,o=e.currentZLevel;a.z=i,a.zlevel=o;var r=t.z2;r!=null&&(a.z2=r||0);for(var s=0;s<qe.length;s++)Pf(a,t,qe[s])}}function Pf(n,t,e){var a=e===je,i=a?t:un(t,e),o=i?i.z2:null,r;o!=null&&(r=a?n:n.ensureState(e),r.z2=o||0)}function Pr(n,t,e,a){var i=n.get("renderItem"),o=n.coordinateSystem,r={};o&&(r=o.prepareCustoms?o.prepareCustoms(o):Df[o.type](o));for(var s=ce({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:_,style:I,ordinalRawValue:b,styleEmphasis:w,visual:D,barLayout:L,currentSeriesIndices:T,font:N},r.api||{}),l={context:{},seriesId:n.id,seriesName:n.name,seriesIndex:n.seriesIndex,coordSys:r.coordSys,dataInsideLength:t.count(),encode:Rf(n.getData())},u,d,h={},c={},p={},g={},f=0;f<qe.length;f++){var y=qe[f];p[y]=n.getModel(Ua[y]),g[y]=n.getModel(ja[y])}function m(C){return C===u?d||(d=t.getItemModel(C)):t.getItemModel(C)}function x(C,A){return t.hasItemOption?C===u?h[A]||(h[A]=m(C).getModel(Ua[A])):m(C).getModel(Ua[A]):p[A]}function v(C,A){return t.hasItemOption?C===u?c[A]||(c[A]=m(C).getModel(ja[A])):m(C).getModel(ja[A]):g[A]}return function(C,A){return u=C,d=null,h={},c={},i&&i(ce({dataIndexInside:C,dataIndex:t.getRawIndex(C),actionType:A?A.type:null},l),s)};function _(C,A){return A==null&&(A=u),t.getStore().get(t.getDimensionIndex(C||0),A)}function b(C,A){A==null&&(A=u),C=C||0;var R=t.getDimensionInfo(C);if(!R){var V=t.getDimensionIndex(C);return V>=0?t.getStore().get(V,A):void 0}var k=t.get(R.name,A),z=R&&R.ordinalMeta;return z?z.categories[k]:k}function I(C,A){A==null&&(A=u);var R=t.getItemVisual(A,"style"),V=R&&R.fill,k=R&&R.opacity,z=x(A,je).getItemStyle();V!=null&&(z.fill=V),k!=null&&(z.opacity=k);var H={inheritColor:be(V)?V:"#000"},B=v(A,je),K=vt(B,null,H,!1,!0);K.text=B.getShallow("show")?Ge(n.getFormattedLabel(A,je),no(t,A)):null;var Q=ao(B,H,!1);return M(C,z),z=io(z,K,Q),C&&S(z,C),z.legacy=!0,z}function w(C,A){A==null&&(A=u);var R=x(A,Oe).getItemStyle(),V=v(A,Oe),k=vt(V,null,null,!0,!0);k.text=V.getShallow("show")?mt(n.getFormattedLabel(A,Oe),n.getFormattedLabel(A,je),no(t,A)):null;var z=ao(V,null,!0);return M(C,R),R=io(R,k,z),C&&S(R,C),R.legacy=!0,R}function S(C,A){for(var R in A)Ce(A,R)&&(C[R]=A[R])}function M(C,A){C&&(C.textFill&&(A.textFill=C.textFill),C.textPosition&&(A.textPosition=C.textPosition))}function D(C,A){if(A==null&&(A=u),Ce(Ar,C)){var R=t.getItemVisual(A,"style");return R?R[Ar[C]]:null}if(Ce(pf,C))return t.getItemVisual(A,C)}function L(C){if(o.type==="cartesian2d"){var A=o.getBaseAxis();return dl(ce({axis:A},C))}}function T(){return e.getCurrentSeriesIndices()}function N(C){return hl(C,e)}}function Rf(n){var t={};return P(n.dimensions,function(e){var a=n.getDimensionInfo(e);if(!a.isExtraCoord){var i=a.coordDim,o=t[i]=t[i]||[];o[a.coordDimIndex]=n.getDimensionIndex(e)}}),t}function Ja(n,t,e,a,i,o,r){if(!a){o.remove(t);return}var s=ei(n,t,e,a,i,o);return s&&r.setItemGraphicEl(e,s),s&&fe(s,a.focus,a.blurScope,a.emphasisDisabled),s}function ei(n,t,e,a,i,o){var r=-1,s=t;t&&Rr(t,a,i)&&(r=xe(o.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=Qa(a),s&&Cf(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),we.normal.cfg=we.normal.conOpt=we.emphasis.cfg=we.emphasis.conOpt=we.blur.cfg=we.blur.conOpt=we.select.cfg=we.select.conOpt=null,we.isLegacy=!1,Vf(u,e,a,i,l,we),Ef(u,e,a,i,l),$a(n,u,e,a,we,i,l),Ce(a,"info")&&(ze(u).info=a.info);for(var d=0;d<qe.length;d++){var h=qe[d];if(h!==je){var c=un(a,h),p=ti(a,c,h);Nr(h,u,c,p,we)}}return Nf(u,a,i),a.type==="group"&&kf(n,u,e,a,i),r>=0?o.replaceAt(u,r):o.add(u),u}function Rr(n,t,e){var a=ze(n),i=t.type,o=t.shape,r=t.style;return e.isUniversalTransitionEnabled()||i!=null&&i!==a.customGraphicType||i==="path"&&Bf(o)&&zr(o)!==a.customPathData||i==="image"&&Ce(r,"image")&&r.image!==a.customImagePath}function Ef(n,t,e,a,i){var o=e.clipPath;if(o===!1)n&&n.getClipPath()&&n.removeClipPath();else if(o){var r=n.getClipPath();r&&Rr(r,o,a)&&(r=null),r||(r=Qa(o),n.setClipPath(r)),$a(null,r,t,o,null,a,i)}}function Vf(n,t,e,a,i,o){if(!n.isGroup){Er(e,null,o),Er(e,Oe,o);var r=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,u=o.select.conOpt;if(r!=null||s!=null||u!=null||l!=null){var d=n.getTextContent();if(r===!1)d&&n.removeTextContent();else{r=o.normal.conOpt=r||{type:"text"},d?d.clearStates():(d=Qa(r),n.setTextContent(d)),$a(null,d,t,r,null,a,i);for(var h=r&&r.style,c=0;c<qe.length;c++){var p=qe[c];if(p!==je){var g=o[p].conOpt;Nr(p,d,g,ti(r,g,p),null)}}h?d.dirty():d.markRedraw()}}}}function Er(n,t,e){var a=t?un(n,t):n,i=t?ti(n,a,Oe):n.style,o=n.type,r=a?a.textConfig:null,s=n.textContent,l=s?t?un(s,t):s:null;if(i&&(e.isLegacy||cl(i,o,!!r,!!l))){e.isLegacy=!0;var u=pl(i,o,!t);!r&&u.textConfig&&(r=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var d=l;!d.type&&(d.type="text")}var h=t?e[t]:e.normal;h.cfg=r,h.conOpt=l}function un(n,t){return t?n?n[t]:null:n}function ti(n,t,e){var a=t&&t.style;return a==null&&e===Oe&&n&&(a=n.styleEmphasis),a}function kf(n,t,e,a,i){var o=a.children,r=o?o.length:0,s=a.$mergeChildren,l=s==="byName"||a.diffChildrenByName,u=s===!1;if(!(!r&&!l&&!u)){if(l){Of({api:n,oldChildren:t.children()||[],newChildren:o||[],dataIndex:e,seriesModel:i,group:t});return}u&&t.removeAll();for(var d=0;d<r;d++){var h=o[d],c=t.childAt(d);h?(h.ignore==null&&(h.ignore=!1),ei(n,c,e,h,i,t)):c.ignore=!0}for(var p=t.childCount()-1;p>=d;p--){var g=t.childAt(p);zf(t,g,i)}}}function zf(n,t,e){t&&ea(t,ze(n).option,e)}function Of(n){new ot(n.oldChildren,n.newChildren,Vr,Vr,n).add(kr).update(kr).remove(Gf).execute()}function Vr(n,t){var e=n&&n.name;return e!=null?e:Lf+t}function kr(n,t){var e=this.context,a=n!=null?e.newChildren[n]:null,i=t!=null?e.oldChildren[t]:null;ei(e.api,i,e.dataIndex,a,e.seriesModel,e.group)}function Gf(n){var t=this.context,e=t.oldChildren[n];e&&ea(e,ze(e).option,t.seriesModel)}function zr(n){return n&&(n.pathData||n.d)}function Bf(n){return n&&(Ce(n,"pathData")||Ce(n,"d"))}function Ff(n){n.registerChartView(Af),n.registerSeriesModel(gf)}function ni(n,t){t=t||{};var e=n.coordinateSystem,a=n.axis,i={},o=a.position,r=a.orient,s=e.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[r==="vertical"?u.vertical[o]:l[0],r==="horizontal"?u.horizontal[o]:l[3]];var d={horizontal:0,vertical:1};i.rotation=Math.PI/2*d[r];var h={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=h[o],n.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Ne(t.labelInside,n.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var c=t.rotate;return c==null&&(c=n.get(["axisLabel","rotate"])),i.labelRotation=o==="top"?-c:c,i.z2=1,i}var Hf=["axisLine","axisTickLabel","axisName"],Wf=["splitArea","splitLine"],Xf=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="SingleAxisPointer",e}return t.prototype.render=function(e,a,i,o){var r=this.group;r.removeAll();var s=this._axisGroup;this._axisGroup=new oe;var l=ni(e),u=new xl(e,l);P(Hf,u.add,u),r.add(this._axisGroup),r.add(u.getGroup()),P(Wf,function(d){e.get([d,"show"])&&Yf[d](this,this.group,this._axisGroup,e)},this),_l(s,this._axisGroup,e),n.prototype.render.call(this,e,a,i,o)},t.prototype.remove=function(){bl(this)},t.type="singleAxis",t}(oo),Yf={splitLine:function(n,t,e,a){var i=a.axis;if(!i.scale.isBlank()){var o=a.getModel("splitLine"),r=o.getModel("lineStyle"),s=r.get("color");s=s instanceof Array?s:[s];for(var l=r.get("width"),u=a.coordinateSystem.getRect(),d=i.isHorizontal(),h=[],c=0,p=i.getTicksCoords({tickModel:o}),g=[],f=[],y=0;y<p.length;++y){var m=i.toGlobalCoord(p[y].coord);d?(g[0]=m,g[1]=u.y,f[0]=m,f[1]=u.y+u.height):(g[0]=u.x,g[1]=m,f[0]=u.x+u.width,f[1]=m);var x=new Wi({shape:{x1:g[0],y1:g[1],x2:f[0],y2:f[1]},silent:!0});Il(x.shape,l);var v=c++%s.length;h[v]=h[v]||[],h[v].push(x)}for(var _=r.getLineStyle(["color"]),y=0;y<h.length;++y)t.add(wl(h[y],{style:ce({stroke:s[y%s.length]},_),silent:!0}))}},splitArea:function(n,t,e,a){Sl(n,e,a,a)}};const Zf=Xf;var Or=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(Zt);st(Or,Ml.prototype);const ai=Or;var Uf=function(n){E(t,n);function t(e,a,i,o,r){var s=n.call(this,e,a,i)||this;return s.type=o||"value",s.position=r||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.pointToData=function(e,a){return this.coordinateSystem.pointToData(e)[0]},t}(Ll);const jf=Uf;var Gr=["single"],qf=function(){function n(t,e,a){this.type="single",this.dimension="single",this.dimensions=Gr,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,a)}return n.prototype._init=function(t,e,a){var i=this.dimension,o=new jf(i,Dl(t),[0,0],t.get("type"),t.get("position")),r=o.type==="category";o.onBand=r&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},n.prototype.update=function(t,e){t.eachSeries(function(a){if(a.coordinateSystem===this){var i=a.getData();P(i.mapDimensionsAll(this.dimension),function(o){this._axis.scale.unionExtentFromData(i,o)},this),Cl(this._axis.scale,this._axis.model)}},this)},n.prototype.resize=function(t,e){this._rect=it({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},n.prototype.getRect=function(){return this._rect},n.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,a=e.isHorizontal(),i=a?[0,t.width]:[0,t.height],o=e.inverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,a?t.x:t.y)},n.prototype._updateAxisTransform=function(t,e){var a=t.getExtent(),i=a[0]+a[1],o=t.isHorizontal();t.toGlobalCoord=o?function(r){return r+e}:function(r){return i-r+e},t.toLocalCoord=o?function(r){return r-e}:function(r){return i-r+e}},n.prototype.getAxis=function(){return this._axis},n.prototype.getBaseAxis=function(){return this._axis},n.prototype.getAxes=function(){return[this._axis]},n.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},n.prototype.containPoint=function(t){var e=this.getRect(),a=this.getAxis(),i=a.orient;return i==="horizontal"?a.contain(a.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:a.contain(a.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},n.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},n.prototype.dataToPoint=function(t){var e=this.getAxis(),a=this.getRect(),i=[],o=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,i},n.prototype.convertToPixel=function(t,e,a){var i=Br(e);return i===this?this.dataToPoint(a):null},n.prototype.convertFromPixel=function(t,e,a){var i=Br(e);return i===this?this.pointToData(a):null},n}();function Br(n){var t=n.seriesModel,e=n.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function Kf(n,t){var e=[];return n.eachComponent("singleAxis",function(a,i){var o=new qf(a,n,t);o.name="single_"+i,o.resize(a,t),a.coordinateSystem=o,e.push(o)}),n.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=a.getReferringComponents("singleAxis",Ji).models[0];a.coordinateSystem=i&&i.coordinateSystem}}),e}var Qf={create:Kf,dimensions:Gr};const $f=Qf;var Fr=["x","y"],Jf=["width","height"],eg=function(n){E(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,i,o,r){var s=i.axis,l=s.coordinateSystem,u=ii(l,1-dn(s)),d=l.dataToPoint(a)[0],h=o.get("type");if(h&&h!=="none"){var c=Tl(o),p=tg[h](s,d,u);p.style=c,e.graphicKey=p.type,e.pointer=p}var g=ni(i);Al(a,e,g,i,o,r)},t.prototype.getHandleTransform=function(e,a,i){var o=ni(a,{labelInside:!1});o.labelMargin=i.get(["handle","margin"]);var r=Nl(a.axis,e,o);return{x:r[0],y:r[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,i,o){var r=i.axis,s=r.coordinateSystem,l=dn(r),u=ii(s,l),d=[e.x,e.y];d[l]+=a[l],d[l]=Math.min(u[1],d[l]),d[l]=Math.max(u[0],d[l]);var h=ii(s,1-l),c=(h[1]+h[0])/2,p=[c,c];return p[l]=d[l],{x:d[0],y:d[1],rotation:e.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},t}(Pl),tg={line:function(n,t,e){var a=Rl([t,e[0]],[t,e[1]],dn(n));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(n,t,e){var a=n.getBandWidth(),i=e[1]-e[0];return{type:"Rect",shape:El([t-a/2,e[0]],[a,i],dn(n))}}};function dn(n){return n.isHorizontal()?0:1}function ii(n,t){var e=n.getRect();return[e[Fr[t]],e[Fr[t]]+e[Jf[t]]]}const ng=eg;var ag=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(Ut);function ig(n){X(ro),oo.registerAxisPointerClass("SingleAxisPointer",ng),n.registerComponentView(ag),n.registerComponentView(Zf),n.registerComponentModel(ai),Vl(n,"single",ai,ai.defaultOption),n.registerCoordinateSystem("single",$f)}var og=["rect","polygon","keep","clear"];function rg(n,t){var e=ke(n?n.brush:[]);if(e.length){var a=[];P(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=n&&n.toolbox;G(i)&&(i=i[0]),i||(i={feature:{}},n.toolbox=[i]);var o=i.feature||(i.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,a),sg(s),t&&!s.length&&s.push.apply(s,og)}}function sg(n){var t={};P(n,function(e){t[e]=1}),n.length=0,P(t,function(e,a){n.push(a)})}function lg(n){var t=n.brushType,e={point:function(a){return Hr[t].point(a,e,n)},rect:function(a){return Hr[t].rect(a,e,n)}};return e}var Hr={lineX:Wr(0),lineY:Wr(1),rect:{point:function(n,t,e){return n&&e.boundingRect.contain(n[0],n[1])},rect:function(n,t,e){return n&&e.boundingRect.intersect(n)}},polygon:{point:function(n,t,e){return n&&e.boundingRect.contain(n[0],n[1])&&It(e.range,n[0],n[1])},rect:function(n,t,e){var a=e.range;if(!n||a.length<=1)return!1;var i=n.x,o=n.y,r=n.width,s=n.height,l=a[0];if(It(a,i,o)||It(a,i+r,o)||It(a,i,o+s)||It(a,i+r,o+s)||de.create(n).contain(l[0],l[1])||jt(i,o,i+r,o,a)||jt(i,o,i,o+s,a)||jt(i+r,o,i+r,o+s,a)||jt(i,o+s,i+r,o+s,a))return!0}}};function Wr(n){var t=["x","y"],e=["width","height"];return{point:function(a,i,o){if(a){var r=o.range,s=a[n];return Rt(s,r)}},rect:function(a,i,o){if(a){var r=o.range,s=[a[t[n]],a[t[n]]+a[e[n]]];return s[1]<s[0]&&s.reverse(),Rt(s[0],r)||Rt(s[1],r)||Rt(r[0],s)||Rt(r[1],s)}}}}function Rt(n,t){return t[0]<=n&&n<=t[1]}var Xr=["inBrush","outOfBrush"],oi="__ecBrushSelect",ri="__ecInBrushSelectEvent";function Yr(n){n.eachComponent({mainType:"brush"},function(t){var e=t.brushTargetManager=new Ol(t.option,n);e.setInputRanges(t.areas,n)})}function ug(n,t,e){var a=[],i,o;n.eachComponent({mainType:"brush"},function(r){e&&e.type==="takeGlobalCursor"&&r.setBrushOption(e.key==="brush"?e.brushOption:{brushType:!1})}),Yr(n),n.eachComponent({mainType:"brush"},function(r,s){var l={brushId:r.id,brushIndex:s,brushName:r.name,areas:wt(r.areas),selected:[]};a.push(l);var u=r.option,d=u.brushLink,h=[],c=[],p=[],g=!1;s||(i=u.throttleType,o=u.throttleDelay);var f=F(r.areas,function(b){var I=pg[b.brushType],w=ce({boundingRect:I?I(b):void 0},b);return w.selectors=lg(w),w}),y=kl(r.option,Xr,function(b){b.mappingMethod="fixed"});G(d)&&P(d,function(b){h[b]=1});function m(b){return d==="all"||!!h[b]}function x(b){return!!b.length}n.eachSeries(function(b,I){var w=p[I]=[];b.subType==="parallel"?v(b,I):_(b,I,w)});function v(b,I){var w=b.coordinateSystem;g=g||w.hasAxisBrushed(),m(I)&&w.eachActiveState(b.getData(),function(S,M){S==="active"&&(c[M]=1)})}function _(b,I,w){if(!(!b.brushSelector||cg(r,I))&&(P(f,function(M){r.brushTargetManager.controlSeries(M,b,n)&&w.push(M),g=g||x(w)}),m(I)&&x(w))){var S=b.getData();S.each(function(M){Zr(b,w,S,M)&&(c[M]=1)})}}n.eachSeries(function(b,I){var w={seriesId:b.id,seriesIndex:I,seriesName:b.name,dataIndex:[]};l.selected.push(w);var S=p[I],M=b.getData(),D=m(I)?function(L){return c[L]?(w.dataIndex.push(M.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return Zr(b,S,M,L)?(w.dataIndex.push(M.getRawIndex(L)),"inBrush"):"outOfBrush"};(m(I)?g:x(S))&&zl(Xr,y,M,D)})}),dg(t,i,o,a,e)}function dg(n,t,e,a,i){if(i){var o=n.getZr();if(!o[ri]){o[oi]||(o[oi]=hg);var r=Gl(o,oi,e,t);r(n,a)}}}function hg(n,t){if(!n.isDisposed()){var e=n.getZr();e[ri]=!0,n.dispatchAction({type:"brushSelect",batch:t}),e[ri]=!1}}function Zr(n,t,e,a){for(var i=0,o=t.length;i<o;i++){var r=t[i];if(n.brushSelector(a,e,r.selectors,r))return!0}}function cg(n,t){var e=n.option.seriesIndex;return e!=null&&e!=="all"&&(G(e)?xe(e,t)<0:t!==e)}var pg={rect:function(n){return Ur(n.range)},polygon:function(n){for(var t,e=n.range,a=0,i=e.length;a<i;a++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=e[a];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&Ur(t)}};function Ur(n){return new de(n[0][0],n[1][0],n[0][1]-n[0][0],n[1][1]-n[1][0])}var fg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a,this.model,(this._brushController=new Bl(a.getZr())).on("brush",re(this._onBrush,this)).mount()},t.prototype.render=function(e,a,i,o){this.model=e,this._updateController(e,a,i,o)},t.prototype.updateTransform=function(e,a,i,o){Yr(a),this._updateController(e,a,i,o)},t.prototype.updateVisual=function(e,a,i,o){this.updateTransform(e,a,i,o)},t.prototype.updateView=function(e,a,i,o){this._updateController(e,a,i,o)},t.prototype._updateController=function(e,a,i,o){(!o||o.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var a=this.model.id,i=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:wt(i),$from:a}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:wt(i),$from:a})},t.type="brush",t}(Ut);const gg=fg;var yg="#ddd",vg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,a){var i=this.option;!a&&Fl(i,e,["inBrush","outOfBrush"]);var o=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:yg},o.hasOwnProperty("liftZ")||(o.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=F(e,function(a){return jr(this.option,a)},this))},t.prototype.setBrushOption=function(e){this.brushOption=jr(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Zt);function jr(n,t){return $e({brushType:n.brushType,brushMode:n.brushMode,transformable:n.transformable,brushStyle:new Be(n.brushStyle).getItemStyle(),removeOnClick:n.removeOnClick,z:n.z},t,!0)}const mg=vg;var xg=["rect","polygon","lineX","lineY","keep","clear"],_g=function(n){E(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.render=function(e,a,i){var o,r,s;a.eachComponent({mainType:"brush"},function(l){o=l.brushType,r=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=o,this._brushMode=r,P(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?r==="multiple":l==="clear"?s:l===o)?"emphasis":"normal")})},t.prototype.updateView=function(e,a,i){this.render(e,a,i)},t.prototype.getIcons=function(){var e=this.model,a=e.get("icon",!0),i={};return P(e.get("type",!0),function(o){a[o]&&(i[o]=a[o])}),i},t.prototype.onclick=function(e,a,i){var o=this._brushType,r=this._brushMode;i==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?o:o===i?!1:i,brushMode:i==="keep"?r==="multiple"?"single":"multiple":r}})},t.getDefaultOption=function(e){var a={show:!0,type:xg.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return a},t}(Hl);const bg=_g;function Ig(n){n.registerComponentView(gg),n.registerComponentModel(mg),n.registerPreprocessor(rg),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,ug),n.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(a){a.setAreas(t.areas)})}),n.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},gt),n.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},gt),Wl("brush",bg)}function si(n,t){if(!n)return!1;for(var e=G(n)?n:[n],a=0;a<e.length;a++)if(e[a]&&e[a][t])return!0;return!1}function hn(n){Fn(n,"label",["show"])}var cn=me(),qr=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e}return t.prototype.init=function(e,a,i){this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(so.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,a){this._mergeOption(e,a,!1,!1)},t.prototype._mergeOption=function(e,a,i,o){var r=this.mainType;i||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=cn(s)[r];if(!l||!l.data){cn(s)[r]=null;return}u?u._mergeOption(l,a,!0):(o&&hn(l),P(l.data,function(d){d instanceof Array?(hn(d[0]),hn(d[1])):hn(d)}),u=this.createMarkerModelFromSeries(l,this,a),W(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),cn(s)[r]=u},this)},t.prototype.formatTooltip=function(e,a,i){var o=this.getData(),r=this.getRawValue(e),s=o.getName(e);return Ve("section",{header:this.name,blocks:[Ve("nameValue",{name:s,value:r,noName:!s,noValue:r==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.getMarkerModelFromSeries=function(e,a){return cn(e)[a]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Zt);st(qr,Xl.prototype);const Ke=qr;var wg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(Ke);const Sg=wg;function li(n){return!(isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y)))}function Mg(n){return!isNaN(parseFloat(n.x))&&!isNaN(parseFloat(n.y))}function pn(n,t,e,a,i,o){var r=[],s=Yl(t,a),l=s?t.getCalculationInfo("stackResultDimension"):a,u=di(t,l,n),d=t.indicesOfNearest(l,u)[0];r[i]=t.get(e,d),r[o]=t.get(l,d);var h=t.get(a,d),c=Zl(t.get(a,d));return c=Math.min(c,20),c>=0&&(r[o]=+r[o].toFixed(c)),[r,h]}var ui={min:te(pn,"min"),max:te(pn,"max"),average:te(pn,"average"),median:te(pn,"median")};function Et(n,t){if(t){var e=n.getData(),a=n.coordinateSystem,i=a&&a.dimensions;if(!Mg(t)&&!G(t.coord)&&G(i)){var o=Kr(t,e,a,n);if(t=wt(t),t.type&&ui[t.type]&&o.baseAxis&&o.valueAxis){var r=xe(i,o.baseAxis.dim),s=xe(i,o.valueAxis.dim),l=ui[t.type](e,o.baseDataDim,o.valueDataDim,r,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!G(i))t.coord=[];else for(var u=t.coord,d=0;d<2;d++)ui[u[d]]&&(u[d]=di(e,e.mapDimension(i[d]),u[d]));return t}}function Kr(n,t,e,a){var i={};return n.valueIndex!=null||n.valueDim!=null?(i.valueDataDim=n.valueIndex!=null?t.getDimension(n.valueIndex):n.valueDim,i.valueAxis=e.getAxis(Lg(a,i.valueDataDim)),i.baseAxis=e.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=e.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function Lg(n,t){var e=n.getData().getDimensionInfo(t);return e&&e.coordDim}function Vt(n,t){return n&&n.containData&&t.coord&&!li(t)?n.containData(t.coord):!0}function Dg(n,t,e){return n&&n.containZone&&t.coord&&e.coord&&!li(t)&&!li(e)?n.containZone(t.coord,e.coord):!0}function Qr(n,t){return n?function(e,a,i,o){var r=o<2?e.coord&&e.coord[o]:e.value;return qt(r,t[o])}:function(e,a,i,o){return qt(e.value,t[o])}}function di(n,t,e){if(e==="average"){var a=0,i=0;return n.each(t,function(o,r){isNaN(o)||(a+=o,i++)}),a/i}else return e==="median"?n.getMedian(t):n.getDataExtent(t)[e==="max"?1:0]}var hi=me(),Cg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=De()},t.prototype.render=function(e,a,i){var o=this,r=this.markerGroupMap;r.each(function(s){hi(s).keep=!1}),a.eachSeries(function(s){var l=Ke.getMarkerModelFromSeries(s,o.type);l&&o.renderSeries(s,l,a,i)}),r.each(function(s){!hi(s).keep&&o.group.remove(s.group)})},t.prototype.markKeep=function(e){hi(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var i=this;P(e,function(o){var r=Ke.getMarkerModelFromSeries(o,i.type);if(r){var s=r.getData();s.eachItemGraphicEl(function(l){l&&(a?Ul(l):jl(l))})}})},t.type="marker",t}(Ut);const ci=Cg;function $r(n,t,e){var a=t.coordinateSystem;n.each(function(i){var o=n.getItemModel(i),r,s=Z(o.get("x"),e.getWidth()),l=Z(o.get("y"),e.getHeight());if(!isNaN(s)&&!isNaN(l))r=[s,l];else if(t.getMarkerPosition)r=t.getMarkerPosition(n.getValues(n.dimensions,i));else if(a){var u=n.get(a.dimensions[0],i),d=n.get(a.dimensions[1],i);r=a.dataToPoint([u,d])}isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),n.setItemLayout(i,r)})}var Tg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markPoint");r&&($r(r.getData(),o,i),this.markerGroupMap.get(o.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,new Gn),h=Ag(r,e,a);a.setData(h),$r(a.getData(),e,o),h.each(function(c){var p=h.getItemModel(c),g=p.getShallow("symbol"),f=p.getShallow("symbolSize"),y=p.getShallow("symbolRotate"),m=p.getShallow("symbolOffset"),x=p.getShallow("symbolKeepAspect");if(ie(g)||ie(f)||ie(y)||ie(m)){var v=a.getRawValue(c),_=a.getDataParams(c);ie(g)&&(g=g(v,_)),ie(f)&&(f=f(v,_)),ie(y)&&(y=y(v,_)),ie(m)&&(m=m(v,_))}var b=p.getModel("itemStyle").getItemStyle(),I=ta(l,"color");b.fill||(b.fill=I),h.setItemVisual(c,{symbol:g,symbolSize:f,symbolRotate:y,symbolOffset:m,symbolKeepAspect:x,style:b})}),d.updateData(h),this.group.add(d.group),h.eachItemGraphicEl(function(c){c.traverse(function(p){ae(p).dataModel=a})}),this.markKeep(d),d.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t}(ci);function Ag(n,t,e){var a;n?a=F(n&&n.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return W(W({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new _e(a,e),o=F(e.get("data"),te(Et,t));n&&(o=Le(o,te(Vt,n)));var r=Qr(!!n,a);return i.initData(o,null,r),i}const Ng=Tg;function Pg(n){n.registerComponentModel(Sg),n.registerComponentView(Ng),n.registerPreprocessor(function(t){si(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var Rg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Ke);const Eg=Rg;var fn=me(),Vg=function(n,t,e,a){var i=n.getData(),o;if(G(a))o=a;else{var r=a.type;if(r==="min"||r==="max"||r==="average"||r==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=t.getAxis(a.yAxis!=null?"y":"x"),l=Ne(a.yAxis,a.xAxis);else{var u=Kr(a,i,t,n);s=u.valueAxis;var d=ql(i,u.valueDataDim);l=di(i,d,r)}var h=s.dim==="x"?0:1,c=1-h,p=wt(a),g={coord:[]};p.type=null,p.coord=[],p.coord[c]=-1/0,g.coord[c]=1/0;var f=e.get("precision");f>=0&&We(l)&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=g.coord[h]=l,o=[p,g,{type:r,valueIndex:a.valueIndex,value:l}]}else o=[]}var y=[Et(n,o[0]),Et(n,o[1]),W({},o[2])];return y[2].type=y[2].type||null,$e(y[2],y[0]),$e(y[2],y[1]),y};function gn(n){return!isNaN(n)&&!isFinite(n)}function Jr(n,t,e,a){var i=1-n,o=a.dimensions[n];return gn(t[i])&&gn(e[i])&&t[n]===e[n]&&a.getAxis(o).containData(t[n])}function kg(n,t){if(n.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(Jr(1,e,a,n)||Jr(0,e,a,n)))return!0}return Vt(n,t[0])&&Vt(n,t[1])}function pi(n,t,e,a,i){var o=a.coordinateSystem,r=n.getItemModel(t),s,l=Z(r.get("x"),i.getWidth()),u=Z(r.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(n.getValues(n.dimensions,t));else{var d=o.dimensions,h=n.get(d[0],t),c=n.get(d[1],t);s=o.dataToPoint([h,c])}if(Yt(o,"cartesian2d")){var p=o.getAxis("x"),g=o.getAxis("y"),d=o.dimensions;gn(n.get(d[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[e?0:1]):gn(n.get(d[1],t))&&(s[1]=g.toGlobalCoord(g.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}n.setItemLayout(t,s)}var zg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markLine");if(r){var s=r.getData(),l=fn(r).from,u=fn(r).to;l.each(function(d){pi(l,d,!0,o,i),pi(u,d,!1,o,i)}),s.each(function(d){s.setItemLayout(d,[l.getItemLayout(d),u.getItemLayout(d)])}),this.markerGroupMap.get(o.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,new Na);this.group.add(d.group);var h=Og(r,e,a),c=h.from,p=h.to,g=h.line;fn(a).from=c,fn(a).to=p,a.setData(g);var f=a.get("symbol"),y=a.get("symbolSize"),m=a.get("symbolRotate"),x=a.get("symbolOffset");G(f)||(f=[f,f]),G(y)||(y=[y,y]),G(m)||(m=[m,m]),G(x)||(x=[x,x]),h.from.each(function(_){v(c,_,!0),v(p,_,!1)}),g.each(function(_){var b=g.getItemModel(_).getModel("lineStyle").getLineStyle();g.setItemLayout(_,[c.getItemLayout(_),p.getItemLayout(_)]),b.stroke==null&&(b.stroke=c.getItemVisual(_,"style").fill),g.setItemVisual(_,{fromSymbolKeepAspect:c.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(_,"symbolOffset"),fromSymbolRotate:c.getItemVisual(_,"symbolRotate"),fromSymbolSize:c.getItemVisual(_,"symbolSize"),fromSymbol:c.getItemVisual(_,"symbol"),toSymbolKeepAspect:p.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(_,"symbolOffset"),toSymbolRotate:p.getItemVisual(_,"symbolRotate"),toSymbolSize:p.getItemVisual(_,"symbolSize"),toSymbol:p.getItemVisual(_,"symbol"),style:b})}),d.updateData(g),h.line.eachItemGraphicEl(function(_){ae(_).dataModel=a,_.traverse(function(b){ae(b).dataModel=a})});function v(_,b,I){var w=_.getItemModel(b);pi(_,b,I,e,o);var S=w.getModel("itemStyle").getItemStyle();S.fill==null&&(S.fill=ta(l,"color")),_.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Ge(w.get("symbolOffset",!0),x[I?0:1]),symbolRotate:Ge(w.get("symbolRotate",!0),m[I?0:1]),symbolSize:Ge(w.get("symbolSize"),y[I?0:1]),symbol:Ge(w.get("symbol",!0),f[I?0:1]),style:S})}this.markKeep(d),d.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t}(ci);function Og(n,t,e){var a;n?a=F(n&&n.dimensions,function(u){var d=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return W(W({},d),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new _e(a,e),o=new _e(a,e),r=new _e([],e),s=F(e.get("data"),te(Vg,t,n,e));n&&(s=Le(s,te(kg,n)));var l=Qr(!!n,a);return i.initData(F(s,function(u){return u[0]}),null,l),o.initData(F(s,function(u){return u[1]}),null,l),r.initData(F(s,function(u){return u[2]})),r.hasItemOption=!0,{from:i,to:o,line:r}}const Gg=zg;function Bg(n){n.registerComponentModel(Eg),n.registerComponentView(Gg),n.registerPreprocessor(function(t){si(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var Fg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,i){return new t(e,a,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Ke);const Hg=Fg;var yn=me(),Wg=function(n,t,e,a){var i=a[0],o=a[1];if(!(!i||!o)){var r=Et(n,i),s=Et(n,o),l=r.coord,u=s.coord;l[0]=Ne(l[0],-1/0),l[1]=Ne(l[1],-1/0),u[0]=Ne(u[0],1/0),u[1]=Ne(u[1],1/0);var d=Qi([{},r,s]);return d.coord=[r.coord,s.coord],d.x0=r.x,d.y0=r.y,d.x1=s.x,d.y1=s.y,d}};function vn(n){return!isNaN(n)&&!isFinite(n)}function es(n,t,e,a){var i=1-n;return vn(t[i])&&vn(e[i])}function Xg(n,t){var e=t.coord[0],a=t.coord[1],i={coord:e,x:t.x0,y:t.y0},o={coord:a,x:t.x1,y:t.y1};return Yt(n,"cartesian2d")?e&&a&&(es(1,e,a)||es(0,e,a))?!0:Dg(n,i,o):Vt(n,i)||Vt(n,o)}function ts(n,t,e,a,i){var o=a.coordinateSystem,r=n.getItemModel(t),s,l=Z(r.get(e[0]),i.getWidth()),u=Z(r.get(e[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var d=n.getValues(["x0","y0"],t),h=n.getValues(["x1","y1"],t),c=o.clampData(d),p=o.clampData(h),g=[];e[0]==="x0"?g[0]=c[0]>p[0]?h[0]:d[0]:g[0]=c[0]>p[0]?d[0]:h[0],e[1]==="y0"?g[1]=c[1]>p[1]?h[1]:d[1]:g[1]=c[1]>p[1]?d[1]:h[1],s=a.getMarkerPosition(g,e,!0)}else{var f=n.get(e[0],t),y=n.get(e[1],t),m=[f,y];o.clampData&&o.clampData(m,m),s=o.dataToPoint(m,!0)}if(Yt(o,"cartesian2d")){var x=o.getAxis("x"),v=o.getAxis("y"),f=n.get(e[0],t),y=n.get(e[1],t);vn(f)?s[0]=x.toGlobalCoord(x.getExtent()[e[0]==="x0"?0:1]):vn(y)&&(s[1]=v.toGlobalCoord(v.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var ns=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Yg=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,i){a.eachSeries(function(o){var r=Ke.getMarkerModelFromSeries(o,"markArea");if(r){var s=r.getData();s.each(function(l){var u=F(ns,function(h){return ts(s,l,h,o,i)});s.setItemLayout(l,u);var d=s.getItemGraphicEl(l);d.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,a,i,o){var r=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,d=u.get(s)||u.set(s,{group:new oe});this.group.add(d.group),this.markKeep(d);var h=Zg(r,e,a);a.setData(h),h.each(function(c){var p=F(ns,function(S){return ts(h,c,S,e,o)}),g=r.getAxis("x").scale,f=r.getAxis("y").scale,y=g.getExtent(),m=f.getExtent(),x=[g.parse(h.get("x0",c)),g.parse(h.get("x1",c))],v=[f.parse(h.get("y0",c)),f.parse(h.get("y1",c))];Zn(x),Zn(v);var _=!(y[0]>x[1]||y[1]<x[0]||m[0]>v[1]||m[1]<v[0]),b=!_;h.setItemLayout(c,{points:p,allClipped:b});var I=h.getItemModel(c).getModel("itemStyle").getItemStyle(),w=ta(l,"color");I.fill||(I.fill=w,be(I.fill)&&(I.fill=Nn(I.fill,.4))),I.stroke||(I.stroke=w),h.setItemVisual(c,"style",I)}),h.diff(yn(d).data).add(function(c){var p=h.getItemLayout(c);if(!p.allClipped){var g=new yt({shape:{points:p.points}});h.setItemGraphicEl(c,g),d.group.add(g)}}).update(function(c,p){var g=yn(d).data.getItemGraphicEl(p),f=h.getItemLayout(c);f.allClipped?g&&d.group.remove(g):(g?se(g,{shape:{points:f.points}},a,c):g=new yt({shape:{points:f.points}}),h.setItemGraphicEl(c,g),d.group.add(g))}).remove(function(c){var p=yn(d).data.getItemGraphicEl(c);d.group.remove(p)}).execute(),h.eachItemGraphicEl(function(c,p){var g=h.getItemModel(p),f=h.getItemVisual(p,"style");c.useStyle(h.getItemVisual(p,"style")),Fe(c,Ae(g),{labelFetcher:a,labelDataIndex:p,defaultText:h.getName(p)||"",inheritColor:be(f.fill)?Nn(f.fill,1):"#000"}),Ee(c,g),fe(c,null,null,g.get(["emphasis","disabled"])),ae(c).dataModel=a}),yn(d).data=h,d.group.silent=a.get("silent")||e.get("silent")},t.type="markArea",t}(ci);function Zg(n,t,e){var a,i,o=["x0","y0","x1","y1"];if(n){var r=F(n&&n.dimensions,function(u){var d=t.getData(),h=d.getDimensionInfo(d.mapDimension(u))||{};return W(W({},h),{name:u,ordinalMeta:null})});i=F(o,function(u,d){return{name:u,type:r[d%2].type}}),a=new _e(i,e)}else i=[{name:"value",type:"float"}],a=new _e(i,e);var s=F(e.get("data"),te(Wg,t,n,e));n&&(s=Le(s,te(Xg,n)));var l=n?function(u,d,h,c){var p=u.coord[Math.floor(c/2)][c%2];return qt(p,i[c])}:function(u,d,h,c){return qt(u.value,i[c])};return a.initData(s,null,l),a.hasItemOption=!0,a}const Ug=Yg;function jg(n){n.registerComponentModel(Hg),n.registerComponentView(Ug),n.registerPreprocessor(function(t){si(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var as={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},qg=function(){function n(t){var e=this._condVal=be(t)?new RegExp(t):$l(t)?t:null;if(e==null){var a="";J(a)}}return n.prototype.evaluate=function(t){var e=typeof t;return be(e)?this._condVal.test(t):We(e)?this._condVal.test(t+""):!1},n}(),Kg=function(){function n(){}return n.prototype.evaluate=function(){return this.value},n}(),Qg=function(){function n(){}return n.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},n}(),$g=function(){function n(){}return n.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},n}(),Jg=function(){function n(){}return n.prototype.evaluate=function(){return!this.child.evaluate()},n}(),ey=function(){function n(){}return n.prototype.evaluate=function(){for(var t=!!this.valueParser,e=this.getValue,a=e(this.valueGetterParam),i=t?this.valueParser(a):null,o=0;o<this.subCondList.length;o++)if(!this.subCondList[o].evaluate(t?i:a))return!1;return!0},n}();function fi(n,t){if(n===!0||n===!1){var e=new Kg;return e.value=n,e}var a="";return os(n)||J(a),n.and?is("and",n,t):n.or?is("or",n,t):n.not?ty(n,t):ny(n,t)}function is(n,t,e){var a=t[n],i="";G(a)||J(i),a.length||J(i);var o=n==="and"?new Qg:new $g;return o.children=F(a,function(r){return fi(r,e)}),o.children.length||J(i),o}function ty(n,t){var e=n.not,a="";os(e)||J(a);var i=new Jg;return i.child=fi(e,t),i.child||J(a),i}function ny(n,t){for(var e="",a=t.prepareGetValue(n),i=[],o=Sn(n),r=n.parser,s=r?lo(r):null,l=0;l<o.length;l++){var u=o[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var d=Ce(as,u)?as[u]:u,h=n[u],c=s?s(h):h,p=Kl(d,c)||d==="reg"&&new qg(c);p||J(e),i.push(p)}}i.length||J(e);var g=new ey;return g.valueGetterParam=a,g.valueParser=s,g.getValue=t.getValue,g.subCondList=i,g}function os(n){return qn(n)&&!Ql(n)}var ay=function(){function n(t,e){this._cond=fi(t,e)}return n.prototype.evaluate=function(){return this._cond.evaluate()},n}();function iy(n,t){return new ay(n,t)}var oy={type:"echarts:filter",transform:function(n){for(var t=n.upstream,e,a=iy(n.config,{valueGetterAttrMap:De({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Ce(s,"dimension")||J(l);var d=t.getDimensionInfo(u);return d||J(l),{dimIdx:d.index}},getValue:function(s){return t.retrieveValueFromItem(e,s.dimIdx)}}),i=[],o=0,r=t.count();o<r;o++)e=t.getRawDataItem(o),a.evaluate()&&i.push(e);return{data:i}}},ry={type:"echarts:sort",transform:function(n){var t=n.upstream,e=n.config,a="",i=ke(e);i.length||J(a);var o=[];P(i,function(d){var h=d.dimension,c=d.order,p=d.parser,g=d.incomparable;if(h==null&&J(a),c!=="asc"&&c!=="desc"&&J(a),g&&g!=="min"&&g!=="max"){var f="";J(f)}if(c!=="asc"&&c!=="desc"){var y="";J(y)}var m=t.getDimensionInfo(h);m||J(a);var x=p?lo(p):null;p&&!x&&J(a),o.push({dimIdx:m.index,parser:x,comparator:new Jl(c,g)})});var r=t.sourceFormat;r!==ji&&r!==eu&&J(a);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(d,h){for(var c=0;c<o.length;c++){var p=o[c],g=t.retrieveValueFromItem(d,p.dimIdx),f=t.retrieveValueFromItem(h,p.dimIdx);p.parser&&(g=p.parser(g),f=p.parser(f));var y=p.comparator.evaluate(g,f);if(y!==0)return y}return 0}),{data:s}}};function sy(n){n.registerTransform(oy),n.registerTransform(ry)}var ly=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,a,i){n.prototype.init.call(this,e,a,i),this._sourceManager=new tu(this),uo(this)},t.prototype.mergeOption=function(e,a){n.prototype.mergeOption.call(this,e,a),uo(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:nu},t}(Zt),uy=function(n){E(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t}(Ut);function dy(n){n.registerComponentModel(ly),n.registerComponentView(uy)}function rs(n,t,e){var a=$n.createCanvas(),i=t.getWidth(),o=t.getHeight(),r=a.style;return r&&(r.position="absolute",r.left="0",r.top="0",r.width=i+"px",r.height=o+"px",a.setAttribute("data-zr-dom-id",n)),a.width=i*e,a.height=o*e,a}var hy=function(n){au(t,n);function t(e,a,i){var o=n.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null;var r;i=i||co,typeof e=="string"?r=rs(e,a,i):qn(e)&&(r=e,e=r.id),o.id=e,o.dom=r;var s=r.style;return s&&(ho(r),r.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),o.painter=a,o.dpr=i,o}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=rs("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,a,i,o){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r=[],s=this.maxRepaintRectCount,l=!1,u=new de(0,0,0,0);function d(x){if(!(!x.isFinite()||x.isZero()))if(r.length===0){var v=new de(0,0,0,0);v.copy(x),r.push(v)}else{for(var _=!1,b=1/0,I=0,w=0;w<r.length;++w){var S=r[w];if(S.intersect(x)){var M=new de(0,0,0,0);M.copy(S),M.union(x),r[w]=M,_=!0;break}else if(l){u.copy(x),u.union(S);var D=x.width*x.height,L=S.width*S.height,T=u.width*u.height,N=T-D-L;N<b&&(b=N,I=w)}}if(l&&(r[I].union(x),_=!0),!_){var v=new de(0,0,0,0);v.copy(x),r.push(v)}l||(l=r.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var c=e[h];if(c){var p=c.shouldBePainted(i,o,!0,!0),g=c.__isRendered&&(c.__dirty&na||!p)?c.getPrevPaintRect():null;g&&d(g);var f=p&&(c.__dirty&na||!c.__isRendered)?c.getPaintRect():null;f&&d(f)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var c=a[h],p=c.shouldBePainted(i,o,!0,!0);if(c&&(!p||!c.__zr)&&c.__isRendered){var g=c.getPrevPaintRect();g&&d(g)}}var y;do{y=!1;for(var h=0;h<r.length;){if(r[h].isZero()){r.splice(h,1);continue}for(var m=h+1;m<r.length;)r[h].intersect(r[m])?(y=!0,r[h].union(r[m]),r.splice(m,1)):m++;h++}}while(y);return this._paintRects=r,r},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,a){var i=this.dpr,o=this.dom,r=o.style,s=this.domBack;r&&(r.width=e+"px",r.height=a+"px"),o.width=e*i,o.height=a*i,s&&(s.width=e*i,s.height=a*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(e,a,i){var o=this.dom,r=this.ctx,s=o.width,l=o.height;a=a||this.clearColor;var u=this.motionBlur&&!e,d=this.lastFrameAlpha,h=this.dpr,c=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,s/h,l/h));var p=this.domBack;function g(f,y,m,x){if(r.clearRect(f,y,m,x),a&&a!=="transparent"){var v=void 0;if(ou(a)){var _=a.global||a.__width===m&&a.__height===x;v=_&&a.__canvasGradient||ru(r,a,{x:0,y:0,width:m,height:x}),a.__canvasGradient=v,a.__width=m,a.__height=x}else su(a)&&(a.scaleX=a.scaleX||h,a.scaleY=a.scaleY||h,v=lu(r,a,{dirty:function(){c.setUnpainted(),c.__painter.refresh()}}));r.save(),r.fillStyle=v||a,r.fillRect(f,y,m,x),r.restore()}u&&(r.save(),r.globalAlpha=d,r.drawImage(p,f,y,m,x),r.restore())}!i||u?g(0,0,s,l):i.length&&P(i,function(f){g(f.x*h,f.y*h,f.width*h,f.height*h)})},t}(iu);const gi=hy;var ss=1e5,tt=314159,mn=.01,cy=.001;function py(n){return n?n.__builtin__?!0:!(typeof n.resize!="function"||typeof n.refresh!="function"):!1}function fy(n,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+n+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var gy=function(){function n(t,e,a,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=a=W({},a||{}),this.dpr=a.devicePixelRatio||co,this._singleCanvas=o,this.root=t;var r=t.style;r&&(ho(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(o){var u=t,d=u.width,h=u.height;a.width!=null&&(d=a.width),a.height!=null&&(h=a.height),this.dpr=a.devicePixelRatio||1,u.width=d*this.dpr,u.height=h*this.dpr,this._width=d,this._height=h;var c=new gi(u,this,this.dpr);c.__builtin__=!0,c.initContext(),l[tt]=c,c.zlevel=tt,s.push(tt),this._domRoot=t}else{this._width=Qt(t,0,a),this._height=Qt(t,1,a);var p=this._domRoot=fy(this._width,this._height);t.appendChild(p)}}return n.prototype.getType=function(){return"canvas"},n.prototype.isSingleCanvas=function(){return this._singleCanvas},n.prototype.getViewportRoot=function(){return this._domRoot},n.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},n.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),a=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,a,t,this._redrawId);for(var o=0;o<i.length;o++){var r=i[o],s=this._layers[r];if(!s.__builtin__&&s.refresh){var l=o===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},n.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},n.prototype._paintHoverList=function(t){var e=t.length,a=this._hoverlayer;if(a&&a.clear(),!!e){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o,r=0;r<e;r++){var s=t[r];s.__inHover&&(a||(a=this._hoverlayer=this.getLayer(ss)),o||(o=a.ctx,o.save()),Kt(o,s,i,r===e-1))}o&&o.restore()}},n.prototype.getHoverLayer=function(){return this.getLayer(ss)},n.prototype.paintOne=function(t,e){uu(t,e)},n.prototype._paintList=function(t,e,a,i){if(this._redrawId===i){a=a||!1,this._updateLayerStatus(t);var o=this._doPaintList(t,e,a),r=o.finished,s=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),r)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;du(function(){l._paintList(t,e,a,i)})}}},n.prototype._compositeManually=function(){var t=this.getLayer(tt).ctx,e=this._domRoot.width,a=this._domRoot.height;t.clearRect(0,0,e,a),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,a)})},n.prototype._doPaintList=function(t,e,a){for(var i=this,o=[],r=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||a)&&o.push(u)}for(var d=!0,h=!1,c=function(f){var y=o[f],m=y.ctx,x=r&&y.createRepaintRects(t,e,p._width,p._height),v=a?y.__startIndex:y.__drawIndex,_=!a&&y.incremental&&Date.now,b=_&&Date.now(),I=y.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(y.__startIndex===y.__endIndex)y.clear(!1,I,x);else if(v===y.__startIndex){var w=t[v];(!w.incremental||!w.notClear||a)&&y.clear(!1,I,x)}v===-1&&(v=y.__startIndex);var S,M=function(N){var C={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(S=v;S<y.__endIndex;S++){var A=t[S];if(A.__inHover&&(h=!0),i._doPaintEl(A,y,r,N,C,S===y.__endIndex-1),_){var R=Date.now()-b;if(R>15)break}}C.prevElClipPaths&&m.restore()};if(x)if(x.length===0)S=y.__endIndex;else for(var D=p.dpr,L=0;L<x.length;++L){var T=x[L];m.save(),m.beginPath(),m.rect(T.x*D,T.y*D,T.width*D,T.height*D),m.clip(),M(T),m.restore()}else m.save(),M(),m.restore();y.__drawIndex=S,y.__drawIndex<y.__endIndex&&(d=!1)},p=this,g=0;g<o.length;g++)c(g);return so.wxa&&P(this._layers,function(f){f&&f.ctx&&f.ctx.draw&&f.ctx.draw()}),{finished:d,needsRefreshHover:h}},n.prototype._doPaintEl=function(t,e,a,i,o,r){var s=e.ctx;if(a){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(Kt(s,t,o,r),t.setPrevPaintRect(l))}else Kt(s,t,o,r)},n.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=tt);var a=this._layers[t];return a||(a=new gi("zr_"+t,this,this.dpr),a.zlevel=t,a.__builtin__=!0,this._layerConfig[t]?$e(a,this._layerConfig[t],!0):this._layerConfig[t-mn]&&$e(a,this._layerConfig[t-mn],!0),e&&(a.virtual=e),this.insertLayer(t,a),a.initContext()),a},n.prototype.insertLayer=function(t,e){var a=this._layers,i=this._zlevelList,o=i.length,r=this._domRoot,s=null,l=-1;if(!a[t]&&py(e)){if(o>0&&t>i[0]){for(l=0;l<o-1&&!(i[l]<t&&i[l+1]>t);l++);s=a[i[l]]}if(i.splice(l+1,0,t),a[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?r.insertBefore(e.dom,u.nextSibling):r.appendChild(e.dom)}else r.firstChild?r.insertBefore(e.dom,r.firstChild):r.appendChild(e.dom);e.__painter=this}},n.prototype.eachLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var o=a[i];t.call(e,this._layers[o],o)}},n.prototype.eachBuiltinLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var o=a[i],r=this._layers[o];r.__builtin__&&t.call(e,r,o)}},n.prototype.eachOtherLayer=function(t,e){for(var a=this._zlevelList,i=0;i<a.length;i++){var o=a[i],r=this._layers[o];r.__builtin__||t.call(e,r,o)}},n.prototype.getLayers=function(){return this._layers},n.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,c){h.__dirty=h.__used=!1});function e(h){o&&(o.__endIndex!==h&&(o.__dirty=!0),o.__endIndex=h)}if(this._singleCanvas)for(var a=1;a<t.length;a++){var i=t[a];if(i.zlevel!==t[a-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var o=null,r=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,d=void 0;s!==u&&(s=u,r=0),i.incremental?(d=this.getLayer(u+cy,this._needsManuallyCompositing),d.incremental=!0,r=1):d=this.getLayer(u+(r>0?mn:0),this._needsManuallyCompositing),d.__builtin__||hu("ZLevel "+u+" has been used by unkown layer "+d.id),d!==o&&(d.__used=!0,d.__startIndex!==l&&(d.__dirty=!0),d.__startIndex=l,d.incremental?d.__drawIndex=-1:d.__drawIndex=l,e(l),o=d),i.__dirty&na&&!i.__inHover&&(d.__dirty=!0,d.incremental&&d.__drawIndex<0&&(d.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(t){t.clear()},n.prototype.setBackgroundColor=function(t){this._backgroundColor=t,P(this._layers,function(e){e.setUnpainted()})},n.prototype.configLayer=function(t,e){if(e){var a=this._layerConfig;a[t]?$e(a[t],e,!0):a[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];if(o===t||o===t+mn){var r=this._layers[o];$e(r,a[t],!0)}}}},n.prototype.delLayer=function(t){var e=this._layers,a=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],a.splice(xe(a,t),1))},n.prototype.resize=function(t,e){if(this._domRoot.style){var a=this._domRoot;a.style.display="none";var i=this._opts,o=this.root;if(t!=null&&(i.width=t),e!=null&&(i.height=e),t=Qt(o,0,i),e=Qt(o,1,i),a.style.display="",this._width!==t||e!==this._height){a.style.width=t+"px",a.style.height=e+"px";for(var r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(tt).resize(t,e)}return this},n.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},n.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},n.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[tt].dom;var e=new gi("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var a=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,o=e.dom.height;this.eachLayer(function(h){h.__builtin__?a.drawImage(h.dom,0,0,i,o):h.renderToCanvas&&(a.save(),h.renderToCanvas(a),a.restore())})}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var d=s[l];Kt(a,d,r,l===u-1)}return e.dom},n.prototype.getWidth=function(){return this._width},n.prototype.getHeight=function(){return this._height},n}();const yy=gy;function vy(n){n.registerPainter("canvas",yy)}var Pe=cu.CMD;function ct(n,t){return Math.abs(n-t)<1e-5}function yi(n){var t=n.data,e=n.len(),a=[],i,o=0,r=0,s=0,l=0;function u(N,C){i&&i.length>2&&a.push(i),i=[N,C]}function d(N,C,A,R){ct(N,A)&&ct(C,R)||i.push(N,C,A,R,A,R)}function h(N,C,A,R,V,k){var z=Math.abs(C-N),H=Math.tan(z/4)*4/3,B=C<N?-1:1,K=Math.cos(N),Q=Math.sin(N),q=Math.cos(C),ee=Math.sin(C),ve=K*V+A,Y=Q*k+R,O=q*V+A,j=ee*k+R,U=V*H*B,$=k*H*B;i.push(ve-U*Q,Y+$*K,O+U*ee,j-$*q,O,j)}for(var c,p,g,f,y=0;y<e;){var m=t[y++],x=y===1;switch(x&&(o=t[y],r=t[y+1],s=o,l=r,(m===Pe.L||m===Pe.C||m===Pe.Q)&&(i=[s,l])),m){case Pe.M:o=s=t[y++],r=l=t[y++],u(s,l);break;case Pe.L:c=t[y++],p=t[y++],d(o,r,c,p),o=c,r=p;break;case Pe.C:i.push(t[y++],t[y++],t[y++],t[y++],o=t[y++],r=t[y++]);break;case Pe.Q:c=t[y++],p=t[y++],g=t[y++],f=t[y++],i.push(o+2/3*(c-o),r+2/3*(p-r),g+2/3*(c-g),f+2/3*(p-f),g,f),o=g,r=f;break;case Pe.A:var v=t[y++],_=t[y++],b=t[y++],I=t[y++],w=t[y++],S=t[y++]+w;y+=1;var M=!t[y++];c=Math.cos(w)*b+v,p=Math.sin(w)*I+_,x?(s=c,l=p,u(s,l)):d(o,r,c,p),o=Math.cos(S)*b+v,r=Math.sin(S)*I+_;for(var D=(M?-1:1)*Math.PI/2,L=w;M?L>S:L<S;L+=D){var T=M?Math.max(L+D,S):Math.min(L+D,S);h(L,T,v,_,b,I)}break;case Pe.R:s=o=t[y++],l=r=t[y++],c=s+t[y++],p=l+t[y++],u(c,l),d(c,l,c,p),d(c,p,s,p),d(s,p,s,l),d(s,l,c,l);break;case Pe.Z:i&&d(o,r,s,l),o=s,r=l;break}}return i&&i.length>2&&a.push(i),a}function vi(n,t,e,a,i,o,r,s,l,u){if(ct(n,e)&&ct(t,a)&&ct(i,r)&&ct(o,s)){l.push(r,s);return}var d=2/u,h=d*d,c=r-n,p=s-t,g=Math.sqrt(c*c+p*p);c/=g,p/=g;var f=e-n,y=a-t,m=i-r,x=o-s,v=f*f+y*y,_=m*m+x*x;if(v<h&&_<h){l.push(r,s);return}var b=c*f+p*y,I=-c*m-p*x,w=v-b*b,S=_-I*I;if(w<h&&b>=0&&S<h&&I>=0){l.push(r,s);return}var M=[],D=[];$t(n,e,i,r,.5,M),$t(t,a,o,s,.5,D),vi(M[0],D[0],M[1],D[1],M[2],D[2],M[3],D[3],l,u),vi(M[4],D[4],M[5],D[5],M[6],D[6],M[7],D[7],l,u)}function my(n,t){var e=yi(n),a=[];t=t||1;for(var i=0;i<e.length;i++){var o=e[i],r=[],s=o[0],l=o[1];r.push(s,l);for(var u=2;u<o.length;){var d=o[u++],h=o[u++],c=o[u++],p=o[u++],g=o[u++],f=o[u++];vi(s,l,d,h,c,p,g,f,r,t),s=g,l=f}a.push(r)}return a}function ls(n,t,e){var a=n[t],i=n[1-t],o=Math.abs(a/i),r=Math.ceil(Math.sqrt(o*e)),s=Math.floor(e/r);s===0&&(s=1,r=e);for(var l=[],u=0;u<r;u++)l.push(s);var d=r*s,h=e-d;if(h>0)for(var u=0;u<h;u++)l[u%r]+=1;return l}function us(n,t,e){for(var a=n.r0,i=n.r,o=n.startAngle,r=n.endAngle,s=Math.abs(r-o),l=s*i,u=i-a,d=l>Math.abs(u),h=ls([l,u],d?0:1,t),c=(d?s:u)/h.length,p=0;p<h.length;p++)for(var g=(d?u:s)/h[p],f=0;f<h[p];f++){var y={};d?(y.startAngle=o+c*p,y.endAngle=o+c*(p+1),y.r0=a+g*f,y.r=a+g*(f+1)):(y.startAngle=o+g*f,y.endAngle=o+g*(f+1),y.r0=a+c*p,y.r=a+c*(p+1)),y.clockwise=n.clockwise,y.cx=n.cx,y.cy=n.cy,e.push(y)}}function xy(n,t,e){for(var a=n.width,i=n.height,o=a>i,r=ls([a,i],o?0:1,t),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",d=o?"y":"x",h=n[s]/r.length,c=0;c<r.length;c++)for(var p=n[l]/r[c],g=0;g<r[c];g++){var f={};f[u]=c*h,f[d]=g*p,f[s]=h,f[l]=p,f.x+=n.x,f.y+=n.y,e.push(f)}}function ds(n,t,e,a){return n*a-e*t}function _y(n,t,e,a,i,o,r,s){var l=e-n,u=a-t,d=r-i,h=s-o,c=ds(d,h,l,u);if(Math.abs(c)<1e-6)return null;var p=n-i,g=t-o,f=ds(p,g,d,h)/c;return f<0||f>1?null:new Ye(f*l+n,f*u+t)}function by(n,t,e){var a=new Ye;Ye.sub(a,e,t),a.normalize();var i=new Ye;Ye.sub(i,n,t);var o=i.dot(a);return o}function pt(n,t){var e=n[n.length-1];e&&e[0]===t[0]&&e[1]===t[1]||n.push(t)}function Iy(n,t,e){for(var a=n.length,i=[],o=0;o<a;o++){var r=n[o],s=n[(o+1)%a],l=_y(r[0],r[1],s[0],s[1],t.x,t.y,e.x,e.y);l&&i.push({projPt:by(l,t,e),pt:l,idx:o})}if(i.length<2)return[{points:n},{points:n}];i.sort(function(y,m){return y.projPt-m.projPt});var u=i[0],d=i[i.length-1];if(d.idx<u.idx){var h=u;u=d,d=h}for(var c=[u.pt.x,u.pt.y],p=[d.pt.x,d.pt.y],g=[c],f=[p],o=u.idx+1;o<=d.idx;o++)pt(g,n[o].slice());pt(g,p),pt(g,c);for(var o=d.idx+1;o<=u.idx+a;o++)pt(f,n[o%a].slice());return pt(f,c),pt(f,p),[{points:g},{points:f}]}function hs(n){var t=n.points,e=[],a=[];zt(t,e,a);var i=new de(e[0],e[1],a[0]-e[0],a[1]-e[1]),o=i.width,r=i.height,s=i.x,l=i.y,u=new Ye,d=new Ye;return o>r?(u.x=d.x=s+o/2,u.y=l,d.y=l+r):(u.y=d.y=l+r/2,u.x=s,d.x=s+o),Iy(t,u,d)}function xn(n,t,e,a){if(e===1)a.push(t);else{var i=Math.floor(e/2),o=n(t);xn(n,o[0],i,a),xn(n,o[1],e-i,a)}return a}function wy(n,t){for(var e=[],a=0;a<t;a++)e.push(aa(n));return e}function Sy(n,t){t.setStyle(n.style),t.z=n.z,t.z2=n.z2,t.zlevel=n.zlevel}function My(n){for(var t=[],e=0;e<n.length;)t.push([n[e++],n[e++]]);return t}function Ly(n,t){var e=[],a=n.shape,i;switch(n.type){case"rect":xy(a,t,e),i=He;break;case"sector":us(a,t,e),i=Jn;break;case"circle":us({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},t,e),i=Jn;break;default:var o=n.getComputedTransform(),r=o?Math.sqrt(Math.max(o[0]*o[0]+o[1]*o[1],o[2]*o[2]+o[3]*o[3])):1,s=F(my(n.getUpdatedPathProxy(),r),function(m){return My(m)}),l=s.length;if(l===0)xn(hs,{points:s[0]},t,e);else if(l===t)for(var u=0;u<l;u++)e.push({points:s[u]});else{var d=0,h=F(s,function(m){var x=[],v=[];zt(m,x,v);var _=(v[1]-x[1])*(v[0]-x[0]);return d+=_,{poly:m,area:_}});h.sort(function(m,x){return x.area-m.area});for(var c=t,u=0;u<l;u++){var p=h[u];if(c<=0)break;var g=u===l-1?c:Math.ceil(p.area/d*t);g<0||(xn(hs,{points:p.poly},g,e),c-=g)}}i=yt;break}if(!i)return wy(n,t);for(var f=[],u=0;u<e.length;u++){var y=new i;y.setShape(e[u]),Sy(n,y),f.push(y)}return f}function Dy(n,t){var e=n.length,a=t.length;if(e===a)return[n,t];for(var i=[],o=[],r=e<a?n:t,s=Math.min(e,a),l=Math.abs(a-e)/6,u=(s-2)/6,d=Math.ceil(l/u)+1,h=[r[0],r[1]],c=l,p=2;p<s;){var g=r[p-2],f=r[p-1],y=r[p++],m=r[p++],x=r[p++],v=r[p++],_=r[p++],b=r[p++];if(c<=0){h.push(y,m,x,v,_,b);continue}for(var I=Math.min(c,d-1)+1,w=1;w<=I;w++){var S=w/I;$t(g,y,x,_,S,i),$t(f,m,v,b,S,o),g=i[3],f=o[3],h.push(i[1],o[1],i[2],o[2],g,f),y=i[5],m=o[5],x=i[6],v=o[6]}c-=I-1}return r===n?[h,t]:[n,h]}function cs(n,t){for(var e=n.length,a=n[e-2],i=n[e-1],o=[],r=0;r<t.length;)o[r++]=a,o[r++]=i;return o}function Cy(n,t){for(var e,a,i,o=[],r=[],s=0;s<Math.max(n.length,t.length);s++){var l=n[s],u=t[s],d=void 0,h=void 0;l?u?(e=Dy(l,u),d=e[0],h=e[1],a=d,i=h):(h=cs(i||l,l),d=l):(d=cs(a||u,u),h=u),o.push(d),r.push(h)}return[o,r]}function ps(n){for(var t=0,e=0,a=0,i=n.length,o=0,r=i-2;o<i;r=o,o+=2){var s=n[r],l=n[r+1],u=n[o],d=n[o+1],h=s*d-u*l;t+=h,e+=(s+u)*h,a+=(l+d)*h}return t===0?[n[0]||0,n[1]||0]:[e/t/3,a/t/3,t]}function Ty(n,t,e,a){for(var i=(n.length-2)/6,o=1/0,r=0,s=n.length,l=s-2,u=0;u<i;u++){for(var d=u*6,h=0,c=0;c<s;c+=2){var p=c===0?d:(d+c-2)%l+2,g=n[p]-e[0],f=n[p+1]-e[1],y=t[c]-a[0],m=t[c+1]-a[1],x=y-g,v=m-f;h+=x*x+v*v}h<o&&(o=h,r=u)}return r}function Ay(n){for(var t=[],e=n.length,a=0;a<e;a+=2)t[a]=n[e-a-2],t[a+1]=n[e-a-1];return t}function Ny(n,t,e,a){for(var i=[],o,r=0;r<n.length;r++){var s=n[r],l=t[r],u=ps(s),d=ps(l);o==null&&(o=u[2]<0!=d[2]<0);var h=[],c=[],p=0,g=1/0,f=[],y=s.length;o&&(s=Ay(s));for(var m=Ty(s,l,u,d)*6,x=y-2,v=0;v<x;v+=2){var _=(m+v)%x+2;h[v+2]=s[_]-u[0],h[v+3]=s[_+1]-u[1]}if(h[0]=s[m]-u[0],h[1]=s[m+1]-u[1],e>0)for(var b=a/e,I=-a/2;I<=a/2;I+=b){for(var w=Math.sin(I),S=Math.cos(I),M=0,v=0;v<s.length;v+=2){var D=h[v],L=h[v+1],T=l[v]-d[0],N=l[v+1]-d[1],C=T*S-N*w,A=T*w+N*S;f[v]=C,f[v+1]=A;var R=C-D,V=A-L;M+=R*R+V*V}if(M<g){g=M,p=I;for(var k=0;k<f.length;k++)c[k]=f[k]}}else for(var z=0;z<y;z+=2)c[z]=l[z]-d[0],c[z+1]=l[z+1]-d[1];i.push({from:h,to:c,fromCp:u,toCp:d,rotation:-p})}return i}function _n(n){return n.__isCombineMorphing}var fs="__mOriginal_";function bn(n,t,e){var a=fs+t,i=n[a]||n[t];n[a]||(n[a]=n[t]);var o=e.replace,r=e.after,s=e.before;n[t]=function(){var l=arguments,u;return s&&s.apply(this,l),o?u=o.apply(this,l):u=i.apply(this,l),r&&r.apply(this,l),u}}function kt(n,t){var e=fs+t;n[e]&&(n[t]=n[e],n[e]=null)}function gs(n,t){for(var e=0;e<n.length;e++)for(var a=n[e],i=0;i<a.length;){var o=a[i],r=a[i+1];a[i++]=t[0]*o+t[2]*r+t[4],a[i++]=t[1]*o+t[3]*r+t[5]}}function ys(n,t){var e=n.getUpdatedPathProxy(),a=t.getUpdatedPathProxy(),i=Cy(yi(e),yi(a)),o=i[0],r=i[1],s=n.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&gs(o,s),l&&gs(r,l),bn(t,"updateTransform",{replace:u}),t.transform=null;var d=Ny(o,r,10,Math.PI),h=[];bn(t,"buildPath",{replace:function(c){for(var p=t.__morphT,g=1-p,f=[],y=0;y<d.length;y++){var m=d[y],x=m.from,v=m.to,_=m.rotation*p,b=m.fromCp,I=m.toCp,w=Math.sin(_),S=Math.cos(_);pu(f,b,I,p);for(var M=0;M<x.length;M+=2){var D=x[M],L=x[M+1],T=v[M],N=v[M+1],C=D*g+T*p,A=L*g+N*p;h[M]=C*S-A*w+f[0],h[M+1]=C*w+A*S+f[1]}var R=h[0],V=h[1];c.moveTo(R,V);for(var M=2;M<x.length;){var T=h[M++],N=h[M++],k=h[M++],z=h[M++],H=h[M++],B=h[M++];R===T&&V===N&&k===H&&z===B?c.lineTo(H,B):c.bezierCurveTo(T,N,k,z,H,B),R=H,V=B}}}})}function mi(n,t,e){if(!n||!t)return t;var a=e.done,i=e.during;ys(n,t),t.__morphT=0;function o(){kt(t,"buildPath"),kt(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},ce({during:function(r){t.dirtyShape(),i&&i(r)},done:function(){o(),a&&a()}},e)),t}function Py(n,t,e,a,i,o){var r=16;n=i===e?0:Math.round(32767*(n-e)/(i-e)),t=o===a?0:Math.round(32767*(t-a)/(o-a));for(var s=0,l,u=(1<<r)/2;u>0;u/=2){var d=0,h=0;(n&u)>0&&(d=1),(t&u)>0&&(h=1),s+=u*u*(3*d^h),h===0&&(d===1&&(n=u-1-n,t=u-1-t),l=n,n=t,t=l)}return s}function In(n){var t=1/0,e=1/0,a=-1/0,i=-1/0,o=F(n,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),d=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return t=Math.min(d,t),e=Math.min(h,e),a=Math.max(d,a),i=Math.max(h,i),[d,h]}),r=F(o,function(s,l){return{cp:s,z:Py(s[0],s[1],t,e,a,i),path:n[l]}});return r.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function vs(n){return Ly(n.path,n.count)}function xi(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Ry(n,t,e){var a=[];function i(b){for(var I=0;I<b.length;I++){var w=b[I];_n(w)?i(w.childrenRef()):w instanceof ye&&a.push(w)}}i(n);var o=a.length;if(!o)return xi();var r=e.dividePath||vs,s=r({path:t,count:o});if(s.length!==o)return xi();a=In(a),s=In(s);for(var l=e.done,u=e.during,d=e.individualDelay,h=new Mi,c=0;c<o;c++){var p=a[c],g=s[c];g.parent=t,g.copyTransform(h),d||ys(p,g)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function f(b){for(var I=0;I<s.length;I++)s[I].addSelfToZr(b)}bn(t,"addSelfToZr",{after:function(b){f(b)}}),bn(t,"removeSelfFromZr",{after:function(b){for(var I=0;I<s.length;I++)s[I].removeSelfFromZr(b)}});function y(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,kt(t,"addSelfToZr"),kt(t,"removeSelfFromZr")}var m=s.length;if(d)for(var x=m,v=function(){x--,x===0&&(y(),l&&l())},c=0;c<m;c++){var _=d?ce({delay:(e.delay||0)+d(c,m,a[c],s[c]),done:v},e):e;mi(a[c],s[c],_)}else t.__morphT=0,t.animateTo({__morphT:1},ce({during:function(b){for(var I=0;I<m;I++){var w=s[I];w.__morphT=t.__morphT,w.dirtyShape()}u&&u(b)},done:function(){y();for(var b=0;b<n.length;b++)kt(n[b],"updateTransform");l&&l()}},e));return t.__zr&&f(t.__zr),{fromIndividuals:a,toIndividuals:s,count:m}}function Ey(n,t,e){var a=t.length,i=[],o=e.dividePath||vs;function r(p){for(var g=0;g<p.length;g++){var f=p[g];_n(f)?r(f.childrenRef()):f instanceof ye&&i.push(f)}}if(_n(n)){r(n.childrenRef());var s=i.length;if(s<a)for(var l=0,u=s;u<a;u++)i.push(aa(i[l++%s]));i.length=a}else{i=o({path:n,count:a});for(var d=n.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(d);if(i.length!==a)return xi()}i=In(i),t=In(t);for(var h=e.individualDelay,u=0;u<a;u++){var c=h?ce({delay:(e.delay||0)+h(u,a,i[u],t[u])},e):e;mi(i[u],t[u],c)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function ms(n){return G(n[0])}function xs(n,t){for(var e=[],a=n.length,i=0;i<a;i++)e.push({one:n[i],many:[]});for(var i=0;i<t.length;i++){var o=t[i].length,r=void 0;for(r=0;r<o;r++)e[r%a].many.push(t[i][r])}for(var s=0,i=a-1;i>=0;i--)if(!e[i].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var o=l.length,u=Math.ceil(o/2);e[i].many=l.slice(u,o),e[s].many=l.slice(0,u),s++}return e}var Vy={clone:function(n){for(var t=[],e=1-Math.pow(1-n.path.style.opacity,1/n.count),a=0;a<n.count;a++){var i=aa(n.path);i.setStyle("opacity",e),t.push(i)}return t},split:null};function _i(n,t,e,a,i,o){if(!n.length||!t.length)return;var r=ia("update",a,i);if(!(r&&r.duration>0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},r),u,d;ms(n)&&(u=n,d=t),ms(t)&&(u=t,d=n);function h(m,x,v,_,b){var I=m.many,w=m.one;if(I.length===1&&!b){var S=x?I[0]:w,M=x?w:I[0];if(_n(S))h({many:[S],one:M},!0,v,_,!0);else{var D=s?ce({delay:s(v,_)},l):l;mi(S,M,D),o(S,M,S,M,D)}}else for(var L=ce({dividePath:Vy[e],individualDelay:s&&function(V,k,z,H){return s(V+v,_)}},l),T=x?Ry(I,w,L):Ey(w,I,L),N=T.fromIndividuals,C=T.toIndividuals,A=N.length,R=0;R<A;R++){var D=s?ce({delay:s(R,A)},l):l;o(N[R],C[R],x?I[R]:m.one,x?m.one:I[R],D)}}for(var c=u?u===n:n.length>t.length,p=u?xs(d,u):xs(c?t:n,[c?n:t]),g=0,f=0;f<p.length;f++)g+=p[f].many.length;for(var y=0,f=0;f<p.length;f++)h(p[f],c,y,g),y+=p[f].many.length}function nt(n){if(!n)return[];if(G(n)){for(var t=[],e=0;e<n.length;e++)t.push(nt(n[e]));return t}var a=[];return n.traverse(function(i){i instanceof ye&&!i.disableMorphing&&!i.invisible&&!i.ignore&&a.push(i)}),a}var _s=1e4,ky=me();function zy(n){for(var t=n.dimensions,e=0;e<t.length;e++){var a=n.getDimensionInfo(t[e]);if(a&&a.otherDims.itemGroupId===0)return t[e]}}function bs(n){var t=[];return P(n,function(e){var a=e.data;if(!(a.count()>_s))for(var i=a.getIndices(),o=zy(a),r=0;r<i.length;r++)t.push({dataGroupId:e.dataGroupId,data:a,dim:e.dim||o,divide:e.divide,dataIndex:r})}),t}function bi(n,t,e){n.traverse(function(a){a instanceof ye&&Te(a,{style:{opacity:0}},t,{dataIndex:e,isFrom:!0})})}function Ii(n){if(n.parent){var t=n.getComputedTransform();n.setLocalTransform(t),n.parent.remove(n)}}function ft(n){n.stopAnimation(),n.isGroup&&n.traverse(function(t){t.stopAnimation()})}function Oy(n,t,e){var a=ia("update",e,t);a&&n.traverse(function(i){if(i instanceof An){var o=fu(i);o&&i.animateFrom({style:o},a)}})}function Gy(n,t){var e=n.length;if(e!==t.length)return!1;for(var a=0;a<e;a++){var i=n[a],o=t[a];if(i.data.getId(i.dataIndex)!==o.data.getId(o.dataIndex))return!1}return!0}function Is(n,t,e){var a=bs(n),i=bs(t);function o(m,x,v,_,b){(v||m)&&x.animateFrom({style:v&&v!==m?W(W({},v.style),m.style):m.style},b)}function r(m){for(var x=0;x<m.length;x++)if(m[x].dim)return m[x].dim}var s=r(a),l=r(i),u=!1;function d(m,x){return function(v){var _=v.data,b=v.dataIndex;if(x)return _.getId(b);var I=v.dataGroupId,w=m?s||l:l||s,S=w&&_.getDimensionInfo(w),M=S&&S.ordinalMeta;if(S){var D=_.get(S.name,b);return M&&M.categories[D]||D+""}var L=_.getRawDataItem(b);return L&&L.groupId?L.groupId+"":I||_.getId(b)}}var h=Gy(a,i),c={};if(!h)for(var p=0;p<i.length;p++){var g=i[p],f=g.data.getItemGraphicEl(g.dataIndex);f&&(c[f.id]=!0)}function y(m,x){var v=a[x],_=i[m],b=_.data.hostModel,I=v.data.getItemGraphicEl(v.dataIndex),w=_.data.getItemGraphicEl(_.dataIndex);if(I===w){w&&Oy(w,_.dataIndex,b);return}I&&c[I.id]||w&&(ft(w),I?(ft(I),Ii(I),u=!0,_i(nt(I),nt(w),_.divide,b,m,o)):bi(w,b,m))}new ot(a,i,d(!0,h),d(!1,h),null,"multiple").update(y).updateManyToOne(function(m,x){var v=i[m],_=v.data,b=_.hostModel,I=_.getItemGraphicEl(v.dataIndex),w=Le(F(x,function(S){return a[S].data.getItemGraphicEl(a[S].dataIndex)}),function(S){return S&&S!==I&&!c[S.id]});I&&(ft(I),w.length?(P(w,function(S){ft(S),Ii(S)}),u=!0,_i(nt(w),nt(I),v.divide,b,m,o)):bi(I,b,v.dataIndex))}).updateOneToMany(function(m,x){var v=a[x],_=v.data.getItemGraphicEl(v.dataIndex);if(!(_&&c[_.id])){var b=Le(F(m,function(w){return i[w].data.getItemGraphicEl(i[w].dataIndex)}),function(w){return w&&w!==_}),I=i[m[0]].data.hostModel;b.length&&(P(b,function(w){return ft(w)}),_?(ft(_),Ii(_),u=!0,_i(nt(_),nt(b),v.divide,I,m[0],o)):P(b,function(w){return bi(w,I,m[0])}))}}).updateManyToMany(function(m,x){new ot(x,m,function(v){return a[v].data.getId(a[v].dataIndex)},function(v){return i[v].data.getId(i[v].dataIndex)}).update(function(v,_){y(m[v],x[_])}).execute()}).execute(),u&&P(t,function(m){var x=m.data,v=x.hostModel,_=v&&e.getViewOfSeriesModel(v),b=ia("update",v,0);_&&v.isAnimationEnabled()&&b&&b.duration>0&&_.group.traverse(function(I){I instanceof ye&&!I.animators.length&&I.animateFrom({style:{opacity:0}},b)})})}function ws(n){var t=n.getModel("universalTransition").get("seriesKey");return t||n.id}function Ss(n){return G(n)?n.sort().join(","):n}function Qe(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function By(n,t){var e=De(),a=De(),i=De();return P(n.oldSeries,function(o,r){var s=n.oldDataGroupIds[r],l=n.oldData[r],u=ws(o),d=Ss(u);a.set(d,{dataGroupId:s,data:l}),G(u)&&P(u,function(h){i.set(h,{key:d,dataGroupId:s,data:l})})}),P(t.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var r=o.get("dataGroupId"),s=o.getData(),l=ws(o),u=Ss(l),d=a.get(u);if(d)e.set(u,{oldSeries:[{dataGroupId:d.dataGroupId,divide:Qe(d.data),data:d.data}],newSeries:[{dataGroupId:r,divide:Qe(s),data:s}]});else if(G(l)){var h=[];P(l,function(g){var f=a.get(g);f.data&&h.push({dataGroupId:f.dataGroupId,divide:Qe(f.data),data:f.data})}),h.length&&e.set(u,{oldSeries:h,newSeries:[{dataGroupId:r,data:s,divide:Qe(s)}]})}else{var c=i.get(l);if(c){var p=e.get(c.key);p||(p={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:Qe(c.data)}],newSeries:[]},e.set(c.key,p)),p.newSeries.push({dataGroupId:r,data:s,divide:Qe(s)})}}}}),e}function Ms(n,t){for(var e=0;e<n.length;e++){var a=t.seriesIndex!=null&&t.seriesIndex===n[e].seriesIndex||t.seriesId!=null&&t.seriesId===n[e].id;if(a)return e}}function Fy(n,t,e,a){var i=[],o=[];P(ke(n.from),function(r){var s=Ms(t.oldSeries,r);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Qe(t.oldData[s]),dim:r.dimension})}),P(ke(n.to),function(r){var s=Ms(e.updatedSeries,r);if(s>=0){var l=e.updatedSeries[s].getData();o.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Qe(l),dim:r.dimension})}}),i.length>0&&o.length>0&&Is(i,o,a)}function Hy(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){P(ke(a.seriesTransition),function(i){P(ke(i.to),function(o){for(var r=a.updatedSeries,s=0;s<r.length;s++)(o.seriesIndex!=null&&o.seriesIndex===r[s].seriesIndex||o.seriesId!=null&&o.seriesId===r[s].id)&&(r[s][oa]=!0)})})}),n.registerUpdateLifecycle("series:transition",function(t,e,a){var i=ky(e);if(i.oldSeries&&a.updatedSeries&&a.optionChanged){var o=a.seriesTransition;if(o)P(ke(o),function(p){Fy(p,i,a,e)});else{var r=By(i,a);P(r.keys(),function(p){var g=r.get(p);Is(g.oldSeries,g.newSeries,e)})}P(a.updatedSeries,function(p){p[oa]&&(p[oa]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],d=i.oldData=[],h=0;h<s.length;h++){var c=s[h].getData();c.count()<_s&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),d.push(c))}})}X([vy]),X([gu]),X([yu,vu,mu,xu,_u,bu,wd,oh,Rh,Iu,Xh,ac,Ac,Wc,up,yp,Ep,Xp,wu,$p,cf,Ff]),X(Su),X(Mu),X(Lu),X(ig),X(Ui),X(Du),X(Cu),X(Tu),X(Au),X(ro),X(Ig),X(Nu),X(Pu),X(Pg),X(Bg),X(jg),X(Ru),X(Eu),X(Vu),X(ku),X(zu),X(Ou),X(Gu),X(Bu),X(sy),X(dy),X(Hy),X(Zu);
|