Map.02a4b953.js 231 KB

1
  1. var gn=(r,e,t)=>new Promise((a,n)=>{var i=s=>{try{l(t.next(s))}catch(u){n(u)}},o=s=>{try{l(t.throw(s))}catch(u){n(u)}},l=s=>s.done?a(s.value):Promise.resolve(s.value).then(i,o);l((t=t.apply(r,e)).next())});import{j as ml,a as Sl,r as bl,p as xl,dC as wl,o as Il,e as Ll,ag as _l}from"./index.ae52ebae.js";import{m as bt,B as Et,i as nt,k as Aa,g as et,p as O,a as Dl,f as It,s as Al,b as Tl,h as Cl,e as N,c as Ki,d as Qi,j as yn,l as Ml,n as Pl,r as Ft,o as _t,q as Dt,t as it,v as ji,T as Ji,w as he,_ as G,P as pt,G as rt,R as Ta,x as cr,V as Ca,y as to,z as eo,A as ro,C as ut,S as ao,D as na,H as El,E as Nl,F as no,I as ht,J as At,K as Ke,L as ia,M as tt,N as Vl,O as W,Q as F,U as H,W as fr,X as Ma,Y as mt,Z as gt,$ as Xt,a0 as zt,a1 as vt,a2 as io,a3 as De,a4 as Rl,a5 as re,a6 as Rt,a7 as kl,a8 as Gl,a9 as Ae,aa as Ht,ab as Vt,ac as hr,ad as st,ae as zl,af as fe,ag as lt,ah as mn,ai as Ol,aj as oo,ak as Bl,al as Sn,am as ze,an as bn,ao as ae,ap as Ot,aq as $l,ar as Pa,as as qt,at as lo,au as oa,av as so,aw as Pt,ax as xn,ay as Bt,az as pr,aA as Zt,aB as ke,aC as Fl,aD as Hl,aE as ve,aF as wn,aG as Wl,aH as ft,aI as la,aJ as Mt,aK as Qe,aL as sa,aM as uo,aN as Ea,aO as Na,aP as vo,aQ as co,aR as Te,aS as dr,aT as Ul,aU as fo,aV as Zl,aW as Va,aX as pe,aY as Ge,aZ as ho,a_ as Ra,a$ as ka,b0 as Yl,b1 as Xl,b2 as In,b3 as Ga,b4 as ql,b5 as Ln,b6 as Ce,b7 as za,b8 as Oa,b9 as de,ba as Wt,bb as Kl,bc as Ql,bd as Ba,be as jl,bf as Jl,bg as U,bh as po,bi as ts,bj as ua,bk as va,bl as es,bm as rs,bn as ca,bo as xr,bp as go,bq as J,br as $a,bs as yo,bt as Fa,bu as wr,bv as as,bw as mo,bx as ns,by as be,bz as is,bA as _n,bB as os,bC as So,bD as Dn,bE as gr,bF as ls,bG as bo,bH as xo,bI as An,bJ as ss,bK as us,bL as Ha,bM as Tn,bN as Cn,bO as Mn,bP as Lt,bQ as vs,bR as cs,bS as fs,bT as hs,bU as ps,bV as ds,bW as gs,bX as ys,bY as ms,bZ as Ss,b_ as bs,b$ as xs,c0 as wo,c1 as ws,c2 as Is,c3 as Ls,c4 as yr,c5 as _s,c6 as Ds,c7 as As,c8 as Ts,c9 as Cs,ca as Ms,cb as Ps,cc as Es,cd as Ns,ce as Vs,cf as mr,cg as Io,ch as Rs,ci as ge,cj as Oe,ck as Me,cl as ks,cm as Gs,cn as zs,co as Os,cp as Bs,cq as $s,cr as fa,cs as Fs,ct as Hs,cu as Ws,cv as Us,cw as Zs,cx as Ys,cy as je,cz as Xs,cA as qs,cB as Wa,cC as Ks,cD as Lo,cE as Qs,cF as js,cG as Js,cH as tu,cI as eu,cJ as ru,cK as Pn,cL as au,cM as nu,cN as Je,cO as Ua,cP as iu,cQ as Za,cR as Ir,cS as ou,cT as lu,cU as su,cV as uu,cW as vu,cX as cu,cY as fu,cZ as hu,c_ as pu,c$ as du,d0 as gu,d1 as yu,d2 as mu,d3 as Su,d4 as bu,d5 as xu,d6 as wu,d7 as Iu,d8 as Lu,d9 as _u,da as Du,db as Au,dc as Tu,dd as Cu,de as Mu,df as Pu,dg as Eu,u as Nu,dh as Vu}from"./useECharts.514ffc33.js";import{m as Ru}from"./data.29a5f341.js";function ku(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function Gu(r,e){var t=r.label,a=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:ku(a&&a.shape.points)}}var En=["align","verticalAlign","width","height","fontSize"],dt=new Ji,Lr=bt(),zu=bt();function Be(r,e,t){for(var a=0;a<t.length;a++){var n=t[a];e[n]!=null&&(r[n]=e[n])}}var $e=["x","y","rotation"],Ou=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,a,n,i){var o=n.style,l=n.__hostTarget,s=l.textConfig||{},u=n.getComputedTransform(),v=n.getBoundingRect().plain();Et.applyTransform(v,v,u),u?dt.setLocalTransform(u):(dt.x=dt.y=dt.rotation=dt.originX=dt.originY=0,dt.scaleX=dt.scaleY=1);var c=n.__hostTarget,f;if(c){f=c.getBoundingRect().plain();var h=c.getComputedTransform();Et.applyTransform(f,f,h)}var d=f&&c.getTextGuideLine();this._labelList.push({label:n,labelLine:d,seriesModel:a,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:v,hostRect:f,priority:f?f.width*f.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:d&&d.ignore,x:dt.x,y:dt.y,scaleX:dt.scaleX,scaleY:dt.scaleY,rotation:dt.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:n.cursor,attachedPos:s.position,attachedRot:s.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var a=e.__model,n=a.get("labelLayout");!(nt(n)||Aa(n).length)||e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),l=et(i);o&&!o.disableLabelLayout&&t._addLabel(l.dataIndex,l.dataType,a,o,n)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),a=e.getHeight();function n(y,b){return function(){yn(y,b)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],l=o.label,s=l.__hostTarget,u=o.defaultAttr,v=void 0;nt(o.layoutOption)?v=o.layoutOption(Gu(o,s)):v=o.layoutOption,v=v||{},o.computedLayoutOption=v;var c=Math.PI/180;s&&s.setTextConfig({local:!1,position:v.x!=null||v.y!=null?null:u.attachedPos,rotation:v.rotate!=null?v.rotate*c:u.attachedRot,offset:[v.dx||0,v.dy||0]});var f=!1;if(v.x!=null?(l.x=O(v.x,t),l.setStyle("x",0),f=!0):(l.x=u.x,l.setStyle("x",u.style.x)),v.y!=null?(l.y=O(v.y,a),l.setStyle("y",0),f=!0):(l.y=u.y,l.setStyle("y",u.style.y)),v.labelLinePoints){var h=s.getTextGuideLine();h&&(h.setShape({points:v.labelLinePoints}),f=!1)}var d=Lr(l);d.needsUpdateLabelLine=f,l.rotation=v.rotate!=null?v.rotate*c:u.rotation,l.scaleX=u.scaleX,l.scaleY=u.scaleY;for(var p=0;p<En.length;p++){var g=En[p];l.setStyle(g,v[g]!=null?v[g]:u.style[g])}if(v.draggable){if(l.draggable=!0,l.cursor="move",s){var m=o.seriesModel;if(o.dataIndex!=null){var S=o.seriesModel.getData(o.dataType);m=S.getItemModel(o.dataIndex)}l.on("drag",n(s,m.getModel("labelLine")))}}else l.off("drag"),l.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),a=e.getHeight(),n=Dl(this._labelList),i=It(n,function(s){return s.layoutOption.moveOverlap==="shiftX"}),o=It(n,function(s){return s.layoutOption.moveOverlap==="shiftY"});Al(i,0,t),Tl(o,0,a);var l=It(n,function(s){return s.layoutOption.hideOverlap});Cl(l)},r.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(t){var a=t.__model,n=t.ignoreLabelLineUpdate,i=a.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var l=!n,s=o.getTextContent();!l&&s&&(l=Lr(s).needsUpdateLabelLine),l&&e._updateLabelLine(o,a),i&&e._animateLabels(o,a)})})},r.prototype._updateLabelLine=function(e,t){var a=e.getTextContent(),n=et(e),i=n.dataIndex;if(a&&i!=null){var o=t.getData(n.dataType),l=o.getItemModel(i),s={},u=o.getItemVisual(i,"style"),v=o.getVisual("drawType");s.stroke=u[v];var c=l.getModel("labelLine");Ki(e,Qi(l),s),yn(e,c)}},r.prototype._animateLabels=function(e,t){var a=e.getTextContent(),n=e.getTextGuideLine();if(a&&(e.forceLabelAnimation||!a.ignore&&!a.invisible&&!e.disableLabelAnimation&&!Ml(e))){var i=Lr(a),o=i.oldLayout,l=et(e),s=l.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},v=t.getData(l.dataType);if(o){a.attr(o);var f=e.prevStates;f&&(Dt(f,"select")>=0&&a.attr(i.oldLayoutSelect),Dt(f,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),it(a,u,t,s)}else if(a.attr(u),!Pl(a).valueAnimation){var c=Ft(a.style.opacity,1);a.style.opacity=0,_t(a,{style:{opacity:c}},t,s)}if(i.oldLayout=u,a.states.select){var h=i.oldLayoutSelect={};Be(h,u,$e),Be(h,a.states.select,$e)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};Be(d,u,$e),Be(d,a.states.emphasis,$e)}ji(a,s,v,t,t)}if(n&&!n.ignore&&!n.invisible){var i=zu(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),it(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,_t(n,{style:{strokePercent:1}},t)),i.oldLayout=p}},r}(),Bu=Ou,_r=bt();function $u(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=_r(t).labelManager;n||(n=_r(t).labelManager=new Bu),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=_r(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}function Fu(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],a,n;a=t.pop();)if(n=a.children,a.isExpand&&n.length)for(var i=n.length,o=i-1;o>=0;o--){var l=n[o];l.hierNode={defaultAncestor:null,ancestor:l,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(l)}}function Hu(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){Zu(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=Yu(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function Wu(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Nn(r){return arguments.length?r:Ku}function xe(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function Uu(r,e){return he(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Zu(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function Yu(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],l=e,s=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,c=l.hierNode.modifier;l=Dr(l),i=Ar(i),l&&i;){n=Dr(n),o=Ar(o),n.hierNode.ancestor=r;var f=l.hierNode.prelim+c-i.hierNode.prelim-u+a(l,i);f>0&&(qu(Xu(l,r,t),r,f),u+=f,s+=f),c+=l.hierNode.modifier,u+=i.hierNode.modifier,s+=n.hierNode.modifier,v+=o.hierNode.modifier}l&&!Dr(n)&&(n.hierNode.thread=l,n.hierNode.modifier+=c-s),i&&!Ar(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=r)}return t}function Dr(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Ar(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function Xu(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function qu(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function Ku(r,e){return r.parentNode===e.parentNode?1:2}var Qu=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),ju=function(r){G(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Qu},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,l=n[0],s=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(l[0],l[1]);return}var u=a.orient,v=u==="TB"||u==="BT"?0:1,c=1-v,f=O(a.forkPosition,1),h=[];h[v]=o[v],h[c]=o[c]+(s[c]-o[c])*f,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(l[0],l[1]),h[v]=l[v],t.lineTo(h[0],h[1]),h[v]=s[v],t.lineTo(h[0],h[1]),t.lineTo(s[0],s[1]);for(var d=1;d<i-1;d++){var p=n[d];t.moveTo(p[0],p[1]),h[v]=p[v],t.lineTo(h[0],h[1])}},e}(pt),Ju=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new rt,t}return e.prototype.init=function(t,a){this._controller=new Ta(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,n){var i=t.getData(),o=t.layoutInfo,l=this._mainGroup,s=t.get("layout");s==="radial"?(l.x=o.x+o.width/2,l.y=o.y+o.height/2):(l.x=o.x,l.y=o.y),this._updateViewCoordSys(t,n),this._updateController(t,a,n);var u=this._data;i.diff(u).add(function(v){Vn(i,v)&&Rn(i,v,null,l,t)}).update(function(v,c){var f=u.getItemGraphicEl(c);if(!Vn(i,v)){f&&Gn(u,c,f,l,t);return}Rn(i,v,f,l,t)}).remove(function(v){var c=u.getItemGraphicEl(v);c&&Gn(u,v,c,l,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(v,c){v.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:c})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,a){var n=t.getData(),i=[];n.each(function(c){var f=n.getItemLayout(c);f&&!isNaN(f.x)&&!isNaN(f.y)&&i.push([+f.x,+f.y])});var o=[],l=[];cr(i,o,l);var s=this._min,u=this._max;l[0]-o[0]===0&&(o[0]=s?s[0]:o[0]-1,l[0]=u?u[0]:l[0]+1),l[1]-o[1]===0&&(o[1]=s?s[1]:o[1]-1,l[1]=u?u[1]:l[1]+1);var v=t.coordinateSystem=new Ca;v.zoomLimit=t.get("scaleLimit"),v.setBoundingRect(o[0],o[1],l[0]-o[0],l[1]-o[1]),v.setCenter(t.get("center"),a),v.setZoom(t.get("zoom")),this.group.attr({x:v.x,y:v.y,scaleX:v.scaleX,scaleY:v.scaleY}),this._min=o,this._max=l},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,l=this._controllerHost,s=this.group;o.setPointerChecker(function(u,v,c){var f=s.getBoundingRect();return f.applyTransform(s.transform),f.contain(v,c)&&!to(u,n,t)}),o.enable(t.get("roam")),l.zoomLimit=t.get("scaleLimit"),l.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){eo(l,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){ro(l,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(t),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var a=t.getData(),n=this._getNodeGlobalScale(t);a.eachItemGraphicEl(function(i,o){i.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var a=t.coordinateSystem;if(a.type!=="view")return 1;var n=this._nodeScaleRatio,i=a.scaleX||1,o=a.getZoom(),l=(o-1)*n+1;return l/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(ut);function Vn(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function Rn(r,e,t,a,n){var i=!t,o=r.tree.getNodeByDataIndex(e),l=o.getModel(),s=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?s:"#fff",v=r.tree.root,c=o.parentNode===v?o:o.parentNode||o,f=r.getItemGraphicEl(c.dataIndex),h=c.getLayout(),d=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:h,p=o.getLayout();i?(t=new ao(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=d.x,t.y=d.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=p.rawX,t.__radialRawY=p.rawY,a.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,it(t,{x:p.x,y:p.y},n);var g=t.getSymbolPath();if(n.get("layout")==="radial"){var m=v.children[0],S=m.getLayout(),y=m.children.length,b=void 0,x=void 0;if(p.x===S.x&&o.isExpand===!0&&m.children.length){var w={x:(m.children[0].getLayout().x+m.children[y-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[y-1].getLayout().y)/2};b=Math.atan2(w.y-S.y,w.x-S.x),b<0&&(b=Math.PI*2+b),x=w.x<S.x,x&&(b=b-Math.PI)}else b=Math.atan2(p.y-S.y,p.x-S.x),b<0&&(b=Math.PI*2+b),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(x=p.x<S.x,x&&(b=b-Math.PI)):(x=p.x>S.x,x||(b=b-Math.PI));var I=x?"left":"right",L=l.getModel("label"),_=L.get("rotate"),D=_*(Math.PI/180),A=g.getTextContent();A&&(g.setTextConfig({position:L.get("position")||I,rotation:_==null?-b:D,origin:"center"}),A.setStyle("verticalAlign","middle"))}var M=l.get(["emphasis","focus"]),E=M==="relative"?na(o.getAncestorsIndices(),o.getDescendantIndices()):M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():null;E&&(et(t).focus=E),tv(n,o,v,t,d,h,p,a),t.__edge&&(t.onHoverStateChange=function(T){if(T!=="blur"){var C=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);C&&C.hoverState===El||Nl(t.__edge,T)}})}function tv(r,e,t,a,n,i,o,l){var s=e.getModel(),u=r.get("edgeShape"),v=r.get("layout"),c=r.getOrient(),f=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),d=s.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=a.__edge=new no({shape:ha(v,c,f,n,n)})),it(p,{shape:ha(v,c,f,i,o)},r));else if(u==="polyline"&&v==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,m=[],S=0;S<g.length;S++){var y=g[S].getLayout();m.push([y.x,y.y])}p||(p=a.__edge=new ju({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:c,forkPosition:h}})),it(p,{shape:{parentPoint:[o.x,o.y],childPoints:m}},r)}p&&!(u==="polyline"&&!e.isExpand)&&(p.useStyle(ht({strokeNoScale:!0,fill:null},d)),At(p,s,"lineStyle"),Ke(p),l.add(p))}function kn(r,e,t,a,n){var i=e.tree.root,o=_o(i,r),l=o.source,s=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(!!u){var v=e.getItemGraphicEl(l.dataIndex),c=v.__edge,f=u.__edge||(l.isExpand===!1||l.children.length===1?c:void 0),h=a.get("edgeShape"),d=a.get("layout"),p=a.get("orient"),g=a.get(["lineStyle","curveness"]);f&&(h==="curve"?ia(f,{shape:ha(d,p,g,s,s),style:{opacity:0}},a,{cb:function(){t.remove(f)},removeOpt:n}):h==="polyline"&&a.get("layout")==="orthogonal"&&ia(f,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},a,{cb:function(){t.remove(f)},removeOpt:n}))}}function _o(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,a;a=t.getLayout(),a==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:a}}function Gn(r,e,t,a,n){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,l=_o(o,i).sourceLayout,s={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};ia(t,{x:l.x+1,y:l.y+1},n,{cb:function(){a.remove(t),r.setItemGraphicEl(e,null)},removeOpt:s}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:s}),i.children.forEach(function(u){kn(u,r,a,n,s)}),kn(i,r,a,n,s)}function ha(r,e,t,a,n){var i,o,l,s,u,v,c,f;if(r==="radial"){u=a.rawX,c=a.rawY,v=n.rawX,f=n.rawY;var h=xe(u,c),d=xe(u,c+(f-c)*t),p=xe(v,f+(c-f)*t),g=xe(v,f);return{x1:h.x||0,y1:h.y||0,x2:g.x||0,y2:g.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=a.x,c=a.y,v=n.x,f=n.y,(e==="LR"||e==="RL")&&(i=u+(v-u)*t,o=c,l=v+(u-v)*t,s=f),(e==="TB"||e==="BT")&&(i=u,o=c+(f-c)*t,l=v,s=f+(c-f)*t);return{x1:u,y1:c,x2:v,y2:f,cpx1:i,cpy1:o,cpx2:l,cpy2:s}}var ev=Ju,St=bt();function Do(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,Ao(e,t,r),N(t,function(a){N(e.TRANSFERABLE_METHODS,function(n){a.wrapMethod(n,tt(rv,r))})}),e.wrapMethod("cloneShallow",tt(nv,r)),N(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,tt(av,r))}),Vl(t[e.dataType]===e)}function rv(r,e){if(lv(this)){var t=W({},St(this).datas);t[this.dataType]=e,Ao(e,t,r)}else Ya(e,this.dataType,St(this).mainData,r);return e}function av(r,e){return r.struct&&r.struct.update(),e}function nv(r,e){return N(St(e).datas,function(t,a){t!==e&&Ya(t.cloneShallow(),a,e,r)}),e}function iv(r){var e=St(this).mainData;return r==null||e==null?e:St(e).datas[r]}function ov(){var r=St(this).mainData;return r==null?[{data:r}]:F(Aa(St(r).datas),function(e){return{type:e,data:St(r).datas[e]}})}function lv(r){return St(r).mainData===r}function Ao(r,e,t){St(r).datas={},N(e,function(a,n){Ya(a,n,r,t)})}function Ya(r,e,t,a){St(t).datas[e]=r,St(r).mainData=t,r.dataType=e,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=r),r.getLinkedData=iv,r.getLinkedDataAll=ov}var sv=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,a){nt(e)&&(a=t,t=e,e=null),e=e||{},gt(e)&&(e={order:e});var n=e.order||"preorder",i=this[e.attr||"children"],o;n==="preorder"&&(o=t.call(a,this));for(var l=0;!o&&l<i.length;l++)i[l].eachNode(e,t,a);n==="postorder"&&t.call(a,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var a=0;a<this.children.length;a++){var n=this.children[a];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t<n;t++){var i=a[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,a=this.children,n=a.length;t<n;t++){var i=a[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],a=e?this:this.parentNode;a;)t.push(a),a=a.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),uv=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,a){this.root.eachNode(e,t,a)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,a=0,n=t.length;a<n;a++)t[a].dataIndex=-1;for(var a=0,n=e.count();a<n;a++)t[e.getRawIndex(a)].dataIndex=a},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,a){var n=new r(t),i=[],o=1;l(e);function l(v,c){var f=v.value;o=Math.max(o,H(f)?f.length:1),i.push(v);var h=new sv(fr(v.name,""),n);c?vv(h,c):n.root=h,n._nodes.push(h);var d=v.children;if(d)for(var p=0;p<d.length;p++)l(d[p],h)}n.root.updateDepthAndHeight(0);var s=Ma(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new mt(s,t);return u.initData(i),a&&a(u),Do({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},r}();function vv(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}var Xa=uv;function Pe(r,e,t){if(r&&Dt(e,r.type)>=0){var a=t.getData().tree.root,n=r.targetNode;if(gt(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function To(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function qa(r,e){var t=To(r);return Dt(t,e)>=0}function Sr(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var cv=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Xt(n,this,this.ecModel),o=Xa.createTree(a,this,l);function l(c){c.wrapMethod("getItemModel",function(f,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(f.parentModel=i),f})}var s=0;o.eachNode("preorder",function(c){c.depth>s&&(s=c.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:s;return o.root.eachNode("preorder",function(c){var f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.collapsed:c.depth<=v}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],l=i.getNodeByDataIndex(t),s=l.getValue(),u=l.name;l&&l!==o;)u=l.parentNode.name+"."+u,l=l.parentNode;return zt("nameValue",{name:u,value:s,noValue:isNaN(s)||s==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Sr(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(vt),fv=cv;function hv(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var l=0;l<o.length;l++)a.push(o[l])}for(;i=n.pop();)e(i,t)}function ye(r,e){for(var t=[r],a;a=t.pop();)if(e(a),a.isExpand){var n=a.children;if(n.length)for(var i=n.length-1;i>=0;i--)t.push(n[i])}}function pv(r,e){r.eachSeriesByType("tree",function(t){dv(t,e)})}function dv(r,e){var t=Uu(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=Nn(function(y,b){return(y.parentNode===b.parentNode?1:2)/y.depth})):(n=t.width,i=t.height,o=Nn());var l=r.getData().tree.root,s=l.children[0];if(s){Fu(l),hv(s,Hu,o),l.hierNode.modifier=-s.hierNode.prelim,ye(s,Wu);var u=s,v=s,c=s;ye(s,function(y){var b=y.getLayout().x;b<u.getLayout().x&&(u=y),b>v.getLayout().x&&(v=y),y.depth>c.depth&&(c=y)});var f=u===v?1:o(u,v)/2,h=f-u.getLayout().x,d=0,p=0,g=0,m=0;if(a==="radial")d=n/(v.getLayout().x+f+h),p=i/(c.depth-1||1),ye(s,function(y){g=(y.getLayout().x+h)*d,m=(y.depth-1)*p;var b=xe(g,m);y.setLayout({x:b.x,y:b.y,rawX:g,rawY:m},!0)});else{var S=r.getOrient();S==="RL"||S==="LR"?(p=i/(v.getLayout().x+f+h),d=n/(c.depth-1||1),ye(s,function(y){m=(y.getLayout().x+h)*p,g=S==="LR"?(y.depth-1)*d:n-(y.depth-1)*d,y.setLayout({x:g,y:m},!0)})):(S==="TB"||S==="BT")&&(d=n/(v.getLayout().x+f+h),p=i/(c.depth-1||1),ye(s,function(y){g=(y.getLayout().x+h)*d,m=S==="TB"?(y.depth-1)*p:i-(y.depth-1)*p,y.setLayout({x:g,y:m},!0)}))}}}function gv(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),l=t.ensureUniqueItemVisual(n.dataIndex,"style");W(l,o)})})}function yv(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=io(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function mv(r){r.registerChartView(ev),r.registerSeriesModel(fv),r.registerLayout(pv),r.registerVisual(gv),yv(r)}var zn=["treemapZoomToNode","treemapRender","treemapMove"];function Sv(r){for(var e=0;e<zn.length;e++)r.registerAction({type:zn[e],update:"updateView"},De);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,a){a.eachComponent({mainType:"series",subType:"treemap",query:t},n);function n(i,o){var l=["treemapZoomToNode","treemapRootToNode"],s=Pe(t,l,i);if(s){var u=i.getViewRoot();u&&(t.direction=qa(u,s.node)?"rollUp":"drillDown"),i.resetViewRoot(s.node)}}})}function Co(r){var e=r.getData(),t=e.tree,a={};t.eachNode(function(n){for(var i=n;i&&i.depth>1;)i=i.parentNode;var o=Rl(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var bv=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};Mo(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},l=new Xt({itemStyle:o},this,a);i=t.levels=xv(i,a);var s=F(i||[],function(c){return new Xt(c,l,a)},this),u=Xa.createTree(n,this,v);function v(c){c.wrapMethod("getItemModel",function(f,h){var d=u.getNodeByDataIndex(h),p=d?s[d.depth]:null;return f.parentModel=p||l,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),l=i.getName(t);return zt("nameValue",{name:l,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Sr(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=re(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){Co(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\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:[]},e}(vt);function Mo(r){var e=0;N(r.children,function(a){Mo(a);var n=a.value;H(n)&&(n=n[0]),e+=n});var t=r.value;H(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),H(r.value)?r.value[0]=t:r.value=t}function xv(r,e){var t=Rt(e.get("color")),a=Rt(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var n,i;N(r,function(l){var s=new Xt(l),u=s.get("color"),v=s.get("decal");(s.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(s.get(["itemStyle","decal"])||v&&v!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}var wv=bv,Iv=8,On=8,Tr=5,Lv=function(){function r(e){this.group=new rt,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var l=i.getModel("itemStyle"),s=i.getModel("emphasis"),u=l.getModel("textStyle"),v=s.getModel(["itemStyle","textStyle"]),c={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,c,u),this._renderContent(e,c,l,s,u,v,n),kl(o,c.pos,c.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=fr(n.getModel().get("name"),""),o=a.getTextRect(i),l=Math.max(o.width+Iv*2,t.emptyItemWidth);t.totalWidth+=l+On,t.renderList.push({node:n,text:i,width:l})}},r.prototype._renderContent=function(e,t,a,n,i,o,l){for(var s=0,u=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),c=Gl(t.pos,t.box),f=t.totalWidth,h=t.renderList,d=n.getModel("itemStyle").getItemStyle(),p=h.length-1;p>=0;p--){var g=h[p],m=g.node,S=g.width,y=g.text;f>c.width&&(f-=S-u,S=u,y=null);var b=new Ae({shape:{points:_v(s,0,S,v,p===h.length-1,p===0)},style:ht(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ht({style:Vt(i,{text:y})}),textConfig:{position:"inside"},z2:hr*1e4,onclick:tt(l,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=Vt(o,{text:y}),b.ensureState("emphasis").style=d,st(b,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(b),Dv(b,e,m),s+=S+On}},r.prototype.remove=function(){this.group.removeAll()},r}();function _v(r,e,t,a,n,i){var o=[[n?r:r-Tr,e],[r+t,e],[r+t,e+a],[n?r:r-Tr,e+a]];return!i&&o.splice(2,0,[r+t+Tr,e+a/2]),!n&&o.push([r,e+a/2]),o}function Dv(r,e,t){et(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Sr(t,e)}}var Av=Lv,Tv=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;n<i;n++){var o=this._storage[n];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:a,aborted:a})}return this},r}();function Cv(){return new Tv}var pa=rt,Bn=qt,$n=3,Fn="label",Hn="upperLabel",Mv=hr*10,Pv=hr*2,Ev=hr*3,Jt=zl([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Wn=function(r){var e=Jt(r);return e.stroke=e.fill=e.lineWidth=null,e},tr=bt(),Nv=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=me(),t}return e.prototype.render=function(t,a,n,i){var o=a.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Dt(o,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=a;var l=["treemapZoomToNode","treemapRootToNode"],s=Pe(i,l,t),u=i&&i.type,v=t.layoutInfo,c=!this._oldTree,f=this._storage,h=u==="treemapRootToNode"&&s&&f?{rootNodeGroup:f.nodeGroup[s.node.getRawIndex()],direction:i.direction}:null,d=this._giveContainerGroup(v),p=t.get("animation"),g=this._doRender(d,t,h);p&&!c&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,t,h):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(t,n,s)}},e.prototype._giveContainerGroup=function(t){var a=this._containerGroup;return a||(a=this._containerGroup=new pa,this._initEvents(a),this.group.add(a)),a.x=t.x,a.y=t.y,a},e.prototype._doRender=function(t,a,n){var i=a.getData().tree,o=this._oldTree,l=me(),s=me(),u=this._storage,v=[];function c(g,m,S,y){return Vv(a,s,u,n,l,v,g,m,S,y)}h(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var f=d(u);return this._oldTree=i,this._storage=s,{lastsForAnimation:l,willDeleteEls:f,renderFinally:p};function h(g,m,S,y,b){y?(m=g,N(g,function(I,L){!I.isRemoved()&&w(L,L)})):new fe(m,g,x,x).add(w).update(w).remove(tt(w,null)).execute();function x(I){return I.getId()}function w(I,L){var _=I!=null?g[I]:null,D=L!=null?m[L]:null,A=c(_,D,S,b);A&&h(_&&_.viewChildren||[],D&&D.viewChildren||[],A,y,b+1)}}function d(g){var m=me();return g&&N(g,function(S,y){var b=m[y];N(S,function(x){x&&(b.push(x),tr(x).willDelete=!0)})}),m}function p(){N(f,function(g){N(g,function(m){m.parent&&m.parent.remove(m)})}),N(v,function(g){g.invisible=!0,g.dirty()})}},e.prototype._doAnimation=function(t,a,n,i){var o=n.get("animationDurationUpdate"),l=n.get("animationEasing"),s=(nt(o)?0:o)||0,u=(nt(l)?null:l)||"cubicOut",v=Cv();N(a.willDeleteEls,function(c,f){N(c,function(h,d){if(!h.invisible){var p=h.parent,g,m=tr(p);if(i&&i.direction==="drillDown")g=p===i.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var S=0,y=0;m.willDelete||(S=m.nodeWidth/2,y=m.nodeHeight/2),g=f==="nodeGroup"?{x:S,y,style:{opacity:0}}:{shape:{x:S,y,width:0,height:0},style:{opacity:0}}}g&&v.add(h,g,s,0,u)}})}),N(this._storage,function(c,f){N(c,function(h,d){var p=a.lastsForAnimation[f][d],g={};!p||(h instanceof rt?p.oldX!=null&&(g.x=h.x,g.y=h.y,h.x=p.oldX,h.y=p.oldY):(p.oldShape&&(g.shape=W({},h.shape),h.setShape(p.oldShape)),p.fadein?(h.setStyle("opacity",0),g.style={opacity:1}):h.style.opacity!==1&&(g.style={opacity:1})),v.add(h,g,s,0,u))})},this),this._state="animating",v.finished(lt(function(){this._state="ready",a.renderFinally()},this)).start()},e.prototype._resetController=function(t){var a=this._controller;a||(a=this._controller=new Ta(t.getZr()),a.enable(this.seriesModel.get("roam")),a.on("pan",lt(this._onPan,this)),a.on("zoom",lt(this._onZoom,this)));var n=new Et(0,0,t.getWidth(),t.getHeight());a.setPointerChecker(function(i,o,l){return n.contain(o,l)})},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>$n||Math.abs(t.dy)>$n)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var l=new Et(o.x,o.y,o.width,o.height),s=this.seriesModel.layoutInfo;a-=s.x,n-=s.y;var u=Bl();mn(u,u,[-a,-n]),Ol(u,u,[t.scale,t.scale]),mn(u,u,[a,n]),l.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(!!i){var o=a.findTarget(n.offsetX,n.offsetY);if(!!o){var l=o.node;if(l.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var s=l.hostTree.data.getItemModel(l.dataIndex),u=s.get("link",!0),v=s.get("target",!0)||"blank";u&&oo(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Av(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(qa(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=me(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var l=this._storage.background[o.getRawIndex()];if(l){var s=l.transformCoordToLocal(t,a),u=l.shape;if(u.x<=s[0]&&s[0]<=u.x+u.width&&u.y<=s[1]&&s[1]<=u.y+u.height)n={node:o,offsetX:s[0],offsetY:s[1]};else return!1}},this),n},e.type="treemap",e}(ut);function me(){return{nodeGroup:[],background:[],content:[]}}function Vv(r,e,t,a,n,i,o,l,s,u){if(!o)return;var v=o.getLayout(),c=r.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var h=v.width,d=v.height,p=v.borderWidth,g=v.invisible,m=o.getRawIndex(),S=l&&l.getRawIndex(),y=o.viewChildren,b=v.upperHeight,x=y&&y.length,w=f.getModel("itemStyle"),I=f.getModel(["emphasis","itemStyle"]),L=f.getModel(["blur","itemStyle"]),_=f.getModel(["select","itemStyle"]),D=w.get("borderRadius")||0,A=Q("nodeGroup",pa);if(!A)return;if(s.add(A),A.x=v.x||0,A.y=v.y||0,A.markRedraw(),tr(A).nodeWidth=h,tr(A).nodeHeight=d,v.isAboveViewRoot)return A;var M=Q("background",Bn,u,Pv);M&&k(A,M,x&&v.upperLabelHeight);var E=f.getModel("emphasis"),T=E.get("focus"),C=E.get("blurScope"),P=E.get("disabled"),V=T==="ancestor"?o.getAncestorsIndices():T==="descendant"?o.getDescendantIndices():T;if(x)Sn(A)&&ze(A,!1),M&&(ze(M,!P),c.setItemGraphicEl(o.dataIndex,M),bn(M,V,C));else{var R=Q("content",Bn,u,Ev);R&&z(A,R),M.disableMorphing=!0,M&&Sn(M)&&ze(M,!1),ze(A,!P),c.setItemGraphicEl(o.dataIndex,A),bn(A,V,C)}return A;function k(Z,$,K){var q=et($);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,$.setShape({x:0,y:0,width:h,height:d,r:D}),g)B($);else{$.invisible=!1;var j=o.getVisual("style"),ct=j.stroke,xt=Wn(w);xt.fill=ct;var at=Jt(I);at.fill=I.get("borderColor");var wt=Jt(L);wt.fill=L.get("borderColor");var Nt=Jt(_);if(Nt.fill=_.get("borderColor"),K){var ne=h-2*p;Y($,ct,j.opacity,{x:p,y:0,width:ne,height:b})}else $.removeTextContent();$.setStyle(xt),$.ensureState("emphasis").style=at,$.ensureState("blur").style=wt,$.ensureState("select").style=Nt,Ke($)}Z.add($)}function z(Z,$){var K=et($);K.dataIndex=o.dataIndex,K.seriesIndex=r.seriesIndex;var q=Math.max(h-2*p,0),j=Math.max(d-2*p,0);if($.culling=!0,$.setShape({x:p,y:p,width:q,height:j,r:D}),g)B($);else{$.invisible=!1;var ct=o.getVisual("style"),xt=ct.fill,at=Wn(w);at.fill=xt,at.decal=ct.decal;var wt=Jt(I),Nt=Jt(L),ne=Jt(_);Y($,xt,ct.opacity,null),$.setStyle(at),$.ensureState("emphasis").style=wt,$.ensureState("blur").style=Nt,$.ensureState("select").style=ne,Ke($)}Z.add($)}function B(Z){!Z.invisible&&i.push(Z)}function Y(Z,$,K,q){var j=f.getModel(q?Hn:Fn),ct=fr(f.get("name"),null),xt=j.getShallow("show");ae(Z,Ot(f,q?Hn:Fn),{defaultText:xt?ct:null,inheritColor:$,defaultOpacity:K,labelFetcher:r,labelDataIndex:o.dataIndex});var at=Z.getTextContent();if(!!at){var wt=at.style,Nt=$l(wt.padding||0);q&&(Z.setTextConfig({layoutRect:q}),at.disableLabelLayout=!0),at.beforeUpdate=function(){var pn=Math.max((q?q.width:Z.shape.width)-Nt[1]-Nt[3],0),dn=Math.max((q?q.height:Z.shape.height)-Nt[0]-Nt[2],0);(wt.width!==pn||wt.height!==dn)&&at.setStyle({width:pn,height:dn})},wt.truncateMinChar=2,wt.lineOverflow="truncate",X(wt,q,v);var ne=at.getState("emphasis");X(ne?ne.style:null,q,v)}}function X(Z,$,K){var q=Z?Z.text:null;if(!$&&K.isLeafRoot&&q!=null){var j=r.get("drillDownIcon",!0);Z.text=j?j+" "+q:q}}function Q(Z,$,K,q){var j=S!=null&&t[Z][S],ct=n[Z];return j?(t[Z][S]=null,ot(ct,j)):g||(j=new $,j instanceof Pa&&(j.z2=Rv(K,q)),Tt(ct,j)),e[Z][m]=j}function ot(Z,$){var K=Z[m]={};$ instanceof pa?(K.oldX=$.x,K.oldY=$.y):K.oldShape=W({},$.shape)}function Tt(Z,$){var K=Z[m]={},q=o.parentNode,j=$ instanceof rt;if(q&&(!a||a.direction==="drillDown")){var ct=0,xt=0,at=n.background[q.getRawIndex()];!a&&at&&at.oldShape&&(ct=at.oldShape.width,xt=at.oldShape.height),j?(K.oldX=0,K.oldY=xt):K.oldShape={x:ct,y:xt,width:0,height:0}}K.fadein=!j}}function Rv(r,e){return r*Mv+e}var kv=Nv,Gv="itemStyle",Po=bt(),zv={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||Eo(t,{},r.getViewRoot().getAncestors(),r)}};function Eo(r,e,t,a){var n=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var l=n.getModel(Gv),s=Ov(l,e,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),v=l.get("borderColor"),c=l.get("borderColorSaturation"),f;c!=null&&(f=Un(s),v=Bv(c,f)),u.stroke=v;var h=r.viewChildren;if(!h||!h.length)f=Un(s),u.fill=f;else{var d=$v(r,n,i,l,s,h);N(h,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var m=Fv(n,s,p,g,d,a);Eo(p,m,t,a)}})}}}function Ov(r,e,t){var a=W({},e),n=t.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function Un(r){var e=Cr(r,"color");if(e){var t=Cr(r,"colorAlpha"),a=Cr(r,"colorSaturation");return a&&(e=lo(e,null,null,a)),t&&(e=oa(e,t)),e}}function Bv(r,e){return e!=null?lo(e,null,null,r):null}function Cr(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function $v(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Mr(e,"color")||n.color!=null&&n.color!=="none"&&(Mr(e,"colorAlpha")||Mr(e,"colorSaturation"));if(!!o){var l=e.get("visualMin"),s=e.get("visualMax"),u=t.dataExtent.slice();l!=null&&l<u[0]&&(u[0]=l),s!=null&&s>u[1]&&(u[1]=s);var v=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var f=new so(c);return Po(f).drColorMappingBy=v,f}}}function Mr(r,e){var t=r.get(e);return H(t)&&t.length?{name:e,range:t}:null}function Fv(r,e,t,a,n,i){var o=W({},e);if(n){var l=n.type,s=l==="color"&&Po(n).drColorMappingBy,u=s==="index"?a:s==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[l]=n.mapValueToVisual(u)}return o}var Ee=Math.max,er=Math.min,Zn=Pt,Ka=N,No=["itemStyle","borderWidth"],Hv=["itemStyle","gapWidth"],Wv=["upperLabel","show"],Uv=["upperLabel","height"],Zv={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,l=he(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),s=o.size||[],u=O(Zn(l.width,s[0]),n),v=O(Zn(l.height,s[1]),i),c=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],h=Pe(a,f,r),d=c==="treemapRender"||c==="treemapMove"?a.rootRect:null,p=r.getViewRoot(),g=To(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?jv(r,h,p,u,v):d?[d.width,d.height]:[u,v],S=o.sort;S&&S!=="asc"&&S!=="desc"&&(S="desc");var y={squareRatio:o.squareRatio,sort:S,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(b),Vo(p,y,!1,0),b=p.getLayout(),Ka(g,function(w,I){var L=(g[I+1]||p).getValue();w.setLayout(W({dataExtent:[L,L],borderWidth:0,upperHeight:0},b))})}var x=r.getData().tree.root;x.setLayout(Jv(l,d,h),!0),r.setLayoutInfo(l),Ro(x,new Et(-l.x,-l.y,n,i),g,p,0)}};function Vo(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var l=r.getModel(),s=l.get(No),u=l.get(Hv)/2,v=ko(l),c=Math.max(s,v),f=s-u,h=c-u;r.setLayout({borderWidth:s,upperHeight:c,upperLabelHeight:v},!0),n=Ee(n-2*f,0),i=Ee(i-f-h,0);var d=n*i,p=Yv(r,l,d,e,t,a);if(!!p.length){var g={x:f,y:h,width:n,height:i},m=er(n,i),S=1/0,y=[];y.area=0;for(var b=0,x=p.length;b<x;){var w=p[b];y.push(w),y.area+=w.getLayout().area;var I=Qv(y,m,e.squareRatio);I<=S?(b++,S=I):(y.area-=y.pop().getLayout().area,Yn(y,m,g,u,!1),m=er(g.width,g.height),y.length=y.area=0,S=1/0)}if(y.length&&Yn(y,m,g,u,!0),!t){var L=l.get("childrenVisibleMin");L!=null&&d<L&&(t=!0)}for(var b=0,x=p.length;b<x;b++)Vo(p[b],e,t,a+1)}}}function Yv(r,e,t,a,n,i){var o=r.children||[],l=a.sort;l!=="asc"&&l!=="desc"&&(l=null);var s=a.leafDepth!=null&&a.leafDepth<=i;if(n&&!s)return r.viewChildren=[];o=It(o,function(h){return!h.isRemoved()}),qv(o,l);var u=Kv(e,o,l);if(u.sum===0)return r.viewChildren=[];if(u.sum=Xv(e,t,u.sum,l,o),u.sum===0)return r.viewChildren=[];for(var v=0,c=o.length;v<c;v++){var f=o[v].getValue()/u.sum*t;o[v].setLayout({area:f})}return s&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function Xv(r,e,t,a,n){if(!a)return t;for(var i=r.get("visibleMin"),o=n.length,l=o,s=o-1;s>=0;s--){var u=n[a==="asc"?o-s-1:s].getValue();u/t*e<i&&(l=s,t-=u)}return a==="asc"?n.splice(0,o-l):n.splice(l,o-l),t}function qv(r,e){return e&&r.sort(function(t,a){var n=e==="asc"?t.getValue()-a.getValue():a.getValue()-t.getValue();return n===0?e==="asc"?t.dataIndex-a.dataIndex:a.dataIndex-t.dataIndex:n}),r}function Kv(r,e,t){for(var a=0,n=0,i=e.length;n<i;n++)a+=e[n].getValue();var o=r.get("visualDimension"),l;return!e||!e.length?l=[NaN,NaN]:o==="value"&&t?(l=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&l.reverse()):(l=[1/0,-1/0],Ka(e,function(s){var u=s.getValue(o);u<l[0]&&(l[0]=u),u>l[1]&&(l[1]=u)})),{sum:a,dataExtent:l}}function Qv(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,l=r.length;i<l;i++)o=r[i].getLayout().area,o&&(o<n&&(n=o),o>a&&(a=o));var s=r.area*r.area,u=e*e*t;return s?Ee(u*a/s,s/(u*n)):1/0}function Yn(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,l=["x","y"],s=["width","height"],u=t[l[i]],v=e?r.area/e:0;(n||v>t[s[o]])&&(v=t[s[o]]);for(var c=0,f=r.length;c<f;c++){var h=r[c],d={},p=v?h.getLayout().area/v:0,g=d[s[o]]=Ee(v-2*a,0),m=t[l[i]]+t[s[i]]-u,S=c===f-1||m<p?m:p,y=d[s[i]]=Ee(S-2*a,0);d[l[o]]=t[l[o]]+er(a,g/2),d[l[i]]=u+er(a,y/2),u+=S,h.setLayout(d,!0)}t[l[o]]+=v,t[s[o]]-=v}function jv(r,e,t,a,n){var i=(e||{}).node,o=[a,n];if(!i||i===t)return o;for(var l,s=a*n,u=s*r.option.zoomToNodeRatio;l=i.parentNode;){for(var v=0,c=l.children,f=0,h=c.length;f<h;f++)v+=c[f].getValue();var d=i.getValue();if(d===0)return o;u*=v/d;var p=l.getModel(),g=p.get(No),m=Math.max(g,ko(p));u+=4*g*g+(3*g+m)*Math.pow(u,.5),u>xn&&(u=xn),i=l}u<s&&(u=s);var S=Math.pow(u/s,.5);return[a*S,n*S]}function Jv(r,e,t){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!t)return a;var n=t.node,i=n.getLayout();if(!i)return a;for(var o=[i.width/2,i.height/2],l=n;l;){var s=l.getLayout();o[0]+=s.x,o[1]+=s.y,l=l.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function Ro(r,e,t,a,n){var i=r.getLayout(),o=t[n],l=o&&o===r;if(!(o&&!l||n===t.length&&r!==a)){r.setLayout({isInView:!0,invisible:!l&&!e.intersect(i),isAboveViewRoot:l},!0);var s=new Et(e.x-i.x,e.y-i.y,e.width,e.height);Ka(r.viewChildren||[],function(u){Ro(u,s,t,a,n+1)})}}function ko(r){return r.get(Wv)?r.get(Uv):0}function tc(r){r.registerSeriesModel(wv),r.registerChartView(kv),r.registerVisual(zv),r.registerLayout(Zv),Sv(r)}function ec(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),n=t.getGraph(),i=n.data,o=a.mapArray(a.getName);i.filterSelf(function(l){var s=i.getItemModel(l),u=s.getShallow("category");if(u!=null){Bt(u)&&(u=o[u]);for(var v=0;v<e.length;v++)if(!e[v].isSelected(u))return!1}return!0})})}function rc(r){var e={};r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),n=t.getData(),i={};a.each(function(o){var l=a.getName(o);i["ec-"+l]=o;var s=a.getItemModel(o),u=s.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(l,e)),a.setItemVisual(o,"style",u);for(var v=["symbol","symbolSize","symbolKeepAspect"],c=0;c<v.length;c++){var f=s.getShallow(v[c],!0);f!=null&&a.setItemVisual(o,v[c],f)}}),a.count()&&n.each(function(o){var l=n.getItemModel(o),s=l.getShallow("category");if(s!=null){gt(s)&&(s=i["ec-"+s]);var u=a.getItemVisual(s,"style"),v=n.ensureUniqueItemVisual(o,"style");W(v,u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++)n.setItemVisual(o,c[f],a.getItemVisual(s,c[f]))}})})}function Fe(r){return r instanceof Array||(r=[r,r]),r}function ac(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),a=e.getEdgeData(),n=Fe(e.get("edgeSymbol")),i=Fe(e.get("edgeSymbolSize"));a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",i&&i[0]),a.setVisual("toSymbolSize",i&&i[1]),a.setVisual("style",e.getModel("lineStyle").getLineStyle()),a.each(function(o){var l=a.getItemModel(o),s=t.getEdgeByIndex(o),u=Fe(l.getShallow("symbol",!0)),v=Fe(l.getShallow("symbolSize",!0)),c=l.getModel("lineStyle").getLineStyle(),f=a.ensureUniqueItemVisual(o,"style");switch(W(f,c),f.stroke){case"source":{var h=s.node1.getVisual("style");f.stroke=h&&h.fill;break}case"target":{var h=s.node2.getVisual("style");f.stroke=h&&h.fill;break}}u[0]&&s.setVisual("fromSymbol",u[0]),u[1]&&s.setVisual("toSymbol",u[1]),v[0]&&s.setVisual("fromSymbolSize",v[0]),v[1]&&s.setVisual("toSymbolSize",v[1])})})}var da="-->",br=function(r){return r.get("autoCurveness")||null},Go=function(r,e){var t=br(r),a=20,n=[];if(Bt(t))a=t;else if(H(t)){r.__curvenessList=t;return}e>a&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=n},Ne=function(r,e,t){var a=[r.id,r.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[t.uid,a,n].join(da)},zo=function(r){var e=r.split(da);return[e[0],e[2],e[1]].join(da)},nc=function(r,e){var t=Ne(r.node1,r.node2,e);return e.__edgeMap[t]},ic=function(r,e){var t=ga(Ne(r.node1,r.node2,e),e),a=ga(Ne(r.node2,r.node1,e),e);return t+a},ga=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function oc(r){!br(r)||(r.__curvenessList=[],r.__edgeMap={},Go(r))}function lc(r,e,t,a){if(!!br(t)){var n=Ne(r,e,t),i=t.__edgeMap,o=i[zo(n)];i[n]&&!o?i[n].isForward=!0:o&&i[n]&&(o.isForward=!0,i[n].isForward=!1),i[n]=i[n]||[],i[n].push(a)}}function Qa(r,e,t,a){var n=br(e),i=H(n);if(!n)return null;var o=nc(r,e);if(!o)return null;for(var l=-1,s=0;s<o.length;s++)if(o[s]===t){l=s;break}var u=ic(r,e);Go(e,u),r.lineStyle=r.lineStyle||{};var v=Ne(r.node1,r.node2,e),c=e.__curvenessList,f=i||u%2?0:1;if(o.isForward)return c[f+l];var h=zo(v),d=ga(h,e),p=c[l+d+f];return a?i?n&&n[0]===0?(d+f)%2?p:-p:((d%2?0:1)+f)%2?p:-p:(d+f)%2?p:-p:c[l+d+f]}function Oo(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(a){var n=a.getModel();a.setLayout([+n.get("x"),+n.get("y")])}),ja(t,r)}}function ja(r,e){r.eachEdge(function(t,a){var n=pr(t.getModel().get(["lineStyle","curveness"]),-Qa(t,e,a,!0),0),i=Zt(t.node1.getLayout()),o=Zt(t.node2.getLayout()),l=[i,o];+n&&l.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),t.setLayout(l)})}function sc(r,e){r.eachSeriesByType("graph",function(t){var a=t.get("layout"),n=t.coordinateSystem;if(n&&n.type!=="view"){var i=t.getData(),o=[];N(n.dimensions,function(f){o=o.concat(i.mapDimensionsAll(f))});for(var l=0;l<i.count();l++){for(var s=[],u=!1,v=0;v<o.length;v++){var c=i.get(o[v],l);isNaN(c)||(u=!0),s.push(c)}u?i.setItemLayout(l,n.dataToPoint(s)):i.setItemLayout(l,[NaN,NaN])}ja(i.graph,t)}else(!a||a==="none")&&Oo(t)})}function we(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,a=e.scaleX,n=e.getZoom(),i=(n-1)*t+1;return i/a}function Ie(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Xn=Math.PI,Pr=[];function Ja(r,e,t,a){var n=r.coordinateSystem;if(!(n&&n.type!=="view")){var i=n.getBoundingRect(),o=r.getData(),l=o.graph,s=i.width/2+i.x,u=i.height/2+i.y,v=Math.min(i.width,i.height)/2,c=o.count();if(o.setLayout({cx:s,cy:u}),!!c){if(t){var f=n.pointToData(a),h=f[0],d=f[1],p=[h-s,d-u];ke(p,p),Fl(p,p,v),t.setLayout([s+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);Bo(t,g,s,u)}uc[e](r,l,o,v,s,u,c),l.eachEdge(function(m,S){var y=pr(m.getModel().get(["lineStyle","curveness"]),Qa(m,r,S),0),b=Zt(m.node1.getLayout()),x=Zt(m.node2.getLayout()),w,I=(b[0]+x[0])/2,L=(b[1]+x[1])/2;+y&&(y*=3,w=[s*y+I*(1-y),u*y+L*(1-y)]),m.setLayout([b,x,w])})}}}var uc={value:function(r,e,t,a,n,i,o){var l=0,s=t.getSum("value"),u=Math.PI*2/(s||o);e.eachNode(function(v){var c=v.getValue("value"),f=u*(s?c:1)/2;l+=f,v.setLayout([a*Math.cos(l)+n,a*Math.sin(l)+i]),l+=f})},symbolSize:function(r,e,t,a,n,i,o){var l=0;Pr.length=o;var s=we(r);e.eachNode(function(c){var f=Ie(c);isNaN(f)&&(f=2),f<0&&(f=0),f*=s;var h=Math.asin(f/2/a);isNaN(h)&&(h=Xn/2),Pr[c.dataIndex]=h,l+=h*2});var u=(2*Xn-l)/o/2,v=0;e.eachNode(function(c){var f=u+Pr[c.dataIndex];v+=f,(!c.getLayout()||!c.getLayout().fixed)&&c.setLayout([a*Math.cos(v)+n,a*Math.sin(v)+i]),v+=f})}};function Bo(r,e,t,a){var n=r.getGraphicEl();if(!!n){var i=r.getModel(),o=i.get(["label","rotate"])||0,l=n.getSymbolPath();if(e){var s=r.getLayout(),u=Math.atan2(s[1]-a,s[0]-t);u<0&&(u=Math.PI*2+u);var v=s[0]<t;v&&(u=u-Math.PI);var c=v?"left":"right";l.setTextConfig({rotation:-u,position:c,origin:"center"});var f=l.ensureState("emphasis");W(f.textConfig||(f.textConfig={}),{position:c})}else l.setTextConfig({rotation:o*=Math.PI/180})}}function vc(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Ja(e,"symbolSize")})}var ie=la;function cc(r,e,t){for(var a=r,n=e,i=t.rect,o=i.width,l=i.height,s=[i.x+o/2,i.y+l/2],u=t.gravity==null?.1:t.gravity,v=0;v<a.length;v++){var c=a[v];c.p||(c.p=Hl(o*(Math.random()-.5)+s[0],l*(Math.random()-.5)+s[1])),c.pp=Zt(c.p),c.edges=null}var f=t.friction==null?.6:t.friction,h=f,d,p;return{warmUp:function(){h=f*.8},setFixed:function(g){a[g].fixed=!0},setUnfixed:function(g){a[g].fixed=!1},beforeStep:function(g){d=g},afterStep:function(g){p=g},step:function(g){d&&d(a,n);for(var m=[],S=a.length,y=0;y<n.length;y++){var b=n[y];if(!b.ignoreForceLayout){var x=b.n1,w=b.n2;ve(m,w.p,x.p);var I=wn(m)-b.d,L=w.w/(x.w+w.w);isNaN(L)&&(L=0),ke(m,m),!x.fixed&&ie(x.p,x.p,m,L*I*h),!w.fixed&&ie(w.p,w.p,m,-(1-L)*I*h)}}for(var y=0;y<S;y++){var _=a[y];_.fixed||(ve(m,s,_.p),ie(_.p,_.p,m,u*h))}for(var y=0;y<S;y++)for(var x=a[y],D=y+1;D<S;D++){var w=a[D];ve(m,w.p,x.p);var I=wn(m);I===0&&(Wl(m,Math.random()-.5,Math.random()-.5),I=1);var A=(x.rep+w.rep)/I/I;!x.fixed&&ie(x.pp,x.pp,m,A),!w.fixed&&ie(w.pp,w.pp,m,-A)}for(var M=[],y=0;y<S;y++){var _=a[y];_.fixed||(ve(M,_.p,_.pp),ie(_.p,_.p,M,h),ft(_.pp,_.p))}h=h*.992;var E=h<.01;p&&p(a,n,E),g&&g(E)}}}function fc(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},n=e.getGraph(),i=n.data,o=n.edgeData,l=e.getModel("force"),s=l.get("initLayout");e.preservedPoints?i.each(function(y){var b=i.getId(y);i.setItemLayout(y,a[b]||[NaN,NaN])}):!s||s==="none"?Oo(e):s==="circular"&&Ja(e,"value");var u=i.getDataExtent("value"),v=o.getDataExtent("value"),c=l.get("repulsion"),f=l.get("edgeLength"),h=H(c)?c:[c,c],d=H(f)?f:[f,f];d=[d[1],d[0]];var p=i.mapArray("value",function(y,b){var x=i.getItemLayout(b),w=Mt(y,u,h);return isNaN(w)&&(w=(h[0]+h[1])/2),{w,rep:w,fixed:i.getItemModel(b).get("fixed"),p:!x||isNaN(x[0])||isNaN(x[1])?null:x}}),g=o.mapArray("value",function(y,b){var x=n.getEdgeByIndex(b),w=Mt(y,v,d);isNaN(w)&&(w=(d[0]+d[1])/2);var I=x.getModel(),L=pr(x.getModel().get(["lineStyle","curveness"]),-Qa(x,e,b,!0),0);return{n1:p[x.node1.dataIndex],n2:p[x.node2.dataIndex],d:w,curveness:L,ignoreForceLayout:I.get("ignoreForceLayout")}}),m=t.getBoundingRect(),S=cc(p,g,{rect:m,gravity:l.get("gravity"),friction:l.get("friction")});S.beforeStep(function(y,b){for(var x=0,w=y.length;x<w;x++)y[x].fixed&&ft(y[x].p,n.getNodeByIndex(x).getLayout())}),S.afterStep(function(y,b,x){for(var w=0,I=y.length;w<I;w++)y[w].fixed||n.getNodeByIndex(w).setLayout(y[w].p),a[i.getId(w)]=y[w].p;for(var w=0,I=b.length;w<I;w++){var L=b[w],_=n.getEdgeByIndex(w),D=L.n1.p,A=L.n2.p,M=_.getLayout();M=M?M.slice():[],M[0]=M[0]||[],M[1]=M[1]||[],ft(M[0],D),ft(M[1],A),+L.curveness&&(M[2]=[(D[0]+A[0])/2-(D[1]-A[1])*L.curveness,(D[1]+A[1])/2-(A[0]-D[0])*L.curveness]),_.setLayout(M)}}),e.forceLayout=S,e.preservedPoints=a,S.step()}else e.forceLayout=null})}function hc(r,e,t){var a=W(r.getBoxLayoutParams(),{aspect:t});return he(a,{width:e.getWidth(),height:e.getHeight()})}function pc(r,e){var t=[];return r.eachSeriesByType("graph",function(a){var n=a.get("coordinateSystem");if(!n||n==="view"){var i=a.getData(),o=i.mapArray(function(g){var m=i.getItemModel(g);return[+m.get("x"),+m.get("y")]}),l=[],s=[];cr(o,l,s),s[0]-l[0]===0&&(s[0]+=1,l[0]-=1),s[1]-l[1]===0&&(s[1]+=1,l[1]-=1);var u=(s[0]-l[0])/(s[1]-l[1]),v=hc(a,e,u);isNaN(u)&&(l=[v.x,v.y],s=[v.x+v.width,v.y+v.height]);var c=s[0]-l[0],f=s[1]-l[1],h=v.width,d=v.height,p=a.coordinateSystem=new Ca;p.zoomLimit=a.get("scaleLimit"),p.setBoundingRect(l[0],l[1],c,f),p.setViewRect(v.x,v.y,h,d),p.setCenter(a.get("center"),e),p.setZoom(a.get("zoom")),t.push(p)}}),t}var qn=Qe.prototype,Er=no.prototype,$o=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){G(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})($o);function Nr(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var dc=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-line",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $o},e.prototype.buildPath=function(t,a){Nr(a)?qn.buildPath.call(this,t,a):Er.buildPath.call(this,t,a)},e.prototype.pointAt=function(t){return Nr(this.shape)?qn.pointAt.call(this,t):Er.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var a=this.shape,n=Nr(a)?[a.x2-a.x1,a.y2-a.y1]:Er.tangentAt.call(this,t);return ke(n,n)},e}(pt),gc=dc,Vr=["fromSymbol","toSymbol"];function Kn(r){return"_"+r+"Type"}function Qn(r,e,t){var a=e.getItemVisual(t,r);if(!(!a||a==="none")){var n=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),l=e.getItemVisual(t,r+"KeepAspect"),s=vo(n),u=co(o||0,s),v=Te(a,-s[0]/2+u[0],-s[1]/2+u[1],s[0],s[1],null,l);return v.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,v.name=r,v}}function yc(r){var e=new gc({name:"line",subPixelOptimize:!0});return ya(e.shape,r),e}function ya(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var mc=function(r){G(e,r);function e(t,a,n){var i=r.call(this)||this;return i._createLine(t,a,n),i}return e.prototype._createLine=function(t,a,n){var i=t.hostModel,o=t.getItemLayout(a),l=yc(o);l.shape.percent=0,_t(l,{shape:{percent:1}},i,a),this.add(l),N(Vr,function(s){var u=Qn(s,t,a);this.add(u),this[Kn(s)]=t.getItemVisual(a,s)},this),this._updateCommonStl(t,a,n)},e.prototype.updateData=function(t,a,n){var i=t.hostModel,o=this.childOfName("line"),l=t.getItemLayout(a),s={shape:{}};ya(s.shape,l),it(o,s,i,a),N(Vr,function(u){var v=t.getItemVisual(a,u),c=Kn(u);if(this[c]!==v){this.remove(this.childOfName(u));var f=Qn(u,t,a);this.add(f)}this[c]=v},this),this._updateCommonStl(t,a,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,a,n){var i=t.hostModel,o=this.childOfName("line"),l=n&&n.emphasisLineStyle,s=n&&n.blurLineStyle,u=n&&n.selectLineStyle,v=n&&n.labelStatesModels,c=n&&n.emphasisDisabled,f=n&&n.focus,h=n&&n.blurScope;if(!n||t.hasItemOption){var d=t.getItemModel(a),p=d.getModel("emphasis");l=p.getModel("lineStyle").getLineStyle(),s=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),c=p.get("disabled"),f=p.get("focus"),h=p.get("blurScope"),v=Ot(d)}var g=t.getItemVisual(a,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=l,o.ensureState("blur").style=s,o.ensureState("select").style=u,N(Vr,function(w){var I=this.childOfName(w);if(I){I.setColor(m),I.style.opacity=g.opacity;for(var L=0;L<sa.length;L++){var _=sa[L],D=o.getState(_);if(D){var A=D.style||{},M=I.ensureState(_),E=M.style||(M.style={});A.stroke!=null&&(E[I.__isEmptyBrush?"stroke":"fill"]=A.stroke),A.opacity!=null&&(E.opacity=A.opacity)}}I.markRedraw()}},this);var S=i.getRawValue(a);ae(this,v,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(w,I){return i.getFormattedLabel(w,I,t.dataType)}},inheritColor:m||"#000",defaultOpacity:g.opacity,defaultText:(S==null?t.getName(a):isFinite(S)?uo(S):S)+""});var y=this.getTextContent();if(y){var b=v.normal;y.__align=y.style.align,y.__verticalAlign=y.style.verticalAlign,y.__position=b.get("position")||"middle";var x=b.get("distance");H(x)||(x=[x,x]),y.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),st(this,f,h,c)},e.prototype.highlight=function(){Ea(this)},e.prototype.downplay=function(){Na(this)},e.prototype.updateLayout=function(t,a){this.setLinePoints(t.getItemLayout(a))},e.prototype.setLinePoints=function(t){var a=this.childOfName("line");ya(a.shape,t),a.dirty()},e.prototype.beforeUpdate=function(){var t=this,a=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.getTextContent();if(!a&&!n&&(!i||i.ignore))return;for(var o=1,l=this.parent;l;)l.scaleX&&(o/=l.scaleX),l=l.parent;var s=t.childOfName("line");if(!this.__dirty&&!s.__dirty)return;var u=s.shape.percent,v=s.pointAt(0),c=s.pointAt(u),f=ve([],c,v);ke(f,f);function h(D,A){var M=D.__specifiedRotation;if(M==null){var E=s.tangentAt(A);D.attr("rotation",(A===1?-1:1)*Math.PI/2-Math.atan2(E[1],E[0]))}else D.attr("rotation",M)}if(a&&(a.setPosition(v),h(a,0),a.scaleX=a.scaleY=o*u,a.markRedraw()),n&&(n.setPosition(c),h(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,p=void 0,g=i.__labelDistance,m=g[0]*o,S=g[1]*o,y=u/2,b=s.tangentAt(y),x=[b[1],-b[0]],w=s.pointAt(y);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var I=b[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var L=-Math.atan2(b[1],b[0]);c[0]<v[0]&&(L=Math.PI+L),i.rotation=L}var _=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":_=-S,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":_=S,p="top";break;default:_=0,p="middle"}switch(i.__position){case"end":i.x=f[0]*m+c[0],i.y=f[1]*S+c[1],d=f[0]>.8?"left":f[0]<-.8?"right":"center",p=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":i.x=-f[0]*m+v[0],i.y=-f[1]*S+v[1],d=f[0]>.8?"right":f[0]<-.8?"left":"center",p=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=m*I+v[0],i.y=v[1]+_,d=b[0]<0?"right":"left",i.originX=-m*I,i.originY=-_;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=w[0],i.y=w[1]+_,d="center",i.originY=-_;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-m*I+c[0],i.y=c[1]+_,d=b[0]>=0?"right":"left",i.originX=m*I,i.originY=-_;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(rt),tn=mc,Sc=function(){function r(e){this.group=new rt,this._LineCtor=e||tn}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=jn(e);e.diff(i).add(function(l){t._doAdd(e,l,o)}).update(function(l,s){t._doUpdate(i,e,s,l,o)}).remove(function(l){n.remove(i.getItemGraphicEl(l))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=jn(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(l){!l.isGroup&&!bc(l)&&(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var i=t.getItemLayout(n);if(Rr(i)){var o=new this._LineCtor(t,n,this._seriesScope);o.traverse(a),this.group.add(o),t.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){dr(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,a){var n=e.getItemLayout(t);if(!!Rr(n)){var i=new this._LineCtor(e,t,a);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,a,n,i){var o=e.getItemGraphicEl(a);if(!Rr(t.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(t,n,i):o=new this._LineCtor(t,n,i),t.setItemGraphicEl(n,o),this.group.add(o)},r}();function bc(r){return r.animators&&r.animators.length>0}function jn(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Ot(e)}}function Jn(r){return isNaN(r[0])||isNaN(r[1])}function Rr(r){return r&&!Jn(r[0])&&!Jn(r[1])}var en=Sc,kr=[],Gr=[],zr=[],oe=fo,Or=Zl,ti=Math.abs;function ei(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,l,s=t*t,u=.1,v=.1;v<=.9;v+=.1){kr[0]=oe(a[0],n[0],i[0],v),kr[1]=oe(a[1],n[1],i[1],v);var c=ti(Or(kr,e)-s);c<o&&(o=c,l=v)}for(var f=0;f<32;f++){var h=l+u;Gr[0]=oe(a[0],n[0],i[0],l),Gr[1]=oe(a[1],n[1],i[1],l),zr[0]=oe(a[0],n[0],i[0],h),zr[1]=oe(a[1],n[1],i[1],h);var c=Or(Gr,e)-s;if(ti(c)<.01)break;var d=Or(zr,e)-s;u/=2,c<0?d>=0?l=l+u:l=l-u:d>=0?l=l-u:l=l+u}return l}function Br(r,e){var t=[],a=Ul,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(l,s){var u=l.getLayout(),v=l.getVisual("fromSymbol"),c=l.getVisual("toSymbol");u.__original||(u.__original=[Zt(u[0]),Zt(u[1])],u[2]&&u.__original.push(Zt(u[2])));var f=u.__original;if(u[2]!=null){if(ft(n[0],f[0]),ft(n[1],f[2]),ft(n[2],f[1]),v&&v!=="none"){var h=Ie(l.node1),d=ei(n,f[0],h*e);a(n[0][0],n[1][0],n[2][0],d,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],d,t),n[0][1]=t[3],n[1][1]=t[4]}if(c&&c!=="none"){var h=Ie(l.node2),d=ei(n,f[1],h*e);a(n[0][0],n[1][0],n[2][0],d,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],d,t),n[1][1]=t[1],n[2][1]=t[2]}ft(u[0],n[0]),ft(u[1],n[2]),ft(u[2],n[1])}else{if(ft(i[0],f[0]),ft(i[1],f[1]),ve(o,i[1],i[0]),ke(o,o),v&&v!=="none"){var h=Ie(l.node1);la(i[0],i[0],o,h*e)}if(c&&c!=="none"){var h=Ie(l.node2);la(i[1],i[1],o,-h*e)}ft(u[0],i[0]),ft(u[1],i[1])}})}function ri(r){return r.type==="view"}var xc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new Va,i=new en,o=this.group;this._controller=new Ta(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var l=this._symbolDraw,s=this._lineDraw,u=this.group;if(ri(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):it(u,v,t)}Br(t.getGraph(),we(t));var c=t.getData();l.updateData(c);var f=t.getEdgeData();s.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var p=t.get("layout");c.graph.eachNode(function(y){var b=y.dataIndex,x=y.getGraphicEl(),w=y.getModel();if(!!x){x.off("drag").off("dragend");var I=w.get("draggable");I&&x.on("drag",function(_){switch(p){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(b),c.setItemLayout(b,[x.x,x.y]);break;case"circular":c.setItemLayout(b,[x.x,x.y]),y.setLayout({fixed:!0},!0),Ja(t,"symbolSize",y,[_.offsetX,_.offsetY]),i.updateLayout(t);break;case"none":default:c.setItemLayout(b,[x.x,x.y]),ja(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(b)}),x.setDraggable(I&&!!h,!!w.get("cursor"));var L=w.get(["emphasis","focus"]);L==="adjacency"&&(et(x).focus=y.getAdjacentDataIndices())}}),c.graph.eachEdge(function(y){var b=y.getGraphicEl(),x=y.getModel().get(["emphasis","focus"]);!b||x==="adjacency"&&(et(b).focus={edge:[y.dataIndex],node:[y.node1.dataIndex,y.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=c.getLayout("cx"),S=c.getLayout("cy");c.graph.eachNode(function(y){Bo(y,g,m,S)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,l=this._controllerHost,s=this.group;if(o.setPointerChecker(function(u,v,c){var f=s.getBoundingRect();return f.applyTransform(s.transform),f.contain(v,c)&&!to(u,n,t)}),!ri(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),l.zoomLimit=t.get("scaleLimit"),l.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){eo(l,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){ro(l,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Br(t.getGraph(),we(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=we(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Br(t.getGraph(),we(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(ut),wc=xc;function le(r){return"_EC_"+r}var Ic=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[le(e)]){var n=new te(e,t);return n.hostGraph=this,this.nodes.push(n),a[le(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[le(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(Bt(e)&&(e=this.nodes[e]),Bt(t)&&(t=this.nodes[t]),e instanceof te||(e=n[le(e)]),t instanceof te||(t=n[le(t)]),!(!e||!t)){var o=e.id+"-"+t.id,l=new Fo(e,t,a);return l.hostGraph=this,this._directed&&(e.outEdges.push(l),t.inEdges.push(l)),e.edges.push(l),e!==t&&t.edges.push(l),this.edges.push(l),i[o]=l,l}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof te&&(e=e.id),t instanceof te&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof te||(t=this._nodesMap[le(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(n,t,null))for(var l=[t];l.length;)for(var s=l.shift(),u=s[i],o=0;o<u.length;o++){var v=u[o],c=v.node1===s?v.node2:v.node1;if(!c.__visited){if(e.call(n,c,s))return;l.push(c),c.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,a=this.nodes,n=this.edges,i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)a[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(l){var s=n[t.getRawIndex(l)];return s.node1.dataIndex>=0&&s.node2.dataIndex>=0});for(var i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)n[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,a=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<a.length;n++){var i=a[n];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r}(),te=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var a=this.edges[t];a.dataIndex<0||(e.edge.push(a.dataIndex),e.node.push(a.node1.dataIndex,a.node2.dataIndex))}return e},r}(),Fo=function(){function r(e,t,a){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=a==null?-1:a}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r}();function Ho(r,e){return{getValue:function(t){var a=this[r][e];return a.getStore().get(a.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,a){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}pe(te,Ho("hostGraph","data"));pe(Fo,Ho("hostGraph","edgeData"));var Lc=Ic;function Wo(r,e,t,a,n){for(var i=new Lc(a),o=0;o<r.length;o++)i.addNode(Pt(r[o].id,r[o].name,o),o);for(var l=[],s=[],u=0,o=0;o<e.length;o++){var v=e[o],c=v.source,f=v.target;i.addEdge(c,f,u)&&(s.push(v),l.push(Pt(fr(v.id,null),c+" > "+f)),u++)}var h=t.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar")d=Ge(r,t);else{var p=ho.get(h),g=p?p.dimensions||[]:[];Dt(g,"value")<0&&g.concat(["value"]);var m=Ma(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new mt(m,t),d.initData(r)}var S=new mt(["value"],t);return S.initData(s,l),n&&n(d,S),Do({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var _c=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new Ra(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),ka(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){oc(this);var l=Wo(i,n,this,!0,s);return N(l.edges,function(u){lc(u.node1,u.node2,this,u.dataIndex)},this),l.data}function s(u,v){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),m=p[g];return m&&(m.parentModel=d.parentModel,d.parentModel=m),d});var c=Xt.prototype.getModel;function f(d,p){var g=c.call(this,d,p);return g.resolveParentPath=h,g}v.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=f,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),l=i.graph.getEdgeByIndex(t),s=i.getName(l.node1.dataIndex),u=i.getName(l.node2.dataIndex),v=[];return s!=null&&v.push(s),u!=null&&v.push(u),zt("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var c=Yl({series:this,dataIndex:t,multipleSeries:a});return c},e.prototype._updateCategoriesData=function(){var t=F(this.option.categories||[],function(n){return n.value!=null?n:W({value:0},n)}),a=new mt(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.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"}}},e}(vt),Dc=_c,Ac={type:"graphRoam",event:"graphRoam",update:"none"};function Tc(r){r.registerChartView(wc),r.registerSeriesModel(Dc),r.registerProcessor(ec),r.registerVisual(rc),r.registerVisual(ac),r.registerLayout(sc),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,vc),r.registerLayout(fc),r.registerCoordinateSystem("graphView",{dimensions:Ca.dimensions,create:pc}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},De),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},De),r.registerAction(Ac,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=io(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var Cc=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),Mc=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new Cc},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,l=a.width,s=a.angle,u=a.x-n(s)*l*(l>=o/3?1:2),v=a.y-i(s)*l*(l>=o/3?1:2);s=a.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(a.x+n(s)*l,a.y+i(s)*l),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(s)*l,a.y-i(s)*l),t.lineTo(u,v)},e}(pt),Pc=Mc;function Ec(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=O(t[0],e.getWidth()),l=O(t[1],e.getHeight()),s=O(r.get("radius"),i/2);return{cx:o,cy:l,r:s}}function He(r,e){var t=r==null?"":r+"";return e&&(gt(e)?t=e.replace("{value}",t):nt(e)&&(t=e(r))),t}var Nc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=Ec(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var l=this.group,s=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,v=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),f=c.get("roundCap"),h=f?Ln:Ce,d=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),m=[u,v];Xl(m,!s),u=m[0],v=m[1];for(var S=v-u,y=u,b=0;d&&b<i.length;b++){var x=Math.min(Math.max(i[b][0],0),1);v=u+S*x;var w=new h({shape:{startAngle:y,endAngle:v,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:i[b][1]}),w.setStyle(p.getLineStyle(["color","width"])),l.add(w),y=v}var I=function(L){if(L<=0)return i[0][1];var _;for(_=0;_<i.length;_++)if(i[_][0]>=L&&(_===0?0:i[_-1][0])<L)return i[_][1];return i[_-1][1]};this._renderTicks(t,a,n,I,o,u,v,s,g),this._renderTitleAndDetail(t,a,n,I,o),this._renderAnchor(t,o),this._renderPointer(t,a,n,I,o,u,v,s,g)},e.prototype._renderTicks=function(t,a,n,i,o,l,s,u,v){for(var c=this.group,f=o.cx,h=o.cy,d=o.r,p=+t.get("min"),g=+t.get("max"),m=t.getModel("splitLine"),S=t.getModel("axisTick"),y=t.getModel("axisLabel"),b=t.get("splitNumber"),x=S.get("splitNumber"),w=O(m.get("length"),d),I=O(S.get("length"),d),L=l,_=(s-l)/b,D=_/x,A=m.getModel("lineStyle").getLineStyle(),M=S.getModel("lineStyle").getLineStyle(),E=m.get("distance"),T,C,P=0;P<=b;P++){if(T=Math.cos(L),C=Math.sin(L),m.get("show")){var V=E?E+v:v,R=new Qe({shape:{x1:T*(d-V)+f,y1:C*(d-V)+h,x2:T*(d-w-V)+f,y2:C*(d-w-V)+h},style:A,silent:!0});A.stroke==="auto"&&R.setStyle({stroke:i(P/b)}),c.add(R)}if(y.get("show")){var V=y.get("distance")+E,k=He(uo(P/b*(g-p)+p),y.get("formatter")),z=i(P/b),B=T*(d-w-V)+f,Y=C*(d-w-V)+h,X=y.get("rotate"),Q=0;X==="radial"?(Q=-L+2*Math.PI,Q>Math.PI/2&&(Q+=Math.PI)):X==="tangential"?Q=-L-Math.PI/2:Bt(X)&&(Q=X*Math.PI/180),Q===0?c.add(new Ht({style:Vt(y,{text:k,x:B,y:Y,verticalAlign:C<-.8?"top":C>.8?"bottom":"middle",align:T<-.4?"left":T>.4?"right":"center"},{inheritColor:z}),silent:!0})):c.add(new Ht({style:Vt(y,{text:k,x:B,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:z}),silent:!0,originX:B,originY:Y,rotation:Q}))}if(S.get("show")&&P!==b){var V=S.get("distance");V=V?V+v:v;for(var ot=0;ot<=x;ot++){T=Math.cos(L),C=Math.sin(L);var Tt=new Qe({shape:{x1:T*(d-V)+f,y1:C*(d-V)+h,x2:T*(d-I-V)+f,y2:C*(d-I-V)+h},silent:!0,style:M});M.stroke==="auto"&&Tt.setStyle({stroke:i((P+ot/x)/b)}),c.add(Tt),L+=D}L-=D}else L+=_}},e.prototype._renderPointer=function(t,a,n,i,o,l,s,u,v){var c=this.group,f=this._data,h=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),m=g.get("show"),S=t.getData(),y=S.mapDimension("value"),b=+t.get("min"),x=+t.get("max"),w=[b,x],I=[l,s];function L(D,A){var M=S.getItemModel(D),E=M.getModel("pointer"),T=O(E.get("width"),o.r),C=O(E.get("length"),o.r),P=t.get(["pointer","icon"]),V=E.get("offsetCenter"),R=O(V[0],o.r),k=O(V[1],o.r),z=E.get("keepAspect"),B;return P?B=Te(P,R-T/2,k-C,T,C,null,z):B=new Pc({shape:{angle:-Math.PI/2,width:T,r:C,x:R,y:k}}),B.rotation=-(A+Math.PI/2),B.x=o.cx,B.y=o.cy,B}function _(D,A){var M=g.get("roundCap"),E=M?Ln:Ce,T=g.get("overlap"),C=T?g.get("width"):v/S.count(),P=T?o.r-C:o.r-(D+1)*C,V=T?o.r:o.r-D*C,R=new E({shape:{startAngle:l,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:P,r:V}});return T&&(R.z2=x-S.get(y,D)%x),R}(m||p)&&(S.diff(f).add(function(D){var A=S.get(y,D);if(p){var M=L(D,l);_t(M,{rotation:-((isNaN(+A)?I[0]:Mt(A,w,I,!0))+Math.PI/2)},t),c.add(M),S.setItemGraphicEl(D,M)}if(m){var E=_(D,l),T=g.get("clip");_t(E,{shape:{endAngle:Mt(A,w,I,T)}},t),c.add(E),In(t.seriesIndex,S.dataType,D,E),d[D]=E}}).update(function(D,A){var M=S.get(y,D);if(p){var E=f.getItemGraphicEl(A),T=E?E.rotation:l,C=L(D,T);C.rotation=T,it(C,{rotation:-((isNaN(+M)?I[0]:Mt(M,w,I,!0))+Math.PI/2)},t),c.add(C),S.setItemGraphicEl(D,C)}if(m){var P=h[A],V=P?P.shape.endAngle:l,R=_(D,V),k=g.get("clip");it(R,{shape:{endAngle:Mt(M,w,I,k)}},t),c.add(R),In(t.seriesIndex,S.dataType,D,R),d[D]=R}}).execute(),S.each(function(D){var A=S.getItemModel(D),M=A.getModel("emphasis"),E=M.get("focus"),T=M.get("blurScope"),C=M.get("disabled");if(p){var P=S.getItemGraphicEl(D),V=S.getItemVisual(D,"style"),R=V.fill;if(P instanceof Ga){var k=P.style;P.useStyle(W({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},V))}else P.useStyle(V),P.type!=="pointer"&&P.setColor(R);P.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),P.style.fill==="auto"&&P.setStyle("fill",i(Mt(S.get(y,D),w,[0,1],!0))),P.z2EmphasisLift=0,At(P,A),st(P,E,T,C)}if(m){var z=d[D];z.useStyle(S.getItemVisual(D,"style")),z.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),z.z2EmphasisLift=0,At(z,A),st(z,E,T,C)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,a){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),l=n.get("icon"),s=n.get("offsetCenter"),u=n.get("keepAspect"),v=Te(l,a.cx-o/2+O(s[0],a.r),a.cy-o/2+O(s[1],a.r),o,o,null,u);v.z2=n.get("showAbove")?1:0,v.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(v)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var l=this,s=t.getData(),u=s.mapDimension("value"),v=+t.get("min"),c=+t.get("max"),f=new rt,h=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);s.diff(this._data).add(function(m){h[m]=new Ht({silent:!0}),d[m]=new Ht({silent:!0})}).update(function(m,S){h[m]=l._titleEls[S],d[m]=l._detailEls[S]}).execute(),s.each(function(m){var S=s.getItemModel(m),y=s.get(u,m),b=new rt,x=i(Mt(y,[v,c],[0,1],!0)),w=S.getModel("title");if(w.get("show")){var I=w.get("offsetCenter"),L=o.cx+O(I[0],o.r),_=o.cy+O(I[1],o.r),D=h[m];D.attr({z2:g?0:2,style:Vt(w,{x:L,y:_,text:s.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:x})}),b.add(D)}var A=S.getModel("detail");if(A.get("show")){var M=A.get("offsetCenter"),E=o.cx+O(M[0],o.r),T=o.cy+O(M[1],o.r),C=O(A.get("width"),o.r),P=O(A.get("height"),o.r),V=t.get(["progress","show"])?s.getItemVisual(m,"style").fill:x,D=d[m],R=A.get("formatter");D.attr({z2:g?0:2,style:Vt(A,{x:E,y:T,text:He(y,R),width:isNaN(C)?null:C,height:isNaN(P)?null:P,align:"center",verticalAlign:"middle"},{inheritColor:V})}),ql(D,{normal:A},y,function(z){return He(z,R)}),p&&ji(D,m,s,t,{getFormattedLabel:function(z,B,Y,X,Q,ot){return He(ot?ot.interpolatedValue:y,R)}}),b.add(D)}f.add(b)}),this.group.add(f),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(ut),Vc=Nc,Rc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return za(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(vt),kc=Rc;function Gc(r){r.registerChartView(Vc),r.registerSeriesModel(kc)}var zc=["itemStyle","opacity"],Oc=function(r){G(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new Oa,l=new Ht;return i.setTextContent(l),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,l=t.getItemModel(a),s=t.getItemLayout(a),u=l.getModel("emphasis"),v=l.get(zc);v=v==null?1:v,n||de(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:s.points}),i.style.opacity=0,_t(i,{style:{opacity:v}},o,a)):it(i,{style:{opacity:v},shape:{points:s.points}},o,a),At(i,l),this._updateLabel(t,a),st(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),l=t.hostModel,s=t.getItemModel(a),u=t.getItemLayout(a),v=u.label,c=t.getItemVisual(a,"style"),f=c.fill;ae(o,Ot(s),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:c.opacity,defaultText:t.getName(a)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:f,outsideFill:f});var h=v.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Wt(h[0][0],h[0][1]):null},it(o,{style:{x:v.x,y:v.y}},l,a),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),Ki(n,Qi(s),{stroke:f})},e}(Ae),Bc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,l=this.group;i.diff(o).add(function(s){var u=new Oc(i,s);i.setItemGraphicEl(s,u),l.add(u)}).update(function(s,u){var v=o.getItemGraphicEl(u);v.updateData(i,s),l.add(v),i.setItemGraphicEl(s,v)}).remove(function(s){var u=o.getItemGraphicEl(s);Kl(u,t,s)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(ut),$c=Bc,Fc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ra(lt(this.getData,this),lt(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return za(this,{coordDimensions:["value"],encodeDefaulter:tt(Ql,this)})},e.prototype._defaultLabelLine=function(t){ka(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.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"}}},e}(vt),Hc=Fc;function Wc(r,e){return he(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Uc(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(s){return s}),n=[],i=e==="ascending",o=0,l=r.count();o<l;o++)n[o]=o;return nt(e)?n.sort(e):e!=="none"&&n.sort(function(s,u){return i?a[s]-a[u]:a[u]-a[s]}),n}function Zc(r){var e=r.hostModel,t=e.get("orient");r.each(function(a){var n=r.getItemModel(a),i=n.getModel("label"),o=i.get("position"),l=n.getModel("labelLine"),s=r.getItemLayout(a),u=s.points,v=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",c,f,h,d;if(v)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,h=(u[0][1]+u[3][1])/2,c="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,h=(u[1][1]+u[2][1])/2,c="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,h=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,c="center"),d=[[f,h],[f,h]];else{var p=void 0,g=void 0,m=void 0,S=void 0,y=l.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=p-y,f=m-5,c="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=p+y,f=m+5,c="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,S=g-y,h=S-5,c="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,S=g+y,h=S+5,c="center"):o==="rightTop"?(p=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(S=g-y,h=S-5,c="center"):(m=p+y,f=m+5,c="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],t==="horizontal"?(S=g+y,h=S+5,c="center"):(m=p+y,f=m+5,c="bottom")):o==="leftTop"?(p=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(S=g-y,h=S-5,c="center"):(m=p-y,f=m-5,c="right")):o==="leftBottom"?(p=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(S=g+y,h=S+5,c="center"):(m=p-y,f=m-5,c="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(S=g+y,h=S+5,c="center"):(m=p+y,f=m+5,c="left")),t==="horizontal"?(m=p,f=m):(S=g,h=S),d=[[p,g],[m,S]]}s.label={linePoints:d,x:f,y:h,verticalAlign:"middle",textAlign:c,inside:v}})}function Yc(r,e){r.eachSeriesByType("funnel",function(t){var a=t.getData(),n=a.mapDimension("value"),i=t.get("sort"),o=Wc(t,e),l=t.get("orient"),s=o.width,u=o.height,v=Uc(a,i),c=o.x,f=o.y,h=l==="horizontal"?[O(t.get("minSize"),u),O(t.get("maxSize"),u)]:[O(t.get("minSize"),s),O(t.get("maxSize"),s)],d=a.getDataExtent(n),p=t.get("min"),g=t.get("max");p==null&&(p=Math.min(d[0],0)),g==null&&(g=d[1]);var m=t.get("funnelAlign"),S=t.get("gap"),y=l==="horizontal"?s:u,b=(y-S*(a.count()-1))/a.count(),x=function(T,C){if(l==="horizontal"){var P=a.get(n,T)||0,V=Mt(P,[p,g],h,!0),R=void 0;switch(m){case"top":R=f;break;case"center":R=f+(u-V)/2;break;case"bottom":R=f+(u-V);break}return[[C,R],[C,R+V]]}var k=a.get(n,T)||0,z=Mt(k,[p,g],h,!0),B;switch(m){case"left":B=c;break;case"center":B=c+(s-z)/2;break;case"right":B=c+s-z;break}return[[B,C],[B+z,C]]};i==="ascending"&&(b=-b,S=-S,l==="horizontal"?c+=s:f+=u,v=v.reverse());for(var w=0;w<v.length;w++){var I=v[w],L=v[w+1],_=a.getItemModel(I);if(l==="horizontal"){var D=_.get(["itemStyle","width"]);D==null?D=b:(D=O(D,s),i==="ascending"&&(D=-D));var A=x(I,c),M=x(L,c+D);c+=D+S,a.setItemLayout(I,{points:A.concat(M.slice().reverse())})}else{var E=_.get(["itemStyle","height"]);E==null?E=b:(E=O(E,u),i==="ascending"&&(E=-E));var A=x(I,f),M=x(L,f+E);f+=E+S,a.setItemLayout(I,{points:A.concat(M.slice().reverse())})}}Zc(a)})}function Xc(r){r.registerChartView($c),r.registerSeriesModel(Hc),r.registerLayout(Yc),r.registerProcessor(Ba("funnel"))}var qc=.3,Kc=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new rt,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,a,n,i){this._progressiveEls=null;var o=this._dataGroup,l=t.getData(),s=this._data,u=t.coordinateSystem,v=u.dimensions,c=ni(t);l.diff(s).add(f).update(h).remove(d).execute();function f(g){var m=ai(l,o,g,v,u);$r(m,l,g,c)}function h(g,m){var S=s.getItemGraphicEl(m),y=Uo(l,g,v,u);l.setItemGraphicEl(g,S),it(S,{shape:{points:y}},t,g),de(S),$r(S,l,g,c)}function d(g){var m=s.getItemGraphicEl(g);o.remove(m)}if(!this._initialized){this._initialized=!0;var p=Qc(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=l},e.prototype.incrementalPrepareRender=function(t,a,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,a,n){for(var i=a.getData(),o=a.coordinateSystem,l=o.dimensions,s=ni(a),u=this._progressiveEls=[],v=t.start;v<t.end;v++){var c=ai(i,this._dataGroup,v,l,o);c.incremental=!0,$r(c,i,v,s),u.push(c)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(ut);function Qc(r,e,t){var a=r.model,n=r.getRect(),i=new qt({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=a.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),_t(i,{shape:{width:n.width,height:n.height}},e,t),i}function Uo(r,e,t,a){for(var n=[],i=0;i<t.length;i++){var o=t[i],l=r.get(r.mapDimension(o),e);jc(l,a.getAxis(o).type)||n.push(a.dataToPoint(l,o))}return n}function ai(r,e,t,a,n){var i=Uo(r,t,a,n),o=new Oa({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function ni(r){var e=r.get("smooth",!0);return e===!0&&(e=qc),e=jl(e),Jl(e)&&(e=0),{smooth:e}}function $r(r,e,t,a){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",a.smooth);var n=e.getItemModel(t),i=n.getModel("emphasis");At(r,n,"lineStyle"),st(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function jc(r,e){return e==="category"?r==null:r==null||isNaN(r)}var Jc=Kc,tf=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,a){return Ge(null,this,{useEncodeDefaulter:lt(ef,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var a=this.coordinateSystem,n=this.getData(),i=[];return a.eachActiveState(n,function(o,l){t===o&&i.push(n.getRawIndex(l))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(vt);function ef(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(!!e){var t={};return N(e.dimensions,function(a){var n=rf(a);t[a]=n}),t}}function rf(r){return+r.replace("dim","")}var af=tf,nf=["lineStyle","opacity"],of={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,a={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(n,i){t.eachActiveState(i,function(o,l){var s=a[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(l).get(nf,!0);u!=null&&(s=u)}var v=i.ensureUniqueItemVisual(l,"style");v.opacity=s},n.start,n.end)}}}},lf=of;function sf(r){U(po),r.registerChartView(Jc),r.registerSeriesModel(af),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,lf)}var uf=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),vf=function(r){G(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new uf},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){Ea(this)},e.prototype.downplay=function(){Na(this)},e}(pt),cf=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),l=this.group,s=t.layoutInfo,u=s.width,v=s.height,c=t.getData(),f=t.getData("edge"),h=t.get("orient");this._model=t,l.removeAll(),l.x=s.x,l.y=s.y,o.eachEdge(function(d){var p=new vf,g=et(p);g.dataIndex=d.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var m=d.getModel(),S=m.getModel("lineStyle"),y=S.get("curveness"),b=d.node1.getLayout(),x=d.node1.getModel(),w=x.get("localX"),I=x.get("localY"),L=d.node2.getLayout(),_=d.node2.getModel(),D=_.get("localX"),A=_.get("localY"),M=d.getLayout(),E,T,C,P,V,R,k,z;switch(p.shape.extent=Math.max(1,M.dy),p.shape.orient=h,h==="vertical"?(E=(w!=null?w*u:b.x)+M.sy,T=(I!=null?I*v:b.y)+b.dy,C=(D!=null?D*u:L.x)+M.ty,P=A!=null?A*v:L.y,V=E,R=T*(1-y)+P*y,k=C,z=T*y+P*(1-y)):(E=(w!=null?w*u:b.x)+b.dx,T=(I!=null?I*v:b.y)+M.sy,C=D!=null?D*u:L.x,P=(A!=null?A*v:L.y)+M.ty,V=E*(1-y)+C*y,R=T,k=E*y+C*(1-y),z=P),p.setShape({x1:E,y1:T,x2:C,y2:P,cpx1:V,cpy1:R,cpx2:k,cpy2:z}),p.useStyle(S.getItemStyle()),p.style.fill){case"source":p.style.fill=d.node1.getVisual("color"),p.style.decal=d.node1.getVisual("style").decal;break;case"target":p.style.fill=d.node2.getVisual("color"),p.style.decal=d.node2.getVisual("style").decal;break;case"gradient":var B=d.node1.getVisual("color"),Y=d.node2.getVisual("color");gt(B)&&gt(Y)&&(p.style.fill=new ts(0,0,+(h==="horizontal"),+(h==="vertical"),[{color:B,offset:0},{color:Y,offset:1}]))}var X=m.getModel("emphasis");At(p,m,"lineStyle",function(ot){return ot.getItemStyle()}),l.add(p),f.setItemGraphicEl(d.dataIndex,p);var Q=X.get("focus");st(p,Q==="adjacency"?d.getAdjacentDataIndices():Q,X.get("blurScope"),X.get("disabled")),et(p).dataType="edge"}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),m=g.get("localX"),S=g.get("localY"),y=g.getModel("emphasis"),b=new qt({shape:{x:m!=null?m*u:p.x,y:S!=null?S*v:p.y,width:p.dx,height:p.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});ae(b,Ot(g),{labelFetcher:t,labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),At(b,g),l.add(b),c.setItemGraphicEl(d.dataIndex,b),et(b).dataType="node";var x=y.get("focus");st(b,x==="adjacency"?d.getAdjacentDataIndices():x,y.get("blurScope"),y.get("disabled"))}),c.eachItemGraphicEl(function(d,p){var g=c.getItemModel(p);g.get("draggable")&&(d.drift=function(m,S){i._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=S,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:c.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/v})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&l.setClipPath(ff(l.getBoundingRect(),t,function(){l.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(ut);function ff(r,e,t){var a=new qt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return _t(a,{shape:{width:r.width+20}},e,t),a}var hf=cf,pf=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var n=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var l=this.levelModels,s=0;s<o.length;s++)o[s].depth!=null&&o[s].depth>=0&&(l[o[s].depth]=new Xt(o[s],this,a));if(i&&n){var u=Wo(i,n,this,!0,v);return u.data}function v(c,f){c.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getData().getItemLayout(d);if(g){var m=g.depth,S=p.levelModels[m];S&&(h.parentModel=S)}return h}),f.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getGraph().getEdgeByIndex(d),m=g.node1.getLayout();if(m){var S=m.depth,y=p.levelModels[S];y&&(h.parentModel=y)}return h})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(t,n),l=o.data,s=o.value,u=l.source+" -- "+l.target;return zt("nameValue",{name:u,value:s,noValue:i(s)})}else{var v=this.getGraph().getNodeByIndex(t),c=v.getLayout().value,f=this.getDataParams(t,n).data.name;return zt("nameValue",{name:f!=null?f+"":null,value:c,noValue:i(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.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},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},e}(vt),df=pf;function gf(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=yf(t,e);t.layoutInfo=i;var o=i.width,l=i.height,s=t.getGraph(),u=s.nodes,v=s.edges;Sf(u);var c=It(u,function(p){return p.getLayout().value===0}),f=c.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),d=t.get("nodeAlign");mf(u,v,a,n,o,l,f,h,d)})}function yf(r,e){return he(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function mf(r,e,t,a,n,i,o,l,s){bf(r,e,t,n,i,l,s),Lf(r,e,i,n,a,o,l),Nf(r,l)}function Sf(r){N(r,function(e){var t=Yt(e.outEdges,rr),a=Yt(e.inEdges,rr),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function bf(r,e,t,a,n,i,o){for(var l=[],s=[],u=[],v=[],c=0,f=0;f<e.length;f++)l[f]=1;for(var f=0;f<r.length;f++)s[f]=r[f].inEdges.length,s[f]===0&&u.push(r[f]);for(var h=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),m=g.depth!=null&&g.depth>=0;m&&g.depth>h&&(h=g.depth),p.setLayout({depth:m?g.depth:c},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var S=0;S<p.outEdges.length;S++){var y=p.outEdges[S],b=e.indexOf(y);l[b]=0;var x=y.node2,w=r.indexOf(x);--s[w]===0&&v.indexOf(x)<0&&v.push(x)}}++c,u=v,v=[]}for(var f=0;f<l.length;f++)if(l[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var I=h>c-1?h:c-1;o&&o!=="left"&&xf(r,o,i,I);var L=i==="vertical"?(n-t)/I:(a-t)/I;If(r,L,i)}function Zo(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function xf(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var l=0;l<i.length;l++){var s=i[l];s.setLayout({skNodeHeight:o},!0);for(var u=0;u<s.inEdges.length;u++){var v=s.inEdges[u];n.indexOf(v.node1)<0&&n.push(v.node1)}}i=n,n=[],++o}N(r,function(c){Zo(c)||c.setLayout({depth:Math.max(0,a-c.getLayout().skNodeHeight)},!0)})}else e==="justify"&&wf(r,a)}function wf(r,e){N(r,function(t){!Zo(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function If(r,e,t){N(r,function(a){var n=a.getLayout().depth*e;t==="vertical"?a.setLayout({y:n},!0):a.setLayout({x:n},!0)})}function Lf(r,e,t,a,n,i,o){var l=_f(r,o);Df(l,e,t,a,n,o),Fr(l,n,t,a,o);for(var s=1;i>0;i--)s*=.99,Af(l,s,o),Fr(l,n,t,a,o),Ef(l,s,o),Fr(l,n,t,a,o)}function _f(r,e){var t=[],a=e==="vertical"?"y":"x",n=ua(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),N(n.keys,function(i){t.push(n.buckets.get(i))}),t}function Df(r,e,t,a,n,i){var o=1/0;N(r,function(l){var s=l.length,u=0;N(l,function(c){u+=c.getLayout().value});var v=i==="vertical"?(a-(s-1)*n)/u:(t-(s-1)*n)/u;v<o&&(o=v)}),N(r,function(l){N(l,function(s,u){var v=s.getLayout().value*o;i==="vertical"?(s.setLayout({x:u},!0),s.setLayout({dx:v},!0)):(s.setLayout({y:u},!0),s.setLayout({dy:v},!0))})}),N(e,function(l){var s=+l.getValue()*o;l.setLayout({dy:s},!0)})}function Fr(r,e,t,a,n){var i=n==="vertical"?"x":"y";N(r,function(o){o.sort(function(p,g){return p.getLayout()[i]-g.getLayout()[i]});for(var l,s,u,v=0,c=o.length,f=n==="vertical"?"dx":"dy",h=0;h<c;h++)s=o[h],u=v-s.getLayout()[i],u>0&&(l=s.getLayout()[i]+u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),v=s.getLayout()[i]+s.getLayout()[f]+e;var d=n==="vertical"?a:t;if(u=v-e-d,u>0){l=s.getLayout()[i]-u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0),v=l;for(var h=c-2;h>=0;--h)s=o[h],u=s.getLayout()[i]+s.getLayout()[f]+e-v,u>0&&(l=s.getLayout()[i]-u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),v=s.getLayout()[i]}})}function Af(r,e,t){N(r.slice().reverse(),function(a){N(a,function(n){if(n.outEdges.length){var i=Yt(n.outEdges,Tf,t)/Yt(n.outEdges,rr);if(isNaN(i)){var o=n.outEdges.length;i=o?Yt(n.outEdges,Cf,t)/o:0}if(t==="vertical"){var l=n.getLayout().x+(i-Kt(n,t))*e;n.setLayout({x:l},!0)}else{var s=n.getLayout().y+(i-Kt(n,t))*e;n.setLayout({y:s},!0)}}})})}function Tf(r,e){return Kt(r.node2,e)*r.getValue()}function Cf(r,e){return Kt(r.node2,e)}function Mf(r,e){return Kt(r.node1,e)*r.getValue()}function Pf(r,e){return Kt(r.node1,e)}function Kt(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function rr(r){return r.getValue()}function Yt(r,e,t){for(var a=0,n=r.length,i=-1;++i<n;){var o=+e(r[i],t);isNaN(o)||(a+=o)}return a}function Ef(r,e,t){N(r,function(a){N(a,function(n){if(n.inEdges.length){var i=Yt(n.inEdges,Mf,t)/Yt(n.inEdges,rr);if(isNaN(i)){var o=n.inEdges.length;i=o?Yt(n.inEdges,Pf,t)/o:0}if(t==="vertical"){var l=n.getLayout().x+(i-Kt(n,t))*e;n.setLayout({x:l},!0)}else{var s=n.getLayout().y+(i-Kt(n,t))*e;n.setLayout({y:s},!0)}}})})}function Nf(r,e){var t=e==="vertical"?"x":"y";N(r,function(a){a.outEdges.sort(function(n,i){return n.node2.getLayout()[t]-i.node2.getLayout()[t]}),a.inEdges.sort(function(n,i){return n.node1.getLayout()[t]-i.node1.getLayout()[t]})}),N(r,function(a){var n=0,i=0;N(a.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),N(a.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function Vf(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),a=t.nodes;if(a.length){var n=1/0,i=-1/0;N(a,function(o){var l=o.getLayout().value;l<n&&(n=l),l>i&&(i=l)}),N(a,function(o){var l=new so({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}),s=l.mapValueToVisual(o.getLayout().value),u=o.getModel().get(["itemStyle","color"]);u!=null?(o.setVisual("color",u),o.setVisual("style",{fill:u})):(o.setVisual("color",s),o.setVisual("style",{fill:s}))})}})}function Rf(r){r.registerChartView(hf),r.registerSeriesModel(df),r.registerLayout(gf),r.registerVisual(Vf),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var Yo=function(){function r(){}return r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),l=i.get("type"),s;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),s=!0):l==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),s=!0):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[v],f=u[1-v],h=[n,i],d=h[v].get("type"),p=h[1-v].get("type"),g=e.data;if(g&&s){var m=[];N(g,function(b,x){var w;H(b)?(w=b.slice(),b.unshift(x)):H(b.value)?(w=W({},b),w.value=w.value.slice(),b.value.unshift(x)):w=b,m.push(w)}),e.data=m}var S=this.defaultValueDimensions,y=[{name:c,type:va(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:va(p),dimsDef:S.slice()}];return za(this,{coordDimensions:y,dimensionsCount:S.length+1,encodeDefaulter:tt(es,y,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),Xo=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.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},e}(vt);pe(Xo,Yo,!0);var kf=Xo,Gf=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,l=this._data;this._data||o.removeAll();var s=t.get("layout")==="horizontal"?1:0;i.diff(l).add(function(u){if(i.hasValue(u)){var v=i.getItemLayout(u),c=ii(v,i,u,s,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,v){var c=l.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(c);return}var f=i.getItemLayout(u);c?(de(c),qo(f,c,i,u)):c=ii(f,i,u,s),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var v=l.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(ut),zf=function(){function r(){}return r}(),Of=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new zf},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},e}(pt);function ii(r,e,t,a,n){var i=r.ends,o=new Of({shape:{points:n?Bf(i,a,r):i}});return qo(r,o,e,t,n),o}function qo(r,e,t,a,n){var i=t.hostModel,o=rs[n?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,a),e.useStyle(t.getItemVisual(a,"style")),e.style.strokeNoScale=!0,e.z2=100;var l=t.getItemModel(a),s=l.getModel("emphasis");At(e,l),st(e,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function Bf(r,e,t){return F(r,function(a){return a=a.slice(),a[e]=t.initBaseline,a})}var $f=Gf;function Ff(r,e){}var Le=N;function Hf(r){var e=Wf(r);Le(e,function(t){var a=t.seriesModels;!a.length||(Uf(t),Le(a,function(n,i){Zf(n,t.boxOffsetList[i],t.boxWidthList[i])}))})}function Wf(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(a){var n=a.getBaseAxis(),i=Dt(t,n);i<0&&(i=t.length,t[i]=n,e[i]={axis:n,seriesModels:[]}),e[i].seriesModels.push(a)}),e}function Uf(r){var e=r.axis,t=r.seriesModels,a=t.length,n=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],l;if(e.type==="category")l=e.getBandWidth();else{var s=0;Le(t,function(d){s=Math.max(s,d.getData().count())});var u=e.getExtent();l=Math.abs(u[1]-u[0])/s}Le(t,function(d){var p=d.get("boxWidth");H(p)||(p=[p,p]),o.push([O(p[0],l)||0,O(p[1],l)||0])});var v=l*.8-2,c=v/a*.3,f=(v-c*(a-1))/a,h=f/2-v/2;Le(t,function(d,p){i.push(h),h+=c+f,n.push(Math.min(Math.max(f,o[p][0]),o[p][1]))})}function Zf(r,e,t){var a=r.coordinateSystem,n=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,l=1-o,s=["x","y"],u=n.mapDimension(s[o]),v=n.mapDimensionsAll(s[l]);if(u==null||v.length<5)return;for(var c=0;c<n.count();c++){var f=n.get(u,c),h=y(f,v[2],c),d=y(f,v[0],c),p=y(f,v[1],c),g=y(f,v[3],c),m=y(f,v[4],c),S=[];b(S,p,!1),b(S,g,!0),S.push(d,p,m,g),x(S,d),x(S,m),x(S,h),n.setItemLayout(c,{initBaseline:h[l],ends:S})}function y(w,I,L){var _=n.get(I,L),D=[];D[o]=w,D[l]=_;var A;return isNaN(w)||isNaN(_)?A=[NaN,NaN]:(A=a.dataToPoint(D),A[o]+=e),A}function b(w,I,L){var _=I.slice(),D=I.slice();_[o]+=i,D[o]-=i,L?w.push(_,D):w.push(D,_)}function x(w,I){var L=I.slice(),_=I.slice();L[o]-=i,_[o]+=i,w.push(L,_)}}function Yf(r,e){e=e||{};for(var t=[],a=[],n=e.boundIQR,i=n==="none"||n===0,o=0;o<r.length;o++){var l=ca(r[o].slice()),s=xr(l,.25),u=xr(l,.5),v=xr(l,.75),c=l[0],f=l[l.length-1],h=(n==null?1.5:n)*(v-s),d=i?c:Math.max(c,s-h),p=i?f:Math.min(f,v+h),g=e.itemNameFormatter,m=nt(g)?g({value:o}):gt(g)?g.replace("{value}",o+""):o+"";t.push([m,d,s,u,v,p]);for(var S=0;S<l.length;S++){var y=l[S];if(y<d||y>p){var b=[m,y];a.push(b)}}}return{boxData:t,outliers:a}}var Xf={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==go){var a="";J(a)}var n=Yf(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function qf(r){r.registerSeriesModel(kf),r.registerChartView($f),r.registerVisual(Ff),r.registerLayout(Hf),r.registerTransform(Xf)}var Kf=["color","borderColor"],Qf=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){dr(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),l=t.get("clip",!0),s=t.coordinateSystem,u=s.getArea&&s.getArea();this._data||i.removeAll(),a.diff(n).add(function(v){if(a.hasValue(v)){var c=a.getItemLayout(v);if(l&&oi(u,c))return;var f=Hr(c,v,!0);_t(f,{shape:{points:c.ends}},t,v),Wr(f,a,v,o),i.add(f),a.setItemGraphicEl(v,f)}}).update(function(v,c){var f=n.getItemGraphicEl(c);if(!a.hasValue(v)){i.remove(f);return}var h=a.getItemLayout(v);if(l&&oi(u,h)){i.remove(f);return}f?(it(f,{shape:{points:h.ends}},t,v),de(f)):f=Hr(h),Wr(f,a,v,o),i.add(f),a.setItemGraphicEl(v,f)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&i.remove(c)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),si(t,this.group);var a=t.get("clip",!0)?$a(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var l=n.getItemLayout(o),s=Hr(l);Wr(s,n,o,i),s.incremental=!0,this.group.add(s),this._progressiveEls.push(s)}},e.prototype._incrementalRenderLarge=function(t,a){si(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(ut),jf=function(){function r(){}return r}(),Jf=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new jf},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(pt);function Hr(r,e,t){var a=r.ends;return new Jf({shape:{points:t?th(a,r):a},z2:100})}function oi(r,e){for(var t=!0,a=0;a<e.ends.length;a++)if(r.contain(e.ends[a][0],e.ends[a][1])){t=!1;break}return t}function Wr(r,e,t,a){var n=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=a,At(r,n)}function th(r,e){return F(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var eh=function(){function r(){}return r}(),li=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new eh},e.prototype.buildPath=function(t,a){for(var n=a.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];t.moveTo(o,n[i++]),t.lineTo(o,n[i++])}else i+=3},e}(pt);function si(r,e,t,a){var n=r.getData(),i=n.getLayout("largePoints"),o=new li({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var l=new li({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(l),ui(1,o,r),ui(-1,l,r),a&&(o.incremental=!0,l.incremental=!0),t&&t.push(o,l)}function ui(r,e,t,a){var n=t.get(["itemStyle",r>0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]),i=t.getModel("itemStyle").getItemStyle(Kf);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var rh=Qf,Ko=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,a,n){var i=a.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",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},e}(vt);pe(Ko,Yo,!0);var ah=Ko;function nh(r){!r||!H(r.series)||N(r.series,function(e){yo(e)&&e.type==="k"&&(e.type="candlestick")})}var ih=["itemStyle","borderColor"],oh=["itemStyle","borderColor0"],lh=["itemStyle","color"],sh=["itemStyle","color0"],uh={seriesType:"candlestick",plan:Fa(),performRawSeries:!0,reset:function(r,e){function t(i,o){return o.get(i>0?lh:sh)}function a(i,o){return o.get(i>0?ih:oh)}if(!e.isSeriesFiltered(r)){var n=r.pipelineContext.large;return!n&&{progress:function(i,o){for(var l;(l=i.next())!=null;){var s=o.getItemModel(l),u=o.getItemLayout(l).sign,v=s.getItemStyle();v.fill=t(u,s),v.stroke=a(u,s)||v.fill;var c=o.ensureUniqueItemVisual(l,"style");W(c,v)}}}}}},vh=uh,ch={seriesType:"candlestick",plan:Fa(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=fh(r,t),n=0,i=1,o=["x","y"],l=t.getDimensionIndex(t.mapDimension(o[n])),s=F(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=s[0],v=s[1],c=s[2],f=s[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),l<0||s.length<4)return;return{progress:r.pipelineContext.large?d:h};function h(p,g){for(var m,S=g.getStore();(m=p.next())!=null;){var y=S.get(l,m),b=S.get(u,m),x=S.get(v,m),w=S.get(c,m),I=S.get(f,m),L=Math.min(b,x),_=Math.max(b,x),D=C(L,y),A=C(_,y),M=C(w,y),E=C(I,y),T=[];P(T,A,0),P(T,D,1),T.push(R(E),R(A),R(M),R(D)),g.setItemLayout(m,{sign:vi(S,m,b,x,v),initBaseline:b>x?A[i]:D[i],ends:T,brushRect:V(w,I,y)})}function C(k,z){var B=[];return B[n]=z,B[i]=k,isNaN(z)||isNaN(k)?[NaN,NaN]:e.dataToPoint(B)}function P(k,z,B){var Y=z.slice(),X=z.slice();Y[n]=wr(Y[n]+a/2,1,!1),X[n]=wr(X[n]-a/2,1,!0),B?k.push(Y,X):k.push(X,Y)}function V(k,z,B){var Y=C(k,B),X=C(z,B);return Y[n]-=a/2,X[n]-=a/2,{x:Y[0],y:Y[1],width:a,height:X[1]-Y[1]}}function R(k){return k[n]=wr(k[n],1),k}}function d(p,g){for(var m=as(p.count*4),S=0,y,b=[],x=[],w,I=g.getStore();(w=p.next())!=null;){var L=I.get(l,w),_=I.get(u,w),D=I.get(v,w),A=I.get(c,w),M=I.get(f,w);if(isNaN(L)||isNaN(A)||isNaN(M)){m[S++]=NaN,S+=3;continue}m[S++]=vi(I,w,_,D,v),b[n]=L,b[i]=A,y=e.dataToPoint(b,null,x),m[S++]=y?y[0]:NaN,m[S++]=y?y[1]:NaN,b[i]=M,y=e.dataToPoint(b,null,x),m[S++]=y?y[1]:NaN}g.setLayout("largePoints",m)}}};function vi(r,e,t,a,n){var i;return t>a?i=-1:t<a?i=1:i=e>0?r.get(n,e-1)<=a?1:-1:1,i}function fh(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=O(Ft(r.get("barMaxWidth"),n),n),o=O(Ft(r.get("barMinWidth"),1),n),l=r.get("barWidth");return l!=null?O(l,n):Math.max(Math.min(n/2,i),o)}var hh=ch;function ph(r){r.registerChartView(rh),r.registerSeriesModel(ah),r.registerPreprocessor(nh),r.registerVisual(vh),r.registerLayout(hh)}function ci(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var dh=function(r){G(e,r);function e(t,a){var n=r.call(this)||this,i=new ao(t,a),o=new rt;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),l=0;l<i;l++){var s=Te(a,-1,-1,2,2,n);s.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-l/i*t.period+t.effectOffset;s.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),s.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(s)}ci(o,t)},e.prototype.updateEffectAnimation=function(t){for(var a=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var l=i[o];if(a[l]!==t[l]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}ci(n,t)},e.prototype.highlight=function(){Ea(this)},e.prototype.downplay=function(){Na(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,a){var n=this,i=t.hostModel;this.childAt(0).updateData(t,a);var o=this.childAt(1),l=t.getItemModel(a),s=t.getItemVisual(a,"symbol"),u=vo(t.getItemVisual(a,"symbolSize")),v=t.getItemVisual(a,"style"),c=v&&v.fill,f=l.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",c)});var h=co(t.getItemVisual(a,"symbolOffset"),u);h&&(o.x=h[0],o.y=h[1]);var d=t.getItemVisual(a,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=l.get(["rippleEffect","scale"]),p.brushType=l.get(["rippleEffect","brushType"]),p.period=l.get(["rippleEffect","period"])*1e3,p.effectOffset=a/t.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=s,p.color=c,p.rippleEffectColor=l.get(["rippleEffect","color"]),p.rippleNumber=l.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?p.showEffectOn!=="render"&&n.startEffectAnimation(p):g==="normal"&&p.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=p,st(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(rt),gh=dh,yh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Va(gh)},e.prototype.render=function(t,a,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var a=t.coordinateSystem,n=a&&a.getArea&&a.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,a,n){var i=t.getData();this.group.dirty();var o=mo("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var a=t.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=ns(a.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(ut),mh=yh,Sh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return Ge(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,a,n){return n.point(a.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(vt),bh=Sh;function xh(r){r.registerChartView(mh),r.registerSeriesModel(bh),r.registerLayout(mo("effectScatter"))}var wh=function(r){G(e,r);function e(t,a,n){var i=r.call(this)||this;return i.add(i.createLine(t,a,n)),i._updateEffectSymbol(t,a),i}return e.prototype.createLine=function(t,a,n){return new tn(t,a,n)},e.prototype._updateEffectSymbol=function(t,a){var n=t.getItemModel(a),i=n.getModel("effect"),o=i.get("symbolSize"),l=i.get("symbol");H(o)||(o=[o,o]);var s=t.getItemVisual(a,"style"),u=i.get("color")||s&&s.stroke,v=this.childAt(1);this._symbolType!==l&&(this.remove(v),v=Te(l,-.5,-.5,1,1,u),v.z2=100,v.culling=!0,this.add(v)),v&&(v.setStyle("shadowColor",u),v.setStyle(i.getItemStyle(["color"])),v.scaleX=o[0],v.scaleY=o[1],v.setColor(u),this._symbolType=l,this._symbolScale=o,this._updateEffectAnimation(t,i,a))},e.prototype._updateEffectAnimation=function(t,a,n){var i=this.childAt(1);if(!!i){var o=t.getItemLayout(n),l=a.get("period")*1e3,s=a.get("loop"),u=a.get("roundTrip"),v=a.get("constantSpeed"),c=Pt(a.get("delay"),function(h){return h/t.count()*l/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),v>0&&(l=this._getLineLength(i)/v*1e3),l!==this._period||s!==this._loop||u!==this._roundTrip){i.stopAnimation();var f=void 0;nt(c)?f=c(n):f=c,i.__t>0&&(f=-l*i.__t),this._animateSymbol(i,l,f,s,u)}this._period=l,this._loop=s,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var l=this,s=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){l._updateSymbolPosition(t)});i||s.done(function(){l.remove(t)}),s.start()}},e.prototype._getLineLength=function(t){return be(t.__p1,t.__cp1)+be(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,l=[t.x,t.y],s=l.slice(),u=fo,v=is;l[0]=u(a[0],i[0],n[0],o),l[1]=u(a[1],i[1],n[1],o);var c=t.__t<1?v(a[0],i[0],n[0],o):v(n[0],i[0],a[0],1-o),f=t.__t<1?v(a[1],i[1],n[1],o):v(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=be(s,l)*1.05,o===1&&(l[0]=s[0]+(l[0]-s[0])/2,l[1]=s[1]+(l[1]-s[1])/2)):t.__lastT===1?t.scaleY=2*be(a,l):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=l[0],t.y=l[1]},e.prototype.updateLayout=function(t,a){this.childAt(0).updateLayout(t,a);var n=t.getItemModel(a).getModel("effect");this._updateEffectAnimation(t,n,a)},e}(rt),Qo=wh,Ih=function(r){G(e,r);function e(t,a,n){var i=r.call(this)||this;return i._createPolyline(t,a,n),i}return e.prototype._createPolyline=function(t,a,n){var i=t.getItemLayout(a),o=new Oa({shape:{points:i}});this.add(o),this._updateCommonStl(t,a,n)},e.prototype.updateData=function(t,a,n){var i=t.hostModel,o=this.childAt(0),l={shape:{points:t.getItemLayout(a)}};it(o,l,i,a),this._updateCommonStl(t,a,n)},e.prototype._updateCommonStl=function(t,a,n){var i=this.childAt(0),o=t.getItemModel(a),l=n&&n.emphasisLineStyle,s=n&&n.focus,u=n&&n.blurScope,v=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var c=o.getModel("emphasis");l=c.getModel("lineStyle").getLineStyle(),v=c.get("disabled"),s=c.get("focus"),u=c.get("blurScope")}i.useStyle(t.getItemVisual(a,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var f=i.ensureState("emphasis");f.style=l,st(this,s,u,v)},e.prototype.updateLayout=function(t,a){var n=this.childAt(0);n.setShape("points",t.getItemLayout(a))},e}(rt),jo=Ih,Lh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,a,n){return new jo(t,a,n)},e.prototype._updateAnimationPoints=function(t,a){this._points=a;for(var n=[0],i=0,o=1;o<a.length;o++){var l=a[o-1],s=a[o];i+=be(l,s),n.push(i)}if(i===0){this._length=0;return}for(var o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var a=t.__t<1?t.__t:2-t.__t,n=this._points,i=this._offsets,o=n.length;if(!!i){var l=this._lastFrame,s;if(a<this._lastFramePercent){var u=Math.min(l+1,o-1);for(s=u;s>=0&&!(i[s]<=a);s--);s=Math.min(s,o-2)}else{for(s=l;s<o&&!(i[s]>a);s++);s=Math.min(s-1,o-2)}var v=(a-i[s])/(i[s+1]-i[s]),c=n[s],f=n[s+1];t.x=c[0]*(1-v)+v*f[0],t.y=c[1]*(1-v)+v*f[1];var h=t.__t<1?f[0]-c[0]:c[0]-f[0],d=t.__t<1?f[1]-c[1]:c[1]-f[1];t.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=a,t.ignore=!1}},e}(Qo),_h=Lh,Dh=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),Ah=function(r){G(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Dh},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o<n.length;){var l=n[o++];if(l>0){t.moveTo(n[o++],n[o++]);for(var s=1;s<l;s++)t.lineTo(n[o++],n[o++])}}else for(o=this._off;o<n.length;){var u=n[o++],v=n[o++],c=n[o++],f=n[o++];if(t.moveTo(u,v),i>0){var h=(u+c)/2-(v-f)*i,d=(v+f)/2-(c-u)*i;t.quadraticCurveTo(h,d,c,f)}else t.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,l=this.style.lineWidth;if(n.polyline)for(var s=0,u=0;u<i.length;){var v=i[u++];if(v>0)for(var c=i[u++],f=i[u++],h=1;h<v;h++){var d=i[u++],p=i[u++];if(_n(c,f,d,p,l,t,a))return s}s++}else for(var s=0,u=0;u<i.length;){var c=i[u++],f=i[u++],d=i[u++],p=i[u++];if(o>0){var g=(c+d)/2-(f-p)*o,m=(f+p)/2-(d-c)*o;if(os(c,f,g,m,d,p,l,t,a))return s}else if(_n(c,f,d,p,l,t,a))return s;s++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,l=-1/0,s=-1/0,u=0;u<n.length;){var v=n[u++],c=n[u++];i=Math.min(v,i),l=Math.max(v,l),o=Math.min(c,o),s=Math.max(c,s)}t=this._rect=new Et(i,o,l,s)}return t},e}(pt),Th=function(){function r(){this.group=new rt}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var a=this._newAdded[0],n=t.getLayout("linesPoints"),i=a&&a.shape.segs;if(i&&i.length<2e4){var o=i.length,l=new Float32Array(o+n.length);l.set(i),l.set(n,o),a.setShape({segs:l})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:n}),this._setCommon(s,t),s.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Ah({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,a){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=et(e);o.seriesIndex=n.seriesIndex,e.on("mousemove",function(l){o.dataIndex=null;var s=e.hoverDataIdx;s>0&&(o.dataIndex=s+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Ch=Th,Mh={seriesType:"lines",plan:Fa(),reset:function(r){var e=r.coordinateSystem;if(!!e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var l=void 0,s=n.end-n.start;if(t){for(var u=0,v=n.start;v<n.end;v++)u+=r.getLineCoordsCount(v);l=new Float32Array(s+u*2)}else l=new Float32Array(s*4);for(var c=0,f=[],v=n.start;v<n.end;v++){var h=r.getLineCoords(v,o);t&&(l[c++]=h);for(var d=0;d<h;d++)f=e.dataToPoint(o[d],!1,f),l[c++]=f[0],l[c++]=f[1]}i.setLayout("linesPoints",l)}else for(var v=n.start;v<n.end;v++){var p=i.getItemModel(v),h=r.getLineCoords(v,o),g=[];if(t)for(var m=0;m<h;m++)g.push(e.dataToPoint(o[m]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var S=p.get(["lineStyle","curveness"]);+S&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*S,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*S])}i.setItemLayout(v,g)}}}}}},Jo=Mh,Ph=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t),l=t.get("zlevel"),s=t.get(["effect","trailLength"]),u=n.getZr(),v=u.painter.getType()==="svg";v||u.painter.getLayer(l).clear(!0),this._lastZlevel!=null&&!v&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&s>0&&(v||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)})),o.updateData(i);var c=t.get("clip",!0)&&$a(t.coordinateSystem,!1,t);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=l,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var l=Jo.reset(t,a,n);l.progress&&l.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),l=a.pipelineContext,s=l.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||s!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=s?new Ch:new en(o?i?_h:jo:i?Qo:tn),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(ut),Eh=Ph,Nh=typeof Uint32Array=="undefined"?Array:Uint32Array,Vh=typeof Float64Array=="undefined"?Array:Float64Array;function fi(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=F(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),So([n,t[0],t[1]])}))}var Rh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],fi(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(fi(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=na(this._flatCoords,a.flatCoords),this._flatCoordsOffset=na(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)a[o]=a[o]||[],a[o][0]=this._flatCoords[n+o*2],a[o][1]=this._flatCoords[n+o*2+1];return i}else{for(var l=this._getCoordsFromItemModel(t),o=0;o<l.length;o++)a[o]=a[o]||[],a[o][0]=l[o][0],a[o][1]=l[o][1];return l.length}},e.prototype._processFlatCoordsArray=function(t){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),Bt(t[0])){for(var n=t.length,i=new Nh(n),o=new Vh(n),l=0,s=0,u=0,v=0;v<n;){u++;var c=t[v++];i[s++]=l+a,i[s++]=c;for(var f=0;f<c;f++){var h=t[v++],d=t[v++];o[l++]=h,o[l++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,s),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,a){var n=new mt(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(i,o,l,s){if(i instanceof Array)return NaN;n.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[s]:u}),n},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=i.getItemModel(t),l=o.get("name");if(l)return l;var s=o.get("fromName"),u=o.get("toName"),v=[];return s!=null&&v.push(s),u!=null&&v.push(u),zt("nameValue",{name:v.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.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}},e}(vt),kh=Rh;function We(r){return r instanceof Array||(r=[r,r]),r}var Gh={seriesType:"lines",reset:function(r){var e=We(r.get("symbol")),t=We(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var l=i.getItemModel(o),s=We(l.getShallow("symbol",!0)),u=We(l.getShallow("symbolSize",!0));s[0]&&i.setItemVisual(o,"fromSymbol",s[0]),s[1]&&i.setItemVisual(o,"toSymbol",s[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}},zh=Gh;function Oh(r){r.registerChartView(Eh),r.registerSeriesModel(kh),r.registerLayout(Jo),r.registerVisual(zh)}var Bh=256,$h=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Dn.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var l=this._getBrush(),s=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),h=e.length;c.width=t,c.height=a;for(var d=0;d<h;++d){var p=e[d],g=p[0],m=p[1],S=p[2],y=n(S);f.globalAlpha=y,f.drawImage(l,g-v,m-v)}if(!c.width||!c.height)return c;for(var b=f.getImageData(0,0,c.width,c.height),x=b.data,w=0,I=x.length,L=this.minOpacity,_=this.maxOpacity,D=_-L;w<I;){var y=x[w+3]/256,A=Math.floor(y*(Bh-1))*4;if(y>0){var M=o(y)?s:u;y>0&&(y=y*D+L),x[w++]=M[A],x[w++]=M[A+1],x[w++]=M[A+2],x[w++]=M[A+3]*y*256}else w+=4}return f.putImageData(b,0,0),c},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Dn.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,l=0;l<256;l++)e[t](l/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}(),Fh=$h;function Hh(r,e,t){var a=r[1]-r[0];e=F(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var l;for(l=i;l<n;l++){var s=e[l].interval;if(s[0]<=o&&o<=s[1]){i=l;break}}if(l===n)for(l=i-1;l>=0;l--){var s=e[l].interval;if(s[0]<=o&&o<=s[1]){i=l;break}}return l>=0&&l<n&&t[l]}}function Wh(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(a){return a>=e[0]&&a<=e[1]}}function hi(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Uh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(l){l.eachTargetSeries(function(s){s===t&&(i=l)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):hi(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(hi(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){dr(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var l=t.coordinateSystem,s=gr(l,"cartesian2d"),u,v,c,f;if(s){var h=l.getAxis("x"),d=l.getAxis("y");u=h.getBandWidth()+.5,v=d.getBandWidth()+.5,c=h.scale.getExtent(),f=d.scale.getExtent()}for(var p=this.group,g=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),S=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),x=Ot(t),w=t.getModel("emphasis"),I=w.get("focus"),L=w.get("blurScope"),_=w.get("disabled"),D=s?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],A=n;A<i;A++){var M=void 0,E=g.getItemVisual(A,"style");if(s){var T=g.get(D[0],A),C=g.get(D[1],A);if(isNaN(g.get(D[2],A))||T<c[0]||T>c[1]||C<f[0]||C>f[1])continue;var P=l.dataToPoint([T,C]);M=new qt({shape:{x:P[0]-u/2,y:P[1]-v/2,width:u,height:v},style:E})}else{if(isNaN(g.get(D[1],A)))continue;M=new qt({z2:1,shape:l.dataToRect([g.get(D[0],A)]).contentShape,style:E})}if(g.hasItemOption){var V=g.getItemModel(A),R=V.getModel("emphasis");m=R.getModel("itemStyle").getItemStyle(),S=V.getModel(["blur","itemStyle"]).getItemStyle(),y=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),I=R.get("focus"),L=R.get("blurScope"),_=R.get("disabled"),x=Ot(V)}M.shape.r=b;var k=t.getRawValue(A),z="-";k&&k[2]!=null&&(z=k[2]+""),ae(M,x,{labelFetcher:t,labelDataIndex:A,defaultOpacity:E.opacity,defaultText:z}),M.ensureState("emphasis").style=m,M.ensureState("blur").style=S,M.ensureState("select").style=y,st(M,I,L,_),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),p.add(M),g.setItemGraphicEl(A,M),this._progressiveEls&&this._progressiveEls.push(M)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,l=n.targetVisuals.outOfRange,s=a.getData(),u=this._hmLayer||this._hmLayer||new Fh;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var v=t.getViewRect().clone(),c=t.getRoamTransform();v.applyTransform(c);var f=Math.max(v.x,0),h=Math.max(v.y,0),d=Math.min(v.width+v.x,i.getWidth()),p=Math.min(v.height+v.y,i.getHeight()),g=d-f,m=p-h,S=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],y=s.mapArray(S,function(I,L,_){var D=t.dataToPoint([I,L]);return D[0]-=f,D[1]-=h,D.push(_),D}),b=n.getExtent(),x=n.type==="visualMap.continuous"?Wh(b,n.option.range):Hh(b,n.getPieceList(),n.option.selected);u.update(y,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},x);var w=new Ga({style:{width:g,height:m,x:f,y:h,image:u.canvas},silent:!0});this.group.add(w)},e.type="heatmap",e}(ut),Zh=Uh,Yh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Ge(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ho.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(vt),Xh=Yh;function qh(r){r.registerChartView(Zh),r.registerSeriesModel(Xh)}var Kh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,l=this.group,s=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,c=u.boundaryGap;l.x=0,l.y=v.y+c[0];function f(g){return g.name}var h=new fe(this._layersSeries||[],s,f,f),d=[];h.add(lt(p,this,"add")).update(lt(p,this,"update")).remove(lt(p,this,"remove")).execute();function p(g,m,S){var y=o._layers;if(g==="remove"){l.remove(y[m]);return}for(var b=[],x=[],w,I=s[m].indices,L=0;L<I.length;L++){var _=i.getItemLayout(I[L]),D=_.x,A=_.y0,M=_.y;b.push(D,A),x.push(D,A+M),w=i.getItemVisual(I[L],"style")}var E,T=i.getItemLayout(I[0]),C=t.getModel("label"),P=C.get("margin"),V=t.getModel("emphasis");if(g==="add"){var R=d[m]=new rt;E=new ls({shape:{points:b,stackedOnPoints:x,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),R.add(E),l.add(R),t.isAnimationEnabled()&&E.setClipPath(Qh(E.getBoundingRect(),t,function(){E.removeClipPath()}))}else{var R=y[S];E=R.childAt(0),l.add(R),d[m]=R,it(E,{shape:{points:b,stackedOnPoints:x}},t),de(E)}ae(E,Ot(t),{labelDataIndex:I[L-1],defaultText:i.getName(I[L-1]),inheritColor:w.fill},{normal:{verticalAlign:"middle"}}),E.setTextConfig({position:null,local:!0});var k=E.getTextContent();k&&(k.x=T.x-P,k.y=T.y0+T.y/2),E.useStyle(w),i.setItemGraphicEl(m,E),At(E,t),st(E,V.get("focus"),V.get("blurScope"),V.get("disabled"))}this._layersSeries=s,this._layers=d},e.type="themeRiver",e}(ut);function Qh(r,e,t){var a=new qt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return _t(a,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),a}var jh=Kh,Ur=2,Jh=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ra(lt(this.getData,this),lt(this.getRawData,this))},e.prototype.fixData=function(t){var a=t.length,n={},i=ua(t,function(f){return n.hasOwnProperty(f[0]+"")||(n[f[0]+""]=-1),f[2]}),o=[];i.buckets.each(function(f,h){o.push({name:h,dataList:f})});for(var l=o.length,s=0;s<l;++s){for(var u=o[s].name,v=0;v<o[s].dataList.length;++v){var c=o[s].dataList[v][0]+"";n[c]=s}for(var c in n)n.hasOwnProperty(c)&&n[c]!==s&&(n[c]=s,t[a]=[c,0,u],a++)}return t},e.prototype.getInitialData=function(t,a){for(var n=this.getReferringComponents("singleAxis",bo).models[0],i=n.get("type"),o=It(t.data,function(d){return d[2]!==void 0}),l=this.fixData(o||[]),s=[],u=this.nameMap=re(),v=0,c=0;c<l.length;++c)s.push(l[c][Ur]),u.get(l[c][Ur])||(u.set(l[c][Ur],v),v++);var f=Ma(l,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:va(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,h=new mt(f,this);return h.initData(l),h},e.prototype.getLayerSeries=function(){for(var t=this.getData(),a=t.count(),n=[],i=0;i<a;++i)n[i]=i;var o=t.mapDimension("single"),l=ua(n,function(u){return t.get("name",u)}),s=[];return l.buckets.each(function(u,v){u.sort(function(c,f){return t.get(o,c)-t.get(o,f)}),s.push({name:v,indices:u})}),s},e.prototype.getAxisTooltipData=function(t,a,n){H(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),l=[],s=o.length,u,v=0;v<s;++v){for(var c=Number.MAX_VALUE,f=-1,h=o[v].indices.length,d=0;d<h;++d){var p=i.get(t[0],o[v].indices[d]),g=Math.abs(p-a);g<=c&&(u=p,c=g,f=o[v].indices[d])}l.push(f)}return{dataIndices:l,nestestValue:u}},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=i.getName(t),l=i.get(i.mapDimension("value"),t);return zt("nameValue",{name:o,value:l})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(vt),tp=Jh;function ep(r,e){r.eachSeriesByType("themeRiver",function(t){var a=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var l=t.get("boundaryGap"),s=n.getAxis();if(i.boundaryGap=l,s.orient==="horizontal"){l[0]=O(l[0],o.height),l[1]=O(l[1],o.height);var u=o.height-l[0]-l[1];pi(a,t,u)}else{l[0]=O(l[0],o.width),l[1]=O(l[1],o.width);var v=o.width-l[0]-l[1];pi(a,t,v)}a.setLayout("layoutInfo",i)})}function pi(r,e,t){if(!!r.count())for(var a=e.coordinateSystem,n=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),l=F(n,function(g){return F(g.indices,function(m){var S=a.dataToPoint(r.get(i,m));return S[1]=r.get(o,m),S})}),s=rp(l),u=s.y0,v=t/s.max,c=n.length,f=n[0].indices.length,h,d=0;d<f;++d){h=u[d]*v,r.setItemLayout(n[0].indices[d],{layerIndex:0,x:l[0][d][0],y0:h,y:l[0][d][1]*v});for(var p=1;p<c;++p)h+=l[p-1][d][1]*v,r.setItemLayout(n[p].indices[d],{layerIndex:p,x:l[p][d][0],y0:h,y:l[p][d][1]*v})}}function rp(r){for(var e=r.length,t=r[0].length,a=[],n=[],i=0,o=0;o<t;++o){for(var l=0,s=0;s<e;++s)l+=r[s][o][1];l>i&&(i=l),a.push(l)}for(var u=0;u<t;++u)n[u]=(i-a[u])/2;i=0;for(var v=0;v<t;++v){var c=a[v]+n[v];c>i&&(i=c)}return{y0:n,max:i}}function ap(r){r.registerChartView(jh),r.registerSeriesModel(tp),r.registerLayout(ep),r.registerProcessor(Ba("themeRiver"))}var np=2,ip=4,op=function(r){G(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=np,o.textConfig={inside:!0},et(o).seriesIndex=a.seriesIndex;var l=new Ht({z2:ip,silent:t.getModel().get(["label","silent"])});return o.setTextContent(l),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var l=this;et(l).dataIndex=a.dataIndex;var s=a.getModel(),u=s.getModel("emphasis"),v=a.getLayout(),c=W({},v);c.label=null;var f=a.getVisual("style");f.lineJoin="bevel";var h=a.getVisual("decal");h&&(f.decal=xo(h,o));var d=An(s.getModel("itemStyle"),c,!0);W(c,d),N(sa,function(S){var y=l.ensureState(S),b=s.getModel([S,"itemStyle"]);y.style=b.getItemStyle();var x=An(b,c);x&&(y.shape=x)}),t?(l.setShape(c),l.shape.r=v.r0,it(l,{shape:{r:v.r}},n,a.dataIndex)):(it(l,{shape:c},n),de(l)),l.useStyle(f),this._updateLabel(n);var p=s.getShallow("cursor");p&&l.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),m=g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;st(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),l=o.endAngle-o.startAngle,s=(o.startAngle+o.endAngle)/2,u=Math.cos(s),v=Math.sin(s),c=this,f=c.getTextContent(),h=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(l)<d);f.ignore=!p,N(ss,function(m){var S=m==="normal"?n.getModel("label"):n.getModel([m,"label"]),y=m==="normal",b=y?f:f.ensureState(m),x=t.getFormattedLabel(h,m);y&&(x=x||a.node.name),b.style=Vt(S,{},null,m!=="normal",!0),x&&(b.style.text=x);var w=S.get("show");w!=null&&!y&&(b.ignore=!w);var I=g(S,"position"),L=y?c:c.states[m],_=L.style.fill;L.textConfig={outsideFill:S.get("color")==="inherit"?_:null,inside:I!=="outside"};var D,A=g(S,"distance")||0,M=g(S,"align");I==="outside"?(D=o.r+A,M=s>Math.PI/2?"right":"left"):!M||M==="center"?(l===2*Math.PI&&o.r0===0?D=0:D=(o.r+o.r0)/2,M="center"):M==="left"?(D=o.r0+A,s>Math.PI/2&&(M="right")):M==="right"&&(D=o.r-A,s>Math.PI/2&&(M="left")),b.style.align=M,b.style.verticalAlign=g(S,"verticalAlign")||"middle",b.x=D*u+o.cx,b.y=D*v+o.cy;var E=g(S,"rotate"),T=0;E==="radial"?(T=-s,T<-Math.PI/2&&(T+=Math.PI)):E==="tangential"?(T=Math.PI/2-s,T>Math.PI/2?T-=Math.PI:T<-Math.PI/2&&(T+=Math.PI)):Bt(E)&&(T=E*Math.PI/180),b.rotation=T});function g(m,S){var y=m.get(S);return y==null?i.get(S):y}f.dirtyStyle()},e}(Ce),di=op,ma="sunburstRootToNode",gi="sunburstHighlight",lp="sunburstUnhighlight";function sp(r){r.registerAction({type:ma,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(n,i){var o=Pe(e,[ma],n);if(o){var l=n.getViewRoot();l&&(e.direction=qa(l,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:gi,update:"none"},function(e,t,a){e=W({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=Pe(e,[gi],i);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(W(e,{type:"highlight"}))}),r.registerAction({type:lp,update:"updateView"},function(e,t,a){e=W({},e),a.dispatchAction(W(e,{type:"downplay"}))})}var up=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=a;var l=t.getData(),s=l.tree.root,u=t.getViewRoot(),v=this.group,c=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(S){f.push(S)});var h=this._oldChildren||[];d(f,h),m(s,u),this._initEvents(),this._oldChildren=f;function d(S,y){if(S.length===0&&y.length===0)return;new fe(y,S,b,b).add(x).update(x).remove(tt(x,null)).execute();function b(w){return w.getId()}function x(w,I){var L=w==null?null:S[w],_=I==null?null:y[I];p(L,_)}}function p(S,y){if(!c&&S&&!S.getValue()&&(S=null),S!==s&&y!==s){if(y&&y.piece)S?(y.piece.updateData(!1,S,t,a,n),l.setItemGraphicEl(S.dataIndex,y.piece)):g(y);else if(S){var b=new di(S,t,a,n);v.add(b),l.setItemGraphicEl(S.dataIndex,b)}}}function g(S){!S||S.piece&&(v.remove(S.piece),S.piece=null)}function m(S,y){y.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,S,t,a,n):(o.virtualPiece=new di(S,t,a,n),v.add(o.virtualPiece)),y.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(y.parentNode)})):o.virtualPiece&&(v.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var l=o.getModel().get("nodeClick");if(l==="rootToNode")t._rootToNode(o);else if(l==="link"){var s=o.getModel(),u=s.get("link");if(u){var v=s.get("target",!0)||"_blank";oo(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ma,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,l=t[1]-i.cy,s=Math.sqrt(o*o+l*l);return s<=i.r&&s>=i.r0}},e.type="sunburst",e}(ut),vp=up,cp=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};tl(n);var i=this._levelModels=F(t.levels||[],function(s){return new Xt(s,this,a)},this),o=Xa.createTree(n,this,l);function l(s){s.wrapMethod("getItemModel",function(u,v){var c=o.getNodeByDataIndex(v),f=i[c.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=Sr(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){Co(this)},e.type="series.sunburst",e.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"},e}(vt);function tl(r){var e=0;N(r.children,function(a){tl(a);var n=a.value;H(n)&&(n=n[0]),e+=n});var t=r.value;H(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),H(r.value)?r.value[0]=t:r.value=t}var fp=cp,yi=Math.PI/180;function hp(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");H(i)||(i=[0,i]),H(n)||(n=[n,n]);var o=t.getWidth(),l=t.getHeight(),s=Math.min(o,l),u=O(n[0],o),v=O(n[1],l),c=O(i[0],s/2),f=O(i[1],s/2),h=-a.get("startAngle")*yi,d=a.get("minAngle")*yi,p=a.getData().tree.root,g=a.getViewRoot(),m=g.depth,S=a.get("sort");S!=null&&el(g,S);var y=0;N(g.children,function(P){!isNaN(P.getValue())&&y++});var b=g.getValue(),x=Math.PI/(b||y)*2,w=g.depth>0,I=g.height-(w?-1:1),L=(f-c)/(I||1),_=a.get("clockwise"),D=a.get("stillShowZeroSum"),A=_?1:-1,M=function(P,V){if(!!P){var R=V;if(P!==p){var k=P.getValue(),z=b===0&&D?x:k*x;z<d&&(z=d),R=V+A*z;var B=P.depth-m-(w?-1:1),Y=c+L*B,X=c+L*(B+1),Q=a.getLevelModel(P);if(Q){var ot=Q.get("r0",!0),Tt=Q.get("r",!0),Z=Q.get("radius",!0);Z!=null&&(ot=Z[0],Tt=Z[1]),ot!=null&&(Y=O(ot,s/2)),Tt!=null&&(X=O(Tt,s/2))}P.setLayout({angle:z,startAngle:V,endAngle:R,clockwise:_,cx:u,cy:v,r0:Y,r:X})}if(P.children&&P.children.length){var $=0;N(P.children,function(K){$+=M(K,V+$)})}return R-V}};if(w){var E=c,T=c+L,C=Math.PI*2;p.setLayout({angle:C,startAngle:h,endAngle:h+C,clockwise:_,cx:u,cy:v,r0:E,r:T})}M(g,h)})}function el(r,e){var t=r.children||[];r.children=pp(t,e),t.length&&N(r.children,function(a){el(a,e)})}function pp(r,e){if(nt(e)){var t=F(r,function(n,i){var o=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(n,i){return e(n.params,i.params)}),F(t,function(n){return r[n.index]})}else{var a=e==="asc";return r.sort(function(n,i){var o=(n.getValue()-i.getValue())*(a?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(a?-1:1):o})}}function dp(r){var e={};function t(a,n,i){for(var o=a;o&&o.depth>1;)o=o.parentNode;var l=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&gt(l)&&(l=us(l,(a.depth-1)/(i-1)*.5)),l}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var l=o.getModel(),s=l.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");W(u,s)})})}function gp(r){r.registerChartView(vp),r.registerSeriesModel(fp),r.registerLayout(tt(hp,"sunburst")),r.registerProcessor(tt(Ba,"sunburst")),r.registerVisual(dp),sp(r)}var mi={color:"fill",borderColor:"stroke"},yp={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},kt=bt(),mp=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return Ge(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=kt(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(vt),Sp=mp;function bp(r,e){return e=e||[0,0],F(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function xp(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:lt(bp,r)}}}function wp(r,e){return e=e||[0,0],F([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function Ip(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:lt(wp,r)}}}function Lp(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function _p(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:lt(Lp,r)}}}function Dp(r,e){return e=e||[0,0],F(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],l=r[a]/2,s=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-l)-i.dataToCoord(o+l));return t==="Angle"&&(s=s*Math.PI/180),s},this)}function Ap(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),l=r.coordToPoint([i,o]);return l.push(i,o*Math.PI/180),l},size:lt(Dp,r)}}}function Tp(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)}}}}var Gt="emphasis",Ut="normal",rn="blur",an="select",Qt=[Ut,Gt,rn,an],Zr={normal:["itemStyle"],emphasis:[Gt,"itemStyle"],blur:[rn,"itemStyle"],select:[an,"itemStyle"]},Yr={normal:["label"],emphasis:[Gt,"label"],blur:[rn,"label"],select:[an,"label"]},Cp=["x","y"],Mp="e\0\0",yt={normal:{},emphasis:{},blur:{},select:{}},Pp={cartesian2d:xp,geo:Ip,single:_p,polar:Ap,calendar:Tp};function Sa(r){return r instanceof pt}function ba(r){return r instanceof Pa}function Ep(r,e){e.copyTransform(r),ba(e)&&ba(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,Sa(e)&&Sa(r)&&e.setShape(r.shape))}var Np=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){this._progressiveEls=null;var o=this._data,l=t.getData(),s=this.group,u=Si(t,l,a,n);o||s.removeAll(),l.diff(o).add(function(c){Xr(n,null,c,u(c,i),t,s,l)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&Ha(f,kt(f).option,t)}).update(function(c,f){var h=o.getItemGraphicEl(f);Xr(n,h,c,u(c,i),t,s,l)}).execute();var v=t.get("clip",!0)?$a(t.coordinateSystem,!1,t):null;v?s.setClipPath(v):s.removeClipPath(),this._data=l},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,a,n,i,o){var l=a.getData(),s=Si(a,l,n,i),u=this._progressiveEls=[];function v(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var c=t.start;c<t.end;c++){var f=Xr(null,null,c,s(c,o),a,this.group,l);f&&(f.traverse(v),u.push(f))}},e.prototype.eachRendered=function(t){dr(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,a,n,i){var o=a.element;if(o==null||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},e.type="custom",e}(ut),Vp=Np;function nn(r){var e=r.type,t;if(e==="path"){var a=r.shape,n=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,i=nl(a);t=ps(i,null,n,a.layout||"center"),kt(t).customPathData=i}else if(e==="image")t=new Ga({}),kt(t).customImagePath=r.style.image;else if(e==="text")t=new Ht({});else if(e==="group")t=new rt;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=ds(e);if(!o){var l="";J(l)}t=new o}return kt(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function on(r,e,t,a,n,i,o){gs(e);var l=n&&n.normal.cfg;l&&e.setTextConfig(l),a&&a.transition==null&&(a.transition=Cp);var s=a&&a.style;if(s){if(e.type==="text"){var u=s;Lt(u,"textFill")&&(u.fill=u.textFill),Lt(u,"textStroke")&&(u.stroke=u.textStroke)}var v=void 0,c=Sa(e)?s.decal:null;r&&c&&(c.dirty=!0,v=xo(c,r)),s.__decalPattern=v}if(ba(e)&&s){var v=s.__decalPattern;v&&(s.decal=v)}ys(e,a,i,{dataIndex:t,isInit:o,clearStyle:!0}),ms(e,a.keyframeAnimation,i)}function rl(r,e,t,a,n){var i=e.isGroup?null:e,o=n&&n[r].cfg;if(i){var l=i.ensureState(r);if(a===!1){var s=i.getState(r);s&&(s.style=null)}else l.style=a||null;o&&(l.textConfig=o),Ke(i)}}function Rp(r,e,t){if(!r.isGroup){var a=r,n=t.currentZ,i=t.currentZLevel;a.z=n,a.zlevel=i;var o=e.z2;o!=null&&(a.z2=o||0);for(var l=0;l<Qt.length;l++)kp(a,e,Qt[l])}}function kp(r,e,t){var a=t===Ut,n=a?e:ar(e,t),i=n?n.z2:null,o;i!=null&&(o=a?r:r.ensureState(t),o.z2=i||0)}function Si(r,e,t,a){var n=r.get("renderItem"),i=r.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):Pp[i.type](i));for(var l=ht({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:b,style:w,ordinalRawValue:x,styleEmphasis:I,visual:D,barLayout:A,currentSeriesIndices:M,font:E},o.api||{}),s={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:Gp(r.getData())},u,v,c={},f={},h={},d={},p=0;p<Qt.length;p++){var g=Qt[p];h[g]=r.getModel(Zr[g]),d[g]=r.getModel(Yr[g])}function m(T){return T===u?v||(v=e.getItemModel(T)):e.getItemModel(T)}function S(T,C){return e.hasItemOption?T===u?c[C]||(c[C]=m(T).getModel(Zr[C])):m(T).getModel(Zr[C]):h[C]}function y(T,C){return e.hasItemOption?T===u?f[C]||(f[C]=m(T).getModel(Yr[C])):m(T).getModel(Yr[C]):d[C]}return function(T,C){return u=T,v=null,c={},f={},n&&n(ht({dataIndexInside:T,dataIndex:e.getRawIndex(T),actionType:C?C.type:null},s),l)};function b(T,C){return C==null&&(C=u),e.getStore().get(e.getDimensionIndex(T||0),C)}function x(T,C){C==null&&(C=u),T=T||0;var P=e.getDimensionInfo(T);if(!P){var V=e.getDimensionIndex(T);return V>=0?e.getStore().get(V,C):void 0}var R=e.get(P.name,C),k=P&&P.ordinalMeta;return k?k.categories[R]:R}function w(T,C){C==null&&(C=u);var P=e.getItemVisual(C,"style"),V=P&&P.fill,R=P&&P.opacity,k=S(C,Ut).getItemStyle();V!=null&&(k.fill=V),R!=null&&(k.opacity=R);var z={inheritColor:gt(V)?V:"#000"},B=y(C,Ut),Y=Vt(B,null,z,!1,!0);Y.text=B.getShallow("show")?Ft(r.getFormattedLabel(C,Ut),Tn(e,C)):null;var X=Cn(B,z,!1);return _(T,k),k=Mn(k,Y,X),T&&L(k,T),k.legacy=!0,k}function I(T,C){C==null&&(C=u);var P=S(C,Gt).getItemStyle(),V=y(C,Gt),R=Vt(V,null,null,!0,!0);R.text=V.getShallow("show")?pr(r.getFormattedLabel(C,Gt),r.getFormattedLabel(C,Ut),Tn(e,C)):null;var k=Cn(V,null,!0);return _(T,P),P=Mn(P,R,k),T&&L(P,T),P.legacy=!0,P}function L(T,C){for(var P in C)Lt(C,P)&&(T[P]=C[P])}function _(T,C){T&&(T.textFill&&(C.textFill=T.textFill),T.textPosition&&(C.textPosition=T.textPosition))}function D(T,C){if(C==null&&(C=u),Lt(mi,T)){var P=e.getItemVisual(C,"style");return P?P[mi[T]]:null}if(Lt(yp,T))return e.getItemVisual(C,T)}function A(T){if(i.type==="cartesian2d"){var C=i.getBaseAxis();return vs(ht({axis:C},T))}}function M(){return t.getCurrentSeriesIndices()}function E(T){return cs(T,t)}}function Gp(r){var e={};return N(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Xr(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var l=ln(r,e,t,a,n,i);return l&&o.setItemGraphicEl(t,l),l&&st(l,a.focus,a.blurScope,a.emphasisDisabled),l}function ln(r,e,t,a,n,i){var o=-1,l=e;e&&al(e,a,n)&&(o=Dt(i.childrenRef(),e),e=null);var s=!e,u=e;u?u.clearStates():(u=nn(a),l&&Ep(l,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),yt.normal.cfg=yt.normal.conOpt=yt.emphasis.cfg=yt.emphasis.conOpt=yt.blur.cfg=yt.blur.conOpt=yt.select.cfg=yt.select.conOpt=null,yt.isLegacy=!1,Op(u,t,a,n,s,yt),zp(u,t,a,n,s),on(r,u,t,a,yt,n,s),Lt(a,"info")&&(kt(u).info=a.info);for(var v=0;v<Qt.length;v++){var c=Qt[v];if(c!==Ut){var f=ar(a,c),h=sn(a,f,c);rl(c,u,f,h,yt)}}return Rp(u,a,n),a.type==="group"&&Bp(r,u,t,a,n),o>=0?i.replaceAt(u,o):i.add(u),u}function al(r,e,t){var a=kt(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&Wp(i)&&nl(i)!==a.customPathData||n==="image"&&Lt(o,"image")&&o.image!==a.customImagePath}function zp(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&al(o,i,a)&&(o=null),o||(o=nn(i),r.setClipPath(o)),on(null,o,e,i,null,a,n)}}function Op(r,e,t,a,n,i){if(!r.isGroup){bi(t,null,i),bi(t,Gt,i);var o=i.normal.conOpt,l=i.emphasis.conOpt,s=i.blur.conOpt,u=i.select.conOpt;if(o!=null||l!=null||u!=null||s!=null){var v=r.getTextContent();if(o===!1)v&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=nn(o),r.setTextContent(v)),on(null,v,e,o,null,a,n);for(var c=o&&o.style,f=0;f<Qt.length;f++){var h=Qt[f];if(h!==Ut){var d=i[h].conOpt;rl(h,v,d,sn(o,d,h),null)}}c?v.dirty():v.markRedraw()}}}}function bi(r,e,t){var a=e?ar(r,e):r,n=e?sn(r,a,Gt):r.style,i=r.type,o=a?a.textConfig:null,l=r.textContent,s=l?e?ar(l,e):l:null;if(n&&(t.isLegacy||fs(n,i,!!o,!!s))){t.isLegacy=!0;var u=hs(n,i,!e);!o&&u.textConfig&&(o=u.textConfig),!s&&u.textContent&&(s=u.textContent)}if(!e&&s){var v=s;!v.type&&(v.type="text")}var c=e?t[e]:t.normal;c.cfg=o,c.conOpt=s}function ar(r,e){return e?r?r[e]:null:r}function sn(r,e,t){var a=e&&e.style;return a==null&&t===Gt&&r&&(a=r.styleEmphasis),a}function Bp(r,e,t,a,n){var i=a.children,o=i?i.length:0,l=a.$mergeChildren,s=l==="byName"||a.diffChildrenByName,u=l===!1;if(!(!o&&!s&&!u)){if(s){Fp({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:n,group:e});return}u&&e.removeAll();for(var v=0;v<o;v++){var c=i[v],f=e.childAt(v);c?(c.ignore==null&&(c.ignore=!1),ln(r,f,t,c,n,e)):f.ignore=!0}for(var h=e.childCount()-1;h>=v;h--){var d=e.childAt(h);$p(e,d,n)}}}function $p(r,e,t){e&&Ha(e,kt(r).option,t)}function Fp(r){new fe(r.oldChildren,r.newChildren,xi,xi,r).add(wi).update(wi).remove(Hp).execute()}function xi(r,e){var t=r&&r.name;return t!=null?t:Mp+e}function wi(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;ln(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function Hp(r){var e=this.context,t=e.oldChildren[r];t&&Ha(t,kt(t).option,e.seriesModel)}function nl(r){return r&&(r.pathData||r.d)}function Wp(r){return r&&(Lt(r,"pathData")||Lt(r,"d"))}function Up(r){r.registerChartView(Vp),r.registerSeriesModel(Sp)}function xa(r,e){e=e||{};var t=r.coordinateSystem,a=r.axis,n={},i=a.position,o=a.orient,l=t.getRect(),s=[l.x,l.x+l.width,l.y,l.y+l.height],u={horizontal:{top:s[2],bottom:s[3]},vertical:{left:s[0],right:s[1]}};n.position=[o==="vertical"?u.vertical[i]:s[0],o==="horizontal"?u.horizontal[i]:s[3]];var v={horizontal:0,vertical:1};n.rotation=Math.PI/2*v[o];var c={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=c[i],r.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Pt(e.labelInside,r.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var f=e.rotate;return f==null&&(f=r.get(["axisLabel","rotate"])),n.labelRotation=i==="top"?-f:f,n.z2=1,n}var Zp=["axisLine","axisTickLabel","axisName"],Yp=["splitArea","splitLine"],Xp=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,a,n,i){var o=this.group;o.removeAll();var l=this._axisGroup;this._axisGroup=new rt;var s=xa(t),u=new Ss(t,s);N(Zp,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),N(Yp,function(v){t.get([v,"show"])&&qp[v](this,this.group,this._axisGroup,t)},this),bs(l,this._axisGroup,t),r.prototype.render.call(this,t,a,n,i)},e.prototype.remove=function(){xs(this)},e.type="singleAxis",e}(wo),qp={splitLine:function(r,e,t,a){var n=a.axis;if(!n.scale.isBlank()){var i=a.getModel("splitLine"),o=i.getModel("lineStyle"),l=o.get("color");l=l instanceof Array?l:[l];for(var s=o.get("width"),u=a.coordinateSystem.getRect(),v=n.isHorizontal(),c=[],f=0,h=n.getTicksCoords({tickModel:i}),d=[],p=[],g=0;g<h.length;++g){var m=n.toGlobalCoord(h[g].coord);v?(d[0]=m,d[1]=u.y,p[0]=m,p[1]=u.y+u.height):(d[0]=u.x,d[1]=m,p[0]=u.x+u.width,p[1]=m);var S=new Qe({shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},silent:!0});ws(S.shape,s);var y=f++%l.length;c[y]=c[y]||[],c[y].push(S)}for(var b=o.getLineStyle(["color"]),g=0;g<c.length;++g)e.add(Is(c[g],{style:ht({stroke:l[g%l.length]},b),silent:!0}))}},splitArea:function(r,e,t,a){Ls(r,t,a,a)}},Kp=Xp,il=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(yr);pe(il,_s.prototype);var qr=il,Qp=function(r){G(e,r);function e(t,a,n,i,o){var l=r.call(this,t,a,n)||this;return l.type=i||"value",l.position=o||"bottom",l}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,a){return this.coordinateSystem.pointToData(t)[0]},e}(Ds),jp=Qp,ol=["single"],Jp=function(){function r(e,t,a){this.type="single",this.dimension="single",this.dimensions=ol,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=this.dimension,i=new jp(n,As(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(a){if(a.coordinateSystem===this){var n=a.getData();N(n.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(n,i)},this),Ts(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=he({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,a=t.isHorizontal(),n=a?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),this._updateAxisTransform(t,a?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var a=e.getExtent(),n=a[0]+a[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return n-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return n-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),a=this.getAxis(),n=a.orient;return n==="horizontal"?a.contain(a.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=Ii(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=Ii(t);return n===this?this.pointToData(a):null},r}();function Ii(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function td(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new Jp(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",bo).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var ed={create:td,dimensions:ol},rd=ed,Li=["x","y"],ad=["width","height"],nd=function(r){G(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var l=n.axis,s=l.coordinateSystem,u=Kr(s,1-nr(l)),v=s.dataToPoint(a)[0],c=i.get("type");if(c&&c!=="none"){var f=Cs(i),h=id[c](l,v,u);h.style=f,t.graphicKey=h.type,t.pointer=h}var d=xa(n);Ms(a,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=xa(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Ps(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,l=o.coordinateSystem,s=nr(o),u=Kr(l,s),v=[t.x,t.y];v[s]+=a[s],v[s]=Math.min(u[1],v[s]),v[s]=Math.max(u[0],v[s]);var c=Kr(l,1-s),f=(c[1]+c[0])/2,h=[f,f];return h[s]=v[s],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(Es),id={line:function(r,e,t){var a=Ns([e,t[0]],[e,t[1]],nr(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:Vs([e-a/2,t[0]],[a,n],nr(r))}}};function nr(r){return r.isHorizontal()?0:1}function Kr(r,e){var t=r.getRect();return[t[Li[e]],t[Li[e]]+t[ad[e]]]}var od=nd,ld=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(mr);function sd(r){U(Io),wo.registerAxisPointerClass("SingleAxisPointer",od),r.registerComponentView(ld),r.registerComponentView(Kp),r.registerComponentModel(qr),Rs(r,"single",qr,qr.defaultOption),r.registerCoordinateSystem("single",rd)}var ud=["rect","polygon","keep","clear"];function vd(r,e){var t=Rt(r?r.brush:[]);if(!!t.length){var a=[];N(t,function(s){var u=s.hasOwnProperty("toolbox")?s.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;H(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),l=o.type||(o.type=[]);l.push.apply(l,a),cd(l),e&&!l.length&&l.push.apply(l,ud)}}function cd(r){var e={};N(r,function(t){e[t]=1}),r.length=0,N(e,function(t,a){r.push(a)})}function fd(r){var e=r.brushType,t={point:function(a){return _i[e].point(a,t,r)},rect:function(a){return _i[e].rect(a,t,r)}};return t}var _i={lineX:Di(0),lineY:Di(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&ge(t.range,r[0],r[1])},rect:function(r,e,t){var a=t.range;if(!r||a.length<=1)return!1;var n=r.x,i=r.y,o=r.width,l=r.height,s=a[0];if(ge(a,n,i)||ge(a,n+o,i)||ge(a,n,i+l)||ge(a,n+o,i+l)||Et.create(r).contain(s[0],s[1])||Oe(n,i,n+o,i,a)||Oe(n,i,n,i+l,a)||Oe(n+o,i,n+o,i+l,a)||Oe(n,i+l,n+o,i+l,a))return!0}}};function Di(r){var e=["x","y"],t=["width","height"];return{point:function(a,n,i){if(a){var o=i.range,l=a[r];return Se(l,o)}},rect:function(a,n,i){if(a){var o=i.range,l=[a[e[r]],a[e[r]]+a[t[r]]];return l[1]<l[0]&&l.reverse(),Se(l[0],o)||Se(l[1],o)||Se(o[0],l)||Se(o[1],l)}}}}function Se(r,e){return e[0]<=r&&r<=e[1]}var Ai=["inBrush","outOfBrush"],Qr="__ecBrushSelect",wa="__ecInBrushSelectEvent";function ll(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new zs(e.option,r);t.setInputRanges(e.areas,r)})}function hd(r,e,t){var a=[],n,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),ll(r),r.eachComponent({mainType:"brush"},function(o,l){var s={brushId:o.id,brushIndex:l,brushName:o.name,areas:Me(o.areas),selected:[]};a.push(s);var u=o.option,v=u.brushLink,c=[],f=[],h=[],d=!1;l||(n=u.throttleType,i=u.throttleDelay);var p=F(o.areas,function(x){var w=yd[x.brushType],I=ht({boundingRect:w?w(x):void 0},x);return I.selectors=fd(I),I}),g=ks(o.option,Ai,function(x){x.mappingMethod="fixed"});H(v)&&N(v,function(x){c[x]=1});function m(x){return v==="all"||!!c[x]}function S(x){return!!x.length}r.eachSeries(function(x,w){var I=h[w]=[];x.subType==="parallel"?y(x,w):b(x,w,I)});function y(x,w){var I=x.coordinateSystem;d=d||I.hasAxisBrushed(),m(w)&&I.eachActiveState(x.getData(),function(L,_){L==="active"&&(f[_]=1)})}function b(x,w,I){if(!(!x.brushSelector||gd(o,w))&&(N(p,function(_){o.brushTargetManager.controlSeries(_,x,r)&&I.push(_),d=d||S(I)}),m(w)&&S(I))){var L=x.getData();L.each(function(_){Ti(x,I,L,_)&&(f[_]=1)})}}r.eachSeries(function(x,w){var I={seriesId:x.id,seriesIndex:w,seriesName:x.name,dataIndex:[]};s.selected.push(I);var L=h[w],_=x.getData(),D=m(w)?function(A){return f[A]?(I.dataIndex.push(_.getRawIndex(A)),"inBrush"):"outOfBrush"}:function(A){return Ti(x,L,_,A)?(I.dataIndex.push(_.getRawIndex(A)),"inBrush"):"outOfBrush"};(m(w)?d:S(L))&&Gs(Ai,g,_,D)})}),pd(e,n,i,a,t)}function pd(r,e,t,a,n){if(!!n){var i=r.getZr();if(!i[wa]){i[Qr]||(i[Qr]=dd);var o=Os(i,Qr,t,e);o(r,a)}}}function dd(r,e){if(!r.isDisposed()){var t=r.getZr();t[wa]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[wa]=!1}}function Ti(r,e,t,a){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(r.brushSelector(a,t,o.selectors,o))return!0}}function gd(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(H(t)?Dt(t,e)<0:e!==t)}var yd={rect:function(r){return Ci(r.range)},polygon:function(r){for(var e,t=r.range,a=0,n=t.length;a<n;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[a];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&Ci(e)}};function Ci(r){return new Et(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var md=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new Bs(a.getZr())).on("brush",lt(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){ll(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:Me(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:Me(n),$from:a})},e.type="brush",e}(mr),Sd=md,bd="#ddd",xd=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&$s(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:bd},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=F(t,function(a){return Mi(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Mi(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.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},e}(yr);function Mi(r,e){return fa({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Xt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var wd=xd,Id=["rect","polygon","lineX","lineY","keep","clear"],Ld=function(r){G(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,l;a.eachComponent({mainType:"brush"},function(s){i=s.brushType,o=s.brushOption.brushMode||"single",l=l||!!s.areas.length}),this._brushType=i,this._brushMode=o,N(t.get("type",!0),function(s){t.setIconStatus(s,(s==="keep"?o==="multiple":s==="clear"?l:s===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return N(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:Id.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:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(Fs),_d=Ld;function Dd(r){r.registerComponentView(Sd),r.registerComponentModel(wd),r.registerPreprocessor(vd),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,hd),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},De),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},De),Hs("brush",_d)}function un(r,e){if(!r)return!1;for(var t=H(r)?r:[r],a=0;a<t.length;a++)if(t[a]&&t[a][e])return!0;return!1}function Ue(r){ka(r,"label",["show"])}var Ze=bt(),sl=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Ws.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,a){this._mergeOption(t,a,!1,!1)},e.prototype._mergeOption=function(t,a,n,i){var o=this.mainType;n||a.eachSeries(function(l){var s=l.get(this.mainType,!0),u=Ze(l)[o];if(!s||!s.data){Ze(l)[o]=null;return}u?u._mergeOption(s,a,!0):(i&&Ue(s),N(s.data,function(v){v instanceof Array?(Ue(v[0]),Ue(v[1])):Ue(v)}),u=this.createMarkerModelFromSeries(s,this,a),W(u,{mainType:this.mainType,seriesIndex:l.seriesIndex,name:l.name,createdBySelf:!0}),u.__hostSeries=l),Ze(l)[o]=u},this)},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),l=i.getName(t);return zt("section",{header:this.name,blocks:[zt("nameValue",{name:l,value:o,noName:!l,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,a){return Ze(t)[a]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(yr);pe(sl,Us.prototype);var jt=sl,Ad=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(jt),Td=Ad;function Ia(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function Cd(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function Ye(r,e,t,a,n,i){var o=[],l=Zs(e,a),s=l?e.getCalculationInfo("stackResultDimension"):a,u=vn(e,s,r),v=e.indicesOfNearest(s,u)[0];o[n]=e.get(t,v),o[i]=e.get(s,v);var c=e.get(a,v),f=Ys(e.get(a,v));return f=Math.min(f,20),f>=0&&(o[i]=+o[i].toFixed(f)),[o,c]}var jr={min:tt(Ye,"min"),max:tt(Ye,"max"),average:tt(Ye,"average"),median:tt(Ye,"median")};function Ve(r,e){var t=r.getData(),a=r.coordinateSystem;if(e&&!Cd(e)&&!H(e.coord)&&a){var n=a.dimensions,i=ul(e,t,a,r);if(e=Me(e),e.type&&jr[e.type]&&i.baseAxis&&i.valueAxis){var o=Dt(n,i.baseAxis.dim),l=Dt(n,i.valueAxis.dim),s=jr[e.type](t,i.baseDataDim,i.valueDataDim,o,l);e.coord=s[0],e.value=s[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],v=0;v<2;v++)jr[u[v]]&&(u[v]=vn(t,t.mapDimension(n[v]),u[v]));e.coord=u}}return e}function ul(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(Md(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function Md(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Re(r,e){return r&&r.containData&&e.coord&&!Ia(e)?r.containData(e.coord):!0}function Pd(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Ia(e)&&!Ia(t)?r.containZone(e.coord,t.coord):!0}function vl(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return je(o,e[i])}:function(t,a,n,i){return je(t.value,e[i])}}function vn(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Jr=bt(),Ed=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=re()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(l){Jr(l).keep=!1}),a.eachSeries(function(l){var s=jt.getMarkerModelFromSeries(l,i.type);s&&i.renderSeries(l,s,a,n)}),o.each(function(l){!Jr(l).keep&&i.group.remove(l.group)})},e.prototype.markKeep=function(t){Jr(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;N(t,function(i){var o=jt.getMarkerModelFromSeries(i,n.type);if(o){var l=o.getData();l.eachItemGraphicEl(function(s){s&&(a?Xs(s):qs(s))})}})},e.type="marker",e}(mr),cn=Ed;function Pi(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,l=O(i.get("x"),t.getWidth()),s=O(i.get("y"),t.getHeight());if(!isNaN(l)&&!isNaN(s))o=[l,s];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),v=r.get(a.dimensions[1],n);o=a.dataToPoint([u,v])}isNaN(l)||(o[0]=l),isNaN(s)||(o[1]=s),r.setItemLayout(n,o)})}var Nd=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=jt.getMarkerModelFromSeries(i,"markPoint");o&&(Pi(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,v=u.get(l)||u.set(l,new Va),c=Vd(o,t,a);a.setData(c),Pi(a.getData(),t,i),c.each(function(f){var h=c.getItemModel(f),d=h.getShallow("symbol"),p=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),m=h.getShallow("symbolOffset"),S=h.getShallow("symbolKeepAspect");if(nt(d)||nt(p)||nt(g)||nt(m)){var y=a.getRawValue(f),b=a.getDataParams(f);nt(d)&&(d=d(y,b)),nt(p)&&(p=p(y,b)),nt(g)&&(g=g(y,b)),nt(m)&&(m=m(y,b))}var x=h.getModel("itemStyle").getItemStyle(),w=Wa(s,"color");x.fill||(x.fill=w),c.setItemVisual(f,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:m,symbolKeepAspect:S,style:x})}),v.updateData(c),this.group.add(v.group),c.eachItemGraphicEl(function(f){f.traverse(function(h){et(h).dataModel=a})}),this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(cn);function Vd(r,e,t){var a;r?a=F(r&&r.dimensions,function(l){var s=e.getData().getDimensionInfo(e.getData().mapDimension(l))||{};return W(W({},s),{name:l,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new mt(a,t),i=F(t.get("data"),tt(Ve,e));r&&(i=It(i,tt(Re,r)));var o=vl(!!r,a);return n.initData(i,null,o),n}var Rd=Nd;function kd(r){r.registerComponentModel(Td),r.registerComponentView(Rd),r.registerPreprocessor(function(e){un(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Gd=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.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"},e}(jt),zd=Gd,Xe=bt(),Od=function(r,e,t,a){var n=r.getData(),i;if(H(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var l=void 0,s=void 0;if(a.yAxis!=null||a.xAxis!=null)l=e.getAxis(a.yAxis!=null?"y":"x"),s=Pt(a.yAxis,a.xAxis);else{var u=ul(a,n,e,r);l=u.valueAxis;var v=Ks(n,u.valueDataDim);s=vn(n,v,o)}var c=l.dim==="x"?0:1,f=1-c,h=Me(a),d={coord:[]};h.type=null,h.coord=[],h.coord[f]=-1/0,d.coord[f]=1/0;var p=t.get("precision");p>=0&&Bt(s)&&(s=+s.toFixed(Math.min(p,20))),h.coord[c]=d.coord[c]=s,i=[h,d,{type:o,valueIndex:a.valueIndex,value:s}]}else i=[]}var g=[Ve(r,i[0]),Ve(r,i[1]),W({},i[2])];return g[2].type=g[2].type||null,fa(g[2],g[0]),fa(g[2],g[1]),g};function ir(r){return!isNaN(r)&&!isFinite(r)}function Ei(r,e,t,a){var n=1-r,i=a.dimensions[r];return ir(e[n])&&ir(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function Bd(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(Ei(1,t,a,r)||Ei(0,t,a,r)))return!0}return Re(r,e[0])&&Re(r,e[1])}function ta(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),l,s=O(o.get("x"),n.getWidth()),u=O(o.get("y"),n.getHeight());if(!isNaN(s)&&!isNaN(u))l=[s,u];else{if(a.getMarkerPosition)l=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var v=i.dimensions,c=r.get(v[0],e),f=r.get(v[1],e);l=i.dataToPoint([c,f])}if(gr(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=i.dimensions;ir(r.get(v[0],e))?l[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):ir(r.get(v[1],e))&&(l[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(s)||(l[0]=s),isNaN(u)||(l[1]=u)}r.setItemLayout(e,l)}var $d=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=jt.getMarkerModelFromSeries(i,"markLine");if(o){var l=o.getData(),s=Xe(o).from,u=Xe(o).to;s.each(function(v){ta(s,v,!0,i,n),ta(u,v,!1,i,n)}),l.each(function(v){l.setItemLayout(v,[s.getItemLayout(v),u.getItemLayout(v)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,v=u.get(l)||u.set(l,new en);this.group.add(v.group);var c=Fd(o,t,a),f=c.from,h=c.to,d=c.line;Xe(a).from=f,Xe(a).to=h,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),m=a.get("symbolRotate"),S=a.get("symbolOffset");H(p)||(p=[p,p]),H(g)||(g=[g,g]),H(m)||(m=[m,m]),H(S)||(S=[S,S]),c.from.each(function(b){y(f,b,!0),y(h,b,!1)}),d.each(function(b){var x=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[f.getItemLayout(b),h.getItemLayout(b)]),x.stroke==null&&(x.stroke=f.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(b,"symbolOffset"),fromSymbolRotate:f.getItemVisual(b,"symbolRotate"),fromSymbolSize:f.getItemVisual(b,"symbolSize"),fromSymbol:f.getItemVisual(b,"symbol"),toSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(b,"symbolOffset"),toSymbolRotate:h.getItemVisual(b,"symbolRotate"),toSymbolSize:h.getItemVisual(b,"symbolSize"),toSymbol:h.getItemVisual(b,"symbol"),style:x})}),v.updateData(d),c.line.eachItemGraphicEl(function(b){et(b).dataModel=a,b.traverse(function(x){et(x).dataModel=a})});function y(b,x,w){var I=b.getItemModel(x);ta(b,x,w,t,i);var L=I.getModel("itemStyle").getItemStyle();L.fill==null&&(L.fill=Wa(s,"color")),b.setItemVisual(x,{symbolKeepAspect:I.get("symbolKeepAspect"),symbolOffset:Ft(I.get("symbolOffset",!0),S[w?0:1]),symbolRotate:Ft(I.get("symbolRotate",!0),m[w?0:1]),symbolSize:Ft(I.get("symbolSize"),g[w?0:1]),symbol:Ft(I.get("symbol",!0),p[w?0:1]),style:L})}this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(cn);function Fd(r,e,t){var a;r?a=F(r&&r.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return W(W({},v),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new mt(a,t),i=new mt(a,t),o=new mt([],t),l=F(t.get("data"),tt(Od,e,r,t));r&&(l=It(l,tt(Bd,r)));var s=vl(!!r,a);return n.initData(F(l,function(u){return u[0]}),null,s),i.initData(F(l,function(u){return u[1]}),null,s),o.initData(F(l,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}var Hd=$d;function Wd(r){r.registerComponentModel(zd),r.registerComponentView(Hd),r.registerPreprocessor(function(e){un(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Ud=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(jt),Zd=Ud,qe=bt(),Yd=function(r,e,t,a){var n=Ve(r,a[0]),i=Ve(r,a[1]),o=n.coord,l=i.coord;o[0]=Pt(o[0],-1/0),o[1]=Pt(o[1],-1/0),l[0]=Pt(l[0],1/0),l[1]=Pt(l[1],1/0);var s=So([{},n,i]);return s.coord=[n.coord,i.coord],s.x0=n.x,s.y0=n.y,s.x1=i.x,s.y1=i.y,s};function or(r){return!isNaN(r)&&!isFinite(r)}function Ni(r,e,t,a){var n=1-r;return or(e[n])&&or(t[n])}function Xd(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return gr(r,"cartesian2d")?t&&a&&(Ni(1,t,a)||Ni(0,t,a))?!0:Pd(r,n,i):Re(r,n)||Re(r,i)}function Vi(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),l,s=O(o.get(t[0]),n.getWidth()),u=O(o.get(t[1]),n.getHeight());if(!isNaN(s)&&!isNaN(u))l=[s,u];else{if(a.getMarkerPosition)l=a.getMarkerPosition(r.getValues(t,e));else{var v=r.get(t[0],e),c=r.get(t[1],e),f=[v,c];i.clampData&&i.clampData(f,f),l=i.dataToPoint(f,!0)}if(gr(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=r.get(t[0],e),c=r.get(t[1],e);or(v)?l[0]=h.toGlobalCoord(h.getExtent()[t[0]==="x0"?0:1]):or(c)&&(l[1]=d.toGlobalCoord(d.getExtent()[t[1]==="y0"?0:1]))}isNaN(s)||(l[0]=s),isNaN(u)||(l[1]=u)}return l}var Ri=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qd=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=jt.getMarkerModelFromSeries(i,"markArea");if(o){var l=o.getData();l.each(function(s){var u=F(Ri,function(c){return Vi(l,s,c,i,n)});l.setItemLayout(s,u);var v=l.getItemGraphicEl(s);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,l=t.id,s=t.getData(),u=this.markerGroupMap,v=u.get(l)||u.set(l,{group:new rt});this.group.add(v.group),this.markKeep(v);var c=Kd(o,t,a);a.setData(c),c.each(function(f){var h=F(Ri,function(L){return Vi(c,f,L,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),m=p.getExtent(),S=[d.parse(c.get("x0",f)),d.parse(c.get("x1",f))],y=[p.parse(c.get("y0",f)),p.parse(c.get("y1",f))];ca(S),ca(y);var b=!(g[0]>S[1]||g[1]<S[0]||m[0]>y[1]||m[1]<y[0]),x=!b;c.setItemLayout(f,{points:h,allClipped:x});var w=c.getItemModel(f).getModel("itemStyle").getItemStyle(),I=Wa(s,"color");w.fill||(w.fill=I,gt(w.fill)&&(w.fill=oa(w.fill,.4))),w.stroke||(w.stroke=I),c.setItemVisual(f,"style",w)}),c.diff(qe(v).data).add(function(f){var h=c.getItemLayout(f);if(!h.allClipped){var d=new Ae({shape:{points:h.points}});c.setItemGraphicEl(f,d),v.group.add(d)}}).update(function(f,h){var d=qe(v).data.getItemGraphicEl(h),p=c.getItemLayout(f);p.allClipped?d&&v.group.remove(d):(d?it(d,{shape:{points:p.points}},a,f):d=new Ae({shape:{points:p.points}}),c.setItemGraphicEl(f,d),v.group.add(d))}).remove(function(f){var h=qe(v).data.getItemGraphicEl(f);v.group.remove(h)}).execute(),c.eachItemGraphicEl(function(f,h){var d=c.getItemModel(h),p=c.getItemVisual(h,"style");f.useStyle(c.getItemVisual(h,"style")),ae(f,Ot(d),{labelFetcher:a,labelDataIndex:h,defaultText:c.getName(h)||"",inheritColor:gt(p.fill)?oa(p.fill,1):"#000"}),At(f,d),st(f,null,null,d.get(["emphasis","disabled"])),et(f).dataModel=a}),qe(v).data=c,v.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}(cn);function Kd(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=F(r&&r.dimensions,function(u){var v=e.getData(),c=v.getDimensionInfo(v.mapDimension(u))||{};return W(W({},c),{name:u,ordinalMeta:null})});n=F(i,function(u,v){return{name:u,type:o[v%2].type}}),a=new mt(n,t)}else n=[{name:"value",type:"float"}],a=new mt(n,t);var l=F(t.get("data"),tt(Yd,e,r,t));r&&(l=It(l,tt(Xd,r)));var s=r?function(u,v,c,f){var h=u.coord[Math.floor(f/2)][f%2];return je(h,n[f])}:function(u,v,c,f){return je(u.value,n[f])};return a.initData(l,null,s),a.hasItemOption=!0,a}var Qd=qd;function jd(r){r.registerComponentModel(Zd),r.registerComponentView(Qd),r.registerPreprocessor(function(e){un(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var ki={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Jd=function(){function r(e){var t=this._condVal=gt(e)?new RegExp(e):Js(e)?e:null;if(t==null){var a="";J(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return gt(t)?this._condVal.test(e):Bt(t)?this._condVal.test(e+""):!1},r}(),tg=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),eg=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),rg=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),ag=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),ng=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,a=t(this.valueGetterParam),n=e?this.valueParser(a):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:a))return!1;return!0},r}();function fn(r,e){if(r===!0||r===!1){var t=new tg;return t.value=r,t}var a="";return cl(r)||J(a),r.and?Gi("and",r,e):r.or?Gi("or",r,e):r.not?ig(r,e):og(r,e)}function Gi(r,e,t){var a=e[r],n="";H(a)||J(n),a.length||J(n);var i=r==="and"?new eg:new rg;return i.children=F(a,function(o){return fn(o,t)}),i.children.length||J(n),i}function ig(r,e){var t=r.not,a="";cl(t)||J(a);var n=new ag;return n.child=fn(t,e),n.child||J(a),n}function og(r,e){for(var t="",a=e.prepareGetValue(r),n=[],i=Aa(r),o=r.parser,l=o?Lo(o):null,s=0;s<i.length;s++){var u=i[s];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var v=Lt(ki,u)?ki[u]:u,c=r[u],f=l?l(c):c,h=Qs(v,f)||v==="reg"&&new Jd(f);h||J(t),n.push(h)}}n.length||J(t);var d=new ng;return d.valueGetterParam=a,d.valueParser=l,d.getValue=e.getValue,d.subCondList=n,d}function cl(r){return yo(r)&&!js(r)}var lg=function(){function r(e,t){this._cond=fn(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function sg(r,e){return new lg(r,e)}var ug={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,a=sg(r.config,{valueGetterAttrMap:re({dimension:!0}),prepareGetValue:function(l){var s="",u=l.dimension;Lt(l,"dimension")||J(s);var v=e.getDimensionInfo(u);return v||J(s),{dimIdx:v.index}},getValue:function(l){return e.retrieveValueFromItem(t,l.dimIdx)}}),n=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),a.evaluate()&&n.push(t);return{data:n}}},vg={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,a="",n=Rt(t);n.length||J(a);var i=[];N(n,function(v){var c=v.dimension,f=v.order,h=v.parser,d=v.incomparable;if(c==null&&J(a),f!=="asc"&&f!=="desc"&&J(a),d&&d!=="min"&&d!=="max"){var p="";J(p)}if(f!=="asc"&&f!=="desc"){var g="";J(g)}var m=e.getDimensionInfo(c);m||J(a);var S=h?Lo(h):null;h&&!S&&J(a),i.push({dimIdx:m.index,parser:S,comparator:new tu(f,d)})});var o=e.sourceFormat;o!==go&&o!==eu&&J(a);for(var l=[],s=0,u=e.count();s<u;s++)l.push(e.getRawDataItem(s));return l.sort(function(v,c){for(var f=0;f<i.length;f++){var h=i[f],d=e.retrieveValueFromItem(v,h.dimIdx),p=e.retrieveValueFromItem(c,h.dimIdx);h.parser&&(d=h.parser(d),p=h.parser(p));var g=h.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:l}}};function cg(r){r.registerTransform(ug),r.registerTransform(vg)}var fg=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,a,n){r.prototype.init.call(this,t,a,n),this._sourceManager=new ru(this),Pn(this)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),Pn(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:au},e}(yr),hg=function(r){G(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(mr);function pg(r){r.registerComponentModel(fg),r.registerComponentView(hg)}var Ct=nu.CMD;function ce(r,e){return Math.abs(r-e)<1e-5}function La(r){var e=r.data,t=r.len(),a=[],n,i=0,o=0,l=0,s=0;function u(E,T){n&&n.length>2&&a.push(n),n=[E,T]}function v(E,T,C,P){ce(E,C)&&ce(T,P)||n.push(E,T,C,P,C,P)}function c(E,T,C,P,V,R){var k=Math.abs(T-E),z=Math.tan(k/4)*4/3,B=T<E?-1:1,Y=Math.cos(E),X=Math.sin(E),Q=Math.cos(T),ot=Math.sin(T),Tt=Y*V+C,Z=X*R+P,$=Q*V+C,K=ot*R+P,q=V*z*B,j=R*z*B;n.push(Tt-q*X,Z+j*Y,$+q*ot,K-j*Q,$,K)}for(var f,h,d,p,g=0;g<t;){var m=e[g++],S=g===1;switch(S&&(i=e[g],o=e[g+1],l=i,s=o,(m===Ct.L||m===Ct.C||m===Ct.Q)&&(n=[l,s])),m){case Ct.M:i=l=e[g++],o=s=e[g++],u(l,s);break;case Ct.L:f=e[g++],h=e[g++],v(i,o,f,h),i=f,o=h;break;case Ct.C:n.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Ct.Q:f=e[g++],h=e[g++],d=e[g++],p=e[g++],n.push(i+2/3*(f-i),o+2/3*(h-o),d+2/3*(f-d),p+2/3*(h-p),d,p),i=d,o=p;break;case Ct.A:var y=e[g++],b=e[g++],x=e[g++],w=e[g++],I=e[g++],L=e[g++]+I;g+=1;var _=!e[g++];f=Math.cos(I)*x+y,h=Math.sin(I)*w+b,S?(l=f,s=h,u(l,s)):v(i,o,f,h),i=Math.cos(L)*x+y,o=Math.sin(L)*w+b;for(var D=(_?-1:1)*Math.PI/2,A=I;_?A>L:A<L;A+=D){var M=_?Math.max(A+D,L):Math.min(A+D,L);c(A,M,y,b,x,w)}break;case Ct.R:l=i=e[g++],s=o=e[g++],f=l+e[g++],h=s+e[g++],u(f,s),v(f,s,f,h),v(f,h,l,h),v(l,h,l,s),v(l,s,f,s);break;case Ct.Z:n&&v(i,o,l,s),i=l,o=s;break}}return n&&n.length>2&&a.push(n),a}function _a(r,e,t,a,n,i,o,l,s,u){if(ce(r,t)&&ce(e,a)&&ce(n,o)&&ce(i,l)){s.push(o,l);return}var v=2/u,c=v*v,f=o-r,h=l-e,d=Math.sqrt(f*f+h*h);f/=d,h/=d;var p=t-r,g=a-e,m=n-o,S=i-l,y=p*p+g*g,b=m*m+S*S;if(y<c&&b<c){s.push(o,l);return}var x=f*p+h*g,w=-f*m-h*S,I=y-x*x,L=b-w*w;if(I<c&&x>=0&&L<c&&w>=0){s.push(o,l);return}var _=[],D=[];Je(r,t,n,o,.5,_),Je(e,a,i,l,.5,D),_a(_[0],D[0],_[1],D[1],_[2],D[2],_[3],D[3],s,u),_a(_[4],D[4],_[5],D[5],_[6],D[6],_[7],D[7],s,u)}function dg(r,e){var t=La(r),a=[];e=e||1;for(var n=0;n<t.length;n++){var i=t[n],o=[],l=i[0],s=i[1];o.push(l,s);for(var u=2;u<i.length;){var v=i[u++],c=i[u++],f=i[u++],h=i[u++],d=i[u++],p=i[u++];_a(l,s,v,c,f,h,d,p,o,e),l=d,s=p}a.push(o)}return a}function fl(r,e,t){var a=r[e],n=r[1-e],i=Math.abs(a/n),o=Math.ceil(Math.sqrt(i*t)),l=Math.floor(t/o);l===0&&(l=1,o=t);for(var s=[],u=0;u<o;u++)s.push(l);var v=o*l,c=t-v;if(c>0)for(var u=0;u<c;u++)s[u%o]+=1;return s}function zi(r,e,t){for(var a=r.r0,n=r.r,i=r.startAngle,o=r.endAngle,l=Math.abs(o-i),s=l*n,u=n-a,v=s>Math.abs(u),c=fl([s,u],v?0:1,e),f=(v?l:u)/c.length,h=0;h<c.length;h++)for(var d=(v?u:l)/c[h],p=0;p<c[h];p++){var g={};v?(g.startAngle=i+f*h,g.endAngle=i+f*(h+1),g.r0=a+d*p,g.r=a+d*(p+1)):(g.startAngle=i+d*p,g.endAngle=i+d*(p+1),g.r0=a+f*h,g.r=a+f*(h+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function gg(r,e,t){for(var a=r.width,n=r.height,i=a>n,o=fl([a,n],i?0:1,e),l=i?"width":"height",s=i?"height":"width",u=i?"x":"y",v=i?"y":"x",c=r[l]/o.length,f=0;f<o.length;f++)for(var h=r[s]/o[f],d=0;d<o[f];d++){var p={};p[u]=f*c,p[v]=d*h,p[l]=c,p[s]=h,p.x+=r.x,p.y+=r.y,t.push(p)}}function Oi(r,e,t,a){return r*a-t*e}function yg(r,e,t,a,n,i,o,l){var s=t-r,u=a-e,v=o-n,c=l-i,f=Oi(v,c,s,u);if(Math.abs(f)<1e-6)return null;var h=r-n,d=e-i,p=Oi(h,d,v,c)/f;return p<0||p>1?null:new Wt(p*s+r,p*u+e)}function mg(r,e,t){var a=new Wt;Wt.sub(a,t,e),a.normalize();var n=new Wt;Wt.sub(n,r,e);var i=n.dot(a);return i}function se(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function Sg(r,e,t){for(var a=r.length,n=[],i=0;i<a;i++){var o=r[i],l=r[(i+1)%a],s=yg(o[0],o[1],l[0],l[1],e.x,e.y,t.x,t.y);s&&n.push({projPt:mg(s,e,t),pt:s,idx:i})}if(n.length<2)return[{points:r},{points:r}];n.sort(function(g,m){return g.projPt-m.projPt});var u=n[0],v=n[n.length-1];if(v.idx<u.idx){var c=u;u=v,v=c}for(var f=[u.pt.x,u.pt.y],h=[v.pt.x,v.pt.y],d=[f],p=[h],i=u.idx+1;i<=v.idx;i++)se(d,r[i].slice());se(d,h),se(d,f);for(var i=v.idx+1;i<=u.idx+a;i++)se(p,r[i%a].slice());return se(p,f),se(p,h),[{points:d},{points:p}]}function Bi(r){var e=r.points,t=[],a=[];cr(e,t,a);var n=new Et(t[0],t[1],a[0]-t[0],a[1]-t[1]),i=n.width,o=n.height,l=n.x,s=n.y,u=new Wt,v=new Wt;return i>o?(u.x=v.x=l+i/2,u.y=s,v.y=s+o):(u.y=v.y=s+o/2,u.x=l,v.x=l+i),Sg(e,u,v)}function lr(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);lr(r,i[0],n,a),lr(r,i[1],t-n,a)}return a}function bg(r,e){for(var t=[],a=0;a<e;a++)t.push(Ua(r));return t}function xg(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function wg(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function Ig(r,e){var t=[],a=r.shape,n;switch(r.type){case"rect":gg(a,e,t),n=qt;break;case"sector":zi(a,e,t),n=Ce;break;case"circle":zi({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},e,t),n=Ce;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,l=F(dg(r.getUpdatedPathProxy(),o),function(m){return wg(m)}),s=l.length;if(s===0)lr(Bi,{points:l[0]},e,t);else if(s===e)for(var u=0;u<s;u++)t.push({points:l[u]});else{var v=0,c=F(l,function(m){var S=[],y=[];cr(m,S,y);var b=(y[1]-S[1])*(y[0]-S[0]);return v+=b,{poly:m,area:b}});c.sort(function(m,S){return S.area-m.area});for(var f=e,u=0;u<s;u++){var h=c[u];if(f<=0)break;var d=u===s-1?f:Math.ceil(h.area/v*e);d<0||(lr(Bi,{points:h.poly},d,t),f-=d)}}n=Ae;break}if(!n)return bg(r,e);for(var p=[],u=0;u<t.length;u++){var g=new n;g.setShape(t[u]),xg(r,g),p.push(g)}return p}function Lg(r,e){var t=r.length,a=e.length;if(t===a)return[r,e];for(var n=[],i=[],o=t<a?r:e,l=Math.min(t,a),s=Math.abs(a-t)/6,u=(l-2)/6,v=Math.ceil(s/u)+1,c=[o[0],o[1]],f=s,h=2;h<l;){var d=o[h-2],p=o[h-1],g=o[h++],m=o[h++],S=o[h++],y=o[h++],b=o[h++],x=o[h++];if(f<=0){c.push(g,m,S,y,b,x);continue}for(var w=Math.min(f,v-1)+1,I=1;I<=w;I++){var L=I/w;Je(d,g,S,b,L,n),Je(p,m,y,x,L,i),d=n[3],p=i[3],c.push(n[1],i[1],n[2],i[2],d,p),g=n[5],m=i[5],S=n[6],y=i[6]}f-=w-1}return o===r?[c,e]:[r,c]}function $i(r,e){for(var t=r.length,a=r[t-2],n=r[t-1],i=[],o=0;o<e.length;)i[o++]=a,i[o++]=n;return i}function _g(r,e){for(var t,a,n,i=[],o=[],l=0;l<Math.max(r.length,e.length);l++){var s=r[l],u=e[l],v=void 0,c=void 0;s?u?(t=Lg(s,u),v=t[0],c=t[1],a=v,n=c):(c=$i(n||s,s),v=s):(v=$i(a||u,u),c=u),i.push(v),o.push(c)}return[i,o]}function Fi(r){for(var e=0,t=0,a=0,n=r.length,i=0,o=n-2;i<n;o=i,i+=2){var l=r[o],s=r[o+1],u=r[i],v=r[i+1],c=l*v-u*s;e+=c,t+=(l+u)*c,a+=(s+v)*c}return e===0?[r[0]||0,r[1]||0]:[t/e/3,a/e/3,e]}function Dg(r,e,t,a){for(var n=(r.length-2)/6,i=1/0,o=0,l=r.length,s=l-2,u=0;u<n;u++){for(var v=u*6,c=0,f=0;f<l;f+=2){var h=f===0?v:(v+f-2)%s+2,d=r[h]-t[0],p=r[h+1]-t[1],g=e[f]-a[0],m=e[f+1]-a[1],S=g-d,y=m-p;c+=S*S+y*y}c<i&&(i=c,o=u)}return o}function Ag(r){for(var e=[],t=r.length,a=0;a<t;a+=2)e[a]=r[t-a-2],e[a+1]=r[t-a-1];return e}function Tg(r,e,t,a){for(var n=[],i,o=0;o<r.length;o++){var l=r[o],s=e[o],u=Fi(l),v=Fi(s);i==null&&(i=u[2]<0!=v[2]<0);var c=[],f=[],h=0,d=1/0,p=[],g=l.length;i&&(l=Ag(l));for(var m=Dg(l,s,u,v)*6,S=g-2,y=0;y<S;y+=2){var b=(m+y)%S+2;c[y+2]=l[b]-u[0],c[y+3]=l[b+1]-u[1]}if(c[0]=l[m]-u[0],c[1]=l[m+1]-u[1],t>0)for(var x=a/t,w=-a/2;w<=a/2;w+=x){for(var I=Math.sin(w),L=Math.cos(w),_=0,y=0;y<l.length;y+=2){var D=c[y],A=c[y+1],M=s[y]-v[0],E=s[y+1]-v[1],T=M*L-E*I,C=M*I+E*L;p[y]=T,p[y+1]=C;var P=T-D,V=C-A;_+=P*P+V*V}if(_<d){d=_,h=w;for(var R=0;R<p.length;R++)f[R]=p[R]}}else for(var k=0;k<g;k+=2)f[k]=s[k]-v[0],f[k+1]=s[k+1]-v[1];n.push({from:c,to:f,fromCp:u,toCp:v,rotation:-h})}return n}function sr(r){return r.__isCombineMorphing}var hl="__mOriginal_";function ur(r,e,t){var a=hl+e,n=r[a]||r[e];r[a]||(r[a]=r[e]);var i=t.replace,o=t.after,l=t.before;r[e]=function(){var s=arguments,u;return l&&l.apply(this,s),i?u=i.apply(this,s):u=n.apply(this,s),o&&o.apply(this,s),u}}function _e(r,e){var t=hl+e;r[t]&&(r[e]=r[t],r[t]=null)}function Hi(r,e){for(var t=0;t<r.length;t++)for(var a=r[t],n=0;n<a.length;){var i=a[n],o=a[n+1];a[n++]=e[0]*i+e[2]*o+e[4],a[n++]=e[1]*i+e[3]*o+e[5]}}function pl(r,e){var t=r.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),n=_g(La(t),La(a)),i=n[0],o=n[1],l=r.getComputedTransform(),s=e.getComputedTransform();function u(){this.transform=null}l&&Hi(i,l),s&&Hi(o,s),ur(e,"updateTransform",{replace:u}),e.transform=null;var v=Tg(i,o,10,Math.PI),c=[];ur(e,"buildPath",{replace:function(f){for(var h=e.__morphT,d=1-h,p=[],g=0;g<v.length;g++){var m=v[g],S=m.from,y=m.to,b=m.rotation*h,x=m.fromCp,w=m.toCp,I=Math.sin(b),L=Math.cos(b);iu(p,x,w,h);for(var _=0;_<S.length;_+=2){var D=S[_],A=S[_+1],M=y[_],E=y[_+1],T=D*d+M*h,C=A*d+E*h;c[_]=T*L-C*I+p[0],c[_+1]=T*I+C*L+p[1]}var P=c[0],V=c[1];f.moveTo(P,V);for(var _=2;_<S.length;){var M=c[_++],E=c[_++],R=c[_++],k=c[_++],z=c[_++],B=c[_++];P===M&&V===E&&R===z&&k===B?f.lineTo(z,B):f.bezierCurveTo(M,E,R,k,z,B),P=z,V=B}}}})}function hn(r,e,t){if(!r||!e)return e;var a=t.done,n=t.during;pl(r,e),e.__morphT=0;function i(){_e(e,"buildPath"),_e(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},ht({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),a&&a()}},t)),e}function Cg(r,e,t,a,n,i){var o=16;r=n===t?0:Math.round(32767*(r-t)/(n-t)),e=i===a?0:Math.round(32767*(e-a)/(i-a));for(var l=0,s,u=(1<<o)/2;u>0;u/=2){var v=0,c=0;(r&u)>0&&(v=1),(e&u)>0&&(c=1),l+=u*u*(3*v^c),c===0&&(v===1&&(r=u-1-r,e=u-1-e),s=r,r=e,e=s)}return l}function vr(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=F(r,function(l){var s=l.getBoundingRect(),u=l.getComputedTransform(),v=s.x+s.width/2+(u?u[4]:0),c=s.y+s.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(c,t),a=Math.max(v,a),n=Math.max(c,n),[v,c]}),o=F(i,function(l,s){return{cp:l,z:Cg(l[0],l[1],e,t,a,n),path:r[s]}});return o.sort(function(l,s){return l.z-s.z}).map(function(l){return l.path})}function dl(r){return Ig(r.path,r.count)}function Da(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Mg(r,e,t){var a=[];function n(x){for(var w=0;w<x.length;w++){var I=x[w];sr(I)?n(I.childrenRef()):I instanceof pt&&a.push(I)}}n(r);var i=a.length;if(!i)return Da();var o=t.dividePath||dl,l=o({path:e,count:i});if(l.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Da();a=vr(a),l=vr(l);for(var s=t.done,u=t.during,v=t.individualDelay,c=new Ji,f=0;f<i;f++){var h=a[f],d=l[f];d.parent=e,d.copyTransform(c),v||pl(h,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return l};function p(x){for(var w=0;w<l.length;w++)l[w].addSelfToZr(x)}ur(e,"addSelfToZr",{after:function(x){p(x)}}),ur(e,"removeSelfFromZr",{after:function(x){for(var w=0;w<l.length;w++)l[w].removeSelfFromZr(x)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,_e(e,"addSelfToZr"),_e(e,"removeSelfFromZr")}var m=l.length;if(v)for(var S=m,y=function(){S--,S===0&&(g(),s&&s())},f=0;f<m;f++){var b=v?ht({delay:(t.delay||0)+v(f,m,a[f],l[f]),done:y},t):t;hn(a[f],l[f],b)}else e.__morphT=0,e.animateTo({__morphT:1},ht({during:function(x){for(var w=0;w<m;w++){var I=l[w];I.__morphT=e.__morphT,I.dirtyShape()}u&&u(x)},done:function(){g();for(var x=0;x<r.length;x++)_e(r[x],"updateTransform");s&&s()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:a,toIndividuals:l,count:m}}function Pg(r,e,t){var a=e.length,n=[],i=t.dividePath||dl;function o(h){for(var d=0;d<h.length;d++){var p=h[d];sr(p)?o(p.childrenRef()):p instanceof pt&&n.push(p)}}if(sr(r)){o(r.childrenRef());var l=n.length;if(l<a)for(var s=0,u=l;u<a;u++)n.push(Ua(n[s++%l]));n.length=a}else{n=i({path:r,count:a});for(var v=r.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(v);if(n.length!==a)return console.error("Invalid morphing: unmatched splitted path"),Da()}n=vr(n),e=vr(e);for(var c=t.individualDelay,u=0;u<a;u++){var f=c?ht({delay:(t.delay||0)+c(u,a,n[u],e[u])},t):t;hn(n[u],e[u],f)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function Wi(r){return H(r[0])}function Ui(r,e){for(var t=[],a=r.length,n=0;n<a;n++)t.push({one:r[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%a].many.push(e[n][o])}for(var l=0,n=a-1;n>=0;n--)if(!t[n].many.length){var s=t[l].many;if(s.length<=1)if(l)l=0;else return t;var i=s.length,u=Math.ceil(i/2);t[n].many=s.slice(u,i),t[l].many=s.slice(0,u),l++}return t}var Eg={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a<r.count;a++){var n=Ua(r.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function ea(r,e,t,a,n,i){if(!r.length||!e.length)return;var o=Za("update",a,n);if(!(o&&o.duration>0))return;var l=a.getModel("universalTransition").get("delay"),s=Object.assign({setToFinal:!0},o),u,v;Wi(r)&&(u=r,v=e),Wi(e)&&(u=e,v=r);function c(m,S,y,b,x){var w=m.many,I=m.one;if(w.length===1&&!x){var L=S?w[0]:I,_=S?I:w[0];if(sr(L))c({many:[L],one:_},!0,y,b,!0);else{var D=l?ht({delay:l(y,b)},s):s;hn(L,_,D),i(L,_,L,_,D)}}else for(var A=ht({dividePath:Eg[t],individualDelay:l&&function(V,R,k,z){return l(V+y,b)}},s),M=S?Mg(w,I,A):Pg(I,w,A),E=M.fromIndividuals,T=M.toIndividuals,C=E.length,P=0;P<C;P++){var D=l?ht({delay:l(P,C)},s):s;i(E[P],T[P],S?w[P]:m.one,S?m.one:w[P],D)}}for(var f=u?u===r:r.length>e.length,h=u?Ui(v,u):Ui(f?e:r,[f?r:e]),d=0,p=0;p<h.length;p++)d+=h[p].many.length;for(var g=0,p=0;p<h.length;p++)c(h[p],f,g,d),g+=h[p].many.length}function ee(r){if(!r)return[];if(H(r)){for(var e=[],t=0;t<r.length;t++)e.push(ee(r[t]));return e}var a=[];return r.traverse(function(n){n instanceof pt&&!n.disableMorphing&&!n.invisible&&!n.ignore&&a.push(n)}),a}var gl=1e4,Ng=bt();function Vg(r){for(var e=r.dimensions,t=0;t<e.length;t++){var a=r.getDimensionInfo(e[t]);if(a&&a.otherDims.itemGroupId===0)return e[t]}}function Zi(r){var e=[];return N(r,function(t){var a=t.data;if(!(a.count()>gl))for(var n=a.getIndices(),i=Vg(a),o=0;o<n.length;o++)e.push({data:a,dim:t.dim||i,divide:t.divide,dataIndex:o})}),e}function ra(r,e,t){r.traverse(function(a){a instanceof pt&&_t(a,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function aa(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function ue(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Rg(r,e,t){var a=Za("update",t,e);a&&r.traverse(function(n){if(n instanceof Pa){var i=ou(n);i&&n.animateFrom({style:i},a)}})}function kg(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++){var n=r[a],i=e[a];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function yl(r,e,t){var a=Zi(r),n=Zi(e);function i(m,S,y,b,x){(y||m)&&S.animateFrom({style:y&&y!==m?W(W({},y.style),m.style):m.style},x)}function o(m){for(var S=0;S<m.length;S++)if(m[S].dim)return m[S].dim}var l=o(a),s=o(n),u=!1;function v(m,S){return function(y){var b=y.data,x=y.dataIndex;if(S)return b.getId(x);var w=b.hostModel&&b.hostModel.get("dataGroupId"),I=m?l||s:s||l,L=I&&b.getDimensionInfo(I),_=L&&L.ordinalMeta;if(L){var D=b.get(L.name,x);return _&&_.categories[D]||D+""}var A=b.getRawDataItem(x);return A&&A.groupId?A.groupId+"":w||b.getId(x)}}var c=kg(a,n),f={};if(!c)for(var h=0;h<n.length;h++){var d=n[h],p=d.data.getItemGraphicEl(d.dataIndex);p&&(f[p.id]=!0)}function g(m,S){var y=a[S],b=n[m],x=b.data.hostModel,w=y.data.getItemGraphicEl(y.dataIndex),I=b.data.getItemGraphicEl(b.dataIndex);if(w===I){I&&Rg(I,b.dataIndex,x);return}w&&f[w.id]||I&&(ue(I),w?(ue(w),aa(w),u=!0,ea(ee(w),ee(I),b.divide,x,m,i)):ra(I,x,m))}new fe(a,n,v(!0,c),v(!1,c),null,"multiple").update(g).updateManyToOne(function(m,S){var y=n[m],b=y.data,x=b.hostModel,w=b.getItemGraphicEl(y.dataIndex),I=It(F(S,function(L){return a[L].data.getItemGraphicEl(a[L].dataIndex)}),function(L){return L&&L!==w&&!f[L.id]});w&&(ue(w),I.length?(N(I,function(L){ue(L),aa(L)}),u=!0,ea(ee(I),ee(w),y.divide,x,m,i)):ra(w,x,y.dataIndex))}).updateOneToMany(function(m,S){var y=a[S],b=y.data.getItemGraphicEl(y.dataIndex);if(!(b&&f[b.id])){var x=It(F(m,function(I){return n[I].data.getItemGraphicEl(n[I].dataIndex)}),function(I){return I&&I!==b}),w=n[m[0]].data.hostModel;x.length&&(N(x,function(I){return ue(I)}),b?(ue(b),aa(b),u=!0,ea(ee(b),ee(x),y.divide,w,m[0],i)):N(x,function(I){return ra(I,w,m[0])}))}}).updateManyToMany(function(m,S){new fe(S,m,function(y){return a[y].data.getId(a[y].dataIndex)},function(y){return n[y].data.getId(n[y].dataIndex)}).update(function(y,b){g(m[y],S[b])}).execute()}).execute(),u&&N(e,function(m){var S=m.data,y=S.hostModel,b=y&&t.getViewOfSeriesModel(y),x=Za("update",y,0);b&&y.isAnimationEnabled()&&x&&x.duration>0&&b.group.traverse(function(w){w instanceof pt&&!w.animators.length&&w.animateFrom({style:{opacity:0}},x)})})}function Yi(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Xi(r){return H(r)?r.sort().join(","):r}function $t(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Gg(r,e){var t=re(),a=re(),n=re();return N(r.oldSeries,function(i,o){var l=r.oldData[o],s=Yi(i),u=Xi(s);a.set(u,l),H(s)&&N(s,function(v){n.set(v,{data:l,key:u})})}),N(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.getData(),l=Yi(i),s=Xi(l),u=a.get(s);if(u)t.set(s,{oldSeries:[{divide:$t(u),data:u}],newSeries:[{divide:$t(o),data:o}]});else if(H(l)){var v=[];N(l,function(h){var d=a.get(h);d&&v.push({divide:$t(d),data:d})}),v.length&&t.set(s,{oldSeries:v,newSeries:[{data:o,divide:$t(o)}]})}else{var c=n.get(l);if(c){var f=t.get(c.key);f||(f={oldSeries:[{data:c.data,divide:$t(c.data)}],newSeries:[]},t.set(c.key,f)),f.newSeries.push({data:o,divide:$t(o)})}}}}),t}function qi(r,e){for(var t=0;t<r.length;t++){var a=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(a)return t}}function zg(r,e,t,a){var n=[],i=[];N(Rt(r.from),function(o){var l=qi(e.oldSeries,o);l>=0&&n.push({data:e.oldData[l],divide:$t(e.oldData[l]),dim:o.dimension})}),N(Rt(r.to),function(o){var l=qi(t.updatedSeries,o);if(l>=0){var s=t.updatedSeries[l].getData();i.push({data:s,divide:$t(s),dim:o.dimension})}}),n.length>0&&i.length>0&&yl(n,i,a)}function Og(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){N(Rt(a.seriesTransition),function(n){N(Rt(n.to),function(i){for(var o=a.updatedSeries,l=0;l<o.length;l++)(i.seriesIndex!=null&&i.seriesIndex===o[l].seriesIndex||i.seriesId!=null&&i.seriesId===o[l].id)&&(o[l][Ir]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,a){var n=Ng(t);if(n.oldSeries&&a.updatedSeries&&a.optionChanged){var i=a.seriesTransition;if(i)N(Rt(i),function(f){zg(f,n,a,t)});else{var o=Gg(n,a);N(o.keys(),function(f){var h=o.get(f);yl(h.oldSeries,h.newSeries,t)})}N(a.updatedSeries,function(f){f[Ir]&&(f[Ir]=!1)})}for(var l=e.getSeries(),s=n.oldSeries=[],u=n.oldData=[],v=0;v<l.length;v++){var c=l[v].getData();c.count()<gl&&(s.push(l[v]),u.push(c))}})}U([lu]);U([su]);U([uu,vu,cu,fu,hu,pu,mv,tc,Tc,Gc,Xc,sf,Rf,qf,ph,xh,Oh,qh,du,ap,gp,Up]);U(gu);U(yu);U(mu);U(sd);U(po);U(Su);U(bu);U(xu);U(wu);U(Io);U(Dd);U(Iu);U(Lu);U(kd);U(Wd);U(jd);U(_u);U(Du);U(Au);U(Tu);U(Cu);U(Mu);U(Pu);U(Eu);U(cg);U(pg);U(Og);U($u);const Bg=Sl({props:{width:{type:String,default:"100%"},height:{type:String,default:"calc(100vh - 78px)"}},setup(){const r=bl(null),{setOptions:e}=Nu(r);return xl(()=>gn(this,null,function*(){const t=yield(yield wl(()=>import("./china.a225b5d5.js"),[])).default;Vu("china",t),e({visualMap:[{min:0,max:1e3,left:"left",top:"bottom",text:["\u9AD8","\u4F4E"],calculable:!1,orient:"horizontal",inRange:{color:["#e0ffff","#006edd"],symbolSize:[30,100]}}],tooltip:{trigger:"item",backgroundColor:"rgba(0, 0, 0, .6)",textStyle:{color:"#fff",fontSize:12}},series:[{name:"iphone4",type:"map",map:"china",label:{show:!0,color:"rgb(249, 249, 249)",fontSize:10},itemStyle:{areaColor:"#2f82ce",borderColor:"#0DAAC1"},data:Ru}]})})),{chartRef:r}}});function $g(r,e,t,a,n,i){return Il(),Ll("div",{ref:"chartRef",style:_l({height:r.height,width:r.width})},null,4)}var Zg=ml(Bg,[["render",$g]]);export{Zg as default};