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=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;gx.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;xe&&(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=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=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=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;_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;t1;)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;iCo||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&&su[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;_=0;l--){var u=i[a==="asc"?r-l-1:l].getValue();u/e*ts[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;oa&&(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;hFi&&(u=Fi),o=s}ua&&(a=t);var o=a%2?a+2:a+3;i=[];for(var r=0;r0&&(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].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;i0}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=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=0&&t.call(e,a[o],o)},n.prototype.eachEdge=function(t,e){for(var a=this.edges,i=a.length,o=0;o=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=0&&l.node2.dataIndex>=0});for(var o=0,r=i.length;o=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 "+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=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=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;xh-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;s0;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;d0&&(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;++or&&(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();of){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;a0?"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:e0?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;s0&&(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=0&&!(o[l]<=a);l--);l=Math.min(l,r-2)}else{for(l=s;la);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;r0){e.moveTo(i[r++],i[r++]);for(var l=1;l0){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;u0)for(var h=o[u++],c=o[u++],p=1;p0){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;u0&&(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;d0&&(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 ")})},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;g0){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=0;s--){var l=t[s].interval;if(l[0]<=r&&r<=l[1]){o=s;break}}return s>=0&&s=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;Lh[1]||Ac[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;So&&(o=s),a.push(s)}for(var u=0;uo&&(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)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&&CMath.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;H1;)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=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=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=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=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]t[0][1]&&(t[0][1]=o[0]),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=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]v[1]||m[1]":"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=s)}}for(var h=this.__startIndex;h15)break}}C.prevElClipPaths&&m.restore()};if(x)if(x.length===0)S=y.__endIndex;else for(var D=p.dpr,L=0;L0&&t>i[0]){for(l=0;lt);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;i0?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;i2&&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=CS:L2&&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=0&&S=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;i0)for(var u=0;uMath.abs(u),h=ls([l,u],d?0:1,t),c=(d?s:u)/h.length,p=0;pi,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;c1?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;or?(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;a0)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;v0;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=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;a0))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;Rt.length,p=u?xs(d,u):xs(c?t:n,[c?n:t]),g=0,f=0;f_s))for(var i=a.getIndices(),o=zy(a),r=0;r0&&_.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=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